edu.princeton.swing
public class DefaultTristateButtonModel extends javax.swing.JToggleButton.ToggleButtonModel implements TristateButtonModel
Constructor and Description |
---|
DefaultTristateButtonModel()
Constructs a DefaultTristateButtonModel.
|
DefaultTristateButtonModel(javax.swing.ButtonModel model)
Constructs a DefaultTristateButtonModel.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isTristate()
Returns true if the button is in tristate.
|
void |
setSelected(boolean b)
Selects or deselects the button.
|
void |
setTristate(boolean tristate)
Sets wheter or not the button is in tristate.
|
addActionListener, addChangeListener, addItemListener, fireActionPerformed, fireItemStateChanged, fireStateChanged, getActionCommand, getActionListeners, getChangeListeners, getGroup, getItemListeners, getListeners, getMnemonic, getSelectedObjects, isArmed, isEnabled, isPressed, isRollover, removeActionListener, removeChangeListener, removeItemListener, setActionCommand, setArmed, setEnabled, setGroup, setMnemonic, setRollover
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addActionListener, addChangeListener, addItemListener, getActionCommand, getMnemonic, isArmed, isEnabled, isPressed, isRollover, isSelected, removeActionListener, removeChangeListener, removeItemListener, setActionCommand, setArmed, setEnabled, setGroup, setMnemonic, setPressed, setRollover
public DefaultTristateButtonModel()
public DefaultTristateButtonModel(javax.swing.ButtonModel model)
public boolean isTristate()
isTristate
in interface TristateButtonModel
public void setTristate(boolean tristate)
setTristate
in interface TristateButtonModel
tristate
- Wheter or not the button should be in tristate.public void setSelected(boolean b)
setSelected
in interface javax.swing.ButtonModel
setSelected
in class javax.swing.JToggleButton.ToggleButtonModel