|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.visuals.DefaultButtonModel
public class DefaultButtonModel
DefaultButtonModel is an implementation of the ButtonModelInterface interface
that holds the state information for a specific button and sends out the Action
and Item events that the button forwards to its listeners.
DefaultButtonListener,
BaseButton,
ButtonListenerInterface,
Serialized Form| Field Summary | |
|---|---|
protected java.lang.String |
actionCommand
|
protected java.awt.event.ActionListener |
actionListenerList
|
protected boolean |
armed
|
protected boolean |
disabled
|
protected java.awt.event.ItemListener |
itemListenerList
|
protected char |
keyAccelerator
|
protected int |
nextState
|
protected boolean |
pressed
|
protected int |
prevState
|
protected boolean |
rollover
|
protected boolean |
selected
|
protected SelectionGroupInterface |
selectionGroup
|
protected int |
state
|
protected int |
stateCount
|
| Constructor Summary | |
|---|---|
DefaultButtonModel()
Default Constructor |
|
| Method Summary | |
|---|---|
void |
addActionListener(java.awt.event.ActionListener listener)
Adds the specified action listener to receive action events from this buttonModel. |
void |
addItemListener(java.awt.event.ItemListener listener)
Adds the specified item listener to receive item events from this buttonModel. |
java.lang.String |
getActionCommand()
Get the ActionCommand used when an ActionEvent is sent |
char |
getKeyAccelerator()
Get the key that is used to trigger the button. |
int |
getNextState()
Get the next state of the ButtonModel if it has multiple states. |
int |
getPrevState()
Get the prev state of the ButtonModel if it has multiple states. |
java.lang.Object[] |
getSelectedObjects()
Get the selected objects. |
SelectionGroupInterface |
getSelectionGroup()
Get the SelectionGroupInterface object used to provide a single selection behavior of a group of buttons. |
int |
getState()
Get the state of the buttonModel. |
int |
getStateCount()
Get the number of possible states for the buttonModel. |
boolean |
isArmed()
Return if the button is armed. |
boolean |
isDisabled()
Return if the button is disabled. |
boolean |
isPressed()
Return if the button is pressed. |
boolean |
isRollover()
Return if the button is rollover. |
boolean |
isSelected()
Return if the button is selected. |
void |
removeActionListener(java.awt.event.ActionListener l)
Removes the specified action listener so that it no longer receives action events from this buttonModel. |
void |
removeItemListener(java.awt.event.ItemListener l)
Removes the specified item listener so that it no longer receives item events from this buttonModel. |
void |
setActionCommand(java.lang.String cmd)
Set the ActionCommand used when an ActionEvent is sent |
void |
setArmed(boolean a)
Set the button armed state. |
void |
setDefaultValues()
Set the default internal values for the AnimationIconView. |
void |
setDisabled(boolean d)
Set the button disabled state. |
void |
setKeyAccelerator(char key)
Set the key that is used to trigger the button. |
void |
setPressed(boolean p)
Set the button pressed state. |
void |
setRollover(boolean r)
Set the button rollover state. |
void |
setSelected(boolean s)
Set the button selected state. |
void |
setSelectionGroup(SelectionGroupInterface group)
Set the selectionGroup used to provide singleSelection behavior to a group of buttons. |
void |
setState(int s)
Set the state of the button. |
| Methods inherited from interface com.sas.beans.PropertyChangeSource |
|---|
addPropertyChangeListener, removePropertyChangeListener |
| Field Detail |
|---|
protected java.lang.String actionCommand
protected char keyAccelerator
protected int nextState
protected int prevState
protected SelectionGroupInterface selectionGroup
protected int state
protected int stateCount
protected boolean armed
protected boolean disabled
protected boolean rollover
protected boolean pressed
protected boolean selected
protected transient java.awt.event.ActionListener actionListenerList
protected transient java.awt.event.ItemListener itemListenerList
| Constructor Detail |
|---|
public DefaultButtonModel()
| Method Detail |
|---|
public void addActionListener(java.awt.event.ActionListener listener)
addActionListener in interface ActionSourcelistener - an object which handles ActionEvent events
the listener is not added a second time if it already exists
in the list of listeners for this event.ActionListener,
removeActionListener(java.awt.event.ActionListener)public void addItemListener(java.awt.event.ItemListener listener)
addItemListener in interface java.awt.ItemSelectableItemListener,
removeItemListener(java.awt.event.ItemListener)public java.lang.String getActionCommand()
getActionCommand in interface ButtonModelInterfacesetActionCommand(java.lang.String),
ActionEventpublic char getKeyAccelerator()
getKeyAccelerator in interface ButtonModelInterfacesetKeyAccelerator(char)public int getNextState()
getNextState in interface ButtonModelInterfacepublic int getPrevState()
getPrevState in interface ButtonModelInterfacepublic SelectionGroupInterface getSelectionGroup()
getSelectionGroup in interface ButtonModelInterfacesetSelectionGroup(com.sas.visuals.SelectionGroupInterface)public java.lang.Object[] getSelectedObjects()
getSelectedObjects in interface java.awt.ItemSelectableItemSelectablepublic int getState()
getState in interface ButtonModelInterfacesetState(int)public int getStateCount()
getStateCount in interface ButtonModelInterfacepublic boolean isArmed()
isArmed in interface ButtonModelInterfacesetArmed(boolean)public boolean isDisabled()
isDisabled in interface ButtonModelInterfacesetDisabled(boolean)public boolean isRollover()
isRollover in interface ButtonModelInterfacesetRollover(boolean)public boolean isPressed()
isPressed in interface ButtonModelInterfacesetPressed(boolean)public boolean isSelected()
isSelected in interface ButtonModelInterfacesetSelected(boolean)public void removeActionListener(java.awt.event.ActionListener l)
removeActionListener in interface ActionSourcel - an object which handles ActionEvent eventsActionListener,
addActionListener(java.awt.event.ActionListener)public void removeItemListener(java.awt.event.ItemListener l)
removeItemListener in interface java.awt.ItemSelectableItemListener,
addItemListener(java.awt.event.ItemListener)public void setActionCommand(java.lang.String cmd)
setActionCommand in interface ButtonModelInterfacegetActionCommand(),
ActionEventpublic void setArmed(boolean a)
setArmed in interface ButtonModelInterfacearmed - true if armed, false otherwise.isArmed()public void setDefaultValues()
setDefaultValues in interface ComponentInterfacesetDefaultValues in class ComponentComponentInterface.setDefaultValues()public void setDisabled(boolean d)
setDisabled in interface ButtonModelInterfacedisabled - true if disabled, false otherwise.isDisabled()public void setKeyAccelerator(char key)
setKeyAccelerator in interface ButtonModelInterfacegetKeyAccelerator()public void setPressed(boolean p)
setPressed in interface ButtonModelInterfacepressed - true if pressed, false otherwise.isPressed()public void setRollover(boolean r)
setRollover in interface ButtonModelInterfacerollover - true if rollover, false otherwise.isRollover()public void setSelected(boolean s)
setSelected in interface ButtonModelInterfaceselected - true if selected, false otherwise.isSelected(),
ItemSelectablepublic void setSelectionGroup(SelectionGroupInterface group)
setSelectionGroup in interface ButtonModelInterfaceselectionGroup - selectionGroup to add button to.getSelectionGroup()public void setState(int s)
setState in interface ButtonModelInterfacestate - the button stategetState()
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||