private void startAnimation() { if(busy != null) { stopAnimation(); } busy = new Timer(delay, new ActionListener() { BusyPainter busyPainter = getBusyPainter(); int frame = busyPainter.getPoints(); public void actionPerformed(ActionEvent e) { frame = (frame+1)%busyPainter.getPoints(); busyPainter.setFrame(direction == Direction.LEFT ? busyPainter.getPoints() - frame : frame); frameChanged(); } }); busy.start(); }
private void startAnimation() { if(busy != null) { stopAnimation(); } busy = new Timer(delay, new ActionListener() { BusyPainter busyPainter = getBusyPainter(); int frame = busyPainter.getPoints(); @Override public void actionPerformed(ActionEvent e) { frame = (frame+1)%busyPainter.getPoints(); busyPainter.setFrame(direction == BusyPainter.Direction.LEFT ? busyPainter.getPoints() - frame : frame); frameChanged(); } }); busy.start(); }
private void startAnimation() { if(busy != null) { stopAnimation(); } busy = new Timer(delay, new ActionListener() { BusyPainter busyPainter = getBusyPainter(); int frame = busyPainter.getPoints(); @Override public void actionPerformed(ActionEvent e) { frame = (frame+1)%busyPainter.getPoints(); busyPainter.setFrame(direction == BusyPainter.Direction.LEFT ? busyPainter.getPoints() - frame : frame); frameChanged(); } }); busy.start(); }
private void startAnimation() { if(busy != null) { stopAnimation(); } busy = new Timer(delay, new ActionListener() { BusyPainter busyPainter = getBusyPainter(); int frame = busyPainter.getPoints(); @Override public void actionPerformed(ActionEvent e) { frame = (frame+1)%busyPainter.getPoints(); busyPainter.setFrame(direction == BusyPainter.Direction.LEFT ? busyPainter.getPoints() - frame : frame); frameChanged(); } }); busy.start(); }
private void startAnimation() { if(busy != null) { stopAnimation(); } busy = new Timer(delay, new ActionListener() { BusyPainter busyPainter = getBusyPainter(); int frame = busyPainter.getPoints(); @Override public void actionPerformed(ActionEvent e) { frame = (frame+1)%busyPainter.getPoints(); busyPainter.setFrame(direction == BusyPainter.Direction.LEFT ? busyPainter.getPoints() - frame : frame); frameChanged(); } }); busy.start(); }
@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(); }
@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(); }
@Override public void removeNotify() { // fix for #698 wasBusyOnNotify = isBusy(); // fix for #626 stopAnimation(); super.removeNotify(); }
/** * <p>Sets whether this <code>JXBusyLabel</code> instance should consider * itself busy. A busy component may indicate that it is busy via animation, * or some other means.</p> * * @param busy whether this <code>JXBusyLabel</code> instance should * consider itself busy */ public void setBusy(boolean busy) { boolean old = isBusy(); if (!old && busy) { startAnimation(); firePropertyChange("busy", old, isBusy()); } else if (old && !busy) { stopAnimation(); firePropertyChange("busy", old, isBusy()); } }
/** * <p>Sets whether this <code>JXBusyLabel</code> instance should consider * itself busy. A busy component may indicate that it is busy via animation, * or some other means.</p> * * @param busy whether this <code>JXBusyLabel</code> instance should * consider itself busy */ public void setBusy(boolean busy) { boolean old = isBusy(); if (!old && busy) { startAnimation(); firePropertyChange("busy", old, isBusy()); } else if (old && !busy) { stopAnimation(); firePropertyChange("busy", old, isBusy()); } }
/** * <p>Sets whether this <code>JXBusyLabel</code> instance should consider * itself busy. A busy component may indicate that it is busy via animation, * or some other means.</p> * * @param busy whether this <code>JXBusyLabel</code> instance should * consider itself busy */ public void setBusy(boolean busy) { boolean old = isBusy(); if (!old && busy) { startAnimation(); firePropertyChange("busy", old, isBusy()); } else if (old && !busy) { stopAnimation(); firePropertyChange("busy", old, isBusy()); } }
/** * <p>Sets whether this <code>JXBusyLabel</code> instance should consider * itself busy. A busy component may indicate that it is busy via animation, * or some other means.</p> * * @param busy whether this <code>JXBusyLabel</code> instance should * consider itself busy */ public void setBusy(boolean busy) { boolean old = isBusy(); if (!old && busy) { startAnimation(); firePropertyChange("busy", old, isBusy()); } else if (old && !busy) { stopAnimation(); firePropertyChange("busy", old, isBusy()); } }
/** * <p>Sets whether this <code>JXBusyLabel</code> instance should consider * itself busy. A busy component may indicate that it is busy via animation, * or some other means.</p> * * @param busy whether this <code>JXBusyLabel</code> instance should * consider itself busy */ public void setBusy(boolean busy) { boolean old = isBusy(); if (!old && busy) { startAnimation(); firePropertyChange("busy", old, isBusy()); } else if (old && !busy) { stopAnimation(); firePropertyChange("busy", old, isBusy()); } }