Class EDU.auburn.VGJ.graph.Node
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class EDU.auburn.VGJ.graph.Node

java.lang.Object
   |
   +----EDU.auburn.VGJ.graph.Node

public class Node
extends Object
implements Cloneable, ImageObserver
A Node class for use in a Graph, and for display.

Here is the source.

Variable Index

 o BELOW
 o CENTER
 o data
A general purpose data field.
 o data_
 o defaultDataTypes_
Just change this list to change the data types.
 o defaults
The default node.
 o depth_
 o groupActive_
 o groupbox_
 o groupNode_
 o groupNodeId_
 o grouppos_
 o haveId_
 o height_
 o id_
 o IN
 o inActiveGroup_
 o index_
 o isDummy_
 o isGroup_
 o oldbox_
 o oldpos_
 o OVAL
 o RECTANGLE
 o shapeNames
 o width_
 o x_
 o y_
 o z_

Constructor Index

 o Node()
Create a Node with default attributes.
 o Node(boolean)
Create a Node with default attributes, that may be a dummy node.
 o Node(GMLobject)

Method Index

 o clearChild(int)
 o clone()
 o copyAttributes(Node)
Copy attributes from another Node.
 o draw(Component, Graphics, Matrix44, int)
 o firstChild()
Returns the index of the lowest numbered child, -1 if there are no children.

This resets the iterator nextChild().
 o getBoundingBox()
 o getBoundingBox3()
 o getChildren()
 o getDefaultLabel()
 o getDrawBounds_(double, Matrix44, DPoint, DPoint)
 o getId()
 o getIdObject()
 o getImage()
 o getImagePixels(Image, int, int)
 o getImageSource()
 o getImageType()
 o getIndex()
 o getLabel()
 o getLabelPosition()
 o getPosition()
 o getPosition3()
 o getSelected()
 o getShape()
 o getTemp()
 o getVisibleGroupRoot()
 o groupActive()
 o hasChild(int)
 o hasChild(Node)
 o imagePS(Image)
 o imageUpdate(Image, int, int, int, int, int)
 o inGroup()
 o intersectWithLineTo(DPoint3, boolean, int)
 o isGroup()
 o isVisible()
 o nextChild()
Returns the index of the next child, -1 if there is none.
 o numberOfChildren()
 o saveState()
 o scale(double, double, double)
 o searchNextChild(int)
Return the next child with index >= n, or -1 if n is the last.
 o setBoundingBox(DDimension)
 o setBoundingBox(DDimension3)
 o setBoundingBox(double, double)
 o setBoundingBox(double, double, double)
 o setChild(int)
 o setContext(URL)
 o setDefaultLabel(boolean)
 o setGMLvalues(GMLobject)
 o setGroup()
 o setId(int)
 o setImage(Component, boolean, boolean)
 o setImageSource(String)
 o setImageType(String)
 o setLabel(String)
 o setLabelPosition(String)
 o setPosition(double, double)
 o setPosition(double, double, double)
 o setPosition(DPoint)
 o setPosition(DPoint3)
 o setSelected(boolean)
 o setShape(int)
 o setTemp(double)
 o setToolkit(Toolkit)
 o slide(Matrix44, Matrix44, int, int)
 o toPS(Matrix44)
Generate PostScript code for the node.
 o toPSimage(int, Matrix44)

Variables

 o x_
  protected double x_
 o y_
  protected double y_
 o z_
  protected double z_
 o oldpos_
  protected DPoint3 oldpos_
 o grouppos_
  protected DPoint3 grouppos_
 o oldbox_
  protected DDimension3 oldbox_
 o groupbox_
  protected DDimension3 groupbox_
 o width_
  protected double width_
 o height_
  protected double height_
 o depth_
  protected double depth_
 o isDummy_
  protected boolean isDummy_
 o index_
  protected int index_
 o id_
  protected int id_
 o haveId_
  protected boolean haveId_
 o groupNodeId_
  protected int groupNodeId_
 o groupNode_
  protected Node groupNode_
 o isGroup_
  protected boolean isGroup_
 o groupActive_
  protected boolean groupActive_
 o inActiveGroup_
  protected boolean inActiveGroup_
 o data
  public Object data
A general purpose data field. Algorithms that operate on Nodes can store any necessary data here.
 o OVAL
  public final static int OVAL
 o RECTANGLE
  public final static int RECTANGLE
 o BELOW
  public final static int BELOW
 o IN
  public final static int IN
 o CENTER
  public final static int CENTER
 o shapeNames
  public final static String shapeNames[]
 o defaultDataTypes_
  public static String defaultDataTypes_[]
Just change this list to change the data types.
 o data_
  public Hashtable data_
 o defaults
  public static Node defaults
The default node. Created nodes are initialized with the fields of this node. Default attributes can be changed by modifying it, in the same way those attributes are changed for other nodes.

For Example: If Node.defaults.setPosition(1.0, 1.0) is called, (1.0, 1.0) becomes the default position for all Nodes created thereafter.

Do not assign defaults to null, but it can be assigned to another Node.

Constructors

 o Node
  public Node()
Create a Node with default attributes.
 o Node
  public Node(boolean dummy)
Create a Node with default attributes, that may be a dummy node. Graph.dummysToEdgePaths() will convert the dummy nodes to edge paths.
 o Node
  public Node(GMLobject gml)

Methods

 o searchNextChild
  public int searchNextChild(int n)
Return the next child with index >= n, or -1 if n is the last.
 o setGMLvalues
  public void setGMLvalues(GMLobject gml)
 o setId
  public void setId(int id)
 o getIdObject
  public Integer getIdObject()
 o getId
  public int getId()
 o setPosition
  public void setPosition(double new_x,
                          double new_y)
 o setPosition
  public void setPosition(DPoint new_position)
 o setPosition
  public void setPosition(double new_x,
                          double new_y,
                          double new_z)
 o setPosition
  public void setPosition(DPoint3 new_position)
 o getPosition
  public DPoint getPosition()
 o getPosition3
  public DPoint3 getPosition3()
 o setBoundingBox
  public void setBoundingBox(double new_width,
                             double new_height)
 o setBoundingBox
  public void setBoundingBox(DDimension new_bbox)
 o getBoundingBox
  public DDimension getBoundingBox()
 o setBoundingBox
  public void setBoundingBox(double new_width,
                             double new_height,
                             double new_depth)
 o setBoundingBox
  public void setBoundingBox(DDimension3 new_bbox)
 o getBoundingBox3
  public DDimension3 getBoundingBox3()
 o setShape
  public void setShape(int shape)
 o getShape
  public int getShape()
 o setTemp
  public void setTemp(double temp)
 o getTemp
  public double getTemp()
 o setLabel
  public void setLabel(String label)
 o getLabel
  public String getLabel()
 o setDefaultLabel
  public static void setDefaultLabel(boolean use_default)
 o getDefaultLabel
  public static boolean getDefaultLabel()
 o setSelected
  public void setSelected(boolean selected)
 o getSelected
  public boolean getSelected()
 o setChild
  public void setChild(int child)
 o clearChild
  public void clearChild(int child)
 o getChildren
  public Set getChildren()
 o firstChild
  public int firstChild()
Returns the index of the lowest numbered child, -1 if there are no children.

This resets the iterator nextChild().
 o nextChild
  public int nextChild()
Returns the index of the next child, -1 if there is none.
 o getIndex
  public int getIndex()
 o hasChild
  public boolean hasChild(int child)
 o hasChild
  public boolean hasChild(Node child)
 o numberOfChildren
  public int numberOfChildren()
 o copyAttributes
  public void copyAttributes(Node node_to_copy)
Copy attributes from another Node. This will not change the children or the data.
 o clone
  public Object clone() throws CloneNotSupportedException
Overrides:
clone in class Object
 o draw
  public void draw(Component comp,
                   Graphics graphics,
                   Matrix44 transform,
                   int quality)
 o intersectWithLineTo
  public DPoint3 intersectWithLineTo(DPoint3 to,
                                     boolean inplane,
                                     int quality)
 o toPS
  public String toPS(Matrix44 transform)
Generate PostScript code for the node.
 o toPSimage
  public String toPSimage(int number,
                          Matrix44 transform)
 o getDrawBounds_
  public void getDrawBounds_(double scale,
                             Matrix44 transform,
                             DPoint width,
                             DPoint height)
 o saveState
  public void saveState()
 o slide
  public void slide(Matrix44 moveTransform,
                    Matrix44 viewTransform,
                    int xoffs,
                    int yoffs)
 o scale
  public void scale(double scalex,
                    double scaley,
                    double scalez)
 o setToolkit
  public static void setToolkit(Toolkit toolkit)
 o setContext
  public static void setContext(URL context)
 o imageUpdate
  public boolean imageUpdate(Image image,
                             int info,
                             int x,
                             int y,
                             int w,
                             int h)
 o setLabelPosition
  public void setLabelPosition(String label_position)
 o getLabelPosition
  public int getLabelPosition()
 o setImageType
  public void setImageType(String image_type)
 o getImageType
  public String getImageType()
 o setImageSource
  public void setImageSource(String image_source)
 o getImageSource
  public String getImageSource()
 o setImage
  public void setImage(Component comp,
                       boolean set_w,
                       boolean set_h)
 o getImagePixels
  public static int[] getImagePixels(Image image,
                                     int wd,
                                     int ht)
 o getImage
  public Image getImage()
 o imagePS
  public static String imagePS(Image image)
 o inGroup
  public boolean inGroup()
 o isGroup
  public boolean isGroup()
 o groupActive
  public boolean groupActive()
 o isVisible
  public boolean isVisible()
 o getVisibleGroupRoot
  public Node getVisibleGroupRoot()
 o setGroup
  public void setGroup()

All Packages  Class Hierarchy  This Package  Previous  Next  Index