|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.LabelLayoutTranslator
public class 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.
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 achieved 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. |
boolean |
isTranslateEdgeLabelsEnabled()
Returns whether edge label translation is enabled. |
boolean |
isTranslateNodeLabelsEnabled()
Returns whether node label translation is enabled. |
boolean |
isWriteBackEdgeLabelsEnabled()
Returns whether edge labels are written back to their model. |
boolean |
isWriteBackNodeLabelsEnabled()
Returns whether node labels are written back to their model. |
void |
setCoreLayouter(Layouter core)
Sets the core layouter. |
void |
setTranslateEdgeLabelsEnabled(boolean translateEdgeLabelsEnabled)
Determines whether edge label translation should be enabled. |
void |
setTranslateNodeLabelsEnabled(boolean translateNodeLabelsEnabled)
Determines whether node label translation should be enabled. |
void |
setWriteBackEdgeLabelsEnabled(boolean writeBack)
Determines whether edge label information is written back to the model. |
void |
setWriteBackNodeLabelsEnabled(boolean writeBack)
Determines whether node label information is written back to the model. |
| 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 LayoutStagepublic Layouter getCoreLayouter()
LayoutStage
getCoreLayouter in interface LayoutStagepublic void doLayout(LayoutGraph graph)
doLayout in interface Layouterpublic boolean canLayout(LayoutGraph graph)
canLayout in interface Layouterpublic boolean isWriteBackEdgeLabelsEnabled()
true.
public void setWriteBackEdgeLabelsEnabled(boolean writeBack)
writeBack - whether to write back the informationpublic boolean isWriteBackNodeLabelsEnabled()
false.
public void setWriteBackNodeLabelsEnabled(boolean writeBack)
writeBack - whether to write back the informationpublic boolean isTranslateNodeLabelsEnabled()
false.
public void setTranslateNodeLabelsEnabled(boolean translateNodeLabelsEnabled)
translateNodeLabelsEnabled - whether to enable the translation for node labelspublic boolean isTranslateEdgeLabelsEnabled()
true.
public void setTranslateEdgeLabelsEnabled(boolean translateEdgeLabelsEnabled)
translateEdgeLabelsEnabled - whether to enable the translation for edge labels
|
© Copyright 2000-2008, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||