|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wings.SComponent
org.wings.SAbstractIconTextCompound
org.wings.SAbstractButton
org.wings.SButton
org.wings.SMenuItem
org.wings.SMenu
public class SMenu
Aggregates various SMenuItems under a main header entry.
| Field Summary | |
|---|---|
protected List |
menuItems
|
| Fields inherited from class org.wings.SMenuItem |
|---|
menuParent |
| Fields inherited from class org.wings.SAbstractButton |
|---|
actionCommand, CHECKBOX, IMAGE_BUTTON, RADIOBUTTON, RESET_BUTTON, SUBMIT_BUTTON |
| Fields inherited from class org.wings.SAbstractIconTextCompound |
|---|
changeEvent, changeListener, DISABLED_ICON, DISABLED_SELECTED_ICON, ENABLED_ICON, ICON_COUNT, PRESSED_ICON, ROLLOVER_ICON, ROLLOVER_SELECTED_ICON, SELECTED_ICON, SELECTOR_SELECTED |
| 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 | |
|---|---|
SMenu()
|
|
SMenu(SIcon i)
|
|
SMenu(String text)
|
|
SMenu(String text,
SIcon icon)
|
|
| Method Summary | |
|---|---|
void |
add(SComponent menuItem)
Add a menu item to this menu. |
void |
add(SMenuItem menuItem)
Add a menu item to this menu. |
void |
add(String menuitem)
Add a menu item to this menu. |
void |
addSeparator()
Add a separator to this menu. |
SComponent |
getChild(int index)
gets the n'th child of the menu. |
int |
getChildrenCount()
|
SComponent |
getMenuComponent(int pos)
|
int |
getMenuComponentCount()
Return the number of items on the menu, including separators. |
double |
getWidthScaleFactor()
Returns the scale factor for the width of the Menu components. |
boolean |
isPopupMenuVisible()
Returns true if the menu's popup window is visible. |
void |
remove(int pos)
Removes the menu item at specified index from the menu. |
void |
remove(SComponent comp)
removes a specific menu item component. |
void |
removeAll()
Remove all SMenuItem from this menu. |
void |
setAccelerator(KeyStroke keyStroke)
|
void |
setCG(MenuBarCG cg)
|
void |
setEnabled(boolean enabled)
Set wether this component should be enabled. |
void |
setParentFrame(SFrame f)
Sets the parent frame. |
void |
setPopupMenuVisible(boolean b)
Sets the visibility of the menu's popup. |
void |
setWidthScaleFactor(double widthScaleFactor)
Sets the scale factor for the width of the Menu components. |
void |
writePopup(Device device)
|
| Methods inherited from class org.wings.SMenuItem |
|---|
getAccelerator, getParentMenu, getResidesInForm, isRecursivelyVisible |
| Methods inherited from class org.wings.SButton |
|---|
fireFinalEvents, getSelectionParameter, isSelected, processLowLevelEvent, setGroup |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.wings.LowLevelEventListener |
|---|
getLowLevelEventId, getName, isEnabled |
| Field Detail |
|---|
protected final List menuItems
| Constructor Detail |
|---|
public SMenu(String text)
public SMenu()
public SMenu(SIcon i)
public SMenu(String text,
SIcon icon)
| Method Detail |
|---|
public void add(SMenuItem menuItem)
public void add(SComponent menuItem)
public void addSeparator()
public void setParentFrame(SFrame f)
SComponent
setParentFrame in class SAbstractButtonf - the framepublic void add(String menuitem)
public SComponent getMenuComponent(int pos)
public int getMenuComponentCount()
public void removeAll()
SMenuItem from this menu.
public void remove(int pos)
public void remove(SComponent comp)
public void setCG(MenuBarCG cg)
setCG in class SMenuItempublic void setPopupMenuVisible(boolean b)
b - a boolean value -- true to make the menu visible, false to hide itpublic boolean isPopupMenuVisible()
public double getWidthScaleFactor()
public void setWidthScaleFactor(double widthScaleFactor)
widthScaleFactor - The widthScaleFactor to set.public int getChildrenCount()
public SComponent getChild(int index)
index - the index of the child to return
public void writePopup(Device device)
throws IOException
IOExceptionpublic void setAccelerator(KeyStroke keyStroke)
setAccelerator in class SMenuItempublic void setEnabled(boolean enabled)
SComponent
setEnabled in class SComponentenabled - true if the component is enabled, false otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||