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 JCommandButton
static final int
Identifies the "popup showing" bit in the bitmask, which indicates that the visibility status of the associated popup.Fields inherited from class javax.swing.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 TypeMethodDescriptionvoid
Adds anPopupActionListener
to the model.protected void
Notifies all listeners that have registered interest for notification on this event type.boolean
Returns indication whether the associated popup is showing.void
Removes anPopupActionListener
from the model.void
setPopupShowing
(boolean b) Sets indication on the visibility status of the associated popup.void
setPressed
(boolean b) Methods inherited from class javax.swing.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, setSelected
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.swing.ButtonModel
addActionListener, addChangeListener, addItemListener, getActionCommand, getGroup, getMnemonic, isArmed, isEnabled, isPressed, isRollover, isSelected, removeActionListener, removeChangeListener, removeItemListener, setActionCommand, setArmed, setEnabled, setGroup, setMnemonic, setRollover, setSelected
Methods inherited from interface java.awt.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:PopupButtonModel
Adds anPopupActionListener
to the model.- Specified by:
addPopupActionListener
in interfacePopupButtonModel
- Parameters:
l
- the listener to add
-
removePopupActionListener
Description copied from interface:PopupButtonModel
Removes anPopupActionListener
from the model.- Specified by:
removePopupActionListener
in interfacePopupButtonModel
- Parameters:
l
- the listener to remove
-
firePopupActionPerformed
Notifies all listeners that have registered interest for notification on this event type.- Parameters:
e
- theActionEvent
to deliver to listeners- See Also:
-
setPressed
public void setPressed(boolean b) - Specified by:
setPressed
in interfaceButtonModel
- Overrides:
setPressed
in classDefaultButtonModel
-
isPopupShowing
public boolean isPopupShowing()Description copied from interface:PopupButtonModel
Returns indication whether the associated popup is showing.- Specified by:
isPopupShowing
in interfacePopupButtonModel
- Returns:
true
if the associated popup is showing,false
otherwise.
-
setPopupShowing
public void setPopupShowing(boolean b) Description copied from interface:PopupButtonModel
Sets indication on the visibility status of the associated popup.- Specified by:
setPopupShowing
in interfacePopupButtonModel
- Parameters:
b
- The visibility status of the associated popup.
-