|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cytoscape.render.stateful.GraphLOD cytoscape.ding.CyGraphLOD
public class CyGraphLOD
An instance of this class defines the level of detail that goes into a single rendering of a graph. This class is meant to be subclassed; its methods are meant to be overridden; nonetheless, sane defaults are used in the default method implementations.
To understand the significance of each method's return value, it makes sense to become familiar with the API cytoscape.render.immed.GraphGraphics.
Field Summary | |
---|---|
protected int |
coarseDetailThreshold
|
protected int |
edgeArrowThreshold
|
protected int |
edgeLabelThreshold
|
protected int |
nodeBorderThreshold
|
protected int |
nodeLabelThreshold
|
Constructor Summary | |
---|---|
CyGraphLOD()
Creates a new CyGraphLOD object. |
Method Summary | |
---|---|
boolean |
customGraphics(int renderNodeCount,
int renderEdgeCount)
Determines whether or not to render custom graphics on nodes. |
boolean |
dashedEdges(int renderNodeCount,
int renderEdgeCount)
Determines whether or not to honor dashed edges. |
boolean |
detail(int renderNodeCount,
int renderEdgeCount)
Determines whether or not to render a graph at full detail. |
boolean |
edgeAnchors(int renderNodeCount,
int renderEdgeCount)
Determines whether or not to honor edge anchors. |
boolean |
edgeArrows(int renderNodeCount,
int renderEdgeCount)
Determines whether or not to render edge arrows. |
boolean |
edgeLabels(int renderNodeCount,
int renderEdgeCount)
Determines whether or not to render edge labels. |
protected boolean |
getBoolean(String key,
boolean defaultValue)
Deprecated. Use PropUtil.getBoolean(..) instead. Leaving Feb 2011. |
protected int |
getInt(String key,
int defaultValue)
Deprecated. Use PropUtil.getInt(..) instead. Leaving Feb 2011. |
double |
getNestedNetworkImageScaleFactor()
|
protected void |
init()
|
boolean |
nodeBorders(int renderNodeCount,
int renderEdgeCount)
Determines whether or not to render node borders. |
boolean |
nodeLabels(int renderNodeCount,
int renderEdgeCount)
Determines whether or not to render node labels. |
void |
propertyChange(PropertyChangeEvent e)
DOCUMENT ME! |
byte |
renderEdges(int visibleNodeCount,
int totalNodeCount,
int totalEdgeCount)
Determines whether or not to render all edges in a graph, no edges, or only those edges which touch a visible node. |
boolean |
textAsShape(int renderNodeCount,
int renderEdgeCount)
Determines whether or not to draw text as shape when rendering node and edge labels. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int coarseDetailThreshold
protected int nodeBorderThreshold
protected int nodeLabelThreshold
protected int edgeArrowThreshold
protected int edgeLabelThreshold
Constructor Detail |
---|
public CyGraphLOD()
Method Detail |
---|
public void propertyChange(PropertyChangeEvent e)
propertyChange
in interface PropertyChangeListener
e
- DOCUMENT ME!protected void init()
@Deprecated protected int getInt(String key, int defaultValue)
@Deprecated protected boolean getBoolean(String key, boolean defaultValue)
public byte renderEdges(int visibleNodeCount, int totalNodeCount, int totalEdgeCount)
Note that rendering all edges leads to a dramatic performance decrease when rendering large graphs.
renderEdges
in class GraphLOD
visibleNodeCount
- the number of nodes visible in the current
viewport; note that a visible node is not necessarily a rendered node,
because visible nodes with zero width or height are not rendered.totalNodeCount
- the total number of nodes in the graph that is
being rendered.totalEdgeCount
- the total number of edges in the graph that is
being rendered.
public boolean detail(int renderNodeCount, int renderEdgeCount)
The following table describes the difference between full and low rendering detail in terms of what methods on an instance of GraphGraphics get called:
full detail low detail nodes drawNodeFull() drawNodeLow() edges drawEdgeFull() drawEdgeLow() node labels drawTextFull() not rendered edge labels drawTextFull() not rendered custom node graphics drawCustomGraphicFull() not rendered
detail
in class GraphLOD
renderNodeCount
- the number of nodes that are about to be rendered.renderEdgeCount
- the number of edges that are about to be rendered.
public boolean nodeBorders(int renderNodeCount, int renderEdgeCount)
It is only possible to draw node borders at the full detail level. If low detail is chosen, the output of this method is ignored.
nodeBorders
in class GraphLOD
renderNodeCount
- the number of nodes that are about to be rendered.renderEdgeCount
- the number of edges that are about to be rendered.
detail(int, int)
public boolean nodeLabels(int renderNodeCount, int renderEdgeCount)
Node labels are only rendered at the full detail level. If low detail is chosen, the output of this method is ignored.
nodeLabels
in class GraphLOD
renderNodeCount
- the number of nodes that are about to be rendered.renderEdgeCount
- the number of edges that are about to be rendered.
detail(int, int)
public boolean customGraphics(int renderNodeCount, int renderEdgeCount)
Custom node graphics are only rendered at the full detail level. If low detail is chosen, the output of this method is ignored.
customGraphics
in class GraphLOD
renderNodeCount
- the number of nodes that are about to be rendered.renderEdgeCount
- the number of edges that are about to be rendered.
detail(int, int)
public boolean edgeArrows(int renderNodeCount, int renderEdgeCount)
It is only possible to draw edge arrows at the full detail level. If low detail is chosen, the output of this method is ignored.
edgeArrows
in class GraphLOD
renderNodeCount
- the number of nodes that are about to be rendered.renderEdgeCount
- the number of edges that are about to be rendered.
detail(int, int)
public boolean dashedEdges(int renderNodeCount, int renderEdgeCount)
It is only possible to draw dashed edges at the full detail level. If low detail is chosen, the output of this method is ignored. Note that drawing dashed edges is computationally expensive; the default implementation of this method does not make a very performance-minded decision if a lot of edges happen to be dashed.
dashedEdges
in class GraphLOD
renderNodeCount
- the number of nodes that are about to be rendered.renderEdgeCount
- the number of edges that are about to be rendered.
detail(int, int)
public boolean edgeAnchors(int renderNodeCount, int renderEdgeCount)
It is only possible to draw poly-edges at the full detail level. If low detail is chosen, the output of this method is ignored.
edgeAnchors
in class GraphLOD
renderNodeCount
- the number of nodes that are about to be rendered.renderEdgeCount
- the number of edges that are about to be rendered.
detail(int, int)
public boolean edgeLabels(int renderNodeCount, int renderEdgeCount)
Edge labels are only rendered at the full detail level. If low detail is chosen, the output of this method is ignored.
edgeLabels
in class GraphLOD
renderNodeCount
- the number of nodes that are about to be rendered.renderEdgeCount
- the number of edges that are about to be rendered.
detail(int, int)
public boolean textAsShape(int renderNodeCount, int renderEdgeCount)
This method affects the boolean parameter drawTextAsShape in the method call GraphGraphics.drawTextFull(). If neither node nor edge labels are rendered then the output of this method is ignored.
textAsShape
in class GraphLOD
renderNodeCount
- the number of nodes that are about to be rendered.renderEdgeCount
- the number of edges that are about to be rendered.
nodeLabels(int, int)
,
edgeLabels(int, int)
public double getNestedNetworkImageScaleFactor()
getNestedNetworkImageScaleFactor
in class GraphLOD
|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |