|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.view.graphic.LyGraphicalObject
leon.view.win.swing.LySwingObject
leon.view.win.swing.LySwingMenu
public class LySwingMenu
This class implements the Menu object (as described in the dtd) for swing viewer.
A menu contains a set of menu, sub-menus entries and separators. The menus are available only with the heavy clients (Swing and SWT) viewers.
LySwingMenuBar
,
LyMenu
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
Constructor Summary | |
---|---|
LySwingMenu(LyMenu menu)
Class constructor of a Menu object for the Swing target. |
Method Summary | |
---|---|
void |
actionPerformed(LyActionEvent actionEvent)
(non-Javadoc). |
void |
addComponent(LyComponent component,
int pos)
Adds a new menu item at the specified position. |
void |
addItem(java.lang.Object item)
Adds an item at the end of this menu. |
void |
addMenu(java.lang.Object menu)
Adds a sub-menu at the end of this menu. |
void |
addSeparator()
Adds a separator at the end of this menu. |
java.lang.Object |
createMenu()
Creates and configures the component that display this menu. |
LyActionTransmitter |
getActionTransmitter()
(non-Javadoc). |
java.lang.Object |
getMenu()
Gets the menu component. |
LySelectionTransmitter |
getSelectionTransmitter()
This menu doesn't handle selection events, so it has no selection transmitter. |
void |
initialize()
Initializes the current menu. |
void |
insertItem(java.lang.Object item,
int pos)
Adds an item at the specified position in this menu. |
void |
insertMenu(java.lang.Object menu,
int pos)
Adds a sub-menu at the specified position in this menu. |
void |
insertSeparator(int pos)
Inserts a separator at the specified position in this menu. |
void |
removeComponent(LyComponent component)
(non-Javadoc). |
void |
removeItem(java.lang.Object item)
Removes an item from this menu. |
void |
removeMenu(java.lang.Object menu)
Removes a menu from this menu. |
void |
setContent()
Sets the menu items of this menu. |
void |
setEnabled(boolean enabled)
Enables or disables this menu. |
void |
setLabel(java.lang.String label)
Sets the menu label of this menu. |
void |
setMnemonic(char mnemonic)
Sets the mnemonic of this menu. |
Methods inherited from class leon.view.win.swing.LySwingObject |
---|
getBounds, getChildrenBounds, getComponent, getDefaultFrame |
Methods inherited from class leon.view.graphic.LyGraphicalObject |
---|
expand, free, getController, getEnv, getEnvironment, getIdCode, getIntResource, getMessage, getMessage, getResource, getString, getString, getString, getViewComponent, getViewManager, isFreed, isFreeing, isImageAnimated, processDemand, processDemand, testResource, translate |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface leon.view.graphic.LyGraphicalComponent |
---|
free, getViewComponent |
Field Detail |
---|
public static final java.lang.String __VERSION
Constructor Detail |
---|
public LySwingMenu(LyMenu menu)
menu
- a MENU component defined for every type of view targets. This menu is initialized
for the swing view and its attributes are configured with the default values.Method Detail |
---|
public void initialize()
public void setContent()
public java.lang.Object createMenu()
public java.lang.Object getMenu()
public void actionPerformed(LyActionEvent actionEvent)
actionPerformed
in interface LyActionListener
LyActionListener.actionPerformed(leon.view.event.LyActionEvent)
public LyActionTransmitter getActionTransmitter()
getActionTransmitter
in interface LyEventTransmitter
LyEventTransmitter.getActionTransmitter()
public LySelectionTransmitter getSelectionTransmitter()
getSelectionTransmitter
in interface LyEventTransmitter
null
LyEventTransmitter.getSelectionTransmitter()
public void addComponent(LyComponent component, int pos)
addComponent
in interface LyGraphicalMenu
component
- a menu item to add to this menu. null
adds a separator.pos
- the position of this menu item in the menuLyGraphicalMenu.addComponent(leon.view.LyComponent, int)
public void removeComponent(LyComponent component)
removeComponent
in interface LyGraphicalMenu
component
- The components to remove to components list.LyGraphicalMenu.removeComponent(leon.view.LyComponent)
public void setEnabled(boolean enabled)
setEnabled
in interface LyGraphicalMenu
setEnabled
in interface LySetEnabledInterface
enabled
- Indicates if the menu is enabled or notLyGraphicalMenu.setEnabled(boolean)
,
JMenuItem.setEnabled(boolean)
public void setLabel(java.lang.String label)
label
- the new value of the menu labelAbstractButton.setText(String)
public void setMnemonic(char mnemonic)
mnemonic
- the new value of the mnemonicAbstractButton.setMnemonic(char)
public void addItem(java.lang.Object item)
item
- the menu item to add to this menuJMenu.add(JMenuItem)
public void insertItem(java.lang.Object item, int pos)
item
- the menu item to add to this menupos
- the position where the sub-component is insertedJMenu.insert(javax.swing.JMenuItem, int)
public void addMenu(java.lang.Object menu)
menu
- the sub-menu to add in this menuJMenu.add(JMenuItem)
public void insertMenu(java.lang.Object menu, int pos)
menu
- the sub-menu to add in this menupos
- the position where the sub-component is insertedJMenu.insert(javax.swing.JMenuItem, int)
public void addSeparator()
JMenu.addSeparator()
public void insertSeparator(int pos)
pos
- the position where the separator will be insertedJMenu.insertSeparator(int)
public void removeItem(java.lang.Object item)
item
- the menu item to removeJMenu.remove(javax.swing.JMenuItem)
public void removeMenu(java.lang.Object menu)
menu
- the menu to removeJMenu.remove(javax.swing.JMenuItem)
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |