|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.AbstractButton
javax.swing.JButton
org.ceryle.ui.ArrowButton
public class ArrowButton
Extends JButton, creating a four-mode arrow button. The four modes are 'LEFT', 'RIGHT', 'BOTH', and optionally, 'NONE' (no arrowheads). Clicking on the button rotates through the successive modes. The button has default, selected, and disabled icons for each mode.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JButton |
|---|
JButton.AccessibleJButton |
| Nested classes/interfaces inherited from class javax.swing.AbstractButton |
|---|
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static int |
BOTH
State indicator for both (symmetric, arrows pointing both directions). |
static int |
LEFT
State indicator for left. |
protected int |
m_state
Current state. |
static int |
MAX
State maximum (limit). |
static int |
NONE
State indicator for none (undirected, no arrows). |
static boolean |
onDoubleClick
If true, only a double-click will cycle the arrow state. |
static int |
RIGHT
State indicator for right. |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
ArrowButton(String id,
int initialState,
EventListener listener)
Constructor with necessary components for the retrieval of string properties, IDs, labels, etc. |
|
| Method Summary | |
|---|---|
int |
getState()
Returns the current button state as an int. |
static String |
getStateDescription(int state)
A static method that returns a String representation of state. |
boolean |
setState(int state)
Sets the button state to the int state. |
| Methods inherited from class javax.swing.JButton |
|---|
configurePropertiesFromAction, getAccessibleContext, getUIClassID, isDefaultButton, isDefaultCapable, paramString, removeNotify, setDefaultCapable, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static boolean onDoubleClick
public static final int RIGHT
public static final int LEFT
public static final int BOTH
public static final int NONE
public static final int MAX
protected int m_state
| Constructor Detail |
|---|
public ArrowButton(String id,
int initialState,
EventListener listener)
id - the String identifier for the buttoninitialState - the initial state: left, right, both, or nonelistener - the optional listener for events| Method Detail |
|---|
public int getState()
LEFT, RIGHT, or BOTH.
public boolean setState(int state)
LEFT, RIGHT, or BOTH.
Returns true if the state changed via this call.
public static String getStateDescription(int state)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||