Class JCommandButton.DefaultPopupButtonModel
- java.lang.Object
-
- javax.swing.DefaultButtonModel
-
- org.pushingpixels.radiance.component.api.common.JCommandButton.DefaultPopupButtonModel
-
- All Implemented Interfaces:
java.awt.ItemSelectable,java.io.Serializable,javax.swing.ButtonModel,PopupButtonModel
- Enclosing class:
- JCommandButton
private static class JCommandButton.DefaultPopupButtonModel extends javax.swing.DefaultButtonModel implements PopupButtonModel
Extension of the default button model that supports thePopupButtonModelinterface.
-
-
Field Summary
Fields Modifier and Type Field Description private JCommandButtoncommandButtonstatic intPOPUP_SHOWINGIdentifies the "popup showing" bit in the bitmask, which indicates that the visibility status of the associated popup.
-
Constructor Summary
Constructors Constructor Description DefaultPopupButtonModel(JCommandButton commandButton)Creates a new default popup button model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPopupActionListener(PopupActionListener l)Adds anPopupActionListenerto the model.protected voidfirePopupActionPerformed(java.awt.event.ActionEvent e)Notifies all listeners that have registered interest for notification on this event type.booleanisPopupShowing()Returns indication whether the associated popup is showing.voidremovePopupActionListener(PopupActionListener l)Removes anPopupActionListenerfrom the model.voidsetPopupShowing(boolean b)Sets indication on the visibility status of the associated popup.voidsetPressed(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, getMnemonic, isArmed, isEnabled, isPressed, isRollover, isSelected, removeActionListener, removeChangeListener, removeItemListener, setActionCommand, setArmed, setEnabled, setGroup, setMnemonic, setRollover, setSelected
-
-
-
-
Field Detail
-
POPUP_SHOWING
public static final int POPUP_SHOWING
Identifies the "popup showing" bit in the bitmask, which indicates that the visibility status of the associated popup.- See Also:
- Constant Field Values
-
commandButton
private JCommandButton commandButton
-
-
Constructor Detail
-
DefaultPopupButtonModel
public DefaultPopupButtonModel(JCommandButton commandButton)
Creates a new default popup button model.
-
-
Method Detail
-
addPopupActionListener
public void addPopupActionListener(PopupActionListener l)
Description copied from interface:PopupButtonModelAdds anPopupActionListenerto the model.- Specified by:
addPopupActionListenerin interfacePopupButtonModel- Parameters:
l- the listener to add
-
removePopupActionListener
public void removePopupActionListener(PopupActionListener l)
Description copied from interface:PopupButtonModelRemoves anPopupActionListenerfrom the model.- Specified by:
removePopupActionListenerin interfacePopupButtonModel- Parameters:
l- the listener to remove
-
firePopupActionPerformed
protected void firePopupActionPerformed(java.awt.event.ActionEvent e)
Notifies all listeners that have registered interest for notification on this event type.- Parameters:
e- theActionEventto deliver to listeners- See Also:
EventListenerList
-
setPressed
public void setPressed(boolean b)
- Specified by:
setPressedin interfacejavax.swing.ButtonModel- Overrides:
setPressedin classjavax.swing.DefaultButtonModel
-
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.
-
-