plugins.adufour.vars.lang
Class VarString
java.lang.Object
plugins.adufour.vars.lang.Var<java.lang.String>
plugins.adufour.vars.lang.VarString
- All Implemented Interfaces:
- icy.file.xml.XMLPersistent, VarListener<java.lang.String>
public class VarString
- extends Var<java.lang.String>
Constructor Summary |
VarString(java.lang.String name,
java.lang.String defaultValue)
Creates a new text variable with a default text field editor |
VarString(java.lang.String name,
java.lang.String defaultValue,
int nbLines)
Creates a new text variable with a default text field editor |
Method Summary |
VarEditor<java.lang.String> |
createVarEditor()
Creates a new VarEditor object that allows the user to graphically adjust the value
of this variable. |
java.lang.String |
parse(java.lang.String s)
Parses the given String into the current type |
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 |
VarString
public VarString(java.lang.String name,
java.lang.String defaultValue)
- Creates a new text variable with a default text field editor
- Parameters:
name
- defaultValue
-
VarString
public VarString(java.lang.String name,
java.lang.String defaultValue,
int nbLines)
- Creates a new text variable with a default text field editor
- Parameters:
name
- the name of this variable (*not* the actual text to store and/or display)defaultValue
- the initial text to store and/or displaynbLines
- The number of lines (used only to create the graphical interface)
parse
public java.lang.String 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.String>
- Returns:
- The variable value corresponding to the given string
createVarEditor
public VarEditor<java.lang.String> 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.String>
- Returns:
- the variable editor embarking the graphical component