com.sas.visuals
Class TabButtonModel

com.sas.visuals.TabButtonModel
All Implemented Interfaces:
ActionSource, com.sas.beans.PropertyChangeSource, com.sas.beans.VetoableChangeSource, com.sas.ComponentInterface, com.sas.LinkPropertiesInterface, com.sas.ModelInterface, com.sas.ViewInterface, ButtonModelInterface, MultipleValueEventSourceInterface, java.awt.ItemSelectable, java.beans.PropertyChangeListener, java.io.ObjectInputValidation, java.io.Serializable, java.util.EventListener

public class TabButtonModel

TabButtonModel is a subclass of DefaultButtonModel. The TabButtonModel sets the selected state to its opposite as soon as the pressed state is set.
Notes:


See Also:
TabButton, DefaultButtonModel, Serialized Form

Field Summary
protected  SelectableInterface button
           
 
Fields inherited from class com.sas.visuals.DefaultButtonModel
actionCommand, actionListenerList, armed, disabled, itemListenerList, keyAccelerator, nextState, pressed, prevState, rollover, selected, selectionGroup, state, stateCount
 
Constructor Summary
TabButtonModel(SelectableInterface btn)
          Constructor requires a SelectableInterface object to select if the selectionGroup is not null.
 
Method Summary
 SelectableInterface getButton()
          Get the button to be selected by the selectionGroup if one is set on the model.
 void setButton(SelectableInterface btn)
          Set the button to be selected by the selectionGroup if one is set on the model.
 void setPressed(boolean p)
          Set the pressed state.
 
Methods inherited from class com.sas.visuals.DefaultButtonModel
addActionListener, addItemListener, getActionCommand, getKeyAccelerator, getNextState, getPrevState, getSelectedObjects, getSelectionGroup, getState, getStateCount, isArmed, isDisabled, isPressed, isRollover, isSelected, removeActionListener, removeItemListener, setActionCommand, setArmed, setDefaultValues, setDisabled, setKeyAccelerator, setRollover, setSelected, setSelectionGroup, setState
 

Field Detail

button

protected SelectableInterface button
Constructor Detail

TabButtonModel

public TabButtonModel(SelectableInterface btn)
Constructor requires a SelectableInterface object to select if the selectionGroup is not null.

Method Detail

getButton

public SelectableInterface getButton()
Get the button to be selected by the selectionGroup if one is set on the model.

Returns:
a SelectableInterface button
See Also:
setButton(com.sas.visuals.SelectableInterface)

setButton

public void setButton(SelectableInterface btn)
Set the button to be selected by the selectionGroup if one is set on the model.

Parameters:
btn - a SelectableInterface button
See Also:
getButton()

setPressed

public void setPressed(boolean p)
Set the pressed state. If set to true, the selected state is also set to the opposite of what it currently is.

Specified by:
setPressed in interface ButtonModelInterface
Overrides:
setPressed in class DefaultButtonModel
Parameters:
p - the pressed state
See Also:
DefaultButtonModel.isPressed()



Copyright © 2009 SAS Institute Inc. All Rights Reserved.