plugins.adufour.vars.lang
Class VarSequence

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

public class VarSequence
extends Var<icy.sequence.Sequence>


Field Summary
static java.lang.String ACTIVE_SEQUENCE
           
static java.lang.String NO_SEQUENCE
           
 
Fields inherited from class plugins.adufour.vars.lang.Var
listeners, NO_VALUE, type, XML_KEY_ID
 
Constructor Summary
VarSequence(java.lang.String name, icy.sequence.Sequence defaultValue)
           
 
Method Summary
 VarEditor<icy.sequence.Sequence> createVarEditor()
          Creates a new VarEditor object that allows the user to graphically adjust the value of this variable.
 VarEditor<icy.sequence.Sequence> createVarViewer()
          Creates a new VarEditor object that allows the user to view the value of this variable (but not necessarily modify it).
 java.lang.String getValueAsString()
           
 boolean isNoSequenceSelected()
           
 boolean loadFromXML(org.w3c.dom.Node node)
           
 boolean saveToXML(org.w3c.dom.Node node)
          Saves the current variable to the specified node
 void setNoSequenceSelection()
           
 void setValue(icy.sequence.Sequence newValue)
          Sets the value of this variable and notify the listeners.
 
Methods inherited from class plugins.adufour.vars.lang.Var
addListener, fireVariableChanged, fireVariableChanged, getDefaultEditorModel, getDefaultValue, getIterableReferrers, getName, getReference, getReferencingPolicy, getReferrers, getType, getTypeAsString, getValue, getValue, getValueAsString, isAssignableFrom, isEnabled, isOptional, isReferenced, parse, prettyPrint, referenceChanged, removeListener, removeListeners, setDefaultEditorModel, setEnabled, setOptional, setReference, setReferencingPolicy, toString, valueChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_SEQUENCE

public static final java.lang.String NO_SEQUENCE
See Also:
Constant Field Values

ACTIVE_SEQUENCE

public static final java.lang.String ACTIVE_SEQUENCE
See Also:
Constant Field Values
Constructor Detail

VarSequence

public VarSequence(java.lang.String name,
                   icy.sequence.Sequence defaultValue)
Method Detail

saveToXML

public boolean saveToXML(org.w3c.dom.Node node)
                  throws java.lang.UnsupportedOperationException
Saves the current variable to the specified node

Specified by:
saveToXML in interface icy.file.xml.XMLPersistent
Overrides:
saveToXML in class Var<icy.sequence.Sequence>
Throws:
java.lang.UnsupportedOperationException - if the functionality is not supported by the current variable type

loadFromXML

public boolean loadFromXML(org.w3c.dom.Node node)
Specified by:
loadFromXML in interface icy.file.xml.XMLPersistent
Overrides:
loadFromXML in class Var<icy.sequence.Sequence>

createVarEditor

public VarEditor<icy.sequence.Sequence> 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<icy.sequence.Sequence>
Returns:
the variable editor embarking the graphical component

createVarViewer

public VarEditor<icy.sequence.Sequence> createVarViewer()
Description copied from class: Var
Creates a new VarEditor object that allows the user to view the value of this variable (but not necessarily modify it). By default this editor is an empty label for generic types, but this method can be overridden to provide a custom viewer

Overrides:
createVarViewer in class Var<icy.sequence.Sequence>
Returns:
the variable editor embarking the graphical component

getValueAsString

public java.lang.String getValueAsString()
Overrides:
getValueAsString in class Var<icy.sequence.Sequence>
Returns:
a pretty-printed text representation of the variable's local value (referenced variables are not followed). This text is used to display the value (e.g. in a graphical interface) or store the value into XML files. Overriding implementations should make sure that the result of this method is compatible with the Var.parse(String) method to ensure proper reloading from XML files.

isNoSequenceSelected

public boolean isNoSequenceSelected()

setNoSequenceSelection

public void setNoSequenceSelection()

setValue

public void setValue(icy.sequence.Sequence newValue)
              throws java.lang.IllegalAccessError
Description copied from class: Var
Sets the value of this variable and notify the listeners. This method can only be called if this variable is not referencing another one.

Overrides:
setValue in class Var<icy.sequence.Sequence>
Throws:
java.lang.IllegalAccessError - if this variable is already linked to another one