public void actionPerformed(java.awt.event.ActionEvent ev) { setBooleanState(!getBooleanState()); } }
/** Set the current state. * Fires a change event, which should be used to affect other components when * its state is toggled. * @param value <code>true</code> to turn on, <code>false</code> to turn off */ public void setBooleanState(boolean value) { Boolean newValue = value ? Boolean.TRUE : Boolean.FALSE; Boolean oldValue = (Boolean) putProperty(PROP_BOOLEAN_STATE, newValue); firePropertyChange(PROP_BOOLEAN_STATE, oldValue, newValue); }
/** Get the current state. * @return <code>true</code> if on */ public boolean getBooleanState() { return getProperty(PROP_BOOLEAN_STATE).equals(Boolean.TRUE); }
protected void initialize() { putProperty(PROP_BOOLEAN_STATE, Boolean.TRUE); super.initialize(); }
/** @param changedProperty the name of property that has changed * or null if it is not known */ @Override public void updateState(String changedProperty) { super.updateState(changedProperty); if ((changedProperty == null) || changedProperty.equals(BooleanStateAction.PROP_BOOLEAN_STATE)) { button.setSelected(((BooleanStateAction) action).getBooleanState()); } } }
/** Popup menu */ public CheckMenuBridge(JCheckBoxMenuItem item, BooleanStateAction action, boolean popup) { super(item, action); this.popup = popup; if (popup) { prepareMargins(item, action); } Object base = action.getValue("iconBase"); //NOI18N Object i = null; if (action instanceof SystemAction) { i = action.getValue(SystemAction.PROP_ICON); } else { i = action.getValue(Action.SMALL_ICON); } hasOwnIcon = (base != null) || (i != null); }
protected void initialize() { putProperty(PROP_BOOLEAN_STATE, Boolean.TRUE); super.initialize(); }
/** @param changedProperty the name of property that has changed * or null if it is not known */ public void updateState (String changedProperty) { super.updateState (changedProperty); if (changedProperty == null || changedProperty.equals (BooleanStateAction.PROP_BOOLEAN_STATE)) { button.setSelected (((BooleanStateAction)action).getBooleanState ()); } }
/** Popup menu */ public CheckMenuBridge (JCheckBoxMenuItem item, BooleanStateAction action, boolean popup) { super (item, action); this.popup = popup; if (popup) { prepareMargins (item, action); } Object base = action.getValue("iconBase"); //NOI18N Object i = null; if (action instanceof SystemAction) { i = action.getValue (SystemAction.PROP_ICON); } else { i = action.getValue (Action.SMALL_ICON); } hasOwnIcon = (base != null) || (i != null); }
public void actionPerformed(java.awt.event.ActionEvent ev) { setBooleanState(!getBooleanState()); } }
/** Set the current state. * Fires a change event, which should be used to affect other components when * its state is toggled. * @param value <code>true</code> to turn on, <code>false</code> to turn off */ public void setBooleanState(boolean value) { Boolean newValue = value ? Boolean.TRUE : Boolean.FALSE; Boolean oldValue = (Boolean) putProperty(PROP_BOOLEAN_STATE, newValue); firePropertyChange(PROP_BOOLEAN_STATE, oldValue, newValue); }
/** Get the current state. * @return <code>true</code> if on */ public boolean getBooleanState() { return getProperty(PROP_BOOLEAN_STATE).equals(Boolean.TRUE); }
protected void initialize () { putProperty(PROP_BOOLEAN_STATE, Boolean.TRUE); super.initialize(); }
/** @param changedProperty the name of property that has changed * or null if it is not known */ public void updateState (String changedProperty) { super.updateState (changedProperty); if (changedProperty == null || changedProperty.equals (BooleanStateAction.PROP_BOOLEAN_STATE)) { button.setSelected (((BooleanStateAction)action).getBooleanState ()); } }
/** Popup menu */ public CheckMenuBridge (JCheckBoxMenuItem item, BooleanStateAction action, boolean popup) { super (item, action); this.popup = popup; if (popup) { prepareMargins (item, action); } Object base = action.getValue("iconBase"); //NOI18N Object i = null; if (action instanceof SystemAction) { i = action.getValue (SystemAction.PROP_ICON); } else { i = action.getValue (Action.SMALL_ICON); } hasOwnIcon = (base != null) || (i != null); }
public void actionPerformed (java.awt.event.ActionEvent ev) { setBooleanState (!getBooleanState ()); } }
/** Set the current state. * Fires a change event, which should be used to affect other components when * its state is toggled. * @param value <code>true</code> to turn on, <code>false</code> to turn off */ public void setBooleanState(boolean value) { Boolean newValue = value ? Boolean.TRUE : Boolean.FALSE; Boolean oldValue = (Boolean)putProperty (PROP_BOOLEAN_STATE, newValue); firePropertyChange(PROP_BOOLEAN_STATE, oldValue, newValue); }
/** Get the current state. * @return <code>true</code> if on */ public boolean getBooleanState() { return getProperty (PROP_BOOLEAN_STATE).equals (Boolean.TRUE); }
protected void initialize() { putProperty(PROP_BOOLEAN_STATE, Boolean.TRUE); super.initialize(); }
public void actionPerformed(java.awt.event.ActionEvent ev) { setBooleanState(!getBooleanState()); } }