Packagecom.yworks.graph.model
Interfacepublic interface ILabel extends IModelItem, ILookup
Implementors DefaultLabel

The interface used in an 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.



Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined By
 Inherited
lookup(type:Class):Object
Returns an instance that implements the given type or null.
ILookup
Property Detail
labelModelParameterproperty
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.


Implementation
    public function get labelModelParameter():ILabelModelParameter
layoutproperty 
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.


Implementation
    public function get layout():IOrientedRectangle
ownerproperty 
owner:ILabeledItem  [read-only]

Gets the owner of this label.

Typically this will yield an instance of INode or IEdge.


Implementation
    public function get owner():ILabeledItem
preferredSizeproperty 
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.


Implementation
    public function get preferredSize():ISize
styleproperty 
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.


Implementation
    public function get style():ILabelStyle
textproperty 
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.


Implementation
    public function get text():String