Groovy Documentation

com.wordpress.tipsforjava.swing
[Java] Class StayOpenRadioButtonMenuItem

java.lang.Object
  java.awt.Component
      java.awt.Container
          javax.swing.JComponent
              javax.swing.AbstractButton
                  javax.swing.JMenuItem
                      javax.swing.JRadioButtonMenuItem
                          com.wordpress.tipsforjava.swing.StayOpenRadioButtonMenuItem

public class StayOpenRadioButtonMenuItem
extends JRadioButtonMenuItem

An extension of JRadioButtonMenuItem that doesn't close the menu when selected.

Authors:
Rob Camick
Darryl Burke


Field Summary
private static MenuElement[] path

 
Fields inherited from class JRadioButtonMenuItem
MODEL_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, MARGIN_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, BORDER_PAINTED_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, CONTENT_AREA_FILLED_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, CENTER, TOP, LEFT, BOTTOM, RIGHT, NORTH, NORTH_EAST, EAST, SOUTH_EAST, SOUTH, SOUTH_WEST, WEST, NORTH_WEST, HORIZONTAL, VERTICAL, LEADING, TRAILING, NEXT, PREVIOUS, WHEN_FOCUSED, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_IN_FOCUSED_WINDOW, UNDEFINED_CONDITION, TOOL_TIP_TEXT_KEY, TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, WIDTH, HEIGHT, PROPERTIES, SOMEBITS, FRAMEBITS, ALLBITS, ERROR, ABORT
 
Fields inherited from class JMenuItem
MODEL_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, MARGIN_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, BORDER_PAINTED_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, CONTENT_AREA_FILLED_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, CENTER, TOP, LEFT, BOTTOM, RIGHT, NORTH, NORTH_EAST, EAST, SOUTH_EAST, SOUTH, SOUTH_WEST, WEST, NORTH_WEST, HORIZONTAL, VERTICAL, LEADING, TRAILING, NEXT, PREVIOUS, WHEN_FOCUSED, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_IN_FOCUSED_WINDOW, UNDEFINED_CONDITION, TOOL_TIP_TEXT_KEY, TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, WIDTH, HEIGHT, PROPERTIES, SOMEBITS, FRAMEBITS, ALLBITS, ERROR, ABORT
 
Constructor Summary
StayOpenRadioButtonMenuItem()

@see JRadioButtonMenuItem#JRadioButtonMenuItem()

StayOpenRadioButtonMenuItem(Action a)

@see JRadioButtonMenuItem#JRadioButtonMenuItem(Action)

StayOpenRadioButtonMenuItem(Icon icon)

@see JRadioButtonMenuItem#JRadioButtonMenuItem(Icon)

StayOpenRadioButtonMenuItem(Icon icon, boolean selected)

@see JRadioButtonMenuItem#JRadioButtonMenuItem(Icon, boolean)

StayOpenRadioButtonMenuItem(String text)

@see JRadioButtonMenuItem#JRadioButtonMenuItem(String)

StayOpenRadioButtonMenuItem(String text, boolean selected)

@see JRadioButtonMenuItem#JRadioButtonMenuItem(String, boolean)

StayOpenRadioButtonMenuItem(String text, Icon icon)

@see JRadioButtonMenuItem#JRadioButtonMenuItem(String, Icon)

StayOpenRadioButtonMenuItem(String text, Icon icon, boolean selected)

@see JRadioButtonMenuItem#JRadioButtonMenuItem(String, Icon, boolean)

 
Method Summary
void doClick(int pressTime)

Overridden to reopen the menu.

 
Methods inherited from class JRadioButtonMenuItem
getAccessibleContext, getUIClassID, getComponent, setEnabled, processKeyEvent, processMouseEvent, setUI, updateUI, setModel, menuSelectionChanged, getSubElements, setAccelerator, setArmed, isArmed, getAccelerator, processMenuDragMouseEvent, processMenuKeyEvent, addMenuDragMouseListener, removeMenuDragMouseListener, getMenuDragMouseListeners, addMenuKeyListener, removeMenuKeyListener, getMenuKeyListeners, setText, setLayout, removeNotify, imageUpdate, setUI, getUI, getModel, addItemListener, removeItemListener, getItemListeners, addActionListener, removeActionListener, getActionListeners, setActionCommand, getActionCommand, setAction, getAction, getSelectedObjects, addChangeListener, removeChangeListener, getChangeListeners, getDisabledIcon, getMnemonic, getDisplayedMnemonicIndex, setDisplayedMnemonicIndex, setMnemonic, setMnemonic, isSelected, setSelected, doClick, doClick, setHorizontalTextPosition, setVerticalTextPosition, getText, setIcon, setFocusPainted, setHorizontalAlignment, setHideActionText, getHideActionText, setMargin, getMargin, getIcon, getPressedIcon, setPressedIcon, getSelectedIcon, setSelectedIcon, getRolloverIcon, setRolloverIcon, getRolloverSelectedIcon, setRolloverSelectedIcon, setDisabledIcon, getDisabledSelectedIcon, setDisabledSelectedIcon, getVerticalAlignment, setVerticalAlignment, getHorizontalAlignment, getVerticalTextPosition, getHorizontalTextPosition, getIconTextGap, setIconTextGap, isBorderPainted, setBorderPainted, isFocusPainted, isContentAreaFilled, setContentAreaFilled, isRolloverEnabled, setRolloverEnabled, setMultiClickThreshhold, getMultiClickThreshhold, getLabel, setLabel, contains, getLocation, print, getSize, isOpaque, enable, disable, update, getY, getX, getInsets, getInsets, setFont, getPreferredSize, getMinimumSize, getMaximumSize, getAlignmentX, getAlignmentY, paint, getListeners, addNotify, setFocusTraversalKeys, requestFocus, requestFocus, firePropertyChange, firePropertyChange, firePropertyChange, isDoubleBuffered, setVisible, setForeground, setBackground, getBounds, reshape, getWidth, getHeight, setPreferredSize, setMinimumSize, setMaximumSize, getBaseline, getBaselineResizeBehavior, getGraphics, getFontMetrics, repaint, repaint, printAll, requestFocusInWindow, addAncestorListener, setInheritsPopupMenu, getInheritsPopupMenu, setComponentPopupMenu, getComponentPopupMenu, isPaintingTile, isPaintingForPrint, isManagingFocus, setNextFocusableComponent, getNextFocusableComponent, setRequestFocusEnabled, isRequestFocusEnabled, grabFocus, setVerifyInputWhenFocusTarget, getVerifyInputWhenFocusTarget, setBorder, getBorder, setAlignmentY, setAlignmentX, setInputVerifier, getInputVerifier, setDebugGraphicsOptions, getDebugGraphicsOptions, registerKeyboardAction, registerKeyboardAction, unregisterKeyboardAction, getRegisteredKeyStrokes, getConditionForKeyStroke, getActionForKeyStroke, resetKeyboardActions, setInputMap, getInputMap, getInputMap, setActionMap, getActionMap, requestDefaultFocus, getDefaultLocale, setDefaultLocale, setToolTipText, getToolTipText, getToolTipText, getToolTipLocation, getPopupLocation, createToolTip, scrollRectToVisible, setAutoscrolls, getAutoscrolls, setTransferHandler, getTransferHandler, getClientProperty, putClientProperty, isLightweightComponent, setOpaque, computeVisibleRect, getVisibleRect, addVetoableChangeListener, removeVetoableChangeListener, getVetoableChangeListeners, getTopLevelAncestor, removeAncestorListener, getAncestorListeners, revalidate, isValidateRoot, isOptimizedDrawingEnabled, paintImmediately, paintImmediately, setDoubleBuffered, getRootPane, add, add, add, add, add, remove, remove, list, list, removeAll, getComponent, invalidate, validate, getComponentCount, countComponents, getComponents, insets, setComponentZOrder, getComponentZOrder, getLayout, doLayout, layout, preferredSize, minimumSize, paintComponents, printComponents, addContainerListener, removeContainerListener, getContainerListeners, deliverEvent, getComponentAt, getComponentAt, locate, getMousePosition, findComponentAt, findComponentAt, isAncestorOf, getFocusTraversalKeys, areFocusTraversalKeysSet, isFocusCycleRoot, isFocusCycleRoot, transferFocusBackward, setFocusTraversalPolicy, getFocusTraversalPolicy, isFocusTraversalPolicySet, setFocusCycleRoot, setFocusTraversalPolicyProvider, isFocusTraversalPolicyProvider, transferFocusDownCycle, applyComponentOrientation, addPropertyChangeListener, addPropertyChangeListener, add, toString, getName, contains, size, getParent, getLocation, remove, setName, list, list, list, getSize, resize, resize, setSize, setSize, enable, location, isValid, setLocale, action, getMousePosition, getGraphicsConfiguration, dispatchEvent, isVisible, isEnabled, isDisplayable, isFocusable, getTreeLock, isLightweight, getPeer, isFocusOwner, transferFocus, getFont, isPreferredSizeSet, isMinimumSizeSet, isMaximumSizeSet, isShowing, handleEvent, postEvent, getFocusCycleRootAncestor, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, setDropTarget, getDropTarget, getToolkit, enableInputMethods, show, show, hide, getForeground, isForegroundSet, getBackground, isBackgroundSet, isFontSet, getLocale, getColorModel, getLocationOnScreen, setLocation, setLocation, move, getBounds, bounds, setBounds, setBounds, setCursor, getCursor, isCursorSet, paintAll, repaint, repaint, repaint, createImage, createImage, createVolatileImage, createVolatileImage, prepareImage, prepareImage, checkImage, checkImage, setIgnoreRepaint, getIgnoreRepaint, inside, addComponentListener, removeComponentListener, getComponentListeners, addFocusListener, removeFocusListener, getFocusListeners, addHierarchyListener, removeHierarchyListener, getHierarchyListeners, addHierarchyBoundsListener, removeHierarchyBoundsListener, getHierarchyBoundsListeners, addKeyListener, removeKeyListener, getKeyListeners, addMouseListener, removeMouseListener, getMouseListeners, addMouseMotionListener, removeMouseMotionListener, getMouseMotionListeners, addMouseWheelListener, removeMouseWheelListener, getMouseWheelListeners, addInputMethodListener, removeInputMethodListener, getInputMethodListeners, getInputMethodRequests, getInputContext, mouseDown, mouseDrag, mouseUp, mouseMove, mouseEnter, mouseExit, keyDown, keyUp, gotFocus, lostFocus, isFocusTraversable, setFocusable, setFocusTraversalKeysEnabled, getFocusTraversalKeysEnabled, nextFocus, transferFocusUpCycle, hasFocus, removePropertyChangeListener, removePropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, setComponentOrientation, getComponentOrientation, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll
 
Methods inherited from class JMenuItem
getComponent, getAccessibleContext, setEnabled, processKeyEvent, processMouseEvent, setUI, updateUI, getUIClassID, setModel, menuSelectionChanged, getSubElements, setAccelerator, setArmed, isArmed, getAccelerator, processMenuDragMouseEvent, processMenuKeyEvent, addMenuDragMouseListener, removeMenuDragMouseListener, getMenuDragMouseListeners, addMenuKeyListener, removeMenuKeyListener, getMenuKeyListeners, setText, setLayout, removeNotify, imageUpdate, setUI, getUI, getModel, addItemListener, removeItemListener, getItemListeners, addActionListener, removeActionListener, getActionListeners, setActionCommand, getActionCommand, setAction, getAction, getSelectedObjects, addChangeListener, removeChangeListener, getChangeListeners, getDisabledIcon, getMnemonic, getDisplayedMnemonicIndex, setDisplayedMnemonicIndex, setMnemonic, setMnemonic, isSelected, setSelected, doClick, doClick, setHorizontalTextPosition, setVerticalTextPosition, getText, setIcon, setFocusPainted, setHorizontalAlignment, setHideActionText, getHideActionText, setMargin, getMargin, getIcon, getPressedIcon, setPressedIcon, getSelectedIcon, setSelectedIcon, getRolloverIcon, setRolloverIcon, getRolloverSelectedIcon, setRolloverSelectedIcon, setDisabledIcon, getDisabledSelectedIcon, setDisabledSelectedIcon, getVerticalAlignment, setVerticalAlignment, getHorizontalAlignment, getVerticalTextPosition, getHorizontalTextPosition, getIconTextGap, setIconTextGap, isBorderPainted, setBorderPainted, isFocusPainted, isContentAreaFilled, setContentAreaFilled, isRolloverEnabled, setRolloverEnabled, setMultiClickThreshhold, getMultiClickThreshhold, getLabel, setLabel, contains, getLocation, print, getSize, isOpaque, enable, disable, update, getY, getX, getInsets, getInsets, setFont, getPreferredSize, getMinimumSize, getMaximumSize, getAlignmentX, getAlignmentY, paint, getListeners, addNotify, setFocusTraversalKeys, requestFocus, requestFocus, firePropertyChange, firePropertyChange, firePropertyChange, isDoubleBuffered, setVisible, setForeground, setBackground, getBounds, reshape, getWidth, getHeight, setPreferredSize, setMinimumSize, setMaximumSize, getBaseline, getBaselineResizeBehavior, getGraphics, getFontMetrics, repaint, repaint, printAll, requestFocusInWindow, addAncestorListener, setInheritsPopupMenu, getInheritsPopupMenu, setComponentPopupMenu, getComponentPopupMenu, isPaintingTile, isPaintingForPrint, isManagingFocus, setNextFocusableComponent, getNextFocusableComponent, setRequestFocusEnabled, isRequestFocusEnabled, grabFocus, setVerifyInputWhenFocusTarget, getVerifyInputWhenFocusTarget, setBorder, getBorder, setAlignmentY, setAlignmentX, setInputVerifier, getInputVerifier, setDebugGraphicsOptions, getDebugGraphicsOptions, registerKeyboardAction, registerKeyboardAction, unregisterKeyboardAction, getRegisteredKeyStrokes, getConditionForKeyStroke, getActionForKeyStroke, resetKeyboardActions, setInputMap, getInputMap, getInputMap, setActionMap, getActionMap, requestDefaultFocus, getDefaultLocale, setDefaultLocale, setToolTipText, getToolTipText, getToolTipText, getToolTipLocation, getPopupLocation, createToolTip, scrollRectToVisible, setAutoscrolls, getAutoscrolls, setTransferHandler, getTransferHandler, getClientProperty, putClientProperty, isLightweightComponent, setOpaque, computeVisibleRect, getVisibleRect, addVetoableChangeListener, removeVetoableChangeListener, getVetoableChangeListeners, getTopLevelAncestor, removeAncestorListener, getAncestorListeners, revalidate, isValidateRoot, isOptimizedDrawingEnabled, paintImmediately, paintImmediately, setDoubleBuffered, getRootPane, add, add, add, add, add, remove, remove, list, list, removeAll, getComponent, invalidate, validate, getComponentCount, countComponents, getComponents, insets, setComponentZOrder, getComponentZOrder, getLayout, doLayout, layout, preferredSize, minimumSize, paintComponents, printComponents, addContainerListener, removeContainerListener, getContainerListeners, deliverEvent, getComponentAt, getComponentAt, locate, getMousePosition, findComponentAt, findComponentAt, isAncestorOf, getFocusTraversalKeys, areFocusTraversalKeysSet, isFocusCycleRoot, isFocusCycleRoot, transferFocusBackward, setFocusTraversalPolicy, getFocusTraversalPolicy, isFocusTraversalPolicySet, setFocusCycleRoot, setFocusTraversalPolicyProvider, isFocusTraversalPolicyProvider, transferFocusDownCycle, applyComponentOrientation, addPropertyChangeListener, addPropertyChangeListener, add, toString, getName, contains, size, getParent, getLocation, remove, setName, list, list, list, getSize, resize, resize, setSize, setSize, enable, location, isValid, setLocale, action, getMousePosition, getGraphicsConfiguration, dispatchEvent, isVisible, isEnabled, isDisplayable, isFocusable, getTreeLock, isLightweight, getPeer, isFocusOwner, transferFocus, getFont, isPreferredSizeSet, isMinimumSizeSet, isMaximumSizeSet, isShowing, handleEvent, postEvent, getFocusCycleRootAncestor, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, setDropTarget, getDropTarget, getToolkit, enableInputMethods, show, show, hide, getForeground, isForegroundSet, getBackground, isBackgroundSet, isFontSet, getLocale, getColorModel, getLocationOnScreen, setLocation, setLocation, move, getBounds, bounds, setBounds, setBounds, setCursor, getCursor, isCursorSet, paintAll, repaint, repaint, repaint, createImage, createImage, createVolatileImage, createVolatileImage, prepareImage, prepareImage, checkImage, checkImage, setIgnoreRepaint, getIgnoreRepaint, inside, addComponentListener, removeComponentListener, getComponentListeners, addFocusListener, removeFocusListener, getFocusListeners, addHierarchyListener, removeHierarchyListener, getHierarchyListeners, addHierarchyBoundsListener, removeHierarchyBoundsListener, getHierarchyBoundsListeners, addKeyListener, removeKeyListener, getKeyListeners, addMouseListener, removeMouseListener, getMouseListeners, addMouseMotionListener, removeMouseMotionListener, getMouseMotionListeners, addMouseWheelListener, removeMouseWheelListener, getMouseWheelListeners, addInputMethodListener, removeInputMethodListener, getInputMethodListeners, getInputMethodRequests, getInputContext, mouseDown, mouseDrag, mouseUp, mouseMove, mouseEnter, mouseExit, keyDown, keyUp, gotFocus, lostFocus, isFocusTraversable, setFocusable, setFocusTraversalKeysEnabled, getFocusTraversalKeysEnabled, nextFocus, transferFocusUpCycle, hasFocus, removePropertyChangeListener, removePropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, setComponentOrientation, getComponentOrientation, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll
 

Field Detail

path

private static MenuElement[] path


 
Constructor Detail

StayOpenRadioButtonMenuItem

public StayOpenRadioButtonMenuItem()
See Also:
JRadioButtonMenuItem.JRadioButtonMenuItem


StayOpenRadioButtonMenuItem

public StayOpenRadioButtonMenuItem(Action a)
See Also:
JRadioButtonMenuItem.JRadioButtonMenuItem


StayOpenRadioButtonMenuItem

public StayOpenRadioButtonMenuItem(Icon icon)
See Also:
JRadioButtonMenuItem.JRadioButtonMenuItem


StayOpenRadioButtonMenuItem

public StayOpenRadioButtonMenuItem(Icon icon, boolean selected)
See Also:
JRadioButtonMenuItem.JRadioButtonMenuItem


StayOpenRadioButtonMenuItem

public StayOpenRadioButtonMenuItem(String text)
See Also:
JRadioButtonMenuItem.JRadioButtonMenuItem


StayOpenRadioButtonMenuItem

public StayOpenRadioButtonMenuItem(String text, boolean selected)
See Also:
JRadioButtonMenuItem.JRadioButtonMenuItem


StayOpenRadioButtonMenuItem

public StayOpenRadioButtonMenuItem(String text, Icon icon)
See Also:
JRadioButtonMenuItem.JRadioButtonMenuItem


StayOpenRadioButtonMenuItem

public StayOpenRadioButtonMenuItem(String text, Icon icon, boolean selected)
See Also:
JRadioButtonMenuItem.JRadioButtonMenuItem


 
Method Detail

doClick

@Override
public void doClick(int pressTime)
Overridden to reopen the menu.
Parameters:
pressTime - the time to "hold down" the button, in milliseconds


 

Groovy Documentation