plugins.big.bigsnakeutils.icy.snake2D
Class Snake2DNode

java.lang.Object
  extended by java.awt.geom.Point2D
      extended by java.awt.geom.Point2D.Double
          extended by plugins.big.bigsnakeutils.icy.snake2D.Snake2DNode
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class Snake2DNode
extends java.awt.geom.Point2D.Double

This class is used to store the snake-defining parameters. It extends the capabilities of the class Point2D.Double by additional state variables.

Version:
May 3, 2014
Author:
Ricard Delgado-Gonzalo (ricard.delgado@gmail.com), Nicolas Chenouard (nicolas.chenouard@gmail.com), Philippe Thévenaz (philippe.thevenaz@epfl.ch)
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.geom.Point2D
java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Float
 
Field Summary
static java.lang.String ID_FROZEN
           
static java.lang.String ID_HIDDEN
           
static java.lang.String ID_X
           
static java.lang.String ID_Y
           
 
Fields inherited from class java.awt.geom.Point2D.Double
x, y
 
Constructor Summary
Snake2DNode(double x, double y)
          This constructor builds a point that is initially neither frozen nor hidden.
Snake2DNode(double x, double y, boolean frozen, boolean hidden)
          This constructor builds a point with the given initial values.
 
Method Summary
 void freeze()
          Sets the frozen state of the node to .
 void hide()
          Sets the hidden state of the node to .
 boolean isFrozen()
          Returns the frozen state of the node.
 boolean isHidden()
          Returns the hidden state of the node.
 void loadFromXML(org.w3c.dom.Node node)
           
 void saveToXML(org.w3c.dom.Element node)
           
 java.lang.String toString()
          This method returns text-based information about this object.
 void unfreeze()
          Sets the frozen state of the node to .
 void unhide()
          Sets the hidden state of the node to .
 
Methods inherited from class java.awt.geom.Point2D.Double
getX, getY, setLocation
 
Methods inherited from class java.awt.geom.Point2D
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ID_X

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

ID_Y

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

ID_FROZEN

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

ID_HIDDEN

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

Snake2DNode

public Snake2DNode(double x,
                   double y)
This constructor builds a point that is initially neither frozen nor hidden.


Snake2DNode

public Snake2DNode(double x,
                   double y,
                   boolean frozen,
                   boolean hidden)
This constructor builds a point with the given initial values.

Method Detail

loadFromXML

public void loadFromXML(org.w3c.dom.Node node)

saveToXML

public void saveToXML(org.w3c.dom.Element node)

toString

public java.lang.String toString()
This method returns text-based information about this object.

Overrides:
toString in class java.awt.geom.Point2D.Double

hide

public void hide()
Sets the hidden state of the node to .


unhide

public void unhide()
Sets the hidden state of the node to .


isHidden

public boolean isHidden()
Returns the hidden state of the node.


freeze

public void freeze()
Sets the frozen state of the node to .


unfreeze

public void unfreeze()
Sets the frozen state of the node to .


isFrozen

public boolean isFrozen()
Returns the frozen state of the node.