org.objectweb.jac.aspects.gui
Interface MenuView

All Superinterfaces:
View, ViewIdentity
All Known Implementing Classes:
AbstractMenu, Menu, Menu, MenuBar, MenuBar, ToolBar, ToolBar

public interface MenuView
extends View

The GUI target independent menu. Submenus, actions, and separators appears in the order they are added into the menu.


Method Summary
 void addAction(String label, String icon, Callback callback)
          Adds an action to this menu.
 void addSeparator()
          Adds a separator in this menu.
 void addSubMenu(String label, String icon, MenuView submenu)
          Adds a sub-menu in this menu.
 String getPosition()
          Gets the position of the menu bar (TOP||BOTTOM||LEFT||RIGHT).
 void setPosition(String position)
          Sets the position of the menu bar (TOP||BOTTOM||LEFT||RIGHT).
 
Methods inherited from interface org.objectweb.jac.aspects.gui.View
close, getContext, getDescription, getFactory, getLabel, getMessage, getParentView, getRootView, getStyle, getViewBorder, isClosed, isDescendantOf, setContext, setDescription, setFactory, setFocus, setLabel, setMessage, setParentView, setSize, setStyle, setViewBorder
 
Methods inherited from interface org.objectweb.jac.aspects.gui.ViewIdentity
equalsView, equalsView, getParameters, getType, setParameters, setType
 

Method Detail

addSubMenu

public void addSubMenu(String label,
                       String icon,
                       MenuView submenu)
Adds a sub-menu in this menu.

Parameters:
label - the sub-menu's label
icon - the sub-menu's icon
submenu - the submenu

addAction

public void addAction(String label,
                      String icon,
                      Callback callback)
Adds an action to this menu.

Parameters:
label - the sub-menu's label
icon - the sub-menu's icon
callback - the actual action

addSeparator

public void addSeparator()
Adds a separator in this menu.


setPosition

public void setPosition(String position)
Sets the position of the menu bar (TOP||BOTTOM||LEFT||RIGHT).

Parameters:
position - the position. If null, use the default position
See Also:
Menu

getPosition

public String getPosition()
Gets the position of the menu bar (TOP||BOTTOM||LEFT||RIGHT).

Returns:
the position
See Also:
Menu