net.cercis.jstruct.ui
Class Node

java.lang.Object
  extended bynet.cercis.jstruct.ui.Node

public class Node
extends java.lang.Object

Node Object. This object is used in the UI and stores the information of the node so that it can be interactively modified and is later used in the NodeCalc object


Constructor Summary
Node(int id)
          Class Constructor where only the identifier is given
Node(int id, float x, float y)
          Class Constructor where the values are stored
Node(NodeCalc ni)
          Class Constructor where the values are stored thanks to the copy of the values of a nodeCalc
Node(java.lang.String cad)
          Class Constructor where the values are passed in a String that is tokenized to obtain the information
 
Method Summary
 int id()
          Returns the value of the identifier
 int idc()
          Returns the value of the calculation identifier
 void setid(int id)
          Sets the value of the identifier
 void setIdc(int idc)
          Sets the value of the calculation identifier
 void setx(float x)
          Sets the value of the x value of the coordinate
 void sety(float y)
          Sets the value of the y value of the coordinate
 float x()
          Returns the value of the x value of the coordinate
 float y()
          Returns the value of the y value of the coordinate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Node

public Node(java.lang.String cad)
Class Constructor where the values are passed in a String that is tokenized to obtain the information

Parameters:
cad - String where the information is passed and that has to be tokenized (id - x - y) in order

Node

public Node(int id,
            float x,
            float y)
Class Constructor where the values are stored

Parameters:
id - Integer number identifier of the node
x - Float number storing the x coordinate
y - Float number storing the y coordinate

Node

public Node(NodeCalc ni)
Class Constructor where the values are stored thanks to the copy of the values of a nodeCalc

Parameters:
ni - NodeCalc to be copied

Node

public Node(int id)
Class Constructor where only the identifier is given

Parameters:
id - Integer number identifier of the node
Method Detail

id

public int id()
Returns the value of the identifier

Returns:
Integer number with the value of the identifier

idc

public int idc()
Returns the value of the calculation identifier

Returns:
Integer number with the value of the calculation identifier

setIdc

public void setIdc(int idc)
Sets the value of the calculation identifier

Parameters:
idc - Integer number with the value of the calculation identifier

x

public float x()
Returns the value of the x value of the coordinate

Returns:
Float number with the value of the x coordinate

y

public float y()
Returns the value of the y value of the coordinate

Returns:
Float number with the value of the y coordinate

setid

public void setid(int id)
Sets the value of the identifier

Parameters:
id - Integer number with the value of the identifier

setx

public void setx(float x)
Sets the value of the x value of the coordinate

Parameters:
x - Float number with the value of the x coordinate

sety

public void sety(float y)
Sets the value of the y value of the coordinate

Parameters:
y - Float number with the value of the y coordinate