Class 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 the PopupButtonModel 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.
      • Fields inherited from class javax.swing.DefaultButtonModel

        actionCommand, ARMED, changeEvent, ENABLED, group, listenerList, mnemonic, PRESSED, ROLLOVER, SELECTED, stateMask
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addPopupActionListener​(PopupActionListener l)
      Adds an PopupActionListener 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 an PopupActionListener 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
      • Methods inherited from interface java.awt.ItemSelectable

        getSelectedObjects
    • 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
    • Constructor Detail

      • DefaultPopupButtonModel

        public DefaultPopupButtonModel​(JCommandButton commandButton)
        Creates a new default popup button model.
    • Method Detail

      • firePopupActionPerformed

        protected void firePopupActionPerformed​(java.awt.event.ActionEvent e)
        Notifies all listeners that have registered interest for notification on this event type.
        Parameters:
        e - the ActionEvent to deliver to listeners
        See Also:
        EventListenerList
      • setPressed

        public void setPressed​(boolean b)
        Specified by:
        setPressed in interface javax.swing.ButtonModel
        Overrides:
        setPressed in class javax.swing.DefaultButtonModel
      • isPopupShowing

        public boolean isPopupShowing()
        Description copied from interface: PopupButtonModel
        Returns indication whether the associated popup is showing.
        Specified by:
        isPopupShowing in interface PopupButtonModel
        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 interface PopupButtonModel
        Parameters:
        b - The visibility status of the associated popup.