public class TriStateButtonModel
extends javax.swing.JToggleButton.ToggleButtonModel
| Constructor and Description |
|---|
TriStateButtonModel() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canUserSetPartial() |
boolean |
getDirection() |
boolean |
isPartial() |
void |
setCanUserSetPartial(boolean userCanSetPartial) |
void |
setDirection(boolean directionTruePartialFalse)
Set the order of the partial state when cycling through the states.
|
void |
setPartial(boolean isPartial) |
void |
setPressed(boolean b)
When the button is pressed, cycle the model to the next state.
|
void |
setSelected(boolean b) |
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, setRolloverpublic boolean isPartial()
public void setPartial(boolean isPartial)
public void setPressed(boolean b)
setPressed in interface javax.swing.ButtonModelsetPressed in class javax.swing.JToggleButton.ToggleButtonModelb - public void setSelected(boolean b)
setSelected in interface javax.swing.ButtonModelsetSelected in class javax.swing.JToggleButton.ToggleButtonModelpublic void setCanUserSetPartial(boolean userCanSetPartial)
userCanSetPartial - if true then then the partial state will be cycled through
as the user clicks repeatedly on the checkbox. If false the checkbox will
cycle from true to false and back again just like a regular checkbox.public boolean canUserSetPartial()
public void setDirection(boolean directionTruePartialFalse)
directionTruePartialFalse - if true then the Partial state will appear
when changing from true to false. If false the Partial state
will appear when changing from false to true.public boolean getDirection()