Package | com.yworks.yfiles.layout |
Interface | public interface EdgeLabelModel |
Implementors | DiscreteEdgeLabelLayoutModel, FreeEdgeLabelLayoutModel, RotatedDiscreteEdgeLabelLayoutModel, RotatedSliderEdgeLabelLayoutModel, SliderEdgeLabelLayoutModel |
An edge label model provides a set of possible candidates for the placement of an edge label.
Property | Defined By | ||
---|---|---|---|
defaultParameter : Object [read-only]
Returns a model parameter that encodes the default position of this model's allowed edge label positions. | EdgeLabelModel |
Method | Defined By | ||
---|---|---|---|
createModelParameter(labelBounds:YOrientedRectangle, edgeLayout:EdgeLayout, sourceLayout:NodeLayout, targetLayout:NodeLayout):Object
Creates a model parameter that represents the given edge label context best within this model. | EdgeLabelModel | ||
getLabelCandidates(labelLayout:EdgeLabelLayout, edgeLayout:EdgeLayout, sourceLayout:NodeLayout, targetLayout:NodeLayout):YList
Returns a list of com.yworks.yfiles.layout.EdgeLabelCandidate objects each of which describes a valid label position within this model. | EdgeLabelModel | ||
getLabelPlacement(labelSize:YDimension, edgeLayout:EdgeLayout, sourceLayout:NodeLayout, targetLayout:NodeLayout, param:Object):YOrientedRectangle
Returns the bounds of the label for the position encoded by the given model parameter. | EdgeLabelModel |
defaultParameter | property |
defaultParameter:Object
[read-only] Returns a model parameter that encodes the default position of this model's allowed edge label positions.
public function get defaultParameter():Object
See also
createModelParameter | () | method |
public function createModelParameter(labelBounds:YOrientedRectangle, edgeLayout:EdgeLayout, sourceLayout:NodeLayout, targetLayout:NodeLayout):Object
Creates a model parameter that represents the given edge label context best within this model. The created model parameter represents the closest parameter representation of the given label location that can be achieved within this model.
Parameters
labelBounds:YOrientedRectangle — The bounds of the label for which a parameter representation is sought.
| |
edgeLayout:EdgeLayout — The layout of the edge to which the label belongs.
| |
sourceLayout:NodeLayout — The layout of the source node of the label owning edge.
| |
targetLayout:NodeLayout — The layout of the target node of the label owning edge.
|
Object — A model parameter that can be passed to the getLabelPlacement() method.
|
See also
getLabelCandidates | () | method |
public function getLabelCandidates(labelLayout:EdgeLabelLayout, edgeLayout:EdgeLayout, sourceLayout:NodeLayout, targetLayout:NodeLayout):YList
Returns a list of com.yworks.yfiles.layout.EdgeLabelCandidate objects each of which describes a valid label position within this model.
Parameters
labelLayout:EdgeLabelLayout — The label for which candidates should be generated.
| |
edgeLayout:EdgeLayout — The layout of the edge to which the label belongs.
| |
sourceLayout:NodeLayout — The layout of the source node of the label owning edge.
| |
targetLayout:NodeLayout — The layout of the target node of the label owning edge.
|
YList — A list of com.yworks.yfiles.layout.EdgeLabelCandidate objects.
|
See also
getLabelPlacement | () | method |
public function getLabelPlacement(labelSize:YDimension, edgeLayout:EdgeLayout, sourceLayout:NodeLayout, targetLayout:NodeLayout, param:Object):YOrientedRectangle
Returns the bounds of the label for the position encoded by the given model parameter.
Parameters
labelSize:YDimension — The size of the label that should be placed.
| |
edgeLayout:EdgeLayout — The layout of the edge to which the label belongs.
| |
sourceLayout:NodeLayout — The layout of the source node of the label owning edge.
| |
targetLayout:NodeLayout — The layout of the target node of the label owning edge.
| |
param:Object — The model parameter that describes the abstract position of the label within this model. The parameter must have been generated by this model.
|
YOrientedRectangle — The bounds of the label.
|