/*
  * (non-Javadoc)
  *
  * @see
  * java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent
  * )
  */
 @Override
 public void actionPerformed(ActionEvent e) {
   AbstractButton src = (AbstractButton) e.getSource();
   ButtonModel model = src.getModel();
   model.setArmed(false);
   model.setPressed(false);
   model.setRollover(false);
   model.setSelected(false);
 }
Ejemplo n.º 2
0
 private void resetButtonStatus() {
   for (JButton b : Arrays.asList(deleteButton, copyButton)) {
     ButtonModel m = b.getModel();
     m.setRollover(false);
     m.setArmed(false);
     m.setPressed(false);
     m.setSelected(false);
   }
 }
Ejemplo n.º 3
0
 private void setState(State state) {
   if (state == State.NOT_SELECTED) {
     other.setArmed(false);
     other.setPressed(false);
     other.setSelected(false);
     setToolTipText(tr("false: the property is explicitly switched off"));
   } else if (state == State.SELECTED) {
     other.setArmed(false);
     other.setPressed(false);
     other.setSelected(true);
     setToolTipText(tr("true: the property is explicitly switched on"));
   } else if (state == State.PARTIAL) {
     other.setArmed(true);
     other.setPressed(true);
     other.setSelected(true);
     setToolTipText(
         tr("partial: different selected objects have different values, do not change"));
   } else {
     other.setArmed(true);
     other.setPressed(true);
     other.setSelected(false);
     setToolTipText(tr("unset: do not set this property on the selected objects"));
   }
 }
 @Override
 public void setPressed(boolean b) {
   other.setPressed(b);
 }