|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nextapp.echo.Component nextapp.echo.AbstractButton echopoint.MenuItem echopoint.Menu
The Menu
class provides a Component
that can be added to a menu bar or other menu items.
Nested Class Summary | |
static class |
Menu.NestedStyleInfo
Nested public static StyleInfo class. |
Field Summary | |
static java.lang.String |
LEFT_OFFSET_CHANGED_PROPERTY
|
protected int |
leftOffset
|
protected int |
margin
|
static java.lang.String |
MARGIN_CHANGED_PROPERTY
|
static java.lang.String |
MENU_BORDER_COLOR_CHANGED_PROPERTY
|
static java.lang.String |
MENU_BORDER_SIZE_CHANGED_PROPERTY
|
protected nextapp.echo.Color |
menuBorderColor
|
protected int |
menuBorderSize
|
protected int |
padding
|
static java.lang.String |
PADDING_CHANGED_PROPERTY
|
static java.lang.String |
STYLE_LEFT_OFFSET
A style constant for the Left Offset property. |
static java.lang.String |
STYLE_MARGIN
A style constant for the Margin property. |
static java.lang.String |
STYLE_MENU_BORDER_COLOR
A style constant for the Menu Border Color property. |
static java.lang.String |
STYLE_MENU_BORDER_SIZE
A style constant for the Menu Border Size property. |
static java.lang.String |
STYLE_PADDING
A style constant for the Padding property. |
static java.lang.String |
STYLE_ROLLOVER_SUBMENU_IMAGE
A style constant for the Submenu Image property. |
static java.lang.String |
STYLE_ROLLOVER_SUBMENU_IMAGE_ALIGNMENT
A style constant for the Submenu Image Alignment property. |
static java.lang.String |
STYLE_TOP_OFFSET
A style constant for the Top Offset property. |
static java.lang.String |
STYLE_WIDTH
A style constant for the Width property. |
static java.lang.String |
SUBMENU_IMAGE_ALIGNMENT_CHANGED_PROPERTY
|
static java.lang.String |
SUBMENU_IMAGE_CHANGED_PROPERTY
Property Changes Names |
protected nextapp.echo.ImageReference |
submenuImage
|
protected int |
submenuImageAlignment
|
static java.lang.String |
TOP_OFFSET_CHANGED_PROPERTY
|
protected int |
topOffset
|
protected int |
width
|
static java.lang.String |
WIDTH_CHANGED_PROPERTY
|
Fields inherited from class echopoint.MenuItem |
BORDER_COLOR_CHANGED_PROPERTY, borderColor, rolloverColor, STYLE_BORDER_COLOR, STYLE_ROLLOVER_BORDER_COLOR, TEXT_ALIGNMENT_CHANGED_PROPERTY |
Fields inherited from class nextapp.echo.AbstractButton |
ACTION_COMMAND_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, ICON_TEXT_MARGIN_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, ROLLOVER_BACKGROUND_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_FONT_CHANGED_PROPERTY, ROLLOVER_FOREGROUND_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, STYLE_HORIZONTAL_ALIGNMENT, STYLE_HORIZONTAL_TEXT_POSITION, STYLE_ICON_TEXT_MARGIN, STYLE_ROLLOVER_BACKGROUND, STYLE_ROLLOVER_ENABLED, STYLE_ROLLOVER_FONT, STYLE_ROLLOVER_FOREGROUND, STYLE_VERTICAL_ALIGNMENT, STYLE_VERTICAL_TEXT_POSITION, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY |
Fields inherited from class nextapp.echo.Component |
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, listenerList, LOCALE_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY |
Fields inherited from interface nextapp.echo.ToolTipSupport |
TOOL_TIP_TEXT_CHANGED_PROPERTY |
Constructor Summary | |
Menu()
Creates a button with no text or icon. |
|
Menu(nextapp.echo.ImageReference icon)
Creates a button with an icon. |
|
Menu(java.lang.String text)
Creates a button with text. |
|
Menu(java.lang.String text,
nextapp.echo.ImageReference icon)
Creates a button with text and an icon. |
Method Summary | |
void |
add(nextapp.echo.Component c)
Adds a Component to the end of the Menu . |
MenuItem |
add(MenuItem menuItem)
Adds a MenuItem to the end of the Menu . |
MenuItem |
add(java.lang.String text)
Adds a MenuItem to the end of the Menu with the specified text. |
protected void |
addToHierarchy(nextapp.echo.Component c)
Adds a Component to the echo hierarchy. |
void |
applyStyle(nextapp.echo.Style style)
Applies the provided style to the component. |
int |
getLeftOffset()
Returns the left offset of this Menu |
int |
getMargin()
Gets the margin of the Menu on the screen.
|
nextapp.echo.Color |
getMenuBorderColor()
|
int |
getMenuBorderSize()
|
int |
getPadding()
Gets the padding of the Menu on the screen.
|
nextapp.echo.ImageReference |
getSubmenuImage()
|
int |
getSubmenuImageAlignment()
|
int |
getTopOffset()
Returns the top offset of this Menu |
int |
getWidth()
Sets the width of the Menu on the screen.
|
void |
remove(nextapp.echo.Component c)
Removes a Component from the Menu . |
java.lang.Object |
set(java.lang.reflect.Field field,
java.lang.Object newValue)
Called to save the old value of a field, set in a new value and return the old value of a field. |
void |
setLeftOffset(int newLeftOffset)
Sets the left offset of this Menu |
void |
setMargin(int newValue)
Sets the margin of the Menu on the screen.
|
void |
setMenuBorderColor(nextapp.echo.Color newBorderColor)
Sets the Color of the Menu's border.
|
void |
setMenuBorderSize(int newBorderSize)
Sets the size of the Menu outer border.
|
void |
setPadding(int newValue)
Sets the padding of the Menu on the screen.
|
void |
setSubmenuImage(nextapp.echo.ImageReference newImageRef)
Sets the submenu ImageReference of the Menu .
|
void |
setSubmenuImageAlignment(int newAlignment)
Sets the submenu alignment of the Menu .
|
void |
setTopOffset(int newTopOffset)
Sets the top offset of this Menu |
void |
setWidth(int newValue)
Sets the width of the Menu on the screen.
|
java.lang.String |
toString()
|
Methods inherited from class echopoint.MenuItem |
getBorderColor, getId, getRolloverBorderColor, setBorderColor, setRolloverBorderColor |
Methods inherited from class nextapp.echo.AbstractButton |
addActionListener, addChangeListener, addItemListener, doAction, fireActionPerformed, fireItemStateChanged, fireStateChanged, getActionCommand, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextMargin, getModel, getRolloverBackground, getRolloverFont, getRolloverForeground, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getText, getToolTipText, getVerticalAlignment, getVerticalTextPosition, hasActionListeners, isRolloverEnabled, isSelected, removeActionListener, removeChangeListener, removeItemListener, setActionCommand, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextMargin, setModel, setRolloverBackground, setRolloverEnabled, setRolloverFont, setRolloverForeground, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setToolTipText, setVerticalAlignment, setVerticalTextPosition |
Methods inherited from class nextapp.echo.Component |
add, addHierarchyListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getLocale, getParent, indexOf, init, isAncestorOf, isEnabled, isRegistered, isShowing, isVisible, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setEnabled, setFont, setForeground, setIdentifier, setLocale, setVisible, update, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String STYLE_ROLLOVER_SUBMENU_IMAGE
nextapp.echo.ImageReference.
public static final java.lang.String STYLE_ROLLOVER_SUBMENU_IMAGE_ALIGNMENT
int
public static final java.lang.String STYLE_WIDTH
int
public static final java.lang.String STYLE_MARGIN
int
public static final java.lang.String STYLE_PADDING
int
public static final java.lang.String STYLE_MENU_BORDER_COLOR
Color
public static final java.lang.String STYLE_MENU_BORDER_SIZE
Integer.
public static final java.lang.String STYLE_TOP_OFFSET
int
public static final java.lang.String STYLE_LEFT_OFFSET
int
public static final java.lang.String SUBMENU_IMAGE_CHANGED_PROPERTY
public static final java.lang.String SUBMENU_IMAGE_ALIGNMENT_CHANGED_PROPERTY
public static final java.lang.String WIDTH_CHANGED_PROPERTY
public static final java.lang.String MARGIN_CHANGED_PROPERTY
public static final java.lang.String PADDING_CHANGED_PROPERTY
public static final java.lang.String MENU_BORDER_COLOR_CHANGED_PROPERTY
public static final java.lang.String MENU_BORDER_SIZE_CHANGED_PROPERTY
public static final java.lang.String TOP_OFFSET_CHANGED_PROPERTY
public static final java.lang.String LEFT_OFFSET_CHANGED_PROPERTY
protected nextapp.echo.ImageReference submenuImage
protected int submenuImageAlignment
protected int width
protected int margin
protected int padding
protected nextapp.echo.Color menuBorderColor
protected int menuBorderSize
protected int topOffset
protected int leftOffset
Constructor Detail |
public Menu()
public Menu(java.lang.String text)
text
- A text label to display in the button.public Menu(java.lang.String text, nextapp.echo.ImageReference icon)
text
- A text label to display in the button.icon
- An icon to display in the button.public Menu(nextapp.echo.ImageReference icon)
icon
- An icon to display in the button.Method Detail |
public MenuItem add(MenuItem menuItem)
MenuItem
to the end of the Menu
.
public MenuItem add(java.lang.String text)
MenuItem
to the end of the Menu
with the specified text.
public void add(nextapp.echo.Component c)
Component
to the end of the Menu
. This could
typically by a Separator
.
protected void addToHierarchy(nextapp.echo.Component c)
Component
to the echo hierarchy. This can be used
to avoid unintentional super.add() calls.
public void applyStyle(nextapp.echo.Style style)
nextapp.echo.Component
style names can be used as well.
applyStyle
in class MenuItem
public int getLeftOffset()
Menu
Note: Thjis only takes effect when the Menu is a direct child of
the MenuBar, ie a first level child.
- Returns:
- int
public int getMargin()
Menu
on the screen.
Menu
will have no margins
public nextapp.echo.Color getMenuBorderColor()
Color
of the Menu's
border.public int getMenuBorderSize()
Menu's
outer border.public int getPadding()
Menu
on the screen.
Menu
will have no padding
public nextapp.echo.ImageReference getSubmenuImage()
Image Reference
of the Menu
.public int getSubmenuImageAlignment()
Menu
.public int getTopOffset()
Menu
Note: This only takes effect when the Menu is a direct child of
the MenuBar, ie a first level child.
- Returns:
- int
public int getWidth()
Menu
on the screen.
Menu
will be as wide
as required.
public void remove(nextapp.echo.Component c)
Component
from the Menu
.
public void setLeftOffset(int newLeftOffset)
Menu
Note: Thjis only takes effect when the Menu is a direct child of
the MenuBar, ie a first level child.
- Parameters:
newLeftOffset
- int
public void setMargin(int newValue)
Menu
on the screen.
Menu
will have no margin
PropertyChangeEvent
with a
getPropertyName()
value of
Menu.MARGIN_CHANGED_PROPERTY
public void setMenuBorderColor(nextapp.echo.Color newBorderColor)
Color
of the Menu's
border.
PropertyChangeEvent
with a
getPropertyName()
value of
MenuItem.MENU_BORDER_COLOR_CHANGED_PROPERTY
public void setMenuBorderSize(int newBorderSize)
Menu
outer border.
PropertyChangeEvent
with a
getPropertyName()
value of
Menu.BORDER_SIZE_CHANGED_PROPERTY
public void setPadding(int newValue)
Menu
on the screen.
Menu
will have no padding
PropertyChangeEvent
with a
getPropertyName()
value of
Menu.PADDING_CHANGED_PROPERTY
public void setSubmenuImage(nextapp.echo.ImageReference newImageRef)
ImageReference
of the Menu
.
PropertyChangeEvent
with a
getPropertyName()
value of
Menu.SUBMENU_IMAGE_CHANGED_PROPERTY
public void setSubmenuImageAlignment(int newAlignment)
Menu
.
PropertyChangeEvent
with a
getPropertyName()
value of
Menu.SUBMENU_IMAGE_ALIGNMENT_CHANGED_PROPERTY
public void setTopOffset(int newTopOffset)
Menu
Note: Thjis only takes effect when the Menu is a direct child of
the MenuBar, ie a first level child.
- Parameters:
newTopOffset
- int
public void setWidth(int newValue)
Menu
on the screen.
Menu
will be as wide
as required.
PropertyChangeEvent
with a
getPropertyName()
value of
Menu.WIDTH_CHANGED_PROPERTY
public java.lang.String toString()
toString
in class MenuItem
Object.toString()
public java.lang.Object set(java.lang.reflect.Field field, java.lang.Object newValue) throws java.lang.Exception
ReflectionSetter
public Object set(Field f, Object newValue) throws Exception { Object oldValue = f.get(this); f.set(this,newValue); return oldValue; }
set
in interface ReflectionSetter
set
in class MenuItem
java.lang.Exception
ReflectionSetter.set(Field, Object)
|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |