jbcl.view Package
java.lang.Object +----com.borland.jbcl.view.BooleanToggleItemEditor
Variables Constructors Properties Methods Event Listeners
Implements ItemEditor, ToggleItemEditor, Serializable
BooleanToggleItemEditor
component is an ItemEditor
that can be used with
controls that follow the model-view architecture.
There is no user-interface associated
with this component; use this component in conjunction with a CheckboxItemPainter
.
An object whose itemEditor
property is set to this component has the
following behavior:
BooleanToggleItemEditor
processes the input as a boolean value and
switches (or toggles) to the opposite value.
An integer value of 0 is processed as a false value. Boolean values of true are recognized as such; all other values are false.
protected boolean state
protected int type
public BooleanToggleItemEditor()Constructs a
BooleanToggleItemEditor
.
public Component getComponent()Returns the actual component that will be added to the host control as an editor.
public Object getValue()Returns the current value in the editor. The editor host must be able to ask for the value at anytime and always asks for it when posting to the data object.
protected void toggle(Object data)Reverses the boolean state of the item editor.
Parameters:
data
public void addKeyListener(KeyListener l) public void removeKeyListener(KeyListener l)