All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class relaaja.netlayout.VGJ.Node

java.lang.Object
   |
   +----relaaja.netlayout.VGJ.Node

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

Here is the source.

Author:
Larry Barowski

Variable Index

 o adjacencies_
 o BELOW
 o CENTER
 o context_
 o data
A general purpose data field.
 o data_
 o dataTypes
Just change this list to change the data types.
 o defaultLabel_
 o defaults
The default node.
 o depth_
 o groupActive_
 o groupNode_
 o groupNodeId_
 o grouppos_
 o haveId_
 o height_
 o hexchars_
 o id_
 o image_
 o imageChange_
 o imageLocation_
 o imageType_
 o IN
 o inActiveGroup_
 o index_
 o isDummy_
 o isGroup_
 o label_
 o labelPosition_
 o movingZ_
 o oldpos_
 o OVAL
 o RECTANGLE
 o selected_
 o shape_
 o shapeNames
 o temp_
 o toolkit_
 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(int)

Method Index

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

This resets the iterator nextChild().
 o getBoundingBox()
 o getChildren()
 o getDataVals()
 o getDefaultLabel()
 o getHeight()
 o getId()
 o getIdObject()
 o getImage()
 o getImagePixels(Image, int, int)
 o getImageSource()
 o getImageType()
 o getIndex()
 o getIsDummy()
 o getLabel()
 o getLabelPosition()
 o getPosition()
 o getPosition3()
 o getSelected()
 o getShape()
 o getTemp()
 o getVisibleGroupRoot()
 o getWidth()
 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 PSnum_(double)
 o psString_(String)
 o scaleBounds_(Graphics, double)
 o searchNextChild(int)
Return the next child with index >= n, or -1 if n is the last.
 o setBoundingBox(DDimension)
 o setBoundingBox(double, double)
 o setBoundingBox(double, double, double)
 o setChild(int)
 o setContext(URL)
 o setDataVals(String[])
 o setDefaultLabel(boolean)
 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)

Variables

 o adjacencies_
 private Set adjacencies_
 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 movingZ_
 private double movingZ_
 o width_
 protected double width_
 o height_
 protected double height_
 o depth_
 protected double depth_
 o shape_
 private int shape_
 o label_
 private String label_[]
 o labelPosition_
 private int labelPosition_
 o imageLocation_
 private String imageLocation_
 o imageType_
 private String imageType_
 o image_
 private Image image_
 o temp_
 private double temp_
 o defaultLabel_
 private static boolean defaultLabel_
 o isDummy_
 protected boolean isDummy_
 o index_
 protected int index_
 o selected_
 private boolean selected_
 o id_
 protected int id_
 o haveId_
 protected boolean haveId_
 o toolkit_
 private static Toolkit toolkit_
 o context_
 private static URL context_
 o imageChange_
 private boolean imageChange_
 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 static final int OVAL
 o RECTANGLE
 public static final int RECTANGLE
 o BELOW
 public static final int BELOW
 o IN
 public static final int IN
 o CENTER
 public static final int CENTER
 o shapeNames
 public static final String shapeNames[]
 o hexchars_
 private static char hexchars_[]
 o dataTypes
 public static String dataTypes[]
Just change this list to change the data types.

 o data_
 private String 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
 private Node(int unused)
 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.

Methods

 o searchNextChild
 public int searchNextChild(int n)
Return the next child with index >= n, or -1 if n is the last.

 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 getWidth
 public double getWidth()
 o getHeight
 public double getHeight()
 o getIsDummy
 public boolean getIsDummy()
 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 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 intersectWithLineTo
 public DPoint3 intersectWithLineTo(DPoint3 to,
                                    boolean inplane,
                                    int quality)
 o psString_
 private StringBuffer psString_(String source)
 o PSnum_
 private String PSnum_(double num)
 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()
 o scaleBounds_
 private void scaleBounds_(Graphics graphics,
                           double scale)
 o setDataVals
 public void setDataVals(String data_vals[])
 o getDataVals
 public String[] getDataVals()

All Packages  Class Hierarchy  This Package  Previous  Next  Index