|
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
public class GraphLOD
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.
Constructor Summary | |
---|---|
GraphLOD()
|
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. |
double |
getNestedNetworkImageScaleFactor()
|
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. |
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 |
Constructor Detail |
---|
public GraphLOD()
Method Detail |
---|
public byte renderEdges(int visibleNodeCount, int totalNodeCount, int totalEdgeCount)
Note that rendering all edges leads to a dramatic performance decrease when rendering large graphs.
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
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.
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.
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.
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.
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.
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.
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.
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.
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()
|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |