|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.ogdf.lib.Ogdf
public class Ogdf
The java-side wrapper for the OGDF library.
Field Summary | |
---|---|
static int |
BEAUTIFUL_AND_FAST
the BeautifulAndFast option. |
static int |
COSTS_PLANAR
the planar cost option. |
static int |
COSTS_REPULSE
the repulse cost option. |
static int |
COSTS_STANDARD
the standard cost option. |
static int |
DIRECTION_EAST
the east direction. |
static int |
DIRECTION_NORTH
the north direction. |
static int |
DIRECTION_SOUTH
the south direction. |
static int |
DIRECTION_WEST
the west direction. |
static int |
EDGE_TYPE_ASSOCIATION
the association edge type. |
static int |
EDGE_TYPE_DEPENDENCY
the dependency edge type. |
static int |
EDGE_TYPE_GENERALIZATION
the generalization edge type. |
static int |
GORGEOUS_AND_EFFICIENT
the GorgeousAndEfficient option. |
static int |
LABEL_TYPE_END1
the end1 label type. |
static int |
LABEL_TYPE_END2
the end2 label type. |
static int |
LABEL_TYPE_MULT1
the mult1 label type. |
static int |
LABEL_TYPE_MULT2
the mult2 label type. |
static int |
LABEL_TYPE_NAME
the name label type. |
static int |
NICE_AND_INCREDIBLE_SPEED
the NiceAndIncredibleSpeed option. |
static int |
ORIENTATION_BOTTOM_TO_TOP
the bottom-to-top orientation option. |
static int |
ORIENTATION_LEFT_TO_RIGHT
the left-to-right orientation option. |
static int |
ORIENTATION_RIGHT_TO_LEFT
the right-to-left orientation option. |
static int |
ORIENTATION_TOP_TO_BOTTOM
the top-to-bottom orientation option. |
static int |
SPEED_FAST
the fast speed option. |
static int |
SPEED_HQ
the hq speed option. |
static int |
SPEED_MEDIUM
the medium speed option. |
Constructor Summary | |
---|---|
Ogdf()
|
Method Summary | |
---|---|
static float |
BendsIterator_getX()
Returns the x-coordinate of the bend the current bends iterator is pointing at. |
static float |
BendsIterator_getY()
Returns the y-coordinate of the bend the current bends iterator is pointing at. |
static boolean |
BendsIterator_hasNext()
Returns whether the current bends iterator can iterate more bend points. |
static void |
BendsIterator_next()
Moves the current bends iterator forward. |
static void |
cleanup()
Deallocates memory that was allocated during the last graph-build and layout process. This method should be called everytime after such a process finished. |
static void |
createBendsInterator(long edge)
Creates an iterator for the edge and sets it as the current bends iterator. |
static void |
createCircularLayouter(float minDistCircle,
float minDistLevel,
float minDistSibling,
float minDistCC)
Creates the circular layouter. |
static void |
createDavidsonHarelLayouter(int costs,
int speed,
float edgeLength)
Creates the Davidson-Harel layouter. |
static void |
createFMMMLayouter(float unitEdgeLength,
boolean newInitialPlacement,
int qualityVsSpeed)
Creates a new FMMM layouter. |
static void |
createFMMMLayouterDetail(boolean coolTemperature,
float coolValue,
float fineTuneScalar,
int fineTuningIterations,
int fixedIterations,
float forceScalingFactor,
int gridQuotient,
int maxIterFactor,
float minDistCC,
int minGraphSize,
int particlesInLeaves,
int precision,
float postSpringStrength,
float strengthOfRepForces,
int randomTries,
float repForcesStrength,
float springStrength,
int stepsForRotatingComponents,
float threshold)
Creates a new FMMM layouter with low level options. |
static void |
createGraph(boolean umlGraph)
Creates new Graph and GraphAttributes and sets them as the current graph. |
static void |
createLabelInterface()
Creates a new ELabelInterface and sets it as the current label interface. This requires a preceding call to createGraph .Furthermore his has to be called before any other Label and LabelLayouter method and after any call to cleanup . |
static void |
createLabelLayouter()
Creates a new ELabelPosSimple and sets it as the current label layouter. This has to be called before any other label layouter method and after any call to cleanup . |
static void |
createMixedUpwardPlanarizationLayouter(float pageRatio,
float separation,
int direction)
Creates a new Mixed-Upward Planarization layouter. |
static void |
createRadialTreeLayouter(float minDistLevel,
float minDistCC)
Creates the radial tree layouter. |
static void |
createSpringEmbedderFRLayouter(int iterations)
Creates the Spring Embedder layouter by Fruchterman and Reingold. |
static void |
createSugiyamaLayouter(float nodeDistance,
float layerDistance)
Creates a new Sugiyama layouter. |
static void |
createTreeLayouter(float siblingDistance,
float subtreeDistance,
float levelDistance,
float treeDistance,
boolean orthogonal,
int orientation)
Creates the tree layouter. |
static void |
createUpwardPlanarizationLayouter(float nodeDistance,
float layerDistance)
Creates the upward planarization layouter. |
static long |
Graph_addEdge(long node1,
long node2)
Adds a new edge to the current graph. |
static long |
Graph_addNode(float x,
float y,
float w,
float h)
Adds a new node to the current graph. |
static void |
Graph_addNodeCenter2Bends()
Adds intersections of the bends and the node center with the nodes bounding boxes to the list of bends. |
static void |
Graph_getBoundingBox()
Calculates the current bounding box and stores it as the current bounding box. |
static float |
Graph_getBoundingBoxHeight()
Returns the height of the graphs bounding box. |
static float |
Graph_getBoundingBoxWidth()
Returns the width of the graphs bounding box. |
static float |
Graph_getBoundingBoxX()
Returns the x-coordinate of the current bounding box. |
static float |
Graph_getBoundingBoxY()
Returns the y-coordinate of the current bounding box. |
static float |
Graph_getNodeX(long node)
Returns the nodes x-coordinate. |
static float |
Graph_getNodeY(long node)
Returns the nodes y-coordinate. |
static int |
Graph_getNumberOfBends(long edge)
Returns the number of bendpoints for the given edge. |
static void |
Graph_setEdgeType(long edge,
int type)
Sets the edge type of the given edge. |
static void |
Label_addLabel(long edge,
int type,
float width,
float height)
Adds an edge label to the label interface. |
static float |
Label_getX(long edge,
int type)
Returns the x-coordinate of an edge label. |
static float |
Label_getY(long edge,
int type)
Returns the y-coordinate of an edge label. |
static void |
LabelLayouter_layout()
Layouts the current label interface with the current label layouter. |
static void |
LabelLayouter_setEdgeDistance(float distance)
Sets the edge distance option for the label layouter. |
static void |
LabelLayouter_setMarginDistance(float distance)
Sets the margin distance option for the label layouter. |
static void |
layout()
Layouts the current graph with the current layouter. |
static void |
loadLibrary()
Load the native OGDF library. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int EDGE_TYPE_ASSOCIATION
public static final int EDGE_TYPE_GENERALIZATION
public static final int EDGE_TYPE_DEPENDENCY
public static final int LABEL_TYPE_END1
public static final int LABEL_TYPE_MULT1
public static final int LABEL_TYPE_NAME
public static final int LABEL_TYPE_END2
public static final int LABEL_TYPE_MULT2
public static final int DIRECTION_NORTH
public static final int DIRECTION_SOUTH
public static final int DIRECTION_WEST
public static final int DIRECTION_EAST
public static final int GORGEOUS_AND_EFFICIENT
public static final int BEAUTIFUL_AND_FAST
public static final int NICE_AND_INCREDIBLE_SPEED
public static final int COSTS_STANDARD
public static final int COSTS_REPULSE
public static final int COSTS_PLANAR
public static final int SPEED_FAST
public static final int SPEED_MEDIUM
public static final int SPEED_HQ
public static final int ORIENTATION_TOP_TO_BOTTOM
public static final int ORIENTATION_BOTTOM_TO_TOP
public static final int ORIENTATION_LEFT_TO_RIGHT
public static final int ORIENTATION_RIGHT_TO_LEFT
Constructor Detail |
---|
public Ogdf()
Method Detail |
---|
public static void loadLibrary() throws UnsatisfiedLinkError
UnsatisfiedLinkError
- if the library is not found or cannot be loadedpublic static final void createGraph(boolean umlGraph)
true
an UMLGraph is created instead of the
GraphAttributes.cleanup
.
umlGraph
- true if the graph is an uml graphpublic static final long Graph_addNode(float x, float y, float w, float h)
x
- the nodes x-coordinatey
- the nodes y-coordinatew
- the nodes widthh
- the nodes height
public static final long Graph_addEdge(long node1, long node2)
node1
- the edges source node identifiernode2
- the edges target node identifier
public static final void Graph_setEdgeType(long edge, int type)
edge
- the edgetype
- the edge type (one of EDGE_TYPE_ASSOCIATION,
EDGE_TYPE_GENERALIZATION or EDGE_TYPE_DEPENDENCY)public static final float Graph_getNodeX(long node)
node
- the node identifier
public static final float Graph_getNodeY(long node)
node
- the node identifier
public static final void Graph_getBoundingBox()
public static final float Graph_getBoundingBoxX()
public static final float Graph_getBoundingBoxY()
public static final float Graph_getBoundingBoxWidth()
public static final float Graph_getBoundingBoxHeight()
public static final int Graph_getNumberOfBends(long edge)
edge
- the edge identifier
public static final void Graph_addNodeCenter2Bends()
public static final void createBendsInterator(long edge)
edge
- the edge identifierpublic static final boolean BendsIterator_hasNext()
public static final void BendsIterator_next()
public static final float BendsIterator_getX()
public static final float BendsIterator_getY()
public static final void createLabelInterface()
createGraph
.cleanup
.
public static final void Label_addLabel(long edge, int type, float width, float height)
edge
- the edge identifiertype
- the label type (one of LABEL_TYPE_END1, LABEL_TYPE_MULT1,
LABEL_TYPE_NAME, LABEL_TYPE_END2 or LABEL_TYPE_MULT2)width
- the label widthheight
- the label heightpublic static final float Label_getX(long edge, int type)
edge
- the edgetype
- the label type (one of LABEL_TYPE_END1, LABEL_TYPE_MULT1,
LABEL_TYPE_NAME, LABEL_TYPE_END2 or LABEL_TYPE_MULT2)
public static final float Label_getY(long edge, int type)
edge
- the edgetype
- the label type (one of LABEL_TYPE_END1, LABEL_TYPE_MULT1,
LABEL_TYPE_NAME, LABEL_TYPE_END2 or LABEL_TYPE_MULT2)
public static final void createLabelLayouter()
cleanup
.
public static final void LabelLayouter_setEdgeDistance(float distance)
distance
- the edge distancepublic static final void LabelLayouter_setMarginDistance(float distance)
distance
- the margin distancepublic static final void LabelLayouter_layout()
public static final void createSugiyamaLayouter(float nodeDistance, float layerDistance)
nodeDistance
- the node distancelayerDistance
- the layer distancepublic static final void createMixedUpwardPlanarizationLayouter(float pageRatio, float separation, int direction)
pageRatio
- the desired page ratioseparation
- the separation distancedirection
- the layout direction (one of DIRECTION_NORTH, DIRECTION_SOUTH,
DIRECTION_WEST or DIRECTION_EAST)public static final void createFMMMLayouter(float unitEdgeLength, boolean newInitialPlacement, int qualityVsSpeed)
unitEdgeLength
- the unit edge lengthnewInitialPlacement
- true if the algorithm should start with different starting
positions every timequalityVsSpeed
- the QualityVsSpeed option (one of GORGEOUS_AND_EFFICIENT,
BEAUTIFUL_AND_FAST or NICE_AND_INCREDIBLE_SPEED)public static final void createFMMMLayouterDetail(boolean coolTemperature, float coolValue, float fineTuneScalar, int fineTuningIterations, int fixedIterations, float forceScalingFactor, int gridQuotient, int maxIterFactor, float minDistCC, int minGraphSize, int particlesInLeaves, int precision, float postSpringStrength, float strengthOfRepForces, int randomTries, float repForcesStrength, float springStrength, int stepsForRotatingComponents, float threshold)
coolTemperature
- the cool temperaturecoolValue
- the cool valuefineTuneScalar
- the fine tune scalarfineTuningIterations
- the fine tuning iterationsfixedIterations
- the fixed iterationsforceScalingFactor
- the force scaling factorgridQuotient
- the grid quotientmaxIterFactor
- the max iter factorminDistCC
- the min dist ccminGraphSize
- the min graph sizeparticlesInLeaves
- the particles in leavesprecision
- the precisionpostSpringStrength
- the post spring strengthstrengthOfRepForces
- the strength of rep forcesrandomTries
- the random triesrepForcesStrength
- the rep forces strengthspringStrength
- the spring strengthstepsForRotatingComponents
- the steps for rotating componentsthreshold
- the thresholdpublic static final void createDavidsonHarelLayouter(int costs, int speed, float edgeLength)
costs
- the costs option (one of COSTS_STANDARD, COSTS_REPULSE or
COSTS_PLANAR)speed
- the speed option (one of SPEED_FAST, SPEED_MEDIUM or SPEED_HQ)edgeLength
- the desired edge lengthpublic static final void createSpringEmbedderFRLayouter(int iterations)
iterations
- the number of iterations that are performed by the algorithmpublic static final void createCircularLayouter(float minDistCircle, float minDistLevel, float minDistSibling, float minDistCC)
minDistCircle
- the minimum distance between nodes on a circleminDistLevel
- the minimum distance between father and child circleminDistSibling
- the minimum distance between circles on the same levelminDistCC
- the minimum distance between connected componentspublic static final void createTreeLayouter(float siblingDistance, float subtreeDistance, float levelDistance, float treeDistance, boolean orthogonal, int orientation)
siblingDistance
- the horizontal spacing between adjacent sibling nodessubtreeDistance
- the horizontal spacing between adjacent subtreeslevelDistance
- the vertical spacing between adjacent levelstreeDistance
- the horizontal spacing between adjacent trees in a forestorthogonal
- determines whether edges are routed in an orthogonal or
straight-line fashionorientation
- determines if the orientation of the tree (one of
ORIENTATION_TOP_TO_BOTTOM, ORIENTATION_BOTTOM_TO_TOP,
ORIENTATION_LEFT_TO_RIGHT or ORIENTATION_RIGHT_TO_LEFT)public static final void createRadialTreeLayouter(float minDistLevel, float minDistCC)
minDistLevel
- the minimum distance between father and child layerminDistCC
- the minimum distance between connected componentspublic static final void createUpwardPlanarizationLayouter(float nodeDistance, float layerDistance)
public static final void layout()
public static final void cleanup()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |