|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.yworks.yfiles.server.tiles.servlet.GraphInfoProvider
This is a helper class which provides information on the currently visible graph elements and
the nesting structure of the whole graph.
See writeViewInfo(PrintWriter, Graph2D, double, double, double, double, int)
and
writeHierarchyInfo(PrintWriter, Graph2D)
.
Field Summary | |
static int |
EDGE_LABELS
Flag used in writeViewInfo(PrintWriter, Graph2D, double, double, double, double, int) : write
info for edge labels. |
static int |
EDGES
Flag used in writeViewInfo(PrintWriter, Graph2D, double, double, double, double, int) : write
info for edges. |
static int |
NODE_LABELS
Flag used in writeViewInfo(PrintWriter, Graph2D, double, double, double, double, int) : write
info for node labels. |
static int |
NODES
Flag used in writeViewInfo(PrintWriter, Graph2D, double, double, double, double, int) : write
info for nodes. |
Method Summary | |
static String |
getHierarchyInfoJSON(HierarchyManager hierarchyManager)
returns a JSON string containing information on the given hierarchy. |
static String |
getHitInfoJSON(Graph2D graph,
int types,
double x,
double y,
double width,
double height)
returns a JSON string containing information on the bounds of the graph elements. |
static void |
writeHierarchyInfo(PrintWriter out,
Graph2D graph)
writes information on the nesting structure of the nodes of a graph to an output stream. |
static void |
writeViewInfo(PrintWriter out,
Graph2D graph,
double x,
double y,
double width,
double height,
int types)
writes information on the currently visible graph elements to an output stream in JSON format. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NODES
writeViewInfo(PrintWriter, Graph2D, double, double, double, double, int)
: write
info for nodes.
public static final int EDGES
writeViewInfo(PrintWriter, Graph2D, double, double, double, double, int)
: write
info for edges.
public static final int NODE_LABELS
writeViewInfo(PrintWriter, Graph2D, double, double, double, double, int)
: write
info for node labels.
public static final int EDGE_LABELS
writeViewInfo(PrintWriter, Graph2D, double, double, double, double, int)
: write
info for edge labels.
Method Detail |
public static void writeViewInfo(PrintWriter out, Graph2D graph, double x, double y, double width, double height, int types)
getHitInfoJSON(Graph2D, int, double, double, double, double)
.
out
- the output stream on which to write the informationgraph
- the graph for which the information is writtenx
- left edge of the area, for which information should be written (world coordinates)y
- right edge of the area, for which information should be written (world coordinates)width
- width of the area, for which information should be written (world coordinates)height
- height of the area, for which information should be written (world coordinates)types
- types of graph elements, for which information should be written as an ORed combination
of the constants defined in this class for this purposepublic static String getHitInfoJSON(Graph2D graph, int types, double x, double y, double width, double height)
graph
- the graphtypes
- types of graph elements, for which information should be returned as an ORed combination
of the constants defined in this class for this purposex
- left edge of the area, for which information should be returned (world coordinates)y
- right edge of the area, for which information should be returned (world coordinates)width
- width of the area, for which information should be returned (world coordinates)height
- height of the area, for which information should be returned (world coordinates)
public static void writeHierarchyInfo(PrintWriter out, Graph2D graph)
out
- the output stream on which to write the informationgraph
- the graph for which the information is writtenpublic static String getHierarchyInfoJSON(HierarchyManager hierarchyManager)
hierarchyManager
- the manager for the hierarchy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |