swingwtx.swing
Class JMenuItem

java.lang.Object
  extended byswingwt.awt.Component
      extended byswingwt.awt.Container
          extended byswingwtx.swing.JComponent
              extended byswingwtx.swing.AbstractButton
                  extended byswingwtx.swing.JSWTMenuComponent
                      extended byswingwtx.swing.JMenuItem
All Implemented Interfaces:
ButtonModel, ImageObserver, ItemSelectable, MenuContainer, SwingConstants
Direct Known Subclasses:
JCheckBoxMenuItem, JRadioButtonMenuItem

public class JMenuItem
extends JSWTMenuComponent
implements ButtonModel


Nested Class Summary
 
Nested classes inherited from class swingwtx.swing.JComponent
JComponent.InternalFrameSelectionListener
 
Field Summary
 
Fields inherited from class swingwtx.swing.JSWTMenuComponent
actionCommand, actionListeners, CANCELED, DESELECTED, menuAction, menuListeners, pAccelerator, peer, pEnabled, pImage, pMnemonic, pNamedAccelerator, pText, SELECTED
 
Fields inherited from class swingwtx.swing.AbstractButton
changeListeners, itemListeners, pAction, pGroup, pHAlign, pHTextPosition, pIcon, pModel, ppeer, pSelection, pVAlign, pVTextPosition
 
Fields inherited from class swingwtx.swing.JComponent
accessibleContext, actionMap, ancestorInputMap, border, clientProperties, descendantHasPeer, focusInputMap, internalFrameAdapter, internalFrameParent, opaque, propertyChangeListeners, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW, windowInputMap
 
Fields inherited from class swingwt.awt.Container
composite, comps, containerListeners, layout, queuedValidateRequest
 
Fields inherited from class swingwt.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListeners, componentName, consumeAvailableHeight, consumeAvailableWidth, focusable, focusListeners, graphicsConfig, inputMethodListeners, isUserSetFont, keyListeners, layoutModifier, LEFT_ALIGNMENT, LOCK, mouseListeners, mouseMotionListeners, mouseWheelListeners, parent, pBackground, pCursor, pDoubleBuffered, pFont, pForeground, pLayoutData, pLocation, pMaxSize, pMinSize, pPrefSize, pSize, pToolTipText, pVisible, RIGHT_ALIGNMENT, swingWTDefaultActionEventAdapter, swingWTEventAdapter, TOP_ALIGNMENT
 
Fields inherited from interface swingwtx.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface swingwt.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JMenuItem()
           
JMenuItem(Action a)
           
JMenuItem(Icon icon)
           
JMenuItem(java.lang.String text)
           
JMenuItem(java.lang.String text, Icon icon)
           
JMenuItem(java.lang.String text, int mnemonic)
           
 
Method Summary
 java.lang.Object[] getSelectedObjects()
           
 boolean isArmed()
           
 boolean isPressed()
           
 boolean isRollover()
           
 boolean isSelected()
           
 void setAction(Action a)
           
 void setArmed(boolean b)
           
 void setPressed(boolean b)
           
 void setRollover(boolean b)
           
 void setSelected(boolean b)
           
 void setSwingWTParent(org.eclipse.swt.widgets.Menu parent, org.eclipse.swt.widgets.Shell shell)
           
 
Methods inherited from class swingwtx.swing.JSWTMenuComponent
addActionListener, addMenuListener, dispose, getActionCommand, getLabel, getMenuPeer, getMnemonic, getText, getToolTipText, isEnabled, processActionEvent, processMenuEvent, registerEvents, removeActionListener, removeMenuListener, requestFocus, setAccelerator, setActionCommand, setCachedProperties, setEnabled, setIcon, setLabel, setMnemonic, setMnemonic, setText, setToolTipText, showMnemonic
 
Methods inherited from class swingwtx.swing.AbstractButton
addChangeListener, addItemListener, getAction, getHorizontalAlignment, getHorizontalTextPosition, getModel, getVerticalAlignment, getVerticalTextPosition, processItemEvent, registerActionEvents, removeChangeListener, removeItemListener, setAction, setBorderPainted, setContentAreaFilled, setDisabledIcon, setFocusPainted, setGroup, setHorizontalAlignment, setHorizontalTextPosition, setModel, setPressedIcon, setRolloverIcon, setRolloverSelectedIcon, setSelectedIcon, setVerticalAlignment, setVerticalTextPosition
 
Methods inherited from class swingwtx.swing.JComponent
add, add, add, add, add, addPropertyChangeListener, addPropertyChangeListener, checkInternalFrameChild, getAccessibleContext, getActionMap, getAutoscrolls, getBorder, getClientProperty, getInputMap, getInsets, getToolTipLocation, getToolTipText, getTopLevelAncestor, getVisibleRect, isDoubleBuffered, isOpaque, isOptimizedDrawingEnabled, isValidateRoot, paint, paintBackground, paintChildren, paintComponent, paintImmediately, paintImmediately, putClientProperty, remove, remove, removePropertyChangeListener, removePropertyChangeListener, repaint, revalidate, scrollRectToVisible, setActionMap, setAutoscrolls, setBorder, setDoubleBuffered, setInputMap, setMargin, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setSwingWTParent
 
Methods inherited from class swingwt.awt.Container
addComponentToLayout, addContainerListener, debug_showContainmentTree, doAdd, doLayout, getComponent, getComponentCount, getComponentOrientation, getComponents, getComposite, getLayout, getMaximumSize, getMinimumSize, getParent, getPreferredSize, invalidate, minimumSize, preferredSize, processContainerEvent, processEvent, queuedValidate, removeAll, removeComponentFromCache, removeContainerListener, setLayout, setLayoutImpl, validate
 
Methods inherited from class swingwt.awt.Component
add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, calculatePreferredSize, componentOnlyDispose, computePreferredSize, contains, contains, createImage, createListenerArrayFromVector, createVolatileImage, dispatchEvent, getAlignmentX, getAlignmentY, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getListeners, getLocation, getLocationOnScreen, getName, getPeer, getPeerSize, getSize, getSize, getSWTPeer, getToolkit, getTreeLock, getWidth, getX, getY, grabFocus, hasFocus, hasSetFont, hide, imageUpdate, inside, isFocusable, isMinimumSizeSet, isShowing, isVisible, processComponentEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, processTraverseEvent, registerComponentEvents, registerExtendedModifyEvents, registerFocusEvents, registerKeyEvents, registerModifyEvents, registerMouseEvents, registerPaintEvents, registerTraversalEvents, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, repaint, repaint, repaint, setAlignmentX, setAlignmentY, setBackground, setBounds, setBounds, setComponentOrientation, setComponentRemoved, setCursor, setFocusable, setFocusTraversalKeysEnabled, setFont, setForeground, setHeight, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setSize, setSize, setVisible, setWidth, show, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface swingwtx.swing.ButtonModel
addActionListener, addChangeListener, addItemListener, getActionCommand, getMnemonic, isEnabled, removeActionListener, removeChangeListener, removeItemListener, setActionCommand, setEnabled, setGroup, setMnemonic
 

Constructor Detail

JMenuItem

public JMenuItem()

JMenuItem

public JMenuItem(Action a)

JMenuItem

public JMenuItem(Icon icon)

JMenuItem

public JMenuItem(java.lang.String text)

JMenuItem

public JMenuItem(java.lang.String text,
                 Icon icon)

JMenuItem

public JMenuItem(java.lang.String text,
                 int mnemonic)
Method Detail

setAction

public void setAction(Action a)
Overrides:
setAction in class AbstractButton

setSwingWTParent

public void setSwingWTParent(org.eclipse.swt.widgets.Menu parent,
                             org.eclipse.swt.widgets.Shell shell)
                      throws java.lang.Exception
Overrides:
setSwingWTParent in class JSWTMenuComponent
Throws:
java.lang.Exception

isSelected

public boolean isSelected()
Specified by:
isSelected in interface ButtonModel
Specified by:
isSelected in class AbstractButton

setSelected

public void setSelected(boolean b)
Specified by:
setSelected in interface ButtonModel
Specified by:
setSelected in class AbstractButton

getSelectedObjects

public java.lang.Object[] getSelectedObjects()
Specified by:
getSelectedObjects in interface ItemSelectable

isArmed

public boolean isArmed()
Specified by:
isArmed in interface ButtonModel

isPressed

public boolean isPressed()
Specified by:
isPressed in interface ButtonModel

isRollover

public boolean isRollover()
Specified by:
isRollover in interface ButtonModel

setArmed

public void setArmed(boolean b)
Specified by:
setArmed in interface ButtonModel

setPressed

public void setPressed(boolean b)
Specified by:
setPressed in interface ButtonModel

setRollover

public void setRollover(boolean b)
Specified by:
setRollover in interface ButtonModel