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.
-
BELOW
-
-
CENTER
-
-
data
- A general purpose data field.
-
data_
-
-
defaultDataTypes_
- Just change this list to change the data types.
-
defaults
- The default node.
-
depth_
-
-
groupActive_
-
-
groupbox_
-
-
groupNode_
-
-
groupNodeId_
-
-
grouppos_
-
-
haveId_
-
-
height_
-
-
id_
-
-
IN
-
-
inActiveGroup_
-
-
index_
-
-
isDummy_
-
-
isGroup_
-
-
oldbox_
-
-
oldpos_
-
-
OVAL
-
-
RECTANGLE
-
-
shapeNames
-
-
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(GMLobject)
-
-
clearChild(int)
-
-
clone()
-
-
copyAttributes(Node)
- Copy attributes from another Node.
-
draw(Component, Graphics, Matrix44, int)
-
-
firstChild()
- Returns the index of the lowest numbered child, -1 if there are no
children.
This resets the iterator nextChild().
-
getBoundingBox()
-
-
getBoundingBox3()
-
-
getChildren()
-
-
getDefaultLabel()
-
-
getDrawBounds_(double, Matrix44, DPoint, DPoint)
-
-
getId()
-
-
getIdObject()
-
-
getImage()
-
-
getImagePixels(Image, int, int)
-
-
getImageSource()
-
-
getImageType()
-
-
getIndex()
-
-
getLabel()
-
-
getLabelPosition()
-
-
getPosition()
-
-
getPosition3()
-
-
getSelected()
-
-
getShape()
-
-
getTemp()
-
-
getVisibleGroupRoot()
-
-
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()
-
-
saveState()
-
-
scale(double, double, double)
-
-
searchNextChild(int)
- Return the next child with index >= n, or -1 if n
is the last.
-
setBoundingBox(DDimension)
-
-
setBoundingBox(DDimension3)
-
-
setBoundingBox(double, double)
-
-
setBoundingBox(double, double, double)
-
-
setChild(int)
-
-
setContext(URL)
-
-
setDefaultLabel(boolean)
-
-
setGMLvalues(GMLobject)
-
-
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)
-
-
slide(Matrix44, Matrix44, int, int)
-
-
toPS(Matrix44)
- Generate PostScript code for the node.
-
toPSimage(int, Matrix44)
-
x_
protected double x_
y_
protected double y_
z_
protected double z_
oldpos_
protected DPoint3 oldpos_
grouppos_
protected DPoint3 grouppos_
oldbox_
protected DDimension3 oldbox_
groupbox_
protected DDimension3 groupbox_
width_
protected double width_
height_
protected double height_
depth_
protected double depth_
isDummy_
protected boolean isDummy_
index_
protected int index_
id_
protected int id_
haveId_
protected boolean haveId_
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 final static int OVAL
RECTANGLE
public final static int RECTANGLE
BELOW
public final static int BELOW
IN
public final static int IN
CENTER
public final static int CENTER
shapeNames
public final static String shapeNames[]
defaultDataTypes_
public static String defaultDataTypes_[]
- Just change this list to change the data types.
data_
public Hashtable 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
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.
Node
public Node(GMLobject gml)
searchNextChild
public int searchNextChild(int n)
- Return the next child with index >= n, or -1 if n
is the last.
setGMLvalues
public void setGMLvalues(GMLobject gml)
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()
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)
setBoundingBox
public void setBoundingBox(DDimension3 new_bbox)
getBoundingBox3
public DDimension3 getBoundingBox3()
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
draw
public void draw(Component comp,
Graphics graphics,
Matrix44 transform,
int quality)
intersectWithLineTo
public DPoint3 intersectWithLineTo(DPoint3 to,
boolean inplane,
int quality)
toPS
public String toPS(Matrix44 transform)
- Generate PostScript code for the node.
toPSimage
public String toPSimage(int number,
Matrix44 transform)
getDrawBounds_
public void getDrawBounds_(double scale,
Matrix44 transform,
DPoint width,
DPoint height)
saveState
public void saveState()
slide
public void slide(Matrix44 moveTransform,
Matrix44 viewTransform,
int xoffs,
int yoffs)
scale
public void scale(double scalex,
double scaley,
double scalez)
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()
All Packages Class Hierarchy This Package Previous Next Index