plugins.adufour.vars.lang
Class VarBoolean

java.lang.Object
  extended by plugins.adufour.vars.lang.Var<java.lang.Boolean>
      extended by plugins.adufour.vars.lang.VarBoolean
All Implemented Interfaces:
icy.file.xml.XMLPersistent, VarListener<java.lang.Boolean>

public class VarBoolean
extends Var<java.lang.Boolean>

Boolean variable

Author:
Alexandre Dufour

Field Summary
 
Fields inherited from class plugins.adufour.vars.lang.Var
listeners, NO_VALUE, type, XML_KEY_ID
 
Constructor Summary
VarBoolean(java.lang.String name, java.lang.Boolean defaultValue)
           
 
Method Summary
 VarEditor<java.lang.Boolean> createVarEditor()
          Creates a new VarEditor object that allows the user to graphically adjust the value of this variable.
 java.lang.Boolean parse(java.lang.String s)
          Parses the given String into the current type
 java.lang.Boolean toggleValue()
          Inverts the value of this variable.
Warning: this method does nothing if the current variable references another
 
Methods inherited from class plugins.adufour.vars.lang.Var
addListener, createVarViewer, fireVariableChanged, fireVariableChanged, getDefaultEditorModel, getDefaultValue, getIterableReferrers, getName, getReference, getReferencingPolicy, getReferrers, getType, getTypeAsString, getValue, getValue, getValueAsString, getValueAsString, isAssignableFrom, isEnabled, isOptional, isReferenced, loadFromXML, prettyPrint, referenceChanged, removeListener, removeListeners, saveToXML, setDefaultEditorModel, setEnabled, setOptional, setReference, setReferencingPolicy, setValue, toString, valueChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VarBoolean

public VarBoolean(java.lang.String name,
                  java.lang.Boolean defaultValue)
Method Detail

parse

public java.lang.Boolean parse(java.lang.String s)
Description copied from class: Var
Parses the given String into the current type

Overrides:
parse in class Var<java.lang.Boolean>
Returns:
The variable value corresponding to the given string

toggleValue

public java.lang.Boolean toggleValue()
Inverts the value of this variable.
Warning: this method does nothing if the current variable references another

Returns:
the variable value after the change

createVarEditor

public VarEditor<java.lang.Boolean> createVarEditor()
Description copied from class: Var
Creates a new VarEditor object that allows the user to graphically adjust the value of this variable. By default this editor is an empty label for generic types, but this method can be overridden to provide a custom editor.

Overrides:
createVarEditor in class Var<java.lang.Boolean>
Returns:
the variable editor embarking the graphical component