|
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.LySwingPopupMenu
public class LySwingPopupMenu
This class implements the Popup Menu object (as described in the dtd) for swing viewer.
A context-sensitive menu is a menu which positioning and content depends on the context that made possible to display it. This context depends, most of the time, of an element belonging to a high-level graphical object (tree node, element of a map, line of a list,...). If need be, this context is used as context for the launched action. The context-sensitive menus are available only with the heavy clients viewers.
LySwingMenuBar
,
LyMenu
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
Constructor Summary | |
---|---|
LySwingPopupMenu(LyPopupMenu popupMenu)
Class constructor of a Popup menu object for the Swing target. |
Method Summary | |
---|---|
void |
actionPerformed(LyActionEvent actionEvent)
(non-Javadoc). |
void |
addComponent(LyComponent component,
int pos)
Inserts a sub-component components at given position. |
void |
addItem(java.lang.Object item)
Adds an item at the end of this menu. |
void |
addMenu(java.lang.Object menu)
Adds a menu at the end of the menu. |
void |
addSeparator()
Adds a separator at the end of the menu. |
java.lang.Object |
createPopupMenu()
Create a new popup menu. |
LyActionTransmitter |
getActionTransmitter()
(non-Javadoc). |
java.lang.Object |
getMenu()
Gets the menu component. |
LySelectionTransmitter |
getSelectionTransmitter()
This popup menu doesn't handle selection events, so it has no selection transmitter. |
void |
initialize()
Initializes the popup menu component. |
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)
Removes a sub-component components. |
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 popup menu content by adding the current menu items and the associated event listeners. |
void |
setEnabled(boolean enabled)
Enables or disables this popup 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 LySwingPopupMenu(LyPopupMenu popupMenu)
popupMenu
- a POPUP_MENU component defined for every type of view targets. This popup
menu component is initialized specificaly for the Swing view.Method Detail |
---|
public void initialize()
public void setContent()
public java.lang.Object createPopupMenu()
public void setEnabled(boolean enabled)
setEnabled
in interface LyGraphicalPopupMenu
setEnabled
in interface LySetEnabledInterface
enabled
- the enabled statusLySetEnabledInterface.setEnabled(boolean)
public void addItem(java.lang.Object item)
item
- the new item to addpublic void addMenu(java.lang.Object menu)
menu
- the new menu to addpublic void addSeparator()
public void insertSeparator(int pos)
pos
- the position where the separator will be insertedJMenu.insertSeparator(int)
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)
LyGraphicalPopupMenu
addComponent
in interface LyGraphicalPopupMenu
component
- The components to add to components list.pos
- Position where the sub-component is inserted.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 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 removeComponent(LyComponent component)
LyGraphicalPopupMenu
removeComponent
in interface LyGraphicalPopupMenu
component
- The components to remove to components list.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 |