|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object swingwt.awt.Component swingwt.awt.Container swingwtx.swing.JComponent swingwtx.swing.AbstractButton swingwtx.swing.JSWTMenuComponent
Nested Class Summary |
Nested classes inherited from class swingwtx.swing.JComponent |
JComponent.InternalFrameSelectionListener |
Field Summary | |
protected java.lang.String |
actionCommand
Action command |
protected java.util.Vector |
actionListeners
Action Listener objects |
protected static int |
CANCELED
|
protected static int |
DESELECTED
|
protected Action |
menuAction
Swing action used to generate the component |
protected java.util.Vector |
menuListeners
Menu Listener objects |
protected int |
pAccelerator
Cache value |
protected org.eclipse.swt.widgets.MenuItem |
peer
The SWT peer this component is representing |
protected boolean |
pEnabled
Cache value |
protected Icon |
pImage
Cache value |
protected char |
pMnemonic
Cache value |
protected java.lang.String |
pNamedAccelerator
|
protected java.lang.String |
pText
Cache value |
protected static int |
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 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 | |
JSWTMenuComponent()
|
Method Summary | |
void |
addActionListener(ActionListener l)
Add an ActionListener to this component |
void |
addMenuListener(MenuListener l)
|
void |
dispose()
Destroys the component |
java.lang.String |
getActionCommand()
If the action command is null, return the button text like Swing |
java.lang.String |
getLabel()
Deprecated. - Replaced by getText |
org.eclipse.swt.widgets.Widget |
getMenuPeer()
Returns the SWT Menu peer |
int |
getMnemonic()
|
java.lang.String |
getText()
|
java.lang.String |
getToolTipText()
Returns the tooltip text used on the component |
boolean |
isEnabled()
Returns true if the component is enabled |
void |
processActionEvent(int id)
Sends action events to listeners |
void |
processMenuEvent(int id)
Sends menu events to listeners |
void |
registerEvents()
When the component has been added to a container, this routine gets called to tell it to set up SWT listeners for all its events. |
void |
removeActionListener(ActionListener l)
Remove an ActionListener from the component |
void |
removeMenuListener(MenuListener l)
|
void |
requestFocus()
Unworkable on native platforms |
void |
setAccelerator(KeyStroke k)
Handles registering of accelerator keys for menu items. |
void |
setActionCommand(java.lang.String command)
Sets the action command for this component |
void |
setCachedProperties()
If the component has just been added to a container, but properties were set in the meantime, this routine gets called by JMenu/JMenuBar to set the cached properties. |
void |
setEnabled(boolean b)
Change the enabled state of the component |
void |
setIcon(Icon icon)
|
void |
setLabel(java.lang.String label)
Deprecated. - Replaced by setText |
void |
setMnemonic(char mnemonic)
|
void |
setMnemonic(int mnemonic)
|
void |
setSwingWTParent(org.eclipse.swt.widgets.Menu parent,
org.eclipse.swt.widgets.Shell shell)
|
void |
setText(java.lang.String text)
|
void |
setToolTipText(java.lang.String tip)
Sets the tooltip text used on the component - overridden here, so that if we have a mnemonic, we can tack it on the end. |
protected void |
showMnemonic()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.eclipse.swt.widgets.MenuItem peer
protected boolean pEnabled
protected Icon pImage
protected char pMnemonic
protected int pAccelerator
protected java.lang.String pNamedAccelerator
protected java.lang.String pText
protected java.lang.String actionCommand
protected Action menuAction
protected java.util.Vector actionListeners
protected java.util.Vector menuListeners
protected static final int SELECTED
protected static final int DESELECTED
protected static final int CANCELED
Constructor Detail |
public JSWTMenuComponent()
Method Detail |
public void setIcon(Icon icon)
setIcon
in class AbstractButton
public void addMenuListener(MenuListener l)
public void removeMenuListener(MenuListener l)
public int getMnemonic()
getMnemonic
in class AbstractButton
public void setMnemonic(char mnemonic)
setMnemonic
in class AbstractButton
public void setMnemonic(int mnemonic)
setMnemonic
in class AbstractButton
public java.lang.String getLabel()
getText
public void setLabel(java.lang.String label)
setText
public java.lang.String getText()
getText
in class AbstractButton
public void setText(java.lang.String text)
setText
in class AbstractButton
public java.lang.String getToolTipText()
Component
getToolTipText
in class Component
public void setToolTipText(java.lang.String tip)
AbstractButton
setToolTipText
in class AbstractButton
public java.lang.String getActionCommand()
AbstractButton
getActionCommand
in class AbstractButton
public void setActionCommand(java.lang.String command)
Component
setActionCommand
in class Component
protected void showMnemonic()
showMnemonic
in class AbstractButton
public void setSwingWTParent(org.eclipse.swt.widgets.Menu parent, org.eclipse.swt.widgets.Shell shell) throws java.lang.Exception
java.lang.Exception
public void setAccelerator(KeyStroke k)
public org.eclipse.swt.widgets.Widget getMenuPeer()
public void setEnabled(boolean b)
setEnabled
in class Component
public boolean isEnabled()
isEnabled
in class Component
public void dispose()
dispose
in class JComponent
public void requestFocus()
requestFocus
in class Component
public void addActionListener(ActionListener l)
ActionListener
to this component
addActionListener
in class Component
public void removeActionListener(ActionListener l)
ActionListener
from the component
removeActionListener
in class Component
public void processActionEvent(int id)
processActionEvent
in class AbstractButton
public void processMenuEvent(int id)
public void registerEvents()
registerEvents
in class Component
public void setCachedProperties()
setCachedProperties
in class Component
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |