| Package | com.yworks.graph.model |
| Interface | public interface ILabel extends IModelItem, ILookup |
| Implementors | DefaultLabel |
IGraph implementation
for labels.
This interface provides read-only access to the properties of a label.
In order to modify the state of an instance use the various methods provided by the
IGraph this instance belongs to.
Labels are stored in ILabelCollections, that
can be obtained from ILabeledItem implementations.
Typical owners of a label are INode and IEdge instances.
Like all items in an IGraph, this item supports the
lookup method that can be used
to query additional aspects of the item.
| Property | Defined By | ||
|---|---|---|---|
| labelModelParameter : ILabelModelParameter [read-only]
Gets the label model's parameter that determines the positioning of this label. | ILabel | ||
| layout : IOrientedRectangle [read-only]
Provides access to the layout of a label. | ILabel | ||
| owner : ILabeledItem [read-only]
Gets the owner of this label. | ILabel | ||
| preferredSize : ISize [read-only]
Gets the preferred size of the label with respect to its current
contents and the implementation of the visualization. | ILabel | ||
| style : ILabelStyle [read-only]
Returns the style that is responsible for the visual representation
of this label. | ILabel | ||
| text : String [read-only]
Gets the text string associated with this label. | ILabel | ||
| labelModelParameter | property |
labelModelParameter:ILabelModelParameter [read-only] Gets the label model's parameter that determines the positioning of this label.
In order to set a different parameter for this label, use IGraph's setLabelModelParameter
method.
public function get labelModelParameter():ILabelModelParameter| layout | property |
layout:IOrientedRectangle [read-only] Provides access to the layout of a label.
Labels have a ISize and are anchored at
a given location in world coordinate space. The anchor is
the point around which the oriented rectangle is rotated in the world coordinate system.
If the oriented rectangle has default orientation, i.e. its up vector points north (<0,-1>),
it coincides with its lower left corner.
The positioning of the label is determined using a pair of ILabelModel
and ILabelModelParameter.
In order to modify the layout of a label instance, set another LabelModelParameter
for this label or modify its associated instance.
public function get layout():IOrientedRectangle| owner | property |
owner:ILabeledItem [read-only] Gets the owner of this label.
Typically this will yield an instance of INode or IEdge.
public function get owner():ILabeledItem| preferredSize | property |
preferredSize:ISize [read-only] Gets the preferred size of the label with respect to its current contents and the implementation of the visualization.
Often times the Layout size will be the same
as the preferred size, but it's up to the implementation of the ILabelModel
to interpret it differently.
In order to set a different preferred size for this label instance use IGraph's
setPreferredSize method.
public function get preferredSize():ISize| style | property |
style:ILabelStyle [read-only] Returns the style that is responsible for the visual representation of this label.
In order to set the style on an instance, use the IGraph's setStyle
method.
public function get style():ILabelStyle| text | property |
text:String [read-only] Gets the text string associated with this label.
It is up to the visualization engine to interpret this property for the
visualization of the label. Normally it will render the text into the
layout of this instance.
public function get text():String