|
Draw2D v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.eclipse.draw2d.ButtonModel
A model for buttons.
| Field Summary | |
protected String |
actionName
|
protected static int |
ARMED_FLAG
|
static String |
ARMED_PROPERTY
Deprecated. This property will soon disappear since it is simply defined by (isPressed() & isRollover()) |
static int |
DEFAULT_FIRING_BEHAVIOR
|
protected static int |
ENABLED_FLAG
|
static String |
ENABLED_PROPERTY
|
protected org.eclipse.draw2d.ButtonStateTransitionListener |
firingBehavior
|
protected ButtonGroup |
group
|
protected static int |
MAX_FLAG
|
protected static int |
MOUSEOVER_FLAG
|
static String |
MOUSEOVER_PROPERTY
|
protected static int |
PRESSED_FLAG
|
static String |
PRESSED_PROPERTY
|
static int |
REPEAT_FIRING_BEHAVIOR
|
protected static int |
ROLLOVER_ENABLED_FLAG
|
static String |
ROLLOVER_ENABLED_PROPERTY
|
protected static int |
SELECTED_FLAG
|
static String |
SELECTED_PROPERTY
|
| Constructor Summary | |
ButtonModel()
|
|
| Method Summary | |
void |
addActionListener(ActionListener listener)
Registers the given listener as an ActionListener. |
void |
addChangeListener(ChangeListener listener)
Registers the given listener as a ChangeListener. |
void |
addStateTransitionListener(org.eclipse.draw2d.ButtonStateTransitionListener listener)
Registers the given listener as a ButtonStateTransitionListener. |
protected void |
fireActionPerformed()
Notifies any ActionListeners on this ButtonModel that an action has been performed. |
protected void |
fireCanceled()
Notifies any listening ButtonStateTransitionListener that the pressed state of this button has been cancelled. |
protected void |
firePressed()
Notifies any listening ButtonStateTransitionListener that this button has been pressed. |
protected void |
fireReleased()
Notifies any listening ButtonStateTransitionListener that this button has been released. |
protected void |
fireResume()
Notifies any listening ButtonStateTransitionListeners that this button has resumed activity. |
protected void |
fireStateChanged(String property)
Notifies any listening ChangeListeners that this button's state has changed. |
protected void |
fireSuspend()
Notifies any listening ButtonStateTransitionListeners that this button has suspended activity. |
ButtonGroup |
getGroup()
Returns the group to which this model belongs. |
Object |
getUserData()
Returns an object representing user data. |
protected void |
installFiringBehavior()
Sets the firing behavior for this button. |
boolean |
isArmed()
Returns true if this button is armed. |
boolean |
isEnabled()
Returns true if this button is enabled. |
boolean |
isMouseOver()
Returns true if the mouse is over this button. |
boolean |
isPressed()
Returns true if this button is pressed. |
boolean |
isSelected()
Returns the selection state of this model. |
void |
removeActionListener(ActionListener listener)
Removes the given ActionListener. |
void |
removeChangeListener(ChangeListener listener)
Removes the given ChangeListener. |
void |
removeStateTransitionListener(org.eclipse.draw2d.ButtonStateTransitionListener listener)
Removes the given ButtonStateTransitionListener. |
void |
setArmed(boolean value)
Sets this button to be armed. |
void |
setEnabled(boolean value)
Sets this button to be enabled. |
void |
setFiringBehavior(int type)
Sets the firing behavior for this button. |
void |
setGroup(ButtonGroup bg)
Sets the ButtonGroup to which this model belongs to. |
void |
setMouseOver(boolean value)
Sets the mouseover property of this button. |
protected void |
setPressed(boolean value)
Sets the pressed property of this button. |
void |
setSelected(boolean value)
Sets this button to be selected. |
void |
setUserData(Object data)
Sets user data. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String ENABLED_PROPERTY
public static final String PRESSED_PROPERTY
public static final String SELECTED_PROPERTY
public static final String ROLLOVER_ENABLED_PROPERTY
public static final String MOUSEOVER_PROPERTY
public static final String ARMED_PROPERTY
protected static final int ARMED_FLAG
protected static final int PRESSED_FLAG
protected static final int MOUSEOVER_FLAG
protected static final int SELECTED_FLAG
protected static final int ENABLED_FLAG
protected static final int ROLLOVER_ENABLED_FLAG
protected static final int MAX_FLAG
public static final int DEFAULT_FIRING_BEHAVIOR
public static final int REPEAT_FIRING_BEHAVIOR
protected String actionName
protected ButtonGroup group
protected org.eclipse.draw2d.ButtonStateTransitionListener firingBehavior
| Constructor Detail |
public ButtonModel()
| Method Detail |
public void addActionListener(ActionListener listener)
public void addChangeListener(ChangeListener listener)
public void addStateTransitionListener(org.eclipse.draw2d.ButtonStateTransitionListener listener)
protected void fireActionPerformed()
protected void fireCanceled()
protected void firePressed()
protected void fireReleased()
protected void fireResume()
protected void fireStateChanged(String property)
protected void fireSuspend()
public ButtonGroup getGroup()
public Object getUserData()
protected void installFiringBehavior()
public boolean isArmed()
true if this button is armed.
If a button is armed, it will fire an ActionPerformed
when released.public boolean isEnabled()
true if this button is enabled.public boolean isMouseOver()
true if the mouse is over this button.public boolean isPressed()
true if this button is pressed.public boolean isSelected()
public void removeActionListener(ActionListener listener)
public void removeChangeListener(ChangeListener listener)
public void removeStateTransitionListener(org.eclipse.draw2d.ButtonStateTransitionListener listener)
public void setArmed(boolean value)
public void setEnabled(boolean value)
public void setFiringBehavior(int type)
type - DEFAULT_FIRING_BEHAVIOR is the default
behavior. Action performed events are not fired
until mouse button is released.
REPEAT_FIRING_BEHAVIOR causes action performed events
to fire repeatedly until the mouse button is released.public void setGroup(ButtonGroup bg)
bg - Group to which this model belongs to.public void setMouseOver(boolean value)
protected void setPressed(boolean value)
public void setSelected(boolean value)
public void setUserData(Object data)
|
Draw2D v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||