private class TristateCheckBox.TristateDecorator
extends java.lang.Object
implements javax.swing.ButtonModel
Modifier and Type | Field and Description |
---|---|
private javax.swing.ButtonModel |
other |
Constructor and Description |
---|
TristateCheckBox.TristateDecorator(javax.swing.ButtonModel other) |
Modifier and Type | Method and Description |
---|---|
void |
addActionListener(java.awt.event.ActionListener l) |
void |
addChangeListener(javax.swing.event.ChangeListener l) |
void |
addItemListener(java.awt.event.ItemListener l) |
java.lang.String |
getActionCommand() |
int |
getMnemonic() |
java.lang.Object[] |
getSelectedObjects() |
(package private) TristateCheckBox.State |
getState()
The current state is embedded in the selection / armed state of the
model.
|
boolean |
isArmed()
All these methods simply delegate to the "other" model that is being
decorated.
|
boolean |
isEnabled() |
boolean |
isPressed() |
boolean |
isRollover() |
boolean |
isSelected() |
(package private) void |
nextState()
We rotate between NOT_SELECTED, SELECTED and DONT_CARE.
|
void |
removeActionListener(java.awt.event.ActionListener l) |
void |
removeChangeListener(javax.swing.event.ChangeListener l) |
void |
removeItemListener(java.awt.event.ItemListener l) |
void |
setActionCommand(java.lang.String s) |
void |
setArmed(boolean b)
Filter: No one may change the armed status except us.
|
void |
setEnabled(boolean b)
We disable focusing on the component when it is not enabled.
|
void |
setGroup(javax.swing.ButtonGroup group) |
void |
setMnemonic(int key) |
void |
setPressed(boolean b) |
void |
setRollover(boolean b) |
void |
setSelected(boolean b) |
(package private) void |
setState(TristateCheckBox.State state) |
TristateCheckBox.TristateDecorator(javax.swing.ButtonModel other)
void setState(TristateCheckBox.State state)
TristateCheckBox.State getState()
void nextState()
public void setArmed(boolean b)
setArmed
in interface javax.swing.ButtonModel
public void setEnabled(boolean b)
setEnabled
in interface javax.swing.ButtonModel
public boolean isArmed()
isArmed
in interface javax.swing.ButtonModel
public boolean isSelected()
isSelected
in interface javax.swing.ButtonModel
public boolean isEnabled()
isEnabled
in interface javax.swing.ButtonModel
public boolean isPressed()
isPressed
in interface javax.swing.ButtonModel
public boolean isRollover()
isRollover
in interface javax.swing.ButtonModel
public void setSelected(boolean b)
setSelected
in interface javax.swing.ButtonModel
public void setPressed(boolean b)
setPressed
in interface javax.swing.ButtonModel
public void setRollover(boolean b)
setRollover
in interface javax.swing.ButtonModel
public void setMnemonic(int key)
setMnemonic
in interface javax.swing.ButtonModel
public int getMnemonic()
getMnemonic
in interface javax.swing.ButtonModel
public void setActionCommand(java.lang.String s)
setActionCommand
in interface javax.swing.ButtonModel
public java.lang.String getActionCommand()
getActionCommand
in interface javax.swing.ButtonModel
public void setGroup(javax.swing.ButtonGroup group)
setGroup
in interface javax.swing.ButtonModel
public void addActionListener(java.awt.event.ActionListener l)
addActionListener
in interface javax.swing.ButtonModel
public void removeActionListener(java.awt.event.ActionListener l)
removeActionListener
in interface javax.swing.ButtonModel
public void addItemListener(java.awt.event.ItemListener l)
addItemListener
in interface java.awt.ItemSelectable
addItemListener
in interface javax.swing.ButtonModel
public void removeItemListener(java.awt.event.ItemListener l)
removeItemListener
in interface java.awt.ItemSelectable
removeItemListener
in interface javax.swing.ButtonModel
public void addChangeListener(javax.swing.event.ChangeListener l)
addChangeListener
in interface javax.swing.ButtonModel
public void removeChangeListener(javax.swing.event.ChangeListener l)
removeChangeListener
in interface javax.swing.ButtonModel
public java.lang.Object[] getSelectedObjects()
getSelectedObjects
in interface java.awt.ItemSelectable
Copyright © 2013. All Rights Reserved.