Class JCommandButton.DefaultPopupButtonModel
java.lang.Object
javax.swing.DefaultButtonModel
org.pushingpixels.radiance.component.api.common.JCommandButton.DefaultPopupButtonModel
- All Implemented Interfaces:
ItemSelectable, Serializable, ButtonModel, PopupButtonModel
- Enclosing class:
JCommandButton
private static class JCommandButton.DefaultPopupButtonModel
extends DefaultButtonModel
implements PopupButtonModel
Extension of the default button model that supports the
PopupButtonModel interface.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate JCommandButtonstatic final intIdentifies the "popup showing" bit in the bitmask, which indicates that the visibility status of the associated popup.Fields inherited from class DefaultButtonModel
actionCommand, ARMED, changeEvent, ENABLED, group, listenerList, mnemonic, PRESSED, ROLLOVER, SELECTED, stateMask -
Constructor Summary
ConstructorsConstructorDescriptionDefaultPopupButtonModel(JCommandButton commandButton) Creates a new default popup button model. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds anPopupActionListenerto the model.protected voidNotifies all listeners that have registered interest for notification on this event type.booleanReturns indication whether the associated popup is showing.voidRemoves anPopupActionListenerfrom the model.voidsetPopupShowing(boolean b) Sets indication on the visibility status of the associated popup.voidsetPressed(boolean b) Methods inherited from class DefaultButtonModel
addActionListener, addChangeListener, addItemListener, fireActionPerformed, fireItemStateChanged, fireStateChanged, getActionCommand, getActionListeners, getChangeListeners, getGroup, getItemListeners, getListeners, getMnemonic, getSelectedObjects, isArmed, isEnabled, isPressed, isRollover, isSelected, removeActionListener, removeChangeListener, removeItemListener, setActionCommand, setArmed, setEnabled, setGroup, setMnemonic, setRollover, setSelectedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ButtonModel
addActionListener, addChangeListener, addItemListener, getActionCommand, getMnemonic, isArmed, isEnabled, isPressed, isRollover, isSelected, removeActionListener, removeChangeListener, removeItemListener, setActionCommand, setArmed, setEnabled, setGroup, setMnemonic, setRollover, setSelectedMethods inherited from interface ItemSelectable
getSelectedObjects
-
Field Details
-
POPUP_SHOWING
public static final int POPUP_SHOWINGIdentifies the "popup showing" bit in the bitmask, which indicates that the visibility status of the associated popup.- See Also:
-
commandButton
-
-
Constructor Details
-
DefaultPopupButtonModel
Creates a new default popup button model.
-
-
Method Details
-
addPopupActionListener
Description copied from interface:PopupButtonModelAdds anPopupActionListenerto the model.- Specified by:
addPopupActionListenerin interfacePopupButtonModel- Parameters:
l- the listener to add
-
removePopupActionListener
Description copied from interface:PopupButtonModelRemoves anPopupActionListenerfrom the model.- Specified by:
removePopupActionListenerin interfacePopupButtonModel- Parameters:
l- the listener to remove
-
firePopupActionPerformed
Notifies all listeners that have registered interest for notification on this event type.- Parameters:
e- theActionEventto deliver to listeners- See Also:
-
setPressed
public void setPressed(boolean b) - Specified by:
setPressedin interfaceButtonModel- Overrides:
setPressedin classDefaultButtonModel
-
isPopupShowing
public boolean isPopupShowing()Description copied from interface:PopupButtonModelReturns indication whether the associated popup is showing.- Specified by:
isPopupShowingin interfacePopupButtonModel- Returns:
trueif the associated popup is showing,falseotherwise.
-
setPopupShowing
public void setPopupShowing(boolean b) Description copied from interface:PopupButtonModelSets indication on the visibility status of the associated popup.- Specified by:
setPopupShowingin interfacePopupButtonModel- Parameters:
b- The visibility status of the associated popup.
-