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 thePopupButtonModel
interface.
-
-
Field Summary
Fields Modifier and Type Field Description private JCommandButton
commandButton
static int
POPUP_SHOWING
Identifies 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 void
addPopupActionListener(PopupActionListener l)
Adds anPopupActionListener
to the model.protected void
firePopupActionPerformed(java.awt.event.ActionEvent e)
Notifies all listeners that have registered interest for notification on this event type.boolean
isPopupShowing()
Returns indication whether the associated popup is showing.void
removePopupActionListener(PopupActionListener l)
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, 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:PopupButtonModel
Adds anPopupActionListener
to the model.- Specified by:
addPopupActionListener
in interfacePopupButtonModel
- Parameters:
l
- the listener to add
-
removePopupActionListener
public void removePopupActionListener(PopupActionListener l)
Description copied from interface:PopupButtonModel
Removes anPopupActionListener
from the model.- Specified by:
removePopupActionListener
in 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
- theActionEvent
to deliver to listeners- See Also:
EventListenerList
-
setPressed
public void setPressed(boolean b)
- Specified by:
setPressed
in interfacejavax.swing.ButtonModel
- Overrides:
setPressed
in classjavax.swing.DefaultButtonModel
-
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.
-
-