|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.opengl.gui.Component
com.threerings.opengl.gui.TextComponent
com.threerings.opengl.gui.Label
com.threerings.opengl.gui.MenuItem
public class MenuItem
Displays a single menu item.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.threerings.opengl.gui.Label |
|---|
Label.Fit |
| Field Summary |
|---|
| Fields inherited from class com.threerings.opengl.gui.Component |
|---|
DEFAULT, DISABLED, HOVER |
| Fields inherited from interface com.threerings.opengl.gui.UIConstants |
|---|
BOTTOM, CENTER, DEFAULT_SIZE, DEFAULT_SPACING, GLOW, HORIZONTAL, LEFT, NORMAL, OUTLINE, OVERLAPPING, PLAIN, RIGHT, SHADOW, TOP, VERTICAL |
| Constructor Summary | |
|---|---|
MenuItem(GlContext ctx,
Icon icon,
String action)
Creates a menu item with the specified icon that will generate an ActionEvent with the specified action when selected. |
|
MenuItem(GlContext ctx,
String text,
Icon icon,
String action)
Creates a menu item with the specified text and icon that will generate an ActionEvent with the specified action when selected. |
|
MenuItem(GlContext ctx,
String text,
Icon icon,
String action,
Object argument)
Creates a menu item with the specified text and icon that will generate an ActionEvent with the specified action and argument when selected. |
|
MenuItem(GlContext ctx,
String text,
String action)
Creates a menu item with the specified text that will generate an ActionEvent with the specified action when selected. |
|
| Method Summary | |
|---|---|
boolean |
dispatchEvent(Event event)
Instructs this component to process the supplied event. |
String |
getAction()
Returns the action configured for this menu item. |
Object |
getArgument()
Returns the argument of the action for this menu item. |
| Methods inherited from class com.threerings.opengl.gui.Label |
|---|
getFit, getIcon, getIconTextGap, getLabelRenderer, getText, setFit, setIcon, setIconTextGap, setOrientation, setPreferredWidth, setText, setTextRotation |
| Methods inherited from class com.threerings.opengl.gui.TextComponent |
|---|
getEffectColor, getEffectSize, getHorizontalAlignment, getLineSpacing, getTextEffect, getTextFactory, getVerticalAlignment |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MenuItem(GlContext ctx,
String text,
String action)
ActionEvent with the specified action when selected.
public MenuItem(GlContext ctx,
Icon icon,
String action)
ActionEvent with the specified action when selected.
public MenuItem(GlContext ctx,
String text,
Icon icon,
String action)
ActionEvent with the specified action when selected.
public MenuItem(GlContext ctx,
String text,
Icon icon,
String action,
Object argument)
ActionEvent with the specified action and argument when selected.
| Method Detail |
|---|
public String getAction()
public Object getArgument()
public boolean dispatchEvent(Event event)
Componentsuper.dispatchEvent for events that they did not "consume".
dispatchEvent in class Component
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||