EchoPoint
2.1.0rc5

echopointng
Class MenuBar

java.lang.Object
  extended by nextapp.echo2.app.Component
      extended by nextapp.echo2.app.button.AbstractButton
          extended by nextapp.echo2.app.Button
              extended by echopointng.ButtonEx
                  extended by echopointng.MenuItem
                      extended by echopointng.Menu
                          extended by echopointng.MenuBar
All Implemented Interfaces:
AccessKeyable, Attributeable, Borderable, Delegateable, Heightable, Insetable, MouseCursorable, Positionable, Sizeable, ToolTipable, Widthable, Serializable, RenderIdSupport

public class MenuBar
extends Menu
implements Positionable

The MenuBar class provides a Component that contains other Menu objects and MenuItem objects. Its underlying ButtonEx text and icon properties are never rendered.

The styleChildren property can be used to help ensure consistent visual properties between parent and child Menu's. When this is true, the visual properties of the parent Menu will be transfered to the child Menu or MenuItem.

Author:
Brad Baker
See Also:
Serialized Form

Field Summary
static Style DEFAULT_STYLE
          This DEFAULT_STYLE is applied to the MenuBar to give it a series of borders and background colors
 
Fields inherited from class echopointng.Menu
DEFAULT_SUBMENU_IMAGE, OPEN_ON_CLICK, OPEN_ON_MOUSEOVER, OPEN_ON_SUBMENU_CLICK, PROPERTY_BACKGROUND_IMAGE, PROPERTY_DRAW_OUTER_BORDERS, PROPERTY_HORIZONTAL, PROPERTY_KEEP_ALIVE, PROPERTY_LEFT_OFFSET, PROPERTY_MENU_ALWAYS_ON_TOP, PROPERTY_MENU_BACKGROUND, PROPERTY_MENU_BACKGROUND_IMAGE, PROPERTY_MENU_BORDER, PROPERTY_MENU_FOREGROUND, PROPERTY_MENU_INSETS, PROPERTY_MENU_OUTSETS, PROPERTY_OPEN_OPTION, PROPERTY_PROPERTY_CHILDREN, PROPERTY_STYLE_CHILDREN, PROPERTY_SUBMENU_IMAGE, PROPERTY_SUBMENU_IMAGE_ALIGNMENT, PROPERTY_SUBMENU_IMAGE_BORDERED, PROPERTY_SUBMENU_ROLLOVER_IMAGE, PROPERTY_TOP_OFFSET
 
Fields inherited from class echopointng.ButtonEx
PROPERTY_INTERPRET_NEWLINES
 
Fields inherited from class nextapp.echo2.app.button.AbstractButton
ACTION_LISTENERS_CHANGED_PROPERTY, INPUT_CLICK, PROPERTY_ALIGNMENT, PROPERTY_BORDER, PROPERTY_DISABLED_BACKGROUND, PROPERTY_DISABLED_BACKGROUND_IMAGE, PROPERTY_DISABLED_BORDER, PROPERTY_DISABLED_FONT, PROPERTY_DISABLED_FOREGROUND, PROPERTY_DISABLED_ICON, PROPERTY_HEIGHT, PROPERTY_ICON, PROPERTY_ICON_TEXT_MARGIN, PROPERTY_INSETS, PROPERTY_LINE_WRAP, PROPERTY_MODEL, PROPERTY_PRESSED_BACKGROUND, PROPERTY_PRESSED_BACKGROUND_IMAGE, PROPERTY_PRESSED_BORDER, PROPERTY_PRESSED_ENABLED, PROPERTY_PRESSED_FONT, PROPERTY_PRESSED_FOREGROUND, PROPERTY_PRESSED_ICON, PROPERTY_ROLLOVER_BACKGROUND, PROPERTY_ROLLOVER_BACKGROUND_IMAGE, PROPERTY_ROLLOVER_BORDER, PROPERTY_ROLLOVER_ENABLED, PROPERTY_ROLLOVER_FONT, PROPERTY_ROLLOVER_FOREGROUND, PROPERTY_ROLLOVER_ICON, PROPERTY_TEXT, PROPERTY_TEXT_ALIGNMENT, PROPERTY_TEXT_POSITION, PROPERTY_TOOL_TIP_TEXT, PROPERTY_WIDTH
 
Fields inherited from class nextapp.echo2.app.Component
CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY, FOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Fields inherited from interface echopointng.able.Positionable
ABSOLUTE, FIXED, PROPERTY_BOTTOM, PROPERTY_LEFT, PROPERTY_POSITION, PROPERTY_RIGHT, PROPERTY_TOP, PROPERTY_Z_INDEX, RELATIVE, STATIC
 
Fields inherited from interface echopointng.able.Borderable
PROPERTY_BORDER
 
Fields inherited from interface echopointng.able.MouseCursorable
CURSOR_AUTO, CURSOR_CROSSHAIR, CURSOR_CUSTOM_URI, CURSOR_DEFAULT, CURSOR_E_RESIZE, CURSOR_HELP, CURSOR_MOVE, CURSOR_N_RESIZE, CURSOR_NE_RESIZE, CURSOR_NW_RESIZE, CURSOR_POINTER, CURSOR_S_RESIZE, CURSOR_SE_RESIZE, CURSOR_SW_RESIZE, CURSOR_TEXT, CURSOR_W_RESIZE, CURSOR_WAIT, PROPERTY_MOUSE_CURSOR, PROPERTY_MOUSE_CURSOR_URI
 
Fields inherited from interface echopointng.able.AccessKeyable
PROPERTY_ACCESS_KEY
 
Fields inherited from interface echopointng.able.Insetable
DEFAULT_INSETS, DEFAULT_OUTSETS, PROPERTY_INSETS, PROPERTY_OUTSETS
 
Fields inherited from interface echopointng.able.Widthable
PROPERTY_WIDTH
 
Fields inherited from interface echopointng.able.Heightable
PROPERTY_HEIGHT
 
Fields inherited from interface echopointng.able.ToolTipable
PROPERTY_TOOL_TIP_TEXT
 
Constructor Summary
MenuBar()
          Constructs a MenuBar.
MenuBar(MenuItem menuItem)
          Constructs a MenuBar and adds menuItem as its first child
 
Method Summary
 void clear()
          This sets all the positioning attributes (left,top,right,bottom,z-index) to null or zero.
 Extent getBottom()
          Returns the bottom Y position of the component
 Extent getLeft()
          Returns the left X position of the component
 int getPosition()
          This can be one of : POSITIONING_STATIC POSITIONING_RELATIVE POSITIONING_ABSOLUTE POSITIONING_FIXED
 Extent getRight()
          Returns the right X position of the component
 Extent getTop()
          Returns the top Y position of the component
 int getZIndex()
          Returns the z-index of the component
 boolean isPositioned()
          This returns true if any positioning is in place other than normal flow ie.
 void setBottom(Extent newValue)
          Sets the bottom Y position of the component
 void setLeft(Extent newValue)
          Set the left X position of the component
 void setPosition(int newPositioning)
          Sets the position of the component This can be one of : POSITIONING_STATIC POSITIONING_RELATIVE POSITIONING_ABSOLUTE POSITIONING_FIXED
 void setRight(Extent newValue)
          Sets the right X position of the component
 void setTop(Extent newValue)
          Sets the top Y position of the component
 void setZIndex(int newValue)
          Sets the z-index of the component
 String toString()
           
 
Methods inherited from class echopointng.Menu
add, add, add, getLeftOffset, getMenuAlwaysOnTop, getMenuBackground, getMenuBackgroundImage, getMenuBorder, getMenuForeground, getMenuInsets, getMenuItems, getMenuOutsets, getOpenOption, getSubmenuImage, getSubmenuImageAlignment, getSubmenuRolloverImage, getTopOffset, isClickToOpen, isDrawOuterBorders, isHorizontal, isKeepAlive, isStyleChildren, isSubmenuImageBordered, isValidChild, setClickToOpen, setDrawOuterBorders, setHorizontal, setKeepAlive, setLeftOffset, setMenuAlwaysOnTop, setMenuBackground, setMenuBackgroundImage, setMenuBorder, setMenuForeground, setMenuInsets, setMenuOutsets, setOpenOption, setStyleChildren, setSubmenuImage, setSubmenuImageAlignment, setSubmenuImageBordered, setSubmenuRolloverImage, setTopOffset, styleAllMenuItems, styleAllMenuItems, styleAllMenuItemsByName, styleMenuItem
 
Methods inherited from class echopointng.MenuItem
getRootMenu
 
Methods inherited from class echopointng.ButtonEx
getAccessKey, getAttribute, getAttributeNames, getInsets, getMouseCursor, getMouseCursorUri, getOutsets, getText, isInterpretNewlines, processInput, setAccessKey, setAttribute, setInsets, setInterpretNewlines, setModel, setMouseCursor, setMouseCursorUri, setOutsets, setText
 
Methods inherited from class nextapp.echo2.app.button.AbstractButton
addActionListener, doAction, fireActionPerformed, getActionCommand, getAlignment, getBackgroundImage, getBorder, getDisabledBackground, getDisabledBackgroundImage, getDisabledBorder, getDisabledFont, getDisabledForeground, getDisabledIcon, getHeight, getIcon, getIconTextMargin, getModel, getPressedBackground, getPressedBackgroundImage, getPressedBorder, getPressedFont, getPressedForeground, getPressedIcon, getRolloverBackground, getRolloverBackgroundImage, getRolloverBorder, getRolloverFont, getRolloverForeground, getRolloverIcon, getTextAlignment, getTextPosition, getToolTipText, getWidth, hasActionListeners, isLineWrap, isPressedEnabled, isRolloverEnabled, removeActionListener, setActionCommand, setAlignment, setBackgroundImage, setBorder, setDisabledBackground, setDisabledBackgroundImage, setDisabledBorder, setDisabledFont, setDisabledForeground, setDisabledIcon, setHeight, setIcon, setIconTextMargin, setLineWrap, setPressedBackground, setPressedBackgroundImage, setPressedBorder, setPressedEnabled, setPressedFont, setPressedForeground, setPressedIcon, setRolloverBackground, setRolloverBackgroundImage, setRolloverBorder, setRolloverEnabled, setRolloverFont, setRolloverForeground, setRolloverIcon, setText, setTextAlignment, setTextPosition, setToolTipText, setWidth
 
Methods inherited from class nextapp.echo2.app.Component
add, addPropertyChangeListener, dispose, firePropertyChange, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusTraversalIndex, getFont, getForeground, getId, getIndexedProperty, getLayoutData, getLayoutDirection, getLocale, getParent, getProperty, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLayoutDirection, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidParent, isVisible, remove, remove, removeAll, removePropertyChangeListener, setBackground, setEnabled, setFocusTraversalIndex, setFocusTraversalParticipant, setFont, setForeground, setId, setIndexedProperty, setLayoutData, setLayoutDirection, setLocale, setProperty, setRenderId, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface echopointng.able.Delegateable
getRenderProperty, getRenderProperty
 
Methods inherited from interface echopointng.able.Borderable
getBorder, setBorder
 
Methods inherited from interface echopointng.able.Widthable
getWidth, setWidth
 
Methods inherited from interface echopointng.able.Heightable
getHeight, setHeight
 
Methods inherited from interface echopointng.able.ToolTipable
getToolTipText, setToolTipText
 

Field Detail

DEFAULT_STYLE

public static Style DEFAULT_STYLE
This DEFAULT_STYLE is applied to the MenuBar to give it a series of borders and background colors

Constructor Detail

MenuBar

public MenuBar()
Constructs a MenuBar.


MenuBar

public MenuBar(MenuItem menuItem)
Constructs a MenuBar and adds menuItem as its first child

Parameters:
menuItem - - a first child for the MenuBar.
Method Detail

toString

public String toString()
Overrides:
toString in class Menu
See Also:
Object.toString()

clear

public void clear()
Description copied from interface: Positionable
This sets all the positioning attributes (left,top,right,bottom,z-index) to null or zero.

Specified by:
clear in interface Positionable
See Also:
Positionable.clear()

getBottom

public Extent getBottom()
Description copied from interface: Positionable
Returns the bottom Y position of the component

Specified by:
getBottom in interface Positionable
See Also:
Positionable.getBottom()

getLeft

public Extent getLeft()
Description copied from interface: Positionable
Returns the left X position of the component

Specified by:
getLeft in interface Positionable
See Also:
Positionable.getLeft()

getPosition

public int getPosition()
Description copied from interface: Positionable
This can be one of :

Specified by:
getPosition in interface Positionable
See Also:
Positionable.getPosition()

getRight

public Extent getRight()
Description copied from interface: Positionable
Returns the right X position of the component

Specified by:
getRight in interface Positionable
See Also:
Positionable.getRight()

getTop

public Extent getTop()
Description copied from interface: Positionable
Returns the top Y position of the component

Specified by:
getTop in interface Positionable
See Also:
Positionable.getTop()

getZIndex

public int getZIndex()
Description copied from interface: Positionable
Returns the z-index of the component

Specified by:
getZIndex in interface Positionable
See Also:
Positionable.getZIndex()

isPositioned

public boolean isPositioned()
Description copied from interface: Positionable
This returns true if any positioning is in place other than normal flow ie. STATIC.

Specified by:
isPositioned in interface Positionable
See Also:
Positionable.isPositioned()

setBottom

public void setBottom(Extent newValue)
Description copied from interface: Positionable
Sets the bottom Y position of the component

Specified by:
setBottom in interface Positionable
See Also:
Positionable.setBottom(nextapp.echo2.app.Extent)

setLeft

public void setLeft(Extent newValue)
Description copied from interface: Positionable
Set the left X position of the component

Specified by:
setLeft in interface Positionable
See Also:
Positionable.setLeft(nextapp.echo2.app.Extent)

setPosition

public void setPosition(int newPositioning)
Description copied from interface: Positionable
Sets the position of the component This can be one of :

Specified by:
setPosition in interface Positionable
See Also:
Positionable.setPosition(int)

setRight

public void setRight(Extent newValue)
Description copied from interface: Positionable
Sets the right X position of the component

Specified by:
setRight in interface Positionable
See Also:
Positionable.setRight(nextapp.echo2.app.Extent)

setTop

public void setTop(Extent newValue)
Description copied from interface: Positionable
Sets the top Y position of the component

Specified by:
setTop in interface Positionable
See Also:
Positionable.setTop(nextapp.echo2.app.Extent)

setZIndex

public void setZIndex(int newValue)
Description copied from interface: Positionable
Sets the z-index of the component

Specified by:
setZIndex in interface Positionable
See Also:
Positionable.setZIndex(int)

EchoPoint
2.1.0rc5