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
-
adjacencies_
-
-
BELOW
-
-
CENTER
-
-
context_
-
-
data
- A general purpose data field.
-
data_
-
-
dataTypes
- Just change this list to change the data types.
-
defaultLabel_
-
-
defaults
- The default node.
-
depth_
-
-
groupActive_
-
-
groupNode_
-
-
groupNodeId_
-
-
grouppos_
-
-
haveId_
-
-
height_
-
-
hexchars_
-
-
id_
-
-
image_
-
-
imageChange_
-
-
imageLocation_
-
-
imageType_
-
-
IN
-
-
inActiveGroup_
-
-
index_
-
-
isDummy_
-
-
isGroup_
-
-
label_
-
-
labelPosition_
-
-
movingZ_
-
-
oldpos_
-
-
OVAL
-
-
RECTANGLE
-
-
selected_
-
-
shape_
-
-
shapeNames
-
-
temp_
-
-
toolkit_
-
-
width_
-
-
x_
-
-
y_
-
-
z_
-
-
Node()
- Create a Node with default attributes.
-
Node(boolean)
- Create a Node with default attributes, that may
be a dummy node.
-
Node(int)
-
-
clearChild(int)
-
-
clone()
-
-
copyAttributes(Node)
- Copy attributes from another Node.
-
firstChild()
- Returns the index of the lowest numbered child, -1 if there are no
children.
This resets the iterator nextChild().
-
getBoundingBox()
-
-
getChildren()
-
-
getDataVals()
-
-
getDefaultLabel()
-
-
getHeight()
-
-
getId()
-
-
getIdObject()
-
-
getImage()
-
-
getImagePixels(Image, int, int)
-
-
getImageSource()
-
-
getImageType()
-
-
getIndex()
-
-
getIsDummy()
-
-
getLabel()
-
-
getLabelPosition()
-
-
getPosition()
-
-
getPosition3()
-
-
getSelected()
-
-
getShape()
-
-
getTemp()
-
-
getVisibleGroupRoot()
-
-
getWidth()
-
-
groupActive()
-
-
hasChild(int)
-
-
hasChild(Node)
-
-
imagePS(Image)
-
-
imageUpdate(Image, int, int, int, int, int)
-
-
inGroup()
-
-
intersectWithLineTo(DPoint3, boolean, int)
-
-
isGroup()
-
-
isVisible()
-
-
nextChild()
- Returns the index of the next child, -1 if there is none.
-
numberOfChildren()
-
-
PSnum_(double)
-
-
psString_(String)
-
-
scaleBounds_(Graphics, double)
-
-
searchNextChild(int)
- Return the next child with index >= n, or -1 if n
is the last.
-
setBoundingBox(DDimension)
-
-
setBoundingBox(double, double)
-
-
setBoundingBox(double, double, double)
-
-
setChild(int)
-
-
setContext(URL)
-
-
setDataVals(String[])
-
-
setDefaultLabel(boolean)
-
-
setGroup()
-
-
setId(int)
-
-
setImage(Component, boolean, boolean)
-
-
setImageSource(String)
-
-
setImageType(String)
-
-
setLabel(String)
-
-
setLabelPosition(String)
-
-
setPosition(double, double)
-
-
setPosition(double, double, double)
-
-
setPosition(DPoint)
-
-
setPosition(DPoint3)
-
-
setSelected(boolean)
-
-
setShape(int)
-
-
setTemp(double)
-
-
setToolkit(Toolkit)
-
adjacencies_
private Set adjacencies_
x_
protected double x_
y_
protected double y_
z_
protected double z_
oldpos_
protected DPoint3 oldpos_
grouppos_
protected DPoint3 grouppos_
movingZ_
private double movingZ_
width_
protected double width_
height_
protected double height_
depth_
protected double depth_
shape_
private int shape_
label_
private String label_[]
labelPosition_
private int labelPosition_
imageLocation_
private String imageLocation_
imageType_
private String imageType_
image_
private Image image_
temp_
private double temp_
defaultLabel_
private static boolean defaultLabel_
isDummy_
protected boolean isDummy_
index_
protected int index_
selected_
private boolean selected_
id_
protected int id_
haveId_
protected boolean haveId_
toolkit_
private static Toolkit toolkit_
context_
private static URL context_
imageChange_
private boolean imageChange_
groupNodeId_
protected int groupNodeId_
groupNode_
protected Node groupNode_
isGroup_
protected boolean isGroup_
groupActive_
protected boolean groupActive_
inActiveGroup_
protected boolean inActiveGroup_
data
public Object data
- A general purpose data field.
Algorithms that operate on Nodes can store any necessary data here.
OVAL
public static final int OVAL
RECTANGLE
public static final int RECTANGLE
BELOW
public static final int BELOW
IN
public static final int IN
CENTER
public static final int CENTER
shapeNames
public static final String shapeNames[]
hexchars_
private static char hexchars_[]
dataTypes
public static String dataTypes[]
- Just change this list to change the data types.
data_
private String data_[]
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.
Node
private Node(int unused)
Node
public Node()
- Create a Node with default attributes.
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.
searchNextChild
public int searchNextChild(int n)
- Return the next child with index >= n, or -1 if n
is the last.
setId
public void setId(int id)
getIdObject
public Integer getIdObject()
getId
public int getId()
setPosition
public void setPosition(double new_x,
double new_y)
setPosition
public void setPosition(DPoint new_position)
setPosition
public void setPosition(double new_x,
double new_y,
double new_z)
setPosition
public void setPosition(DPoint3 new_position)
getPosition
public DPoint getPosition()
getWidth
public double getWidth()
getHeight
public double getHeight()
getIsDummy
public boolean getIsDummy()
getPosition3
public DPoint3 getPosition3()
setBoundingBox
public void setBoundingBox(double new_width,
double new_height)
setBoundingBox
public void setBoundingBox(DDimension new_bbox)
getBoundingBox
public DDimension getBoundingBox()
setBoundingBox
public void setBoundingBox(double new_width,
double new_height,
double new_depth)
setShape
public void setShape(int shape)
getShape
public int getShape()
setTemp
public void setTemp(double temp)
getTemp
public double getTemp()
setLabel
public void setLabel(String label)
getLabel
public String getLabel()
setDefaultLabel
public static void setDefaultLabel(boolean use_default)
getDefaultLabel
public static boolean getDefaultLabel()
setSelected
public void setSelected(boolean selected)
getSelected
public boolean getSelected()
setChild
public void setChild(int child)
clearChild
public void clearChild(int child)
getChildren
public Set getChildren()
firstChild
public int firstChild()
- Returns the index of the lowest numbered child, -1 if there are no
children.
This resets the iterator nextChild().
nextChild
public int nextChild()
- Returns the index of the next child, -1 if there is none.
getIndex
public int getIndex()
hasChild
public boolean hasChild(int child)
hasChild
public boolean hasChild(Node child)
numberOfChildren
public int numberOfChildren()
copyAttributes
public void copyAttributes(Node node_to_copy)
- Copy attributes from another Node. This will not change the children or
the data.
clone
public Object clone() throws CloneNotSupportedException
- Overrides:
- clone in class Object
intersectWithLineTo
public DPoint3 intersectWithLineTo(DPoint3 to,
boolean inplane,
int quality)
psString_
private StringBuffer psString_(String source)
PSnum_
private String PSnum_(double num)
setToolkit
public static void setToolkit(Toolkit toolkit)
setContext
public static void setContext(URL context)
imageUpdate
public boolean imageUpdate(Image image,
int info,
int x,
int y,
int w,
int h)
setLabelPosition
public void setLabelPosition(String label_position)
getLabelPosition
public int getLabelPosition()
setImageType
public void setImageType(String image_type)
getImageType
public String getImageType()
setImageSource
public void setImageSource(String image_source)
getImageSource
public String getImageSource()
setImage
public void setImage(Component comp,
boolean set_w,
boolean set_h)
getImagePixels
public static int[] getImagePixels(Image image,
int wd,
int ht)
getImage
public Image getImage()
imagePS
public static String imagePS(Image image)
inGroup
public boolean inGroup()
isGroup
public boolean isGroup()
groupActive
public boolean groupActive()
isVisible
public boolean isVisible()
getVisibleGroupRoot
public Node getVisibleGroupRoot()
setGroup
public void setGroup()
scaleBounds_
private void scaleBounds_(Graphics graphics,
double scale)
setDataVals
public void setDataVals(String data_vals[])
getDataVals
public String[] getDataVals()
All Packages Class Hierarchy This Package Previous Next Index