For IntelliJ IDEA,
Android Studio or Eclipse



@Override public void removeNotify() { // fix for #698 wasBusyOnNotify = isBusy(); // fix for #626 stopAnimation(); super.removeNotify(); }
private void stopAnimation() { if (busy != null) { busy.stop(); getBusyPainter().setFrame(-1); repaint(); busy = null; } }
/** * @param busyPainter the busyPainter to set */ public final void setBusyPainter(BusyPainter busyPainter) { this.busyPainter = busyPainter; initPainter(new Dimension(getIcon().getIconWidth(), getIcon().getIconHeight())); }
/** * Creates a new instance of <code>JXBusyLabel</code> initialized to the arbitrary size and using default circular progress indicator. * @param dim Preferred size of the label. */ public JXBusyLabel(Dimension dim) { super(); this.setPreferredSize(dim); // Initialize the BusyPainter. getBusyPainter(); }
@Override public void addNotify() { super.addNotify(); // fix for #698 if (wasBusyOnNotify) { // fix for #626 startAnimation(); } }
@Override public void actionPerformed(ActionEvent e) { frame = (frame+1)%busyPainter.getPoints(); busyPainter.setFrame(direction == BusyPainter.Direction.LEFT ? busyPainter.getPoints() - frame : frame); frameChanged(); } });
/** * Notification from the <code>UIManager</code> that the L&F has changed. * Replaces the current UI object with the latest version from the * <code>UIManager</code>. * * @see javax.swing.JComponent#updateUI */ @Override public void updateUI() { setUI((LabelUI) LookAndFeelAddons.getUI(this, BusyLabelUI.class)); }
/** * Sets direction of rotation. <code>Direction.RIGHT</code> is the default * value. Direction is taken from the very top point so <code>Direction.RIGHT</code> enables rotation clockwise. * @param dir Direction of rotation. */ public void setDirection(BusyPainter.Direction dir) { direction = dir; getBusyPainter().setDirection(dir); }
@Override public void addNotify() { super.addNotify(); // fix for #698 if (wasBusyOnNotify) { // fix for #626 startAnimation(); } }
private void stopAnimation() { if (busy != null) { busy.stop(); getBusyPainter().setFrame(-1); repaint(); busy = null; } }
/** * Creates a new instance of <code>JXBusyLabel</code> initialized to the arbitrary size and using default circular progress indicator. * @param dim Preferred size of the label. */ public JXBusyLabel(Dimension dim) { super(); this.setPreferredSize(dim); // Initialize the BusyPainter. getBusyPainter(); }
public void actionPerformed(ActionEvent e) { frame = (frame+1)%busyPainter.getPoints(); busyPainter.setFrame(direction == Direction.LEFT ? busyPainter.getPoints() - frame : frame); frameChanged(); } });
/** * @param busyPainter the busyPainter to set */ public final void setBusyPainter(BusyPainter busyPainter) { this.busyPainter = busyPainter; initPainter(new Dimension(getIcon().getIconWidth(), getIcon().getIconHeight())); }
@Override public void removeNotify() { // fix for #698 wasBusyOnNotify = isBusy(); // fix for #626 stopAnimation(); super.removeNotify(); }
@Override public void removeNotify() { // fix for #698 wasBusyOnNotify = isBusy(); // fix for #626 stopAnimation(); super.removeNotify(); }