org.objectweb.jac.aspects.gui.web
Class AbstractMenu

java.lang.Object
  extended byorg.objectweb.jac.aspects.gui.web.AbstractView
      extended byorg.objectweb.jac.aspects.gui.web.AbstractMenu
All Implemented Interfaces:
HTMLViewer, MenuListener, MenuView, View, ViewIdentity
Direct Known Subclasses:
Menu, MenuBar

public abstract class AbstractMenu
extends AbstractView
implements MenuView, HTMLViewer, MenuListener


Field Summary
 
Fields inherited from class org.objectweb.jac.aspects.gui.web.AbstractView
column, context, description, height, isCellViewer, label, parentView, row, table, width
 
Constructor Summary
AbstractMenu(ViewFactory factory, DisplayContext context)
           
 
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()
          Get the value of position.
 void onMenuClick(String key)
          Called when the user clicks on an item.
 void setPosition(String v)
          Set the value of position.
 
Methods inherited from class org.objectweb.jac.aspects.gui.web.AbstractView
close, closeForm, equalsView, equalsView, eventURL, eventURL, genBody, genEventAndActionButton, genPage, genStyleSheets, getBaseURL, getCloseBorder, getContext, getDescription, getFactory, getId, getId, getLabel, getMessage, getOpenBorder, getParameters, getParentView, getRootView, getStyle, getType, getViewBorder, iconElement, iconElement, isClosed, isDescendantOf, isInForm, openForm, printAttributes, setAttribute, setColumn, setContext, setDescription, setFactory, setFocus, setLabel, setMessage, setParameters, setParentView, setRow, setSize, setStyle, setStyleSheet, setTable, setType, setViewBorder, showButton, showFormButtons, showFormButtons
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
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
 
Methods inherited from interface org.objectweb.jac.aspects.gui.web.HTMLViewer
genHTML, setStyleSheet
 

Constructor Detail

AbstractMenu

public AbstractMenu(ViewFactory factory,
                    DisplayContext context)
Method Detail

addSubMenu

public void addSubMenu(String label,
                       String icon,
                       MenuView submenu)
Description copied from interface: MenuView
Adds a sub-menu in this menu.

Specified by:
addSubMenu in interface MenuView
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)
Description copied from interface: MenuView
Adds an action to this menu.

Specified by:
addAction in interface MenuView
Parameters:
label - the sub-menu's label
icon - the sub-menu's icon
callback - the actual action

addSeparator

public void addSeparator()
Description copied from interface: MenuView
Adds a separator in this menu.

Specified by:
addSeparator in interface MenuView

getPosition

public String getPosition()
Get the value of position.

Specified by:
getPosition in interface MenuView
Returns:
value of position.
See Also:
Menu

setPosition

public void setPosition(String v)
Set the value of position.

Specified by:
setPosition in interface MenuView
Parameters:
v - Value to assign to position.
See Also:
Menu

onMenuClick

public void onMenuClick(String key)
Description copied from interface: MenuListener
Called when the user clicks on an item.

Specified by:
onMenuClick in interface MenuListener
Parameters:
key - the item that was clicked on