NextApp Echo3 Extras
v3.0.b4

nextapp.echo.extras.app
Class MenuBarPane

java.lang.Object
  extended by nextapp.echo.app.Component
      extended by nextapp.echo.extras.app.menu.AbstractMenuComponent
          extended by nextapp.echo.extras.app.MenuBarPane
All Implemented Interfaces:
java.io.Serializable, nextapp.echo.app.Pane, nextapp.echo.app.RenderIdSupport

public class MenuBarPane
extends AbstractMenuComponent
implements nextapp.echo.app.Pane

MenuBarPane component: a menu bar containing "pull down" menus. This component is a Pane, and is generally best used as the first child of a SplitPane component whose autoPositioned property is set to true. May not contain child components.

See Also:
Serialized Form

Field Summary
static java.lang.String PROPERTY_BACKGROUND_IMAGE
           
static java.lang.String PROPERTY_BORDER
           
static java.lang.String PROPERTY_DISABLED_BACKGROUND
           
static java.lang.String PROPERTY_DISABLED_BACKGROUND_IMAGE
           
static java.lang.String PROPERTY_DISABLED_FOREGROUND
           
static java.lang.String PROPERTY_INSETS
           
static java.lang.String PROPERTY_MENU_BACKGROUND
           
static java.lang.String PROPERTY_MENU_BACKGROUND_IMAGE
           
static java.lang.String PROPERTY_MENU_BORDER
           
static java.lang.String PROPERTY_MENU_EXPAND_ICON
           
static java.lang.String PROPERTY_MENU_FOREGROUND
           
static java.lang.String PROPERTY_MENU_OPACITY
           
static java.lang.String PROPERTY_SELECTION_BACKGROUND
           
static java.lang.String PROPERTY_SELECTION_BACKGROUND_IMAGE
           
static java.lang.String PROPERTY_SELECTION_FOREGROUND
           
 
Fields inherited from class nextapp.echo.extras.app.menu.AbstractMenuComponent
ACTION_LISTENERS_CHANGED_PROPERTY, DEFAULT_ANIMATION_TIME, INPUT_ACTION, MODEL_CHANGED_PROPERTY, PROPERTY_ANIMATION_TIME, STATE_MODEL_CHANGED_PROPERTY
 
Fields inherited from class nextapp.echo.app.Component
CHILD_VISIBLE_CHANGED_PROPERTY, 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
 
Constructor Summary
MenuBarPane()
          Creates a new MenuBarPane with an empty DefaultMenuModel as its model and a.
MenuBarPane(MenuModel model)
          Creates a new MenuBarPane displaying the specified MenuModel and using a DefaultMenuStateModel to provide state information.
MenuBarPane(MenuModel model, MenuStateModel stateModel)
          Creates a new MenuBarPane displaying the specified MenuModel and using the specified MenuStateModel to provide state information.
 
Method Summary
 nextapp.echo.app.FillImage getBackgroundImage()
          Returns the background image that will be displayed in the MenuBarPane.
 nextapp.echo.app.Border getBorder()
          Returns the border that will be displayed around the MenuBarPane.
 nextapp.echo.app.Color getDisabledBackground()
          Returns the background color used to render disabled menu items.
 nextapp.echo.app.FillImage getDisabledBackgroundImage()
          Returns the background image used to render disabled menu items.
 nextapp.echo.app.Color getDisabledForeground()
          Returns the foreground color used to render disabled menu items.
 nextapp.echo.app.Insets getInsets()
          Returns the inset margin around the menu bar.
 nextapp.echo.app.Color getMenuBackground()
          Returns the background color that will be displayed in pull-down menus.
 nextapp.echo.app.FillImage getMenuBackgroundImage()
          Returns the background image that will be displayed in pull-down menus.
 nextapp.echo.app.Border getMenuBorder()
          Returns the border that will be displayed around pull-down menus.
 nextapp.echo.app.ImageReference getMenuExpandIcon()
          Returns the icon used to expand pull-down menus.
 nextapp.echo.app.Color getMenuForeground()
          Returns the foreground color that will be displayed in pull-down menus.
 int getMenuOpacity()
          Returns the opacity setting (percent) that will be used for the background color/image displayed in pulldown menus.
 nextapp.echo.app.Color getSelectionBackground()
          Returns the background color used to highlight the currently selected menu item.
 nextapp.echo.app.FillImage getSelectionBackgroundImage()
          Returns the background image used to highlight the currently selected menu item.
 nextapp.echo.app.Color getSelectionForeground()
          Returns the foreground color used to highlight the currently selected menu item.
 boolean isValidParent(nextapp.echo.app.Component c)
           
 void setBackgroundImage(nextapp.echo.app.FillImage newValue)
          Sets the background image that will be displayed in the MenuBarPane.
 void setBorder(nextapp.echo.app.Border newValue)
          Sets the border that will be displayed around the MenuBarPane.
 void setDisabledBackground(nextapp.echo.app.Color newValue)
          Sets the background color used to render disabled menu items.
 void setDisabledBackgroundImage(nextapp.echo.app.FillImage newValue)
          Sets the background image used to render disabled menu items.
 void setDisabledForeground(nextapp.echo.app.Color newValue)
          Sets the foreground color used to render disabled menu items.
 void setInsets(nextapp.echo.app.Insets newValue)
          Returns the inset margin around the menu bar.
 void setMenuBackground(nextapp.echo.app.Color newValue)
          Sets the background color that will be displayed in pull-down menus.
 void setMenuBackgroundImage(nextapp.echo.app.FillImage newValue)
          Sets the background image that will be displayed in pull-down menus.
 void setMenuBorder(nextapp.echo.app.Border newValue)
          Sets the border that will be displayed around pull-down menus.
 void setMenuExpandIcon(nextapp.echo.app.ImageReference newValue)
          Sets the icon used to expand pull-down menus.
 void setMenuForeground(nextapp.echo.app.Color newValue)
          Sets the foreground color that will be displayed in pull-down menus.
 void setMenuOpacity(int newValue)
          Sets the opacity (percent) that will be used for the background color/image displayed in pulldown menus.
 void setSelectionBackground(nextapp.echo.app.Color newValue)
          Sets the background color used to highlight the currently selected menu item.
 void setSelectionBackgroundImage(nextapp.echo.app.FillImage newValue)
          Sets the background image used to highlight the currently selected menu item.
 void setSelectionForeground(nextapp.echo.app.Color newValue)
          Sets the foreground color used to highlight the currently selected menu item.
 
Methods inherited from class nextapp.echo.extras.app.menu.AbstractMenuComponent
addActionListener, doAction, fireActionPerformed, getAnimationTime, getModel, getStateModel, hasActionListeners, processInput, removeActionListener, setAnimationTime, setModel, setStateModel
 
Methods inherited from class nextapp.echo.app.Component
add, add, addPropertyChangeListener, addPropertyChangeListener, dispose, firePropertyChange, get, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusTraversalIndex, getFont, getForeground, getId, getIndex, getLayoutData, getLayoutDirection, getLocale, getLocalStyle, getParent, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidChild, isVisible, remove, remove, removeAll, removePropertyChangeListener, removePropertyChangeListener, set, setBackground, setComponents, setEnabled, setFocusTraversalIndex, setFocusTraversalParticipant, setFont, setForeground, setId, setIndex, setLayoutData, setLayoutDirection, setLocale, setRenderId, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_BACKGROUND_IMAGE

public static final java.lang.String PROPERTY_BACKGROUND_IMAGE
See Also:
Constant Field Values

PROPERTY_BORDER

public static final java.lang.String PROPERTY_BORDER
See Also:
Constant Field Values

PROPERTY_DISABLED_BACKGROUND

public static final java.lang.String PROPERTY_DISABLED_BACKGROUND
See Also:
Constant Field Values

PROPERTY_DISABLED_BACKGROUND_IMAGE

public static final java.lang.String PROPERTY_DISABLED_BACKGROUND_IMAGE
See Also:
Constant Field Values

PROPERTY_DISABLED_FOREGROUND

public static final java.lang.String PROPERTY_DISABLED_FOREGROUND
See Also:
Constant Field Values

PROPERTY_INSETS

public static final java.lang.String PROPERTY_INSETS
See Also:
Constant Field Values

PROPERTY_MENU_BACKGROUND

public static final java.lang.String PROPERTY_MENU_BACKGROUND
See Also:
Constant Field Values

PROPERTY_MENU_BACKGROUND_IMAGE

public static final java.lang.String PROPERTY_MENU_BACKGROUND_IMAGE
See Also:
Constant Field Values

PROPERTY_MENU_BORDER

public static final java.lang.String PROPERTY_MENU_BORDER
See Also:
Constant Field Values

PROPERTY_MENU_EXPAND_ICON

public static final java.lang.String PROPERTY_MENU_EXPAND_ICON
See Also:
Constant Field Values

PROPERTY_MENU_FOREGROUND

public static final java.lang.String PROPERTY_MENU_FOREGROUND
See Also:
Constant Field Values

PROPERTY_MENU_OPACITY

public static final java.lang.String PROPERTY_MENU_OPACITY
See Also:
Constant Field Values

PROPERTY_SELECTION_BACKGROUND

public static final java.lang.String PROPERTY_SELECTION_BACKGROUND
See Also:
Constant Field Values

PROPERTY_SELECTION_BACKGROUND_IMAGE

public static final java.lang.String PROPERTY_SELECTION_BACKGROUND_IMAGE
See Also:
Constant Field Values

PROPERTY_SELECTION_FOREGROUND

public static final java.lang.String PROPERTY_SELECTION_FOREGROUND
See Also:
Constant Field Values
Constructor Detail

MenuBarPane

public MenuBarPane()
Creates a new MenuBarPane with an empty DefaultMenuModel as its model and a. DefaultMenuStateModel to provide state information.


MenuBarPane

public MenuBarPane(MenuModel model)
Creates a new MenuBarPane displaying the specified MenuModel and using a DefaultMenuStateModel to provide state information.

Parameters:
model - the model

MenuBarPane

public MenuBarPane(MenuModel model,
                   MenuStateModel stateModel)
Creates a new MenuBarPane displaying the specified MenuModel and using the specified MenuStateModel to provide state information.

Parameters:
model - the model
stateModel - the selection model
Method Detail

getBackgroundImage

public nextapp.echo.app.FillImage getBackgroundImage()
Returns the background image that will be displayed in the MenuBarPane. This background image will also be used around pull-down menus in the event that a menu background image is not specified.

Returns:
the default background image

getBorder

public nextapp.echo.app.Border getBorder()
Returns the border that will be displayed around the MenuBarPane. This border will also be used around pull-down menus in the event that a menu border is not specified.

Returns:
the default border

getDisabledBackground

public nextapp.echo.app.Color getDisabledBackground()
Returns the background color used to render disabled menu items.

Returns:
the disabled background

getDisabledBackgroundImage

public nextapp.echo.app.FillImage getDisabledBackgroundImage()
Returns the background image used to render disabled menu items.

Returns:
the disabled background image

getDisabledForeground

public nextapp.echo.app.Color getDisabledForeground()
Returns the foreground color used to render disabled menu items.

Returns:
the disabled foreground

getInsets

public nextapp.echo.app.Insets getInsets()
Returns the inset margin around the menu bar. This property is ignored unless the container is sizing itself to the menu bar.

Returns:
the inset margin around the menu bar

getMenuBackground

public nextapp.echo.app.Color getMenuBackground()
Returns the background color that will be displayed in pull-down menus. Use this property only if a color different from the one used for the menu bar is desired for pull-down menus (otherwise use only the "background" property").

Returns:
the menu background

getMenuBackgroundImage

public nextapp.echo.app.FillImage getMenuBackgroundImage()
Returns the background image that will be displayed in pull-down menus. Use this property only if an image different from the one used for the menu bar is desired for pull-down menus (otherwise use only the "backgroundImage" property").

Returns:
the menu background image

getMenuBorder

public nextapp.echo.app.Border getMenuBorder()
Returns the border that will be displayed around pull-down menus. Use this property only if a border different from the one used for the menu bar is desired for pull-down menus (otherwise use only the "border" property").

Returns:
the menu border

getMenuExpandIcon

public nextapp.echo.app.ImageReference getMenuExpandIcon()
Returns the icon used to expand pull-down menus.

Returns:
the menu expand icon

getMenuForeground

public nextapp.echo.app.Color getMenuForeground()
Returns the foreground color that will be displayed in pull-down menus. Use this property only if a color different from the one used for the menu bar is desired for pull-down menus (otherwise use only the "foreground" property").

Returns:
the menu foreground

getMenuOpacity

public int getMenuOpacity()
Returns the opacity setting (percent) that will be used for the background color/image displayed in pulldown menus. Valid values are between 1 and 100. Some clients may not support this setting and will always render menus with 100% opacity.

Returns:
the opacity setting

getSelectionBackground

public nextapp.echo.app.Color getSelectionBackground()
Returns the background color used to highlight the currently selected menu item.

Returns:
the selection background

getSelectionBackgroundImage

public nextapp.echo.app.FillImage getSelectionBackgroundImage()
Returns the background image used to highlight the currently selected menu item.

Returns:
the selection background image

getSelectionForeground

public nextapp.echo.app.Color getSelectionForeground()
Returns the foreground color used to highlight the currently selected menu item.

Returns:
the selection foreground

isValidParent

public boolean isValidParent(nextapp.echo.app.Component c)
Overrides:
isValidParent in class nextapp.echo.app.Component
See Also:
Component.isValidParent(nextapp.echo.app.Component)

setBackgroundImage

public void setBackgroundImage(nextapp.echo.app.FillImage newValue)
Sets the background image that will be displayed in the MenuBarPane. This background image will also be used around pull-down menus in the event that a menu background image is not specified.

Parameters:
newValue - the new default background image

setBorder

public void setBorder(nextapp.echo.app.Border newValue)
Sets the border that will be displayed around the MenuBarPane. This border will also be used around pull-down menus in the event that a menu border is not specified.

Parameters:
newValue - the new default border

setDisabledBackground

public void setDisabledBackground(nextapp.echo.app.Color newValue)
Sets the background color used to render disabled menu items.

Parameters:
newValue - the new disabled background

setDisabledBackgroundImage

public void setDisabledBackgroundImage(nextapp.echo.app.FillImage newValue)
Sets the background image used to render disabled menu items.

Parameters:
newValue - the new disabled background image

setDisabledForeground

public void setDisabledForeground(nextapp.echo.app.Color newValue)
Sets the foreground color used to render disabled menu items.

Parameters:
newValue - the new disabled foreground

setInsets

public void setInsets(nextapp.echo.app.Insets newValue)
Returns the inset margin around the menu bar. This property is ignored unless the container is sizing itself to the menu bar.

Parameters:
newValue - the inset margin around the menu bar

setMenuBackground

public void setMenuBackground(nextapp.echo.app.Color newValue)
Sets the background color that will be displayed in pull-down menus. Use this property only if a color different from the one used for the menu bar is desired for pull-down menus (otherwise use only the "background" property").

Parameters:
newValue - the new menu background

setMenuBackgroundImage

public void setMenuBackgroundImage(nextapp.echo.app.FillImage newValue)
Sets the background image that will be displayed in pull-down menus. Use this property only if an image different from the one used for the menu bar is desired for pull-down menus (otherwise use only the "backgroundImage" property").

Parameters:
newValue - the new menu background image

setMenuBorder

public void setMenuBorder(nextapp.echo.app.Border newValue)
Sets the border that will be displayed around pull-down menus. Use this property only if a border different from the one used for the menu bar is desired for pull-down menus (otherwise use only the "border" property").

Parameters:
newValue - the new menu border

setMenuExpandIcon

public void setMenuExpandIcon(nextapp.echo.app.ImageReference newValue)
Sets the icon used to expand pull-down menus.

Parameters:
newValue - the new menu expand icon

setMenuForeground

public void setMenuForeground(nextapp.echo.app.Color newValue)
Sets the foreground color that will be displayed in pull-down menus. Use this property only if a color different from the one used for the menu bar is desired for pull-down menus (otherwise use only the "foreground" property").

Parameters:
newValue - the new menu foreground

setMenuOpacity

public void setMenuOpacity(int newValue)
Sets the opacity (percent) that will be used for the background color/image displayed in pulldown menus. Valid values are between 1 and 100. Some clients may not support this setting and will always render menus with 100% opacity.

Parameters:
newValue - the new opacity setting

setSelectionBackground

public void setSelectionBackground(nextapp.echo.app.Color newValue)
Sets the background color used to highlight the currently selected menu item.

Parameters:
newValue - the new selection background

setSelectionBackgroundImage

public void setSelectionBackgroundImage(nextapp.echo.app.FillImage newValue)
Sets the background image used to highlight the currently selected menu item.

Parameters:
newValue - the new selection background image

setSelectionForeground

public void setSelectionForeground(nextapp.echo.app.Color newValue)
Sets the foreground color used to highlight the currently selected menu item.

Parameters:
newValue - the new selection foreground

NextApp Echo3 Extras
v3.0.b4