|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnextapp.echo.AbstractComponent
nextapp.echo.AbstractButton
echopoint.MenuItem
public class MenuItem
The MenuItem class provides a Component that
can be added to a menu bar or other menu items.
| Nested Class Summary | |
|---|---|
static class |
MenuItem.NestedStyleInfo
Nested public static StyleInfo class. |
| Field Summary | |
|---|---|
static java.lang.String |
BORDER_COLOR_CHANGED_PROPERTY
Property Change Names |
protected Color |
borderColor
|
protected Color |
rolloverColor
|
static java.lang.String |
STYLE_BORDER_COLOR
A style constant for the Border Color property. |
static java.lang.String |
STYLE_ROLLOVER_BORDER_COLOR
A style constant for the Rollover Border Color property. |
static java.lang.String |
TEXT_ALIGNMENT_CHANGED_PROPERTY
|
| Fields inherited from interface nextapp.echo.ToolTipSupport |
|---|
TOOL_TIP_TEXT_CHANGED_PROPERTY |
| Constructor Summary | |
|---|---|
MenuItem()
Creates a button with no text or icon. |
|
MenuItem(ImageReference icon)
Creates a button with an icon. |
|
MenuItem(java.lang.String text)
Creates a button with text. |
|
MenuItem(java.lang.String text,
ImageReference icon)
Creates a button with text and an icon. |
|
| Method Summary | |
|---|---|
void |
applyStyle(Style style)
Applies the provided style to the component. |
Color |
getBorderColor()
|
int |
getId()
Returns the unique and immutable Id of the MenuItem |
Color |
getRolloverBorderColor()
|
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 |
setBorderColor(Color newBorderColor)
Sets the Color of the border around
MenuItem's text. |
void |
setRolloverBorderColor(Color newBorderColor)
Sets the Color of the border around the
MenuItem's text when the mouse is over the menu item. |
java.lang.String |
toString()
|
| 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_BORDER_COLOR
nextapp.echo.Color.
public static final java.lang.String STYLE_ROLLOVER_BORDER_COLOR
nextapp.echo.Color.
public static final java.lang.String BORDER_COLOR_CHANGED_PROPERTY
public static final java.lang.String TEXT_ALIGNMENT_CHANGED_PROPERTY
protected Color borderColor
protected Color rolloverColor
| Constructor Detail |
|---|
public MenuItem()
public MenuItem(java.lang.String text)
text - A text label to display in the button.
public MenuItem(java.lang.String text,
ImageReference icon)
text - A text label to display in the button.icon - An icon to display in the button.public MenuItem(ImageReference icon)
icon - An icon to display in the button.| Method Detail |
|---|
public void applyStyle(Style style)
nextapp.echo.Component style names can be used as well.
applyStyle in interface ComponentapplyStyle in class AbstractButtonstyle - The style object from which to retrieve properties for this
Component.Component.applyStyle(Style)public Color getBorderColor()
Color of the border around
MenuItem's text.public int getId()
MenuItem
public Color getRolloverBorderColor()
Color of the border around the
MenuItem's text when the mouse if over the menu
item.public void setBorderColor(Color newBorderColor)
Color of the border around
MenuItem's text. PropertyChangeEvent with a
getPropertyName() value of
MenuItem.BORDER_COLOR_CHANGED_PROPERTY
public void setRolloverBorderColor(Color newBorderColor)
Color of the border around the
MenuItem's text when the mouse is over the menu item. PropertyChangeEvent with a
getPropertyName() value of
MenuItem.BORDER_COLOR_CHANGED_PROPERTY
public java.lang.String toString()
toString in class java.lang.Object
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 ReflectionSetterfield - - the field to be setnewValue - - the new value to be set
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.NullPointerException
java.lang.ExceptionReflectionSetter.set(Field, Object)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||