net.cercis.jstruct.ui
Class Elem

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

public class Elem
extends java.lang.Object

Elem Object. This object is used in the UI and stores the information of the element so that it can be interactively modified and is later used in the ElemCalc object


Constructor Summary
Elem(ElemCalc ei)
          Class Constructor where the values are stored thanks to the copy of the values of a elemCalc
Elem(int id)
          Class Constructor where only the identifier is given
Elem(int id, int mate, int nod_i, int nod_j)
          Class Constructor where the values are stored
Elem(java.lang.String cad)
          Class Constructor where the values are passed in a String that is tokenized to obtain the information
 
Method Summary
 float alpha()
          Returns the value of the angle of the element with the X axis
 int id()
          Returns the value of the identifier
 float length()
          Returns the value of the length of the element
 int mate()
          Returns the value of the material of the element
 int ni()
          Returns the value of the first node
 int nj()
          Returns the value of the second node
 void setalpha(java.util.Map mnodes)
          Calculates and sets the angle of the element.
 void setlength(java.util.Map mnodes)
          Calculates and sets the length of the element.
 void setmate(int mate)
          Sets the value of the material identifier
 void setni(int nod_i)
          Sets the number of the first node
 void setnj(int nod_j)
          Sets the number of the second node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Elem

public Elem(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 - material - first node - second node) in order

Elem

public Elem(int id,
            int mate,
            int nod_i,
            int nod_j)
Class Constructor where the values are stored

Parameters:
id - Integer number identifier of the element
mate - Float Integer number identifier of the material
nod_i - Integer number identifier of the first node
nod_j - Integer number identifier of the second node

Elem

public Elem(ElemCalc ei)
Class Constructor where the values are stored thanks to the copy of the values of a elemCalc

Parameters:
ei - ElemCalc to be copied

Elem

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

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

id

public int id()
Returns the value of the identifier

Returns:
Integer number with the value of the identifier

mate

public int mate()
Returns the value of the material of the element

Returns:
Integer number with the value of the material identifier

ni

public int ni()
Returns the value of the first node

Returns:
Integer number with the value of the first node

nj

public int nj()
Returns the value of the second node

Returns:
Integer number with the value of the second node

length

public float length()
Returns the value of the length of the element

Returns:
Float number with the length of the element

alpha

public float alpha()
Returns the value of the angle of the element with the X axis

Returns:
Float number with the value of the angle of the element with the X axis

setmate

public void setmate(int mate)
Sets the value of the material identifier

Parameters:
mate - Integer number with the value of the material identifier

setni

public void setni(int nod_i)
Sets the number of the first node

Parameters:
nod_i - Integer number with the identifier of the first node

setnj

public void setnj(int nod_j)
Sets the number of the second node

Parameters:
nod_j - Integer number with the identifier of the second node

setlength

public void setlength(java.util.Map mnodes)
Calculates and sets the length of the element. It is called by the method "isPossible()" of the Model and so, the length of the element is only computed once

Parameters:
mnodes - Map containing the nodes of the UI model

setalpha

public void setalpha(java.util.Map mnodes)
Calculates and sets the angle of the element. It is called by the method "isPossible()" of the Model and so, the angle of the element is only computed once. The angle is stored in radians

Parameters:
mnodes - Map containing the nodes of the UI model