public class SwtMenu extends GralMenu._GraphicImpl
Modifier and Type | Class and Description |
---|---|
(package private) static class |
SwtMenu.ActionUserMenuItem
This class wraps the
GralUserAction for a menu action in Swt. |
Modifier and Type | Field and Description |
---|---|
private org.eclipse.swt.widgets.Menu |
menuSwt
It is the first level of menu hierarchy.
|
protected org.eclipse.swt.widgets.Shell |
window |
widgg
Modifier | Constructor and Description |
---|---|
protected |
SwtMenu(GralMenu gralMenu,
GralWidget widgg,
org.eclipse.swt.widgets.Control parent)
Constructor of a context menu of any widget.
|
protected |
SwtMenu(GralMenu gralMenu,
GralWidget widgg,
org.eclipse.swt.widgets.Shell window)
Constructor for the menu bar of a window.
|
Modifier and Type | Method and Description |
---|---|
void |
_implMenuItem(java.lang.Object oParentMenu,
GralMenu.MenuEntry gralEntry)
Creates the implementation for a menu node or entry.
|
org.eclipse.swt.widgets.Menu |
getMenuImpl()
Returns the implementation instance for the menu.
|
void |
setVisible()
Adds with a given widget.
|
private void |
XXXaddMenuItemGthread(GralWidget widggP,
java.lang.String nameWidg,
java.lang.String sMenuPath,
org.eclipse.swt.events.SelectionListener action)
Adds an action with the menu path to this menu.
|
_implMenu
protected final org.eclipse.swt.widgets.Shell window
private final org.eclipse.swt.widgets.Menu menuSwt
protected SwtMenu(GralMenu gralMenu, GralWidget widgg, org.eclipse.swt.widgets.Control parent)
sName
- parent
- mng
- protected SwtMenu(GralMenu gralMenu, GralWidget widgg, org.eclipse.swt.widgets.Shell window)
sName
- window
- mng
- private void XXXaddMenuItemGthread(GralWidget widggP, java.lang.String nameWidg, java.lang.String sMenuPath, org.eclipse.swt.events.SelectionListener action)
SwtTable
to add a context menu with a special
SelectionListener.nameWidg
- sMenuPath
- action
- public void _implMenuItem(java.lang.Object oParentMenu, GralMenu.MenuEntry gralEntry)
_implMenuItem
in class GralMenu._GraphicImpl
oParentMenu
- return value of getMenuImpl()
or the GralMenu.MenuEntry#menuImpl
, that is a menu node.gralEntry
- The entry in the menu treepublic void setVisible()
GralMenu._GraphicImpl
GralMenu._GraphicImpl.widgg
of the constructor.
Check what is happen. Therefore:setVisible
in class GralMenu._GraphicImpl
public org.eclipse.swt.widgets.Menu getMenuImpl()
GralMenu._GraphicImpl
getMenuImpl
in class GralMenu._GraphicImpl