|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.AbstractLayoutStage y.layout.LabelLayoutDataRefinement
public class LabelLayoutDataRefinement
A layout stage that improves the placement of edge labels. This layout stage
expects that its core layouter calculates initial edge label layout data bound to the
data provider key LabelLayoutKeys.EDGE_LABEL_LAYOUT_KEY
. Next, this stage tries to
improve the position of the labels with respect to the preferred placement specifier of the
labels.
Most commonly, this layout stage is used in conjunction with the integrated edge
labeling functionality of class HierarchicLayouter
.
The following code snippet shows how this layout stage can be set up:
// 'hierarchic' is of type y.layout.hierarchic.HierarchicLayouter. // String together a label layout process. CompositeLayoutStage ll = new CompositeLayoutStage(); ll.appendStage(new LabelLayoutTranslator()); ll.appendStage(new LabelLayoutDataRefinement()); // Set the compound label layout process as the label layouter for // HierarchicLayouter. hierarchic.setLabelLayouter(ll); hierarchic.setLabelLayouterEnabled(true);
Field Summary |
---|
Fields inherited from interface y.layout.Layouter |
---|
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES |
Constructor Summary | |
---|---|
LabelLayoutDataRefinement()
Creates a new instance of LabelLayoutDataImprovement |
Method Summary | |
---|---|
boolean |
canLayout(LayoutGraph graph)
Returns true . |
void |
doLayout(LayoutGraph graph)
Assigns a new graph layout to the given layout graph. |
AbstractLabelingAlgorithm |
getInternalLabelingAlgorithm()
Returns the internal labeling algorithm used to improve the label positions. |
void |
setInternalLabelingAlgorithm(AbstractLabelingAlgorithm labeler)
Sets the internal labeling algorithm used to improve the label positions. |
Methods inherited from class y.layout.AbstractLayoutStage |
---|
canLayoutCore, doLayoutCore, getCoreLayouter, setCoreLayouter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LabelLayoutDataRefinement()
Method Detail |
---|
public void setInternalLabelingAlgorithm(AbstractLabelingAlgorithm labeler)
public AbstractLabelingAlgorithm getInternalLabelingAlgorithm()
public boolean canLayout(LayoutGraph graph)
true
.
public void doLayout(LayoutGraph graph)
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |