|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.view.NodeRealizer y.view.ShapeNodeRealizer y.view.Graph2DNodeRealizer
public class Graph2DNodeRealizer
A node realizer that can display a graph as its contents.
Field Summary |
---|
Fields inherited from class y.view.ShapeNodeRealizer |
---|
DIAMOND, ELLIPSE, FAT_ARROW, FAT_ARROW_2, HEXAGON, KEY_SLOPPY_RECT_PAINTING, OCTAGON, PARALLELOGRAM, PARALLELOGRAM_2, RECT, RECT_3D, ROUND_RECT, shape, STAR5, STAR6, STAR8, TRAPEZOID, TRAPEZOID_2, TRIANGLE, TRIANGLE_2, VALUE_SLOPPY_RECT_PAINTING_OFF |
Fields inherited from class y.view.NodeRealizer |
---|
height, HOTSPOT_E, HOTSPOT_N, HOTSPOT_NE, HOTSPOT_NONE, HOTSPOT_NW, HOTSPOT_S, HOTSPOT_SE, HOTSPOT_SW, HOTSPOT_W, width, x, y |
Constructor Summary | |
---|---|
Graph2DNodeRealizer()
Creates a new instance Graph2DNodeRealizer. |
|
Graph2DNodeRealizer(NodeRealizer nr)
Creates a new instance of Graph2DNodeRealizer as a copy of the given realizer. |
Method Summary | |
---|---|
NodeRealizer |
createCopy(NodeRealizer nr)
Creates a copy of this realizer type that will be initialized with the values found in the given realizer. |
boolean |
getApplyClipping()
Returns whether or not to use clipping when drawing the inner graph. |
boolean |
getApplyTransformation()
Returns whether or not to apply a best fit transformation to the graph before displaying it. |
Graph2D |
getInnerGraph()
Returns the inner graph associated to this realizer. |
boolean |
isExpanded()
Returns the expansion state of this realizer. |
protected void |
paintInnerGraph(java.awt.Graphics2D gfx)
Paints the inner graph. |
protected void |
paintNode(java.awt.Graphics2D g)
Paints the node. |
void |
paintSloppy(java.awt.Graphics2D gfx)
Paints the realizer in a cheap, uniform and sloppy way on g . |
void |
read(java.io.ObjectInputStream in)
Deprecated. Use the GraphML format instead. |
void |
setApplyClipping(boolean c)
Sets the clipping policy used when displaying the inner graph. |
void |
setApplyTransformation(boolean t)
Sets the transformation policy used when displaying the inner graph. |
void |
setExpanded(boolean e)
Sets the expansion state of this realizer. |
void |
setInnerGraph(Graph2D g)
Sets the inner graph that this realizer should display as its contents. |
void |
write(java.io.ObjectOutputStream out)
Deprecated. Use the GraphML format instead. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Graph2DNodeRealizer()
public Graph2DNodeRealizer(NodeRealizer nr)
nr
- the prototype to be copied.Method Detail |
---|
public void setApplyClipping(boolean c)
c
- if true
the bounding box of this realizer
serves as clipping area when rendering the inner graph.getApplyClipping()
public void setApplyTransformation(boolean t)
t
- if true
the inner graph will be rendered in such a
way that it fits nicely in the bounding box of this realizer.getApplyTransformation()
public boolean getApplyTransformation()
true
if a best fit transformation is applied to the
graph before displaying it; false
otherwise.setApplyTransformation(boolean)
public boolean getApplyClipping()
true
if clipping is used when drawing the inner graph;
false
otherwise.setApplyClipping(boolean)
public void setExpanded(boolean e)
By default, a Graph2DNodeRealizer
instance is expanded.
e
- the new expansion state of this realizer.isExpanded()
public boolean isExpanded()
By default, a Graph2DNodeRealizer
instance is expanded.
setExpanded(boolean)
public void setInnerGraph(Graph2D g)
g
- the inner graph for this realizer.getInnerGraph()
public Graph2D getInnerGraph()
setInnerGraph(Graph2D)
protected void paintNode(java.awt.Graphics2D g)
paintNode
in class ShapeNodeRealizer
public void paintSloppy(java.awt.Graphics2D gfx)
NodeRealizer
g
. By default this call draws a
rectangle with this realizer's bounds and colors.
No label will be painted.
paintSloppy
in class NodeRealizer
protected void paintInnerGraph(java.awt.Graphics2D gfx)
gfx
- the graphics context to paint upon.public NodeRealizer createCopy(NodeRealizer nr)
ShapeNodeRealizer
createCopy
in class ShapeNodeRealizer
nr
- the prototype realizer whose attributes will be copied.public void write(java.io.ObjectOutputStream out) throws java.io.IOException
GraphML format
instead.
write
in class ShapeNodeRealizer
java.io.IOException
public void read(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
GraphML format
instead.
write(ObjectOutputStream)
method.
read
in class ShapeNodeRealizer
java.io.IOException
java.lang.ClassNotFoundException
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |