|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.samskivert.swing.LabelSausage
com.samskivert.swing.RadialLabelSausage
com.samskivert.swing.RadialMenuItem
public class RadialMenuItem
Used to track info for each menu item in a RadialMenu.
| Field Summary | |
|---|---|
Object |
argument
A special argument to be used when this menu item is selected, rather than the argument provided to the radial menu when it was activated. |
String |
command
The command to issue if this item is selected. |
RadialMenu.Predicate |
predicate
Used to determine whether or not this menu item should be included in a menu and whether or not it should be enabled. |
| Fields inherited from class com.samskivert.swing.RadialLabelSausage |
|---|
_active, BORDER_STROKE, BORDER_THICKNESS, closedBounds, DISABLED_ALPHA, openBounds |
| Fields inherited from class com.samskivert.swing.LabelSausage |
|---|
_dia, _icon, _label, _lxoff, _lyoff, _size, _xoff, _yoff |
| Constructor Summary | |
|---|---|
RadialMenuItem(String command,
String label)
Constructs a radial menu item with the specified command and label. |
|
RadialMenuItem(String command,
String label,
Icon icon)
Constructs a radial menu item with the specified command, label and icon. |
|
RadialMenuItem(String command,
String label,
Icon icon,
RadialMenu.Predicate predicate)
Constructs a radial menu item with the specified command, label and icon. |
|
| Method Summary | |
|---|---|
protected void |
drawIcon(Graphics2D gfx,
int x,
int y,
Object cliData)
Draws the icon, if applicable. |
boolean |
equals(Object other)
Menu items are equal if their commands are equal. |
boolean |
isEnabled(RadialMenu menu)
Returns true if this menu item should be enabled when it is displayed. |
boolean |
isIncluded(RadialMenu menu)
Returns true if this menu item should be included in a menu when it is displayed. |
void |
render(Component host,
RadialMenu menu,
Graphics2D gfx,
int x,
int y)
Renders this menu item at the specified location. |
| Methods inherited from class com.samskivert.swing.RadialLabelSausage |
|---|
drawBase, drawBorder, drawExtras, drawLabel, layout, paint, setActive |
| Methods inherited from class com.samskivert.swing.LabelSausage |
|---|
layout, layout, paint |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public String command
public Object argument
public RadialMenu.Predicate predicate
| Constructor Detail |
|---|
public RadialMenuItem(String command,
String label)
public RadialMenuItem(String command,
String label,
Icon icon)
public RadialMenuItem(String command,
String label,
Icon icon,
RadialMenu.Predicate predicate)
| Method Detail |
|---|
public boolean isIncluded(RadialMenu menu)
RadialMenu.Predicate if
we have one.
public boolean isEnabled(RadialMenu menu)
RadialMenu.Predicate if we
have one.
isEnabled in class RadialLabelSausagepublic boolean equals(Object other)
equals in class Object
public void render(Component host,
RadialMenu menu,
Graphics2D gfx,
int x,
int y)
protected void drawIcon(Graphics2D gfx,
int x,
int y,
Object cliData)
LabelSausage
drawIcon in class LabelSausage
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||