/** * @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); }
/** @param y */ public void setStatusOffset(int y) { status.setLocation(status.getX(), status.getY() + y); }
public void addShadow() { status.addShadow(); }
/** @param centered */ public void setCentered(boolean centered) { this.centered = centered; status.setLocation(bar.getX(), status.getY()); }
/** @param label */ public void setStatusLabel(LLabel label) { status.setVisible(false); status = label; }