|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.FreeNodeLabelModel
public class FreeNodeLabelModel
A node label model that allows placement of labels at a fixed offset relative to the node's upper-left corner.
![]() |
![]() |
| Nested Class Summary | |
|---|---|
static class |
FreeNodeLabelModel.ModelParameter
The model parameter that encodes a node label position within FreeNodeLabelModel. |
| Constructor Summary | |
|---|---|
FreeNodeLabelModel()
Returns a new instance of FreeNodeLabelModel. |
|
| Method Summary | |
|---|---|
Object |
createModelParameter(YRectangle labelBounds,
NodeLayout nodeLayout)
Creates a model parameter that represents the given node label context best within this model. |
Object |
getDefaultParameter()
Returns a model parameter that encodes the default position of this model's allowed node label positions. |
YList |
getLabelCandidates(NodeLabelLayout nl,
NodeLayout nodeLayout)
Returns a list of candidate positions for the given node label. |
YPoint |
getLabelPlacement(YDimension labelSize,
NodeLayout nodeLayout,
Object param)
Returns the coordinate of the upper-left corner of the label position encoded by the given model parameter. |
void |
setLocation(double x,
double y)
Sets the node label's offset that is used with this model. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FreeNodeLabelModel()
| Method Detail |
|---|
public Object getDefaultParameter()
getDefaultParameter in interface NodeLabelModelNodeLabelModel.getLabelPlacement(YDimension, NodeLayout, Object) method.
public YPoint getLabelPlacement(YDimension labelSize,
NodeLayout nodeLayout,
Object param)
getLabelPlacement in interface NodeLabelModellabelSize - The size of the label.nodeLayout - The geometric description of the label's node.param - A model parameter that encodes a label position that is valid in this model.
public YList getLabelCandidates(NodeLabelLayout nl,
NodeLayout nodeLayout)
getLabelCandidates in interface NodeLabelModelnl - The label layout for which candidates should be generated.nodeLayout - The layout of the node to which the label belongs.
NodeLabelCandidate objects.
public void setLocation(double x,
double y)
public Object createModelParameter(YRectangle labelBounds,
NodeLayout nodeLayout)
NodeLabelModel
createModelParameter in interface NodeLabelModellabelBounds - The bounds of the label for which a parameter representation is sought.nodeLayout - The layout of the node to which the label belongs.
NodeLabelModel.getLabelPlacement(YDimension, NodeLayout, Object) method.
|
© Copyright 2000-2008, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||