com.sas.visuals
Interface ButtonModelInterface

All Superinterfaces:
ActionSource, java.awt.ItemSelectable, com.sas.beans.PropertyChangeSource
All Known Implementing Classes:
AlarmButtonModel, DefaultButtonModel, TabButtonModel, ToggleButtonModel

public interface ButtonModelInterface
extends java.awt.ItemSelectable, ActionSource, com.sas.beans.PropertyChangeSource

ButtonModelInterface is an interface to access a ButtonModel that holds the state information about a specific button.

See Also:
BaseButton, ButtonListenerInterface

Method Summary
abstract  java.lang.String getActionCommand()
          Get the ActionCommand used when an ActionEvent is sent
abstract  char getKeyAccelerator()
          Get the key that is used to trigger the button.
abstract  int getNextState()
          Get the next state of the ButtonModel if it has multiple states.
abstract  int getPrevState()
          Get the previous state of the ButtonModel if it has multiple states.
abstract  SelectionGroupInterface getSelectionGroup()
          Get the SelectionGroupInterface object used to provide a single selection behavior of a group of buttons.
abstract  int getState()
          Get the state of the buttonModel.
abstract  int getStateCount()
          Get the number of possible states for the buttonModel.
abstract  boolean isArmed()
          Return if the button is armed.
abstract  boolean isDisabled()
          Return if the button is disabled.
abstract  boolean isPressed()
          Return if the button is pressed.
abstract  boolean isRollover()
          Return if the button is rollover.
abstract  boolean isSelected()
          Return if the button is selected.
abstract  void setActionCommand(java.lang.String cmd)
          Set the ActionCommand used when an ActionEvent is sent
abstract  void setArmed(boolean armed)
          Set the button armed state.
abstract  void setDisabled(boolean disabled)
          Set the button disabled state.
abstract  void setKeyAccelerator(char key)
          Set the key that is used to trigger the button.
abstract  void setPressed(boolean pressed)
          Set the button pressed state.
abstract  void setRollover(boolean rollover)
          Set the button rollover state.
abstract  void setSelected(boolean selected)
          Set the button selected state.
abstract  void setSelectionGroup(SelectionGroupInterface selectionGroup)
          Set the selectionGroup used to provide singleSelection behavior to a group of buttons.
abstract  void setState(int state)
          Set the state of the button.
 
Methods inherited from interface com.sas.awt.ActionSource
addActionListener, removeActionListener
 
Methods inherited from interface com.sas.beans.PropertyChangeSource
addPropertyChangeListener, removePropertyChangeListener
 

Method Detail

getActionCommand

java.lang.String getActionCommand()
Get the ActionCommand used when an ActionEvent is sent

See Also:
setActionCommand(java.lang.String), ActionEvent

getKeyAccelerator

char getKeyAccelerator()
Get the key that is used to trigger the button.

See Also:
setKeyAccelerator(char)

getNextState

int getNextState()
Get the next state of the ButtonModel if it has multiple states.


getPrevState

int getPrevState()
Get the previous state of the ButtonModel if it has multiple states.


getSelectionGroup

SelectionGroupInterface getSelectionGroup()
Get the SelectionGroupInterface object used to provide a single selection behavior of a group of buttons.

See Also:
setSelectionGroup(com.sas.visuals.SelectionGroupInterface)

getState

int getState()
Get the state of the buttonModel.

See Also:
setState(int)

getStateCount

int getStateCount()
Get the number of possible states for the buttonModel.


isArmed

boolean isArmed()
Return if the button is armed.

Returns:
true if armed, false otherwise.
See Also:
setArmed(boolean)

isDisabled

boolean isDisabled()
Return if the button is disabled.

Returns:
true if disabled, false otherwise.
See Also:
setDisabled(boolean)

isRollover

boolean isRollover()
Return if the button is rollover.

Returns:
true if rollover, false otherwise.
See Also:
setRollover(boolean)

isPressed

boolean isPressed()
Return if the button is pressed.

Returns:
true if pressed, false otherwise.
See Also:
setPressed(boolean)

isSelected

boolean isSelected()
Return if the button is selected.

Returns:
true if selected, false otherwise.
See Also:
setSelected(boolean)

setActionCommand

void setActionCommand(java.lang.String cmd)
Set the ActionCommand used when an ActionEvent is sent

See Also:
getActionCommand(), ActionEvent

setArmed

void setArmed(boolean armed)
Set the button armed state. The armed state is used when the button has been pressed and the mouse is moved off or on the button component.

Parameters:
armed - true if armed, false otherwise.
See Also:
isArmed()

setDisabled

void setDisabled(boolean disabled)
Set the button disabled state.

Parameters:
disabled - true if disabled, false otherwise.
See Also:
isDisabled()

setKeyAccelerator

void setKeyAccelerator(char key)
Set the key that is used to trigger the button.

See Also:
getKeyAccelerator()

setPressed

void setPressed(boolean pressed)
Set the button pressed state.

Parameters:
pressed - true if pressed, false otherwise.
See Also:
isPressed()

setRollover

void setRollover(boolean rollover)
Set the button rollover state. The rollover state is used when the mouse is just moved over the button component without being pressed.

Parameters:
rollover - true if rollover, false otherwise.
See Also:
isRollover()

setSelected

void setSelected(boolean selected)
Set the button selected state. The selected state is used when the button component is in a selectionGroup an selected or another button is selected an the original button is deselected.

Parameters:
selected - true if selected, false otherwise.
See Also:
isSelected(), ItemSelectable

setSelectionGroup

void setSelectionGroup(SelectionGroupInterface selectionGroup)
Set the selectionGroup used to provide singleSelection behavior to a group of buttons.

Parameters:
selectionGroup - selectionGroup to add button to.
See Also:
getSelectionGroup()

setState

void setState(int state)
Set the state of the button.

Parameters:
state - the button state
See Also:
getState()



Copyright © 2009 SAS Institute Inc. All Rights Reserved.