|
NextApp Echo3 Extras v3.0.b8 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnextapp.echo.app.Component
nextapp.echo.extras.app.menu.AbstractMenuComponent
nextapp.echo.extras.app.ContextMenu
public class ContextMenu
A component that shows a menu when right-clicked, i.e. a context menu. This component supports at most one child which, when present, will be used as visible content. The component itself will not be visible.
| Field Summary | |
|---|---|
static int |
ACTIVATION_MODE_CLICK
|
static int |
ACTIVATION_MODE_CONTEXT_CLICK
|
static String |
PROPERTY_ACTIVATION_MODE
|
static String |
PROPERTY_BACKGROUND_IMAGE
|
static String |
PROPERTY_BORDER
|
static String |
PROPERTY_DISABLED_BACKGROUND
|
static String |
PROPERTY_DISABLED_BACKGROUND_IMAGE
|
static String |
PROPERTY_DISABLED_FOREGROUND
|
static String |
PROPERTY_MENU_EXPAND_ICON
|
static String |
PROPERTY_SELECTION_BACKGROUND
|
static String |
PROPERTY_SELECTION_BACKGROUND_IMAGE
|
static 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 |
| Constructor Summary | |
|---|---|
ContextMenu()
Creates a new ContextMenu with an empty
DefaultMenuModel as its model and a
DefaultMenuStateModel to provide state information. |
|
ContextMenu(Component applyTo)
Creates a new ContextMenu with an empty
DefaultMenuModel as its model and a
DefaultMenuStateModel to provide state information. |
|
ContextMenu(Component applyTo,
MenuModel model)
Creates a new ContextMenu displaying the specified
MenuModel and using a
DefaultMenuStateModel to provide state information. |
|
ContextMenu(Component applyTo,
MenuModel model,
MenuStateModel stateModel)
Creates a new ContextMenu displaying the specified
MenuModel and using the specified
MenuStateModel to provide state information. |
|
| Method Summary | |
|---|---|
int |
getActivationMode()
Returns the activation mode of the context menu. |
Component |
getApplyTo()
Returns the component to apply the context menu to. |
FillImage |
getBackgroundImage()
Returns the background image that will be displayed in pull-down menus. |
Border |
getBorder()
Returns the border that will be displayed around pull-down menus. |
Color |
getDisabledBackground()
Returns the background color used to render disabled menu items. |
FillImage |
getDisabledBackgroundImage()
Returns the background image used to render disabled menu items. |
Color |
getDisabledForeground()
Returns the foreground color used to render disabled menu items. |
ImageReference |
getMenuExpandIcon()
Returns the icon used to expand pull-down menus. |
Color |
getSelectionBackground()
Returns the background color used to highlight the currently selected menu item. |
FillImage |
getSelectionBackgroundImage()
Returns the background image used to highlight the currently selected menu item. |
Color |
getSelectionForeground()
Returns the foreground color used to highlight the currently selected menu item. |
boolean |
isValidChild(Component child)
|
void |
setActivationMode(int newValue)
Sets the activation mode of the context menu. |
void |
setApplyTo(Component applyTo)
Sets the component to apply the context menu to. |
void |
setBackgroundImage(FillImage newValue)
Sets the background image that will be displayed in pull-down menus. |
void |
setBorder(Border newValue)
Sets the border that will be displayed around pull-down menus. |
void |
setDisabledBackground(Color newValue)
Sets the background color used to render disabled menu items. |
void |
setDisabledBackgroundImage(FillImage newValue)
Sets the background image used to render disabled menu items. |
void |
setDisabledForeground(Color newValue)
Sets the foreground color used to render disabled menu items. |
void |
setMenuExpandIcon(ImageReference newValue)
Sets the icon used to expand pull-down menus. |
void |
setSelectionBackground(Color newValue)
Sets the background color used to highlight the currently selected menu item. |
void |
setSelectionBackgroundImage(FillImage newValue)
Sets the background image used to highlight the currently selected menu item. |
void |
setSelectionForeground(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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ACTIVATION_MODE_CLICK
public static final int ACTIVATION_MODE_CONTEXT_CLICK
public static final String PROPERTY_ACTIVATION_MODE
public static final String PROPERTY_BACKGROUND_IMAGE
public static final String PROPERTY_BORDER
public static final String PROPERTY_DISABLED_BACKGROUND
public static final String PROPERTY_DISABLED_BACKGROUND_IMAGE
public static final String PROPERTY_DISABLED_FOREGROUND
public static final String PROPERTY_MENU_EXPAND_ICON
public static final String PROPERTY_SELECTION_BACKGROUND
public static final String PROPERTY_SELECTION_BACKGROUND_IMAGE
public static final String PROPERTY_SELECTION_FOREGROUND
| Constructor Detail |
|---|
public ContextMenu()
ContextMenu with an empty
DefaultMenuModel as its model and a
DefaultMenuStateModel to provide state information.
public ContextMenu(Component applyTo)
ContextMenu with an empty
DefaultMenuModel as its model and a
DefaultMenuStateModel to provide state information.
applyTo - the component to apply the context menu to
public ContextMenu(Component applyTo,
MenuModel model)
ContextMenu displaying the specified
MenuModel and using a
DefaultMenuStateModel to provide state information.
applyTo - the component to apply the context menu tomodel - the model
public ContextMenu(Component applyTo,
MenuModel model,
MenuStateModel stateModel)
ContextMenu displaying the specified
MenuModel and using the specified
MenuStateModel to provide state information.
applyTo - the component to apply the context menu tomodel - the modelstateModel - the selection model| Method Detail |
|---|
public int getActivationMode()
ACTIVATION_MODE_CONTEXT_CLICKACTIVATION_MODE_CLICKpublic Component getApplyTo()
public FillImage getBackgroundImage()
public Border getBorder()
public Color getDisabledBackground()
public FillImage getDisabledBackgroundImage()
public Color getDisabledForeground()
public ImageReference getMenuExpandIcon()
public Color getSelectionBackground()
public FillImage getSelectionBackgroundImage()
public Color getSelectionForeground()
public void setApplyTo(Component applyTo)
applyTo - the Componentpublic void setActivationMode(int newValue)
newValue - the new activation mode of the context menu, one of the following values:
ACTIVATION_MODE_CONTEXT_CLICKACTIVATION_MODE_CLICKpublic void setBackgroundImage(FillImage newValue)
newValue - the new background imagepublic void setBorder(Border newValue)
newValue - the new default borderpublic void setDisabledBackground(Color newValue)
newValue - the new disabled backgroundpublic void setDisabledBackgroundImage(FillImage newValue)
newValue - the new disabled background imagepublic void setDisabledForeground(Color newValue)
newValue - the new disabled foregroundpublic void setMenuExpandIcon(ImageReference newValue)
newValue - the new menu expand iconpublic void setSelectionBackground(Color newValue)
newValue - the new selection backgroundpublic void setSelectionBackgroundImage(FillImage newValue)
newValue - the new selection background imagepublic void setSelectionForeground(Color newValue)
newValue - the new selection foregroundpublic boolean isValidChild(Component child)
isValidChild in class ComponentComponent.isValidChild(Component)
|
NextApp Echo3 Extras v3.0.b8 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||