@Override
 public void itemStateChanged(ItemEvent e) {
   Object source = e.getItemSelectable();
   CPArtwork artwork = controller.getArtwork();
   if (source == cbSampleAllLayers) {
     artwork.setSampleAllLayers(e.getStateChange() == ItemEvent.SELECTED);
   } else if (source == cbLockAlpha) {
     artwork.setLockAlpha(e.getStateChange() == ItemEvent.SELECTED);
   }
 }
示例#2
0
 public void itemStateChanged(ItemEvent ev) {
   boolean selected = (ev.getStateChange() == ItemEvent.SELECTED);
   AbstractButton button = (AbstractButton) ev.getItemSelectable();
   String command = button.getActionCommand();
 }