|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.view.EdgeRealizer y.view.PolyLineEdgeRealizer y25.view.realizer.PolyLineEdgeRealizer25D
Extends the PolyLineEdgeRealizer
with 25D information.
This realizer aims to provide the same functionality as the
y.view.PolyLineEdgeRealizer
, except that
it can also be used inside a Graph25D
and therefore rendered
into a Graph25DView
.
When this realizer renders itself into an Graph25DView
, it
does so by either rendering a simple line to visualize the edge or by
rendering a 3D cylinder. Whether a 2D or a 3D line is drawn can be set via
setLineDisplayMode
. Note that the arrow head is
always rendered as a three dimensional cone.
Field Summary | |
protected int |
displayMode
Current drawing mode for lines. |
Fields inherited from class y.view.EdgeRealizer |
bends, path |
Fields inherited from interface y25.view.EdgeRealizer25D |
MODE_2D, MODE_3D |
Constructor Summary | |
PolyLineEdgeRealizer25D()
Creates a new PloyLineEdgeRealizer25D . |
|
PolyLineEdgeRealizer25D(EdgeRealizer er)
Creates a new PloyLineEdgeRealizer25D , while trying to
copy as many properties of the passed realizer as possible. |
Method Summary | |
EdgeRealizer |
createCopy(EdgeRealizer er)
Creates a copy of this realizer. |
int |
getLineDisplayMode()
Returns the current display mode for edge lines when drawing into an Graph25DView . |
double |
getLineRadius()
Returns the radius of the edge based on the LineType of this realizer. |
BoundingBox |
getRelativeBoundingBox()
Returns the relative bounding box that encompasses the edge. |
void |
paintGL(GLAutoDrawable drawable,
Camera camera)
Renders the edge this realizer is bound to into the given drawable. |
protected void |
paintGLCylinderLine(GLAutoDrawable drawable,
Camera camera)
Renders the edge as a 3D cylinder. |
protected void |
paintGLCylinderLineSelfLoop(GLAutoDrawable drawable,
Camera camera)
Renders the self loop edge as a 3D cylinder. |
protected void |
paintGLLine(GLAutoDrawable drawable,
Camera camera)
Renders the edge as a 2D line. |
protected void |
paintGLLineSelfLoop(GLAutoDrawable drawable,
Camera camera)
Renders the self loop edge as a 2D line. |
protected void |
setCylinderMaterial(GLAutoDrawable drawable)
Sets the cylinder material. |
void |
setLineDisplayMode(int mode)
Returns the current display mode for edge lines when drawing into an Graph25DView . |
protected void |
unsetCylinderMaterial(GLAutoDrawable drawable)
Unsets the cylinder material. |
Methods inherited from class y.view.PolyLineEdgeRealizer |
calculatePath, containsSeg, createBend, getSmoothedBends, insertBend, pathIntersects, read, reInsertBend, removeBend, setSmoothedBends, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface y.layout.EdgeLayout |
addPoint, clearPoints, getPoint, getSourcePoint, getTargetPoint, pointCount, setPoint, setSourcePoint, setTargetPoint |
Field Detail |
protected int displayMode
Constructor Detail |
public PolyLineEdgeRealizer25D()
PloyLineEdgeRealizer25D
. Edges willbe drawn
as 2D lines.
public PolyLineEdgeRealizer25D(EdgeRealizer er)
PloyLineEdgeRealizer25D
, while trying to
copy as many properties of the passed realizer as possible.
Method Detail |
public EdgeRealizer createCopy(EdgeRealizer er)
EdgeRealizer.createCopy(y.view.EdgeRealizer)
public int getLineDisplayMode()
Graph25DView
. Can be eiter
PolyLineEdgeRealizer.MODE_2D
or
PolyLineEdgeRealizer.MODE_3D
.
getLineDisplayMode
in interface EdgeRealizer25D
public void setLineDisplayMode(int mode)
Graph25DView
. mode
can be eiter
PolyLineEdgeRealizer.MODE_2D
or
PolyLineEdgeRealizer.MODE_3D
.
setLineDisplayMode
in interface EdgeRealizer25D
public void paintGL(GLAutoDrawable drawable, Camera camera)
EdgeRealizer25D
The passed camera is the one that is used to display this edge. It can be used, for example, to render an edge differently depending on the viewing position, or to display labels that always face the viewer.
paintGL
in interface EdgeRealizer25D
EdgeRealizer25D.paintGL(javax.media.opengl.GLAutoDrawable,
y25.graphics.Camera)
protected void paintGLLine(GLAutoDrawable drawable, Camera camera)
protected void paintGLLineSelfLoop(GLAutoDrawable drawable, Camera camera)
protected void setCylinderMaterial(GLAutoDrawable drawable)
protected void unsetCylinderMaterial(GLAutoDrawable drawable)
protected void paintGLCylinderLine(GLAutoDrawable drawable, Camera camera)
protected void paintGLCylinderLineSelfLoop(GLAutoDrawable drawable, Camera camera)
public BoundingBox getRelativeBoundingBox()
EdgeLayout25D
"Relative" means, that the z-position of the layer that the edge belongs to is treated as the origin.
getRelativeBoundingBox
in interface EdgeLayout25D
EdgeLayout25D.getRelativeBoundingBox()
public double getLineRadius()
LineType
of this realizer.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |