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
 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 previous state of the ButtonModel if it has multiple states.
 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 setActionCommand(java.lang.String cmd)
          Set the ActionCommand used when an ActionEvent is sent
 void setArmed(boolean armed)
          Set the button armed state.
 void setDisabled(boolean disabled)
          Set the button disabled state.
 void setKeyAccelerator(char key)
          Set the key that is used to trigger the button.
 void setPressed(boolean pressed)
          Set the button pressed state.
 void setRollover(boolean rollover)
          Set the button rollover state.
 void setSelected(boolean selected)
          Set the button selected state.
 void setSelectionGroup(SelectionGroupInterface selectionGroup)
          Set the selectionGroup used to provide singleSelection behavior to a group of buttons.
 void setState(int state)
          Set the state of the button.
 
Methods inherited from interface com.sas.awt.ActionSource
addActionListener, removeActionListener
 

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.