|
EchoPoint 2.1.0rc4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo2.app.Component
nextapp.echo2.app.button.AbstractButton
nextapp.echo2.app.Button
echopointng.ButtonEx
echopointng.MenuItem
echopointng.Menu
The Menu
class provides a MenuItem
that can be
added to a parent Menu
or MenuBar
.
If it is not contained within a parent Menu
, then it is
rendered just like a ButtonEx
but with a drop down box for any
of its child components.
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.
Field Summary | |
static nextapp.echo2.app.Style |
DEFAULT_STYLE
This DEFAULT_STYLE is applied to the Menu to give it a series of borders and background colors |
static nextapp.echo2.app.ImageReference |
DEFAULT_SUBMENU_IMAGE
The default sub menu image |
static int |
OPEN_ON_CLICK
Open Option that opens the Menu's drop down box when the mouse is clicked anywhere on the Menu's button, including the SubMenu image. |
static int |
OPEN_ON_MOUSEOVER
Open Option that opens the Menu's drop down box when the mouse is placed over the Menu's button. |
static int |
OPEN_ON_SUBMENU_CLICK
Open Option that opens the Menu's drop down box when the mouse is clicked only on the Menu's SubMenu image. |
static java.lang.String |
PROPERTY_BACKGROUND_IMAGE
|
static java.lang.String |
PROPERTY_DRAW_OUTER_BORDERS
|
static java.lang.String |
PROPERTY_HORIZONTAL
|
static java.lang.String |
PROPERTY_KEEP_ALIVE
|
static java.lang.String |
PROPERTY_LEFT_OFFSET
|
static java.lang.String |
PROPERTY_MENU_ALWAYS_ON_TOP
|
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_MENU_INSETS
|
static java.lang.String |
PROPERTY_MENU_OUTSETS
|
static java.lang.String |
PROPERTY_OPEN_OPTION
|
static java.lang.String |
PROPERTY_PROPERTY_CHILDREN
|
static java.lang.String |
PROPERTY_STYLE_CHILDREN
|
static java.lang.String |
PROPERTY_SUBMENU_IMAGE
|
static java.lang.String |
PROPERTY_SUBMENU_IMAGE_ALIGNMENT
|
static java.lang.String |
PROPERTY_SUBMENU_IMAGE_BORDERED
|
static java.lang.String |
PROPERTY_SUBMENU_ROLLOVER_IMAGE
|
static java.lang.String |
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.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 | |
Menu()
Creates a Menu with no text or icon. |
|
Menu(nextapp.echo2.app.ImageReference icon)
Creates a Menu with an icon. |
|
Menu(MenuItem menuItem)
Creates a Menu with no text or icon and adds
menuItem as its first child. |
|
Menu(java.lang.String text)
Creates a Menu with text. |
|
Menu(java.lang.String text,
nextapp.echo2.app.ImageReference icon)
Creates a Menu with text and an icon. |
Method Summary | |
void |
add(nextapp.echo2.app.Component c)
Adds a Component to the end of the Menu .
|
void |
add(MenuItem menuItem)
Adds a MenuItem to the end of the Menu and
styles it the same if styleChildren is set to true. |
MenuItem |
add(java.lang.String text)
Creates and adds a MenuItem to the end of the
Menu with the specified text. |
int |
getLeftOffset()
|
boolean |
getMenuAlwaysOnTop()
|
nextapp.echo2.app.Color |
getMenuBackground()
|
nextapp.echo2.app.FillImage |
getMenuBackgroundImage()
Returns the background image for this Menu's drop down box. |
nextapp.echo2.app.Border |
getMenuBorder()
|
nextapp.echo2.app.Color |
getMenuForeground()
|
nextapp.echo2.app.Insets |
getMenuInsets()
|
MenuItem[] |
getMenuItems()
This returns the MenuItem's that are a direct child of this Menu. |
nextapp.echo2.app.Insets |
getMenuOutsets()
|
int |
getOpenOption()
|
nextapp.echo2.app.ImageReference |
getSubmenuImage()
|
int |
getSubmenuImageAlignment()
|
nextapp.echo2.app.ImageReference |
getSubmenuRolloverImage()
|
int |
getTopOffset()
Returns the top offset of this Menu |
boolean |
isClickToOpen()
|
boolean |
isDrawOuterBorders()
Returns true if the Menu's outer borders and insets/outsets will be drawn. |
boolean |
isHorizontal()
|
boolean |
isKeepAlive()
|
boolean |
isStyleChildren()
|
boolean |
isSubmenuImageBordered()
|
boolean |
isValidChild(nextapp.echo2.app.Component component)
|
void |
setClickToOpen(boolean clickToOpen)
Set to true if the Menu must be clicked on to open is drop down box. |
void |
setDrawOuterBorders(boolean newValue)
Sets the false to prevent the menu outer borders and insets from being used. |
void |
setHorizontal(boolean newValue)
Sets the whether the Menu is orientated horizontal or
vertical on the screen. |
void |
setKeepAlive(boolean newValue)
Set to true if drop down menu boxes will stay alive (ie visible) when the mouse moves out of them |
void |
setLeftOffset(int newLeftOffset)
Sets the left offset of the drop down box associated with this Menu |
void |
setMenuAlwaysOnTop(boolean newValue)
The menuAlwaysOnTop property can be used control how the popup menu box is drawn. |
void |
setMenuBackground(nextapp.echo2.app.Color menuBackground)
Sets the background color of the Menu's drop down box. |
void |
setMenuBackgroundImage(nextapp.echo2.app.FillImage newValue)
Sets the background image for this Menu's drop down box |
void |
setMenuBorder(nextapp.echo2.app.Border newValue)
Sets the border for this Menu's drop down box |
void |
setMenuForeground(nextapp.echo2.app.Color menuForeground)
Sets the foreground color of the Menu's drop down box. |
void |
setMenuInsets(nextapp.echo2.app.Insets menuInsets)
Sets the Insets used inside the Menu's drop down box. |
void |
setMenuOutsets(nextapp.echo2.app.Insets menuOutsets)
Sets the Insets used outside the Menu's drop down box. |
void |
setOpenOption(int newValue)
Sets the Menu's drop down box opening options. |
void |
setStyleChildren(boolean newValue)
Set to true if child Menu's and MenuItems will be styled with the same presentation parameters as this Menu when they are added. |
void |
setSubmenuImage(nextapp.echo2.app.ImageReference newImageRef)
Sets the submenu ImageReference of the Menu .
|
void |
setSubmenuImageAlignment(int newAlignment)
Sets the alignment of the submenu image of the Menu . |
void |
setSubmenuImageBordered(boolean newValue)
Set to true if the submenu image is bordered with the Menu's border color / style and size. |
void |
setSubmenuRolloverImage(nextapp.echo2.app.ImageReference newValue)
Sets the submenu image used when the mouse if rolled over the Menu |
void |
setTopOffset(int newTopOffset)
Sets the top offset of the drop down box associated with this Menu |
void |
styleAllMenuItems()
This methods will call styleMenuItem() for every child MenuItem in the Menu. |
void |
styleAllMenuItems(nextapp.echo2.app.Style menuStyle,
nextapp.echo2.app.Style menuItemStyle)
This static method will set the style via setStyle() of the each of the child menus and menu items using topMenu as the top most level Menu. |
void |
styleAllMenuItemsByName(java.lang.String menuStyleName,
java.lang.String menuItemStyleName)
This method will set the style name via setStyleName() of the each of the child menus and menu items using topMenu as the top most level Menu. |
void |
styleMenuItem(MenuItem menuItem)
This will style the MenuItem with the same presentation parameters as this Menu. |
java.lang.String |
toString()
|
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.Borderable |
getBorder, setBorder |
Methods inherited from interface echopointng.able.Delegateable |
getRenderProperty, getRenderProperty |
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 |
public static final nextapp.echo2.app.ImageReference DEFAULT_SUBMENU_IMAGE
public static final int OPEN_ON_MOUSEOVER
public static final int OPEN_ON_CLICK
public static final int OPEN_ON_SUBMENU_CLICK
public static final java.lang.String PROPERTY_BACKGROUND_IMAGE
public static final java.lang.String PROPERTY_DRAW_OUTER_BORDERS
public static final java.lang.String PROPERTY_HORIZONTAL
public static final java.lang.String PROPERTY_KEEP_ALIVE
public static final java.lang.String PROPERTY_LEFT_OFFSET
public static final java.lang.String PROPERTY_MENU_ALWAYS_ON_TOP
public static final java.lang.String PROPERTY_MENU_BACKGROUND
public static final java.lang.String PROPERTY_MENU_BACKGROUND_IMAGE
public static final java.lang.String PROPERTY_MENU_BORDER
public static final java.lang.String PROPERTY_MENU_FOREGROUND
public static final java.lang.String PROPERTY_MENU_INSETS
public static final java.lang.String PROPERTY_MENU_OUTSETS
public static final java.lang.String PROPERTY_OPEN_OPTION
public static final java.lang.String PROPERTY_PROPERTY_CHILDREN
public static final java.lang.String PROPERTY_STYLE_CHILDREN
public static final java.lang.String PROPERTY_SUBMENU_IMAGE
public static final java.lang.String PROPERTY_SUBMENU_IMAGE_ALIGNMENT
public static final java.lang.String PROPERTY_SUBMENU_IMAGE_BORDERED
public static final java.lang.String PROPERTY_SUBMENU_ROLLOVER_IMAGE
public static final java.lang.String PROPERTY_TOP_OFFSET
public static final nextapp.echo2.app.Style DEFAULT_STYLE
Constructor Detail |
public Menu()
Menu
with no text or icon.
public Menu(MenuItem menuItem)
Menu
with no text or icon and adds
menuItem as its first child.
menuItem
- - the first child to add to this Menu
public Menu(nextapp.echo2.app.ImageReference icon)
Menu
with an icon.
icon
- An icon to display in the Menu
.public Menu(java.lang.String text)
Menu
with text.
text
- A text label to display in the Menu
.public Menu(java.lang.String text, nextapp.echo2.app.ImageReference icon)
Menu
with text and an icon.
text
- A text label to display in the Menu
.icon
- An icon to display in the Menu
.Method Detail |
public void add(nextapp.echo2.app.Component c)
Component
to the end of the Menu
.
This could typically be a Separator
. If the Component is
a MenuItem then it is styled if styleChildren is set to true.
public void add(MenuItem menuItem)
MenuItem
to the end of the Menu
and
styles it the same if styleChildren is set to true.
menuItem
- -
the new child MenuItempublic MenuItem add(java.lang.String text)
MenuItem
to the end of the
Menu
with the specified text.
public int getLeftOffset()
Menu
getMenuAlwaysOnTop
public boolean getMenuAlwaysOnTop()
- See Also:
setMenuAlwaysOnTop(boolean)
getMenuBackground
public nextapp.echo2.app.Color getMenuBackground()
- Returns:
- Returns the background color of the Menu's drop down box.
getMenuBackgroundImage
public nextapp.echo2.app.FillImage getMenuBackgroundImage()
- Returns the background image for this Menu's drop down box.
- Returns:
- The background image for this Menu's drop down box.
getMenuBorder
public nextapp.echo2.app.Border getMenuBorder()
- Returns:
- the border around the Menu drop down box
getMenuForeground
public nextapp.echo2.app.Color getMenuForeground()
- Returns:
- Returns the foreground color of the Menu's drop down box.
getMenuInsets
public nextapp.echo2.app.Insets getMenuInsets()
- Returns:
- the Insets used inside the Menu's drop down box.
getMenuItems
public MenuItem[] getMenuItems()
- This returns the MenuItem's that are a direct child of this Menu.
- Returns:
- a non null array of MenuItem's
getMenuOutsets
public nextapp.echo2.app.Insets getMenuOutsets()
- Returns:
- the Insets used outside the Menu's drop down box.
getOpenOption
public int getOpenOption()
- Returns:
- Returns the Menu's Drop Down Box opening option.
getSubmenuImage
public nextapp.echo2.app.ImageReference getSubmenuImage()
- Returns:
- The submenu
Image Reference
of the
Menu
.
getSubmenuImageAlignment
public int getSubmenuImageAlignment()
- Returns:
- The submenu image alignmentof the
Menu
.
getSubmenuRolloverImage
public nextapp.echo2.app.ImageReference getSubmenuRolloverImage()
- Returns:
- the submenu image used when the mouse if rolled over the Menu
getTopOffset
public int getTopOffset()
- Returns the top offset of this
Menu
- Returns:
- int
isClickToOpen
public boolean isClickToOpen()
- Returns:
- Returns true if the Menu must be clicked on to open is drop down
box.
This will return true if the open options are set to
OPEN_ON_CLICK or OPEN_ON_SUBMENU_CLICK.
isDrawOuterBorders
public boolean isDrawOuterBorders()
- Returns true if the Menu's outer borders and insets/outsets will be
drawn.
- Returns:
- true if the Menu's outer borders and insets/outsets will be
drawn.
isHorizontal
public boolean isHorizontal()
- Returns:
- true if the Menu is oriented in a horizontal manner
isKeepAlive
public boolean isKeepAlive()
- Returns:
- true if drop down menu boxes will stay alive (ie visible) when
the mouse moves out of them
isStyleChildren
public boolean isStyleChildren()
- Returns:
- true if child Menu's and MenuItems will be styled with the same
presentation parameters as this Menu when they are added.
isSubmenuImageBordered
public boolean isSubmenuImageBordered()
- Returns:
- true if the submenu image is bordered with the Menu's border
color / style and size.
setClickToOpen
public void setClickToOpen(boolean clickToOpen)
- Set to true if the Menu must be clicked on to open is drop down box.
This is the equivalent of calling setOpenOption(OPEN_ON_CLICK);
If clickToOpen is false, then this is the equivalent of calling
setOpenOption(OPEN_ON_MOUSEOVER);
- Parameters:
clickToOpen
- true ot false
setDrawOuterBorders
public void setDrawOuterBorders(boolean newValue)
- Sets the false to prevent the menu outer borders and insets from being
used.
- Parameters:
newValue
- -
The newValue to set.
setHorizontal
public void setHorizontal(boolean newValue)
- Sets the whether the
Menu
is orientated horizontal or
vertical on the screen.
setKeepAlive
public void setKeepAlive(boolean newValue)
- Set to true if drop down menu boxes will stay alive (ie visible) when the
mouse moves out of them
setLeftOffset
public void setLeftOffset(int newLeftOffset)
- Sets the left offset of the drop down box associated with this
Menu
relative to its parent.
- Parameters:
newLeftOffset
- the left offset of this Menu
setMenuAlwaysOnTop
public void setMenuAlwaysOnTop(boolean newValue)
- The menuAlwaysOnTop property can be used control how the popup menu box
is drawn.
If this is true, then the Menu box with always take the highest position
on the screen and will disregard parent clipping and scrolling constraints.
If this is false, then the normal client clipping and scrollling
constraints will apply. This can cause the popup menu box to be
shown under other components according to the current hierarchy.
- Parameters:
newValue
- - the new menuAlwaysOnTop value
setMenuBackground
public void setMenuBackground(nextapp.echo2.app.Color menuBackground)
- Sets the background color of the Menu's drop down box.
- Parameters:
menuBackground
- the new background
setMenuBackgroundImage
public void setMenuBackgroundImage(nextapp.echo2.app.FillImage newValue)
- Sets the background image for this Menu's drop down box
- Parameters:
newValue
- The new background image.
setMenuBorder
public void setMenuBorder(nextapp.echo2.app.Border newValue)
- Sets the border for this Menu's drop down box
- Parameters:
newValue
- The new border
setMenuForeground
public void setMenuForeground(nextapp.echo2.app.Color menuForeground)
- Sets the foreground color of the Menu's drop down box.
- Parameters:
menuForeground
- -
the new color
setMenuInsets
public void setMenuInsets(nextapp.echo2.app.Insets menuInsets)
- Sets the Insets used inside the Menu's drop down box. Note that this
differs from the Insets that are used for the Menu's text within its
parent Menu drop down box.
- Parameters:
menuInsets
- the Insets used inside the Menu's drop down box.
setMenuOutsets
public void setMenuOutsets(nextapp.echo2.app.Insets menuOutsets)
- Sets the Insets used outside the Menu's drop down box. Note that this
differs from the outsets that are used for the Menu's text within its
parent Menu drop down box.
- Parameters:
menuOutsets
- the Insets used outside the Menu's drop down box.
setOpenOption
public void setOpenOption(int newValue)
- Sets the Menu's drop down box opening options. This can be one of the
following values :
- OPEN_ON_MOUSEOVER - opens the Menu's drop down box when the mouse
moves over the Menu's button part.
- OPEN_ON_CLICK - opens the Menu's drop down box when the mouse is
clicked anywhere on the Menu's button part.
- OPEN_ON_SUBMENU_CLICK - opens the Menu's drop down box when the
mouse is clicked only on the Menu's sub menu image part.
- Parameters:
newValue
- -
The newValue to set.
setStyleChildren
public void setStyleChildren(boolean newValue)
- Set to true if child Menu's and MenuItems will be styled with the same
presentation parameters as this Menu when they are added.
- Parameters:
newValue
- -
whether to style children when added
setSubmenuImage
public void setSubmenuImage(nextapp.echo2.app.ImageReference newImageRef)
- Sets the submenu
ImageReference
of the Menu
.
This submenu image will only be shown if the Menu does in fact have
children
setSubmenuImageAlignment
public void setSubmenuImageAlignment(int newAlignment)
- Sets the alignment of the submenu image of the
Menu
.
This can be one of the following values :
- Alignment.LEFT
- Alignment.RIGHT (the default)
setSubmenuImageBordered
public void setSubmenuImageBordered(boolean newValue)
- Set to true if the submenu image is bordered with the Menu's border color /
style and size.
- Parameters:
newValue
- -
true of false
setSubmenuRolloverImage
public void setSubmenuRolloverImage(nextapp.echo2.app.ImageReference newValue)
- Sets the submenu image used when the mouse if rolled over the Menu
- Parameters:
newValue
- -
the new image
setTopOffset
public void setTopOffset(int newTopOffset)
- Sets the top offset of the drop down box associated with this
Menu
relative to its parent.
- Parameters:
newTopOffset
- the top offset of this Menu
styleAllMenuItems
public void styleAllMenuItems()
- This methods will call styleMenuItem() for every child MenuItem in the
Menu. It will recurse down the parent-child relationship tree for any
contained Menu's.
- See Also:
styleMenuItem(MenuItem)
styleMenuItem
public void styleMenuItem(MenuItem menuItem)
- This will style the MenuItem with the same presentation parameters as
this Menu. The following groups of properties are set :
- foreground, background, font, background image
- borders
- rollover foreground, background, font, background image
- rollover borders
- insets, outsets
- If the MenuItem is in fact a Menu
- menu foreground, background, font
- menu borders
- menu insets, outsets
- menu submenu image, submenu alignment
- menu submenu rollover image, submenu bordered
- menu background image properties
Note only screen presentation parameters are set, other functional
parameters such as isHorizontal() are not set.
Also the getStyle() value is copied into the MenuItem as well.
- Parameters:
menuItem
- -
the MenuItem to style the same as this Menu
styleAllMenuItemsByName
public void styleAllMenuItemsByName(java.lang.String menuStyleName,
java.lang.String menuItemStyleName)
- This method will set the style name via setStyleName() of the each of the
child menus and menu items using topMenu as the top most level Menu. It
calls setStyleName() of the starting Menu as well.
- Parameters:
menuStyleName
- -
the style name to use for instances of MenumenuItemStyleName
- -
the style name to use for instances of MenuItem
styleAllMenuItems
public void styleAllMenuItems(nextapp.echo2.app.Style menuStyle,
nextapp.echo2.app.Style menuItemStyle)
- This static method will set the style via setStyle() of the each of the
child menus and menu items using topMenu as the top most level Menu. It
calls setStyle() of the starting Menu as well.
- Parameters:
menuStyle
- -
the style to use for instances of MenumenuItemStyle
- -
the style to use for instances of MenuItem
isValidChild
public boolean isValidChild(nextapp.echo2.app.Component component)
- See Also:
AbstractButton.isValidChild(nextapp.echo2.app.Component)
toString
public java.lang.String toString()
- Overrides:
toString
in class MenuItem
- See Also:
Object.toString()
Overview
Package
Class
Tree
Deprecated
Index
Help
EchoPoint
2.1.0rc4
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD