|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.abego.treelayout.util.DefaultConfiguration<TreeNode>
TreeNode
- public class DefaultConfiguration<TreeNode>
Specify a Configuration
through configurable parameters, or falling
back to some frequently used defaults.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.abego.treelayout.Configuration |
---|
Configuration.AlignmentInLevel, Configuration.Location |
Constructor Summary | |
---|---|
DefaultConfiguration(double gapBetweenLevels,
double gapBetweenNodes)
Convenience constructor, using a default for the rootLocation and the alignmentInLevel. |
|
DefaultConfiguration(double gapBetweenLevels,
double gapBetweenNodes,
Configuration.Location location)
Convenience constructor, using a default for the alignmentInLevel. |
|
DefaultConfiguration(double gapBetweenLevels,
double gapBetweenNodes,
Configuration.Location location,
Configuration.AlignmentInLevel alignmentInLevel)
Specifies the constants to be used for this Configuration. |
Method Summary | |
---|---|
Configuration.AlignmentInLevel |
getAlignmentInLevel()
Returns the alignment of "smaller" nodes within a level. |
double |
getGapBetweenLevels(int nextLevel)
Returns the size of the gap between subsequent levels. |
double |
getGapBetweenNodes(TreeNode node1,
TreeNode node2)
Returns the size of the minimal gap of nodes within a level. |
Configuration.Location |
getRootLocation()
Returns the position of the root node in the diagram. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultConfiguration(double gapBetweenLevels, double gapBetweenNodes, Configuration.Location location, Configuration.AlignmentInLevel alignmentInLevel)
gapBetweenLevels
- gapBetweenNodes
- location
- [default: Top
]alignmentInLevel
- [default: Center
]public DefaultConfiguration(double gapBetweenLevels, double gapBetweenNodes, Configuration.Location location)
public DefaultConfiguration(double gapBetweenLevels, double gapBetweenNodes)
Method Detail |
---|
public double getGapBetweenLevels(int nextLevel)
Configuration
getGapBetweenLevels
in interface Configuration<TreeNode>
nextLevel
- [nextLevel > 0]
public double getGapBetweenNodes(TreeNode node1, TreeNode node2)
Configuration
In the layout there will be a gap of at least the returned size between both given nodes.
node1 and node2 are at the same level and are placed next to each other.
getGapBetweenNodes
in interface Configuration<TreeNode>
public Configuration.Location getRootLocation()
Configuration
By default the root of the tree is located at the top of the diagram. However one may also put it at the left, right or bottom of the diagram.
Top (Default) | Left | Right | Bottom |
---|---|---|---|
getRootLocation
in interface Configuration<TreeNode>
public Configuration.AlignmentInLevel getAlignmentInLevel()
Configuration
By default all nodes of one level are centered in the level. However one may also align them "towards the root" or "away from the root". When the root is located at the top this means the nodes are aligned "to the top of the level" or "to the bottom of the level".
Center (Default) | TowardsRoot ("top of level") | AwayFromRoot ("bottom of level") |
---|---|---|
Alignment in level when root is at the left:
Center (Default) | TowardsRoot ("left of level") | AwayFromRoot ("right of level") |
---|---|---|
Of cause the alignment also works when the root is at the bottom or at the right side.
getAlignmentInLevel
in interface Configuration<TreeNode>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |