| java.lang.Object org.wings.SComponent org.wings.SContainer org.wings.SMenuBar
SMenuBar | public class SMenuBar extends SContainer (Code) | | Contains SMenu objects to construct a menu.
When the user selects a SMenu object, its
associated
org.wings.SMenu is displayed, allowing the
user to select one of the
org.wings.SMenuItem s 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
author: Andre Lison author: Armin Haaf See Also: SMenu |
Constructor Summary | |
public | SMenuBar() Creates a new menu bar. |
SMenuBar | public SMenuBar()(Code) | | Creates a new menu bar.
|
add | public SMenuItem add(SMenu menu)(Code) | | Appends the specified menu to the end of the menu bar.
Parameters: menu - the SMenu component to add |
getComponentIndex | public int getComponentIndex(SComponent c)(Code) | | Returns the index of the specified component.
Parameters: c - the SComponent to find an integer giving the component's position, where 0 is first;or -1 if it can't be found |
getMargin | public Insets getMargin()(Code) | | Returns the margin between the menubar's border and
its menus.
an Insets object containing the margin values See Also: Insets |
getMenu | public SMenu getMenu(int index)(Code) | | Gets the menu at the specified position in the menu bar.
Parameters: index - an int giving the position in the menu bar, where0 is the first position the SMenu at that position |
getMenuCount | public int getMenuCount()(Code) | | Returns the number of items in the menu bar.
the number of items in the menu bar |
isBorderPainted | public boolean isBorderPainted()(Code) | | Returns true if the Menubar's border should be painted.
true if the border should be painted, else false |
isSelected | public boolean isSelected()(Code) | | Returns true if the MenuBar currently has a component selected
true if a selection has been made, else false |
paramString | protected String paramString()(Code) | | Returns a string representation of this SMenuBar. This method
is intended to be used only for debugging purposes, and the
content and format of the returned string may vary between
implementations. The returned string may be empty but may not
be null .
a string representation of this SMenuBar. |
remove | public void remove(SMenu menu)(Code) | | Removes the specified menu from the menu bar.
Parameters: menu - the SMenu component to remove |
setBorderPainted | public void setBorderPainted(boolean b)(Code) | | Sets whether the border should be painted.
Parameters: b - if true and border property is not null, the border is painted.attribute: visualUpdate truedescription: Whether the border should be painted. See Also: SMenuBar.isBorderPainted |
setMargin | public void setMargin(Insets m)(Code) | | Sets the margin between the menubar's border and
its menus. Setting to null will cause the menubar to
use the default margins.
Parameters: m - an Insets object containing the margin valuesattribute: visualUpdate truedescription: The space between the menubar's border and its contents See Also: Insets |
setSelected | public void setSelected(SComponent sel)(Code) | | Sets the currently selected component, producing a
a change to the selection model.
Parameters: sel - the SComponent to select |
setSelectionModel | public void setSelectionModel(SingleSelectionModel model)(Code) | | Set the model object to handle single selections.
Parameters: model - the SingleSelectionModel to usedescription: The selection model, recording which child is selected. See Also: SingleSelectionModel |
Methods inherited from org.wings.SContainer | public SComponent add(SComponent c)(Code)(Java Doc) public void add(SComponent c, Object constraint)(Code)(Java Doc) public SComponent add(SComponent c, int index)(Code)(Java Doc) public void add(SComponent c, Object constraint, int index)(Code)(Java Doc) public SComponent addComponent(SComponent c)(Code)(Java Doc) public SComponent addComponent(SComponent c, Object constraint)(Code)(Java Doc) public SComponent addComponent(SComponent c, int index)(Code)(Java Doc) public SComponent addComponent(SComponent c, Object constraint, int index)(Code)(Java Doc) public void addContainerListener(SContainerListener l)(Code)(Java Doc) public void addNotify()(Code)(Java Doc) public Object clone()(Code)(Java Doc) protected void fireContainerEvent(int type, SComponent comp)(Code)(Java Doc) public SComponent getComponent(int i)(Code)(Java Doc) public int getComponentCount()(Code)(Java Doc) protected ArrayList getComponentList()(Code)(Java Doc) public SComponent[] getComponents()(Code)(Java Doc) public Object getConstraintAt(int i)(Code)(Java Doc) protected ArrayList getConstraintList()(Code)(Java Doc) public SLayoutManager getLayout()(Code)(Java Doc) public void invite(ComponentVisitor visitor) throws Exception(Code)(Java Doc) public void inviteEachComponent(ComponentVisitor visitor) throws Exception(Code)(Java Doc) protected boolean isShowingChildren()(Code)(Java Doc) protected void processContainerEvent(SContainerListener listener, SContainerEvent e)(Code)(Java Doc) public void remove(SComponent c)(Code)(Java Doc) public void remove(int index)(Code)(Java Doc) public void removeAll()(Code)(Java Doc) public void removeContainerListener(SContainerListener l)(Code)(Java Doc) public void removeNotify()(Code)(Java Doc) public void setCG(ContainerCG cg)(Code)(Java Doc) public void setLayout(SLayoutManager l)(Code)(Java Doc) protected void setParentFrame(SFrame f)(Code)(Java Doc) public void updateCG()(Code)(Java Doc)
|
Methods inherited from org.wings.SComponent | final public void addComponentListener(SComponentListener l)(Code)(Java Doc) public void addDynamicStyle(Style style)(Code)(Java Doc) final protected void addEventListener(Class<T> type, T listener)(Code)(Java Doc) public void addNotify()(Code)(Java Doc) final public void addParentFrameListener(SParentFrameListener l)(Code)(Java Doc) final public void addRenderListener(SRenderListener renderListener)(Code)(Java Doc) final public void addScriptListener(ScriptListener listener)(Code)(Java Doc) public void addStyle(String additionalCssClassName)(Code)(Java Doc) public Object clone()(Code)(Java Doc) protected void fireComponentChangeEvent(SComponentEvent aEvent)(Code)(Java Doc) public void fireFinalEvents()(Code)(Java Doc) protected void fireKeyEvents()(Code)(Java Doc) final public void fireRenderEvent(int type)(Code)(Java Doc) public ActionMap getActionMap()(Code)(Java Doc) public Color getBackground()(Code)(Java Doc) public SBorder getBorder()(Code)(Java Doc) public ComponentCG getCG()(Code)(Java Doc) final public Object getClientProperty(Object key)(Code)(Java Doc) public SPopupMenu getComponentPopupMenu()(Code)(Java Doc) public Style getDynamicStyle(Selector selector)(Code)(Java Doc) public Collection getDynamicStyles()(Code)(Java Doc) public int getFocusTraversalIndex()(Code)(Java Doc) public SFont getFont()(Code)(Java Doc) public Color getForeground()(Code)(Java Doc) public int getHorizontalAlignment()(Code)(Java Doc) public InputMap getInputMap()(Code)(Java Doc) public InputMap getInputMap(int condition)(Code)(Java Doc) final protected int getListenerCount(Class type)(Code)(Java Doc) final protected Object[] getListenerList()(Code)(Java Doc) final public EventListener[] getListeners(Class<? extends EventListener> type)(Code)(Java Doc) public String getLowLevelEventId()(Code)(Java Doc) final public String getName()(Code)(Java Doc) final public SContainer getParent()(Code)(Java Doc) public SFrame getParentFrame()(Code)(Java Doc) public SDimension getPreferredSize()(Code)(Java Doc) public RequestURL getRequestURL()(Code)(Java Doc) public boolean getResidesInForm()(Code)(Java Doc) public List<ScriptListener> getScriptListenerList()(Code)(Java Doc) public ScriptListener[] getScriptListeners()(Code)(Java Doc) final public Session getSession()(Code)(Java Doc) public boolean getShowAsFormComponent()(Code)(Java Doc) public String getStyle()(Code)(Java Doc) public String getToolTipText()(Code)(Java Doc) public int getVerticalAlignment()(Code)(Java Doc) public void invite(ComponentVisitor visitor) throws Exception(Code)(Java Doc) protected static boolean isDifferent(Object oldObject, Object newObject)(Code)(Java Doc) public boolean isEnabled()(Code)(Java Doc) public boolean isFocusOwner()(Code)(Java Doc) public boolean isRecursivelyVisible()(Code)(Java Doc) public boolean isReloadForced()(Code)(Java Doc) protected boolean isUpdatePossible()(Code)(Java Doc) public boolean isVisible()(Code)(Java Doc) protected String paramString()(Code)(Java Doc) protected void processComponentEvent(SComponentListener listener, SComponentEvent e)(Code)(Java Doc) protected boolean processKeyEvents(String[] values)(Code)(Java Doc) protected void processLowLevelEvent(String name, String[] values)(Code)(Java Doc) final public void putClientProperty(Object key, Object value)(Code)(Java Doc) final void register()(Code)(Java Doc) public void reload()(Code)(Java Doc) final protected void reloadIfChange(Object oldVal, Object newVal)(Code)(Java Doc) final protected void reloadIfChange(int oldVal, int newVal)(Code)(Java Doc) final protected void reloadIfChange(boolean oldVal, boolean newVal)(Code)(Java Doc) final protected void reloadIfChange(byte oldVal, byte newVal)(Code)(Java Doc) final protected void reloadIfChange(short oldVal, short newVal)(Code)(Java Doc) final protected void reloadIfChange(long oldVal, long newVal)(Code)(Java Doc) final protected void reloadIfChange(float oldVal, float newVal)(Code)(Java Doc) final protected void reloadIfChange(double oldVal, double newVal)(Code)(Java Doc) final protected void reloadIfChange(char oldVal, char newVal)(Code)(Java Doc) final public void removeComponentListener(SComponentListener l)(Code)(Java Doc) public void removeDynamicStyle(Selector selector)(Code)(Java Doc) final protected void removeEventListener(Class<T> type, T listener)(Code)(Java Doc) public void removeNotify()(Code)(Java Doc) final public void removeParentFrameListener(SParentFrameListener l)(Code)(Java Doc) final public void removeRenderListener(SRenderListener renderListener)(Code)(Java Doc) final public void removeScriptListener(ScriptListener listener)(Code)(Java Doc) public void removeStyle(String cssStyleClassName)(Code)(Java Doc) public void requestFocus()(Code)(Java Doc) public void scrollRectToVisible(Rectangle aRect)(Code)(Java Doc) public void setActionMap(ActionMap actionMap)(Code)(Java Doc) public void setAttribute(String cssPropertyName, String value)(Code)(Java Doc) public void setAttribute(CSSProperty property, String propertyValue)(Code)(Java Doc) public void setAttribute(Selector selector, CSSProperty property, String propertyValue)(Code)(Java Doc) public void setAttribute(Selector selector, CSSProperty property, SIcon icon)(Code)(Java Doc) public void setAttribute(Selector selector, CSSProperty property, Color color)(Code)(Java Doc) public void setAttributes(Selector selector, CSSAttributeSet attributes)(Code)(Java Doc) public void setBackground(Color color)(Code)(Java Doc) public void setBorder(SBorder border)(Code)(Java Doc) public void setCG(ComponentCG newCG)(Code)(Java Doc) public void setComponentPopupMenu(SPopupMenu popupMenu)(Code)(Java Doc) public void setDynamicStyles(Collection dynamicStyles)(Code)(Java Doc) public void setEnabled(boolean enabled)(Code)(Java Doc) public void setFocusTraversalIndex(int index)(Code)(Java Doc) public void setFont(SFont font)(Code)(Java Doc) public void setForeground(Color color)(Code)(Java Doc) public void setHorizontalAlignment(int alignment)(Code)(Java Doc) public void setInputMap(InputMap inputMap)(Code)(Java Doc) public void setInputMap(int condition, InputMap inputMap)(Code)(Java Doc) public void setName(String uniqueName)(Code)(Java Doc) public void setNameRaw(String uncheckedName)(Code)(Java Doc) public void setParent(SContainer parent)(Code)(Java Doc) protected void setParentFrame(SFrame parentFrame)(Code)(Java Doc) public void setPreferredSize(SDimension preferredSize)(Code)(Java Doc) public void setReloadForced(boolean forced)(Code)(Java Doc) public void setShowAsFormComponent(boolean showAsFormComponent)(Code)(Java Doc) public void setStyle(String cssClassName)(Code)(Java Doc) public void setToolTipText(String t)(Code)(Java Doc) public void setVerticalAlignment(int alignment)(Code)(Java Doc) public void setVisible(boolean visible)(Code)(Java Doc) public String toString()(Code)(Java Doc) final void unregister()(Code)(Java Doc) public void update(Update update)(Code)(Java Doc) public void updateCG()(Code)(Java Doc) public void write(Device s) throws IOException(Code)(Java Doc)
|
|
|