Пример #1
0
  /**
   * @param width
   * @param height
   * @param footerF
   * @param footerC
   */
  public LProgressBar(final int width, final int height, final Font footerF, final Color footerC) {
    bar = new JProgressBar(0, 100);
    bar.setSize(width, height);
    bar.setLocation(bar.getWidth() / 2, 0);
    bar.setStringPainted(true);
    bar.setVisible(true);

    status = new LLabel(". . .", footerF, footerC);
    status.setLocation(
        bar.getX() + bar.getWidth() / 2 - status.getWidth() / 2, bar.getY() + bar.getHeight() + 10);

    setSize(bar.getWidth() * 2, status.getY() + status.getHeight());
    add(bar);
    add(status);
    setVisible(true);
  }
Пример #2
0
 /** @param y */
 public void setStatusOffset(int y) {
   status.setLocation(status.getX(), status.getY() + y);
 }
Пример #3
0
 public void addShadow() {
   status.addShadow();
 }
Пример #4
0
 /** @param centered */
 public void setCentered(boolean centered) {
   this.centered = centered;
   status.setLocation(bar.getX(), status.getY());
 }
Пример #5
0
 /** @param label */
 public void setStatusLabel(LLabel label) {
   status.setVisible(false);
   status = label;
 }