public class ActionToggleButtonModel extends javax.swing.JToggleButton.ToggleButtonModel implements ActionButtonModel
ActionButtonModel
interface. This is the default core action model
set on JCommandToggleButton
s.Modifier and Type | Field and Description |
---|---|
protected boolean |
toFireActionOnPress
Indication whether the action is fired on mouse press (as opposed to
mouse release).
|
Constructor and Description |
---|
ActionToggleButtonModel(boolean toFireActionOnPress)
Creates a new model.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isFireActionOnPress()
Returns indication whether the associated actions should be fired on
mouse press instead of mouse release.
|
void |
setFireActionOnPress(boolean toFireActionOnPress)
Sets indication whether the associated actions should be fired on mouse
press instead of mouse release.
|
void |
setPressed(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, 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, setRollover, setSelected
protected boolean toFireActionOnPress
public ActionToggleButtonModel(boolean toFireActionOnPress)
toFireActionOnPress
- If true
, the action will be fired on mouse press,
if false
, the action will be fired on mouse
release.public boolean isFireActionOnPress()
ActionButtonModel
isFireActionOnPress
in interface ActionButtonModel
true
if the associated actions are fired on mouse
press, false
if the associated actions are fired on
mouse release.public void setFireActionOnPress(boolean toFireActionOnPress)
ActionButtonModel
setFireActionOnPress
in interface ActionButtonModel
toFireActionOnPress
- if true
, the associated actions will be fired on
mouse press, otherwise the associated actions will be fired on
mouse release.public void setPressed(boolean b)
setPressed
in interface javax.swing.ButtonModel
setPressed
in class javax.swing.JToggleButton.ToggleButtonModel