JAC project
AOPSYS
CEDRIC & LIP6 labs

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

java.lang.Object
  |
  +--org.objectweb.jac.aspects.gui.web.AbstractView
        |
        +--org.objectweb.jac.aspects.gui.web.ToolBar
All Implemented Interfaces:
HTMLViewer, MenuListener, MenuView, View, ViewIdentity

public class ToolBar
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
ToolBar(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.
 void genHTML(PrintWriter out)
          Generate the HTML code for the editor.
 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, equals, eventURL, eventURL, genBody, genPage, genStyleSheets, getCloseBorder, getContext, getDescription, getFactory, getId, getId, getLabel, getMessage, getOpenBorder, getParameters, getParentView, getRootView, getStyle, getType, getViewBorder, hashCode, iconElement, iconElement, isClosed, isDescendantOf, isInForm, printAttributes, setAttribute, setColumn, setContext, setDescription, setFactory, setFocus, setHeight, setLabel, setMessage, setParameters, setParentView, setRow, setStyle, setStyleSheet, setTable, setType, setViewBorder, setWidth, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, 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, setHeight, setLabel, setMessage, setParentView, setStyle, setViewBorder, setWidth, validate
 
Methods inherited from interface org.objectweb.jac.aspects.gui.ViewIdentity
getParameters, getType, setParameters, setType
 
Methods inherited from interface org.objectweb.jac.aspects.gui.web.HTMLViewer
setStyleSheet
 

Constructor Detail

ToolBar

public ToolBar(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

genHTML

public void genHTML(PrintWriter out)
Description copied from interface: HTMLViewer
Generate the HTML code for the editor.

Specified by:
genHTML in interface HTMLViewer
Parameters:
out - the writer where to write the HTML code.

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

Contact JAC development team:
Renaud Pawlak
Lionel Seinturier
Laurent Martelli