|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wings.SComponent
org.wings.SContainer
org.wings.SMenuBar
public class SMenuBar
Contains SMenu objects to construct a menu.
When the user selects a SMenu object, its associatedSMenu is displayed, allowing the
user to select one of the SMenuItems on it.
Component are rendered in the order of the container. If a component is right
aligned, every following components are also right aligned. So you have to
sort the components in the order you want and have to take care that te
components are sorted by their horizontal alignment
SMenu,
Serialized Form| Field Summary |
|---|
| Fields inherited from class org.wings.SComponent |
|---|
DONE_RENDERING, dynamicStyles, enabled, propertyChangeSupport, SELECTOR_ALL, START_RENDERING, visible, WHEN_FOCUSED_OR_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_IN_FOCUSED_FRAME |
| Constructor Summary | |
|---|---|
SMenuBar()
Creates a new menu bar. |
|
| Method Summary | |
|---|---|
SMenuItem |
add(SMenu menu)
Appends the specified menu to the end of the menu bar. |
int |
getComponentIndex(SComponent c)
Returns the index of the specified component. |
Insets |
getMargin()
Returns the margin between the menubar's border and its menus. |
SMenu |
getMenu(int index)
Gets the menu at the specified position in the menu bar. |
int |
getMenuCount()
Returns the number of items in the menu bar. |
ArrayList |
getMenus()
|
SingleSelectionModel |
getSelectionModel()
Returns the model object that handles single selections. |
boolean |
isBorderPainted()
Returns true if the Menubar's border should be painted. |
boolean |
isSelected()
Returns true if the MenuBar currently has a component selected |
protected String |
paramString()
Returns a string representation of this SMenuBar. |
void |
remove(SMenu menu)
Removes the specified menu from the menu bar. |
void |
setBorderPainted(boolean b)
Sets whether the border should be painted. |
void |
setCG(MenuBarCG cg)
|
void |
setMargin(Insets m)
Sets the margin between the menubar's border and its menus. |
void |
setSelected(SComponent sel)
Sets the currently selected component, producing a a change to the selection model. |
void |
setSelectionModel(SingleSelectionModel model)
Set the model object to handle single selections. |
| Methods inherited from class org.wings.SContainer |
|---|
add, add, add, add, addComponent, addComponent, addComponent, addComponent, addContainerListener, addNotify, clone, fireContainerEvent, getComponent, getComponentCount, getComponentList, getComponents, getConstraintAt, getConstraintList, getLayout, invite, inviteEachComponent, isShowingChildren, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setCG, setLayout, setParentFrame, updateCG |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SMenuBar()
| Method Detail |
|---|
public SingleSelectionModel getSelectionModel()
SingleSelectionModelpublic void setSelectionModel(SingleSelectionModel model)
model - the SingleSelectionModel to use
description: The selection model, recording which child is selected.SingleSelectionModelpublic SMenuItem add(SMenu menu)
menu - the SMenu component to addpublic void remove(SMenu menu)
menu - the SMenu component to removepublic SMenu getMenu(int index)
index - an int giving the position in the menu bar, where
0 is the first position
public int getMenuCount()
public int getComponentIndex(SComponent c)
c - the SComponent to find
public void setSelected(SComponent sel)
sel - the SComponent to selectpublic boolean isSelected()
public boolean isBorderPainted()
public void setBorderPainted(boolean b)
b - if true and border property is not null, the border is painted.
attribute: visualUpdate true
description: Whether the border should be painted.isBorderPainted()public void setMargin(Insets m)
m - an Insets object containing the margin values
attribute: visualUpdate true
description: The space between the menubar's border and its contentsInsetspublic Insets getMargin()
Insetsprotected String paramString()
null.
paramString in class SComponentpublic void setCG(MenuBarCG cg)
public ArrayList getMenus()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||