|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.layout.LabelLayoutTranslator
Layout stage that automatically translates label layout information provided by the standard
label layout classes EdgeLabelLayout
and NodeLabelLayout
to layout data
of type LabelLayoutData
that is accessible by the keys defined in class LabelLayoutKeys
.
One can use this layout stage as label layouter of a label aware layouter like
HierarchicLayouter
. This can be done by
assigning the stage by an appropriate call to
setLabelLayouter
.
Note that care must be taken on the choice of label model that is used by the
classes EdgeLabelLayout
and NodeLabelLayout
. The calculated label positions
must be consistent with the label positions allowed by the label model. The best label layout
results are achived by choosing FreeEdgeLabelModel
for edge layouts and
FreeNodeLabelModel
for node layouts.
Field Summary |
Fields inherited from interface y.layout.Layouter |
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES |
Constructor Summary | |
LabelLayoutTranslator()
Creates a new instance of LabelLayoutTranslator. |
Method Summary | |
boolean |
canLayout(LayoutGraph graph)
The returned result gets calculated by the core layouter. |
void |
doLayout(LayoutGraph graph)
Before invoking the core layouter this stage translates traditional label layout information to data provider based label layout data. |
Layouter |
getCoreLayouter()
Returns the core layouter. |
void |
setCoreLayouter(Layouter core)
Sets the core layouter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LabelLayoutTranslator()
Method Detail |
public void setCoreLayouter(Layouter core)
LayoutStage
setCoreLayouter
in interface LayoutStage
public Layouter getCoreLayouter()
LayoutStage
getCoreLayouter
in interface LayoutStage
public void doLayout(LayoutGraph graph)
doLayout
in interface Layouter
public boolean canLayout(LayoutGraph graph)
canLayout
in interface Layouter
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |