NextApp Echo2 Extras
v2.1.0

nextapp.echo2.extras.app
Class DropDownMenu

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

public class DropDownMenu
extends AbstractMenuComponent

EXPERIMENTAL: Under Development, API may change.

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_EXPAND_ICON
           
static java.lang.String PROPERTY_DISABLED_FOREGROUND
           
static java.lang.String PROPERTY_EXPAND_ICON
           
static java.lang.String PROPERTY_HEIGHT
           
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_FOREGROUND
           
static java.lang.String PROPERTY_SELECTION_BACKGROUND
           
static java.lang.String PROPERTY_SELECTION_BACKGROUND_IMAGE
           
static java.lang.String PROPERTY_SELECTION_FOREGROUND
           
static java.lang.String PROPERTY_WIDTH
           
static java.lang.String SELECTION_CHANGED_PROPERTY
           
static java.lang.String SELECTION_MODEL_CHANGED_PROPERTY
           
 
Fields inherited from class nextapp.echo2.extras.app.menu.AbstractMenuComponent
INPUT_SELECT, MODEL_CHANGED_PROPERTY, STATE_MODEL_CHANGED_PROPERTY
 
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
 
Constructor Summary
DropDownMenu()
          Creates a new DropDownMenu with an empty DefaultMenuModel as its model and a.
DropDownMenu(MenuModel model)
          Creates a new DropDownMenu displaying the specified MenuModel and using a DefaultMenuStateModel to provide state information.
DropDownMenu(MenuModel model, MenuSelectionModel selectionModel)
           
DropDownMenu(MenuModel model, MenuStateModel stateModel)
          Creates a new DropDownMenu displaying the specified MenuModel and using the specified MenuStateModel to provide state information.
 
Method Summary
 nextapp.echo2.app.FillImage getBackgroundImage()
          Returns the background image that will be displayed in the DropDownMenu.
 nextapp.echo2.app.Border getBorder()
          Returns the border that will be displayed around the DropDownMenu.
 nextapp.echo2.app.Color getDisabledBackground()
          Returns the background color used to render disabled menu items.
 nextapp.echo2.app.FillImage getDisabledBackgroundImage()
          Returns the background image used to render disabled menu items.
 nextapp.echo2.app.ImageReference getDisabledExpandIcon()
          Returns the disabled expand icon.
 nextapp.echo2.app.Color getDisabledForeground()
          Returns the foreground color used to render disabled menu items.
 nextapp.echo2.app.ImageReference getExpandIcon()
          Returns the icon used to expand the drop down menu.
 nextapp.echo2.app.Extent getHeight()
          Returns the height of the drop down menu.
 nextapp.echo2.app.Color getMenuBackground()
          Returns the background color that will be displayed in pull-down menus.
 nextapp.echo2.app.FillImage getMenuBackgroundImage()
          Returns the background image that will be displayed in pull-down menus.
 nextapp.echo2.app.Border getMenuBorder()
          Returns the border that will be displayed around pull-down menus.
 nextapp.echo2.app.Color getMenuForeground()
          Returns the foreground color that will be displayed in pull-down menus.
 nextapp.echo2.app.Color getSelectionBackground()
          Returns the background color used to highlight the currently selected menu item.
 nextapp.echo2.app.FillImage getSelectionBackgroundImage()
          Returns the background image used to highlight the currently selected menu item.
 nextapp.echo2.app.Color getSelectionForeground()
          Returns the foreground color used to highlight the currently selected menu item.
 MenuSelectionModel getSelectionModel()
           
 nextapp.echo2.app.Extent getWidth()
          Returns the width of the drop down menu.
 void setBackgroundImage(nextapp.echo2.app.FillImage newValue)
          Sets the background image that will be displayed in the DropDownMenu.
 void setBorder(nextapp.echo2.app.Border newValue)
          Sets the border that will be displayed around the DropDownMenu.
 void setDisabledBackground(nextapp.echo2.app.Color newValue)
          Sets the background color used to render disabled menu items.
 void setDisabledBackgroundImage(nextapp.echo2.app.FillImage newValue)
          Sets the background image used to render disabled menu items.
 void setDisabledExpandIcon(nextapp.echo2.app.ImageReference newValue)
          Sets the disabled expand icon.
 void setDisabledForeground(nextapp.echo2.app.Color newValue)
          Sets the foreground color used to render disabled menu items.
 void setExpandIcon(nextapp.echo2.app.ImageReference newValue)
          Sets the icon used to expand the drop down menu.
 void setHeight(nextapp.echo2.app.Extent newValue)
          Sets the height of the drop down menu.
 void setMenuBackground(nextapp.echo2.app.Color newValue)
          Sets the background color that will be displayed in pull-down menus.
 void setMenuBackgroundImage(nextapp.echo2.app.FillImage newValue)
          Sets the background image that will be displayed in pull-down menus.
 void setMenuBorder(nextapp.echo2.app.Border newValue)
          Sets the border that will be displayed around pull-down menus.
 void setMenuForeground(nextapp.echo2.app.Color newValue)
          Sets the foreground color that will be displayed in pull-down menus.
 void setSelectionBackground(nextapp.echo2.app.Color newValue)
          Sets the background color used to highlight the currently selected menu item.
 void setSelectionBackgroundImage(nextapp.echo2.app.FillImage newValue)
          Sets the background image used to highlight the currently selected menu item.
 void setSelectionForeground(nextapp.echo2.app.Color newValue)
          Sets the foreground color used to highlight the currently selected menu item.
 void setSelectionModel(MenuSelectionModel newValue)
          Sets the selection model to use.
 void setWidth(nextapp.echo2.app.Extent newValue)
          Sets the width of the drop down menu.
 
Methods inherited from class nextapp.echo2.extras.app.menu.AbstractMenuComponent
addActionListener, doAction, getModel, getStateModel, processInput, removeActionListener, setModel, setStateModel
 
Methods inherited from class nextapp.echo2.app.Component
add, add, addPropertyChangeListener, 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, isValidChild, isValidParent, isVisible, remove, remove, removeAll, removePropertyChangeListener, 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, 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_DISABLED_EXPAND_ICON

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

PROPERTY_EXPAND_ICON

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

PROPERTY_HEIGHT

public static final java.lang.String PROPERTY_HEIGHT
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_FOREGROUND

public static final java.lang.String PROPERTY_MENU_FOREGROUND
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

PROPERTY_WIDTH

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

SELECTION_CHANGED_PROPERTY

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

SELECTION_MODEL_CHANGED_PROPERTY

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

DropDownMenu

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


DropDownMenu

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

Parameters:
model - the model

DropDownMenu

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

Parameters:
model - the model
stateModel - the selection model

DropDownMenu

public DropDownMenu(MenuModel model,
                    MenuSelectionModel selectionModel)
Method Detail

getSelectionModel

public MenuSelectionModel getSelectionModel()

getBackgroundImage

public nextapp.echo2.app.FillImage getBackgroundImage()
Returns the background image that will be displayed in the DropDownMenu. 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.echo2.app.Border getBorder()
Returns the border that will be displayed around the DropDownMenu. 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.echo2.app.Color getDisabledBackground()
Returns the background color used to render disabled menu items.

Returns:
the disabled background

getDisabledBackgroundImage

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

Returns:
the disabled background image

getDisabledExpandIcon

public nextapp.echo2.app.ImageReference getDisabledExpandIcon()
Returns the disabled expand icon.

Returns:
the disabled expand icon

getDisabledForeground

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

Returns:
the disabled foreground

getExpandIcon

public nextapp.echo2.app.ImageReference getExpandIcon()
Returns the icon used to expand the drop down menu.

Returns:
the expand icon

getHeight

public nextapp.echo2.app.Extent getHeight()
Returns the height of the drop down menu.

Returns:
the height

getMenuBackground

public nextapp.echo2.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.echo2.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.echo2.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

getMenuForeground

public nextapp.echo2.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

getSelectionBackground

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

Returns:
the selection background

getSelectionBackgroundImage

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

Returns:
the selection background image

getSelectionForeground

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

Returns:
the selection foreground

getWidth

public nextapp.echo2.app.Extent getWidth()
Returns the width of the drop down menu.

Returns:
the width

setBackgroundImage

public void setBackgroundImage(nextapp.echo2.app.FillImage newValue)
Sets the background image that will be displayed in the DropDownMenu. 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.echo2.app.Border newValue)
Sets the border that will be displayed around the DropDownMenu. 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.echo2.app.Color newValue)
Sets the background color used to render disabled menu items.

Parameters:
newValue - the new disabled background

setDisabledBackgroundImage

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

Parameters:
newValue - the new disabled background image

setDisabledExpandIcon

public void setDisabledExpandIcon(nextapp.echo2.app.ImageReference newValue)
Sets the disabled expand icon.

Parameters:
newValue - the new disabled expand icon

setDisabledForeground

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

Parameters:
newValue - the new disabled foreground

setExpandIcon

public void setExpandIcon(nextapp.echo2.app.ImageReference newValue)
Sets the icon used to expand the drop down menu.

Parameters:
newValue - the new expand icon

setHeight

public void setHeight(nextapp.echo2.app.Extent newValue)
Sets the height of the drop down menu.

Parameters:
newValue - the new height

setMenuBackground

public void setMenuBackground(nextapp.echo2.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.echo2.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.echo2.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

setMenuForeground

public void setMenuForeground(nextapp.echo2.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

setSelectionBackground

public void setSelectionBackground(nextapp.echo2.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.echo2.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.echo2.app.Color newValue)
Sets the foreground color used to highlight the currently selected menu item.

Parameters:
newValue - the new selection foreground

setSelectionModel

public void setSelectionModel(MenuSelectionModel newValue)
Sets the selection model to use.

Parameters:
newValue - the new selection model

setWidth

public void setWidth(nextapp.echo2.app.Extent newValue)
Sets the width of the drop down menu.

Parameters:
newValue - the new width

NextApp Echo2 Extras
v2.1.0