public void actionPerformed(ActionEvent e) { blurItem.setEnabled(!disablingItem.isSelected()); embossItem.setEnabled(!disablingItem.isSelected()); busyPainterItem.setEnabled(!disablingItem.isSelected()); blurUI.setLocked(disablingItem.isSelected()); embossUI.setLocked(disablingItem.isSelected()); busyPainterUI.setLocked(disablingItem.isSelected()); }
@Override protected void paintLayer(Graphics2D g2, JXLayer<JComponent> l) { super.paintLayer(g2, l); if (isLocked()) { busyPainter.paint(g2, l, l.getWidth(), l.getHeight()); } }
@Override public void setLocked(boolean isLocked) { super.setLocked(isLocked); if (isLocked) { timer.start(); } else { timer.stop(); } }