Package de.saar.chorus.domgraph.layout
Class FragmentLayoutAlgorithm
java.lang.Object
de.saar.chorus.domgraph.layout.LayoutAlgorithm
de.saar.chorus.domgraph.layout.FragmentLayoutAlgorithm
- Direct Known Subclasses:
DomGraphChartLayout,DomGraphLayout
-
Field Summary
FieldsFields inherited from class de.saar.chorus.domgraph.layout.LayoutAlgorithm
nodeToLabel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRelXtoParent(String node, Integer x) voidaddRelXtoRoot(String node, Integer x) voidaddRelYpos(String node, Integer y) protected abstract voidprotected abstract voidprotected abstract voidprotected intgetFragDegree(String frag) Resolving the number of dominance edges adjacent to a fragment.getFragHoles(String frag) Resolving the holes of a fragment in the right order.protected List<org._3pq.jgrapht.Edge>getFragInEdges(String frag) Compute the incoming edges of a fragment.protected List<org._3pq.jgrapht.Edge>getFragOutEdges(String frag) Compute the outgoing edges of a fragment.getNodesToShape(String node) getRelXtoParent(String node) voidinitialise(DomGraph graph, NodeLabels labels, Canvas canv) protected voidlayout(DomGraph graph, NodeLabels labels, Canvas canvas) protected abstract voidvoidputNodeToShape(String node, Shape shape) Methods inherited from class de.saar.chorus.domgraph.layout.LayoutAlgorithm
layout, removeRedundandEdges
-
Field Details
-
relXtoParent
-
relXtoRoot
-
relYpos
-
fragWidth
-
fragHeight
-
fragOffset
-
fragYpos
-
fragXpos
-
nodesToShape
-
fragmentToHoles
-
fragments
-
domgraph
-
nodelabels
-
canvas
-
-
Constructor Details
-
FragmentLayoutAlgorithm
public FragmentLayoutAlgorithm()
-
-
Method Details
-
getFragHoles
Resolving the holes of a fragment in the right order. This does not the same job asgetFragLeaves, because leaves that are roots at the same time have to be excluded.- Parameters:
frag- the fragment to get the holes from- Returns:
- the list of holes; an empty list if there are none.
-
getFragInEdges
Compute the incoming edges of a fragment.- Parameters:
frag- the fragment to compute the in-edges for- Returns:
- the sorted list of incoming edges.
-
getFragOutEdges
Compute the outgoing edges of a fragment.- Parameters:
frag- the fragment to compute the out-edges for- Returns:
- the sorted list of outgoing edges.
-
getFragDegree
Resolving the number of dominance edges adjacent to a fragment.- Parameters:
frag- the fragment to compute the degree for- Returns:
- the fragment degree (considering the fragment graph)
-
getNodesToShape
- Returns:
- Returns the nodesToShape.
-
getRelXtoParent
-
addRelXtoParent
-
addRelYpos
-
getNodesToShape
-
addRelXtoRoot
-
getRelXtoRoot
- Returns:
- Returns the relXtoRoot.
-
putNodeToShape
-
initialise
- Throws:
LayoutException
-
computeFragmentPositions
protected abstract void computeFragmentPositions() -
computeNodePositions
protected abstract void computeNodePositions() -
placeNodes
protected abstract void placeNodes() -
drawEdges
protected abstract void drawEdges() -
layout
- Specified by:
layoutin classLayoutAlgorithm- Throws:
LayoutException
-