|
JAC project AOPSYS CEDRIC & LIP6 labs |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JMenuBar | +--org.objectweb.jac.aspects.gui.swing.MenuBar
Field Summary |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
MenuBar()
|
|
MenuBar(ViewFactory factory,
DisplayContext context)
|
Method Summary | |
void |
actionPerformed(ActionEvent event)
|
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 |
close()
Close this view. |
DisplayContext |
getContext()
|
String |
getDescription()
Get the value of description. |
ViewFactory |
getFactory()
Gets the factory. |
String |
getLabel()
Gets the view's label (identifier). |
MethodItem |
getMessage()
Get the value of message. |
static char |
getMnemonic(Container container,
String label)
Returns a mnemonic (keyboard shortcut) not already used |
Object[] |
getParameters()
The parameters that were used to compile the view. |
View |
getParentView()
Get the value of parentView. |
String |
getPosition()
Get the value of position. |
View |
getRootView()
Gets the ancestor view whose parent is null |
String |
getStyle()
Gets the user-defined style for this view. |
String |
getType()
Gets the view type. |
Border |
getViewBorder()
Get the value of viewBorder. |
boolean |
isClosed()
Tells if this view has been closed by the GUI or the user. |
boolean |
isDescendantOf(View ancestor)
Tells wether this view has a given view in its ancestors |
void |
setContext(DisplayContext context)
Sets the display context for this view. |
void |
setDescription(String v)
Set the value of description. |
void |
setFactory(ViewFactory factory)
Sets the factory for this view (WEB, SWING or other supported factory). |
void |
setFocus(FieldItem field,
Object option)
Focus a field of an object's view. |
void |
setHeight(int height)
Sets the prefered height for this view. |
void |
setLabel(String label)
Sets the label (the identifier) of the view. |
void |
setMessage(MethodItem v)
Set the value of message. |
void |
setParameters(Object[] parameters)
Sets the parameters that were used to construct the view. |
void |
setParentView(View v)
Set the value of parentView. |
void |
setPosition(String v)
Set the value of position. |
void |
setStyle(String style)
Sets the view style. |
void |
setType(String type)
Set the view type. |
void |
setViewBorder(Border v)
Set the value of viewBorder. |
void |
setWidth(int width)
Sets the prefered width for this view. |
String |
toString()
|
void |
validate()
Validate this view: its content may be saved when this method is upcalled. |
Methods inherited from class javax.swing.JMenuBar |
add, addNotify, getAccessibleContext, getComponent, getComponentAtIndex, getComponentIndex, getHelpMenu, getMargin, getMenu, getMenuCount, getSelectionModel, getSubElements, getUI, getUIClassID, isBorderPainted, isSelected, menuSelectionChanged, paintBorder, paramString, processKeyBinding, processKeyEvent, processMouseEvent, removeNotify, setBorderPainted, setHelpMenu, setMargin, setSelected, setSelectionModel, setUI, updateUI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MenuBar(ViewFactory factory, DisplayContext context)
public MenuBar()
Method Detail |
public void setStyle(String style)
View
setStyle
in interface View
public String getStyle()
View
getStyle
in interface View
public Border getViewBorder()
getViewBorder
in interface View
public void setViewBorder(Border v)
setViewBorder
in interface View
v
- Value to assign to viewBorder.public String getDescription()
getDescription
in interface View
public void setDescription(String v)
setDescription
in interface View
v
- Value to assign to description.View.setMessage(MethodItem)
public View getParentView()
getParentView
in interface View
CompositeView
public void setParentView(View v)
setParentView
in interface View
v
- Value to assign to parentView.CompositeView
public View getRootView()
View
getRootView
in interface View
public boolean isDescendantOf(View ancestor)
View
isDescendantOf
in interface View
ancestor
- the ancestorpublic MethodItem getMessage()
getMessage
in interface View
public void setMessage(MethodItem v)
setMessage
in interface View
v
- Value to assign to message.View.setDescription(String)
public void setContext(DisplayContext context)
View
The display context contains the factory that is used for this view.
setContext
in interface View
public DisplayContext getContext()
getContext
in interface View
public void setFactory(ViewFactory factory)
View
setFactory
in interface View
public ViewFactory getFactory()
View
getFactory
in interface View
public void setLabel(String label)
View
setLabel
in interface View
label
- a string that identifies the viewpublic String getLabel()
View
getLabel
in interface View
public void setWidth(int width)
View
setWidth
in interface View
public void setHeight(int height)
View
setHeight
in interface View
public void setType(String type)
ViewIdentity
setType
in interface ViewIdentity
public String getType()
ViewIdentity
getType
in interface ViewIdentity
public void setParameters(Object[] parameters)
ViewIdentity
setParameters
in interface ViewIdentity
public Object[] getParameters()
ViewIdentity
getParameters
in interface ViewIdentity
public void close()
View
close
in interface View
public boolean isClosed()
View
isClosed
in interface View
public void validate()
View
validate
in interface View
validate
in class Container
public void setFocus(FieldItem field, Object option)
View
setFocus
in interface View
field
- the field to focusoption
- an extra optionpublic void addSubMenu(String label, String icon, MenuView submenu)
MenuView
addSubMenu
in interface MenuView
label
- the sub-menu's labelicon
- the sub-menu's iconsubmenu
- the submenupublic void addAction(String label, String icon, Callback callback)
MenuView
addAction
in interface MenuView
label
- the sub-menu's labelicon
- the sub-menu's iconcallback
- the actual actionpublic static char getMnemonic(Container container, String label)
label
- the label to get a mnemonic for
public String getPosition()
getPosition
in interface MenuView
Menu
public void setPosition(String v)
setPosition
in interface MenuView
v
- Value to assign to position. If null, use the default
position.Menu
public void addSeparator()
MenuView
addSeparator
in interface MenuView
public String toString()
toString
in class Component
public void actionPerformed(ActionEvent event)
actionPerformed
in interface ActionListener
|
Contact JAC development team: Renaud Pawlak Lionel Seinturier Laurent Martelli |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |