Packagecom.yworks.graph.model
Classpublic class ExteriorLabelModel
InheritanceExteriorLabelModel Inheritance Object
Implements ILabelModel, ILabelModelParameterProvider

A label model for node labels that lie outside of the node's INode.layout bounds.

This label model supports eight positions outside of the layout's bounds.



Public Properties
 PropertyDefined By
  east : ILabelModelParameter
[static] [read-only] A convenience parameter instance that can be shared between label instances.
ExteriorLabelModel
  insets : Rectangle
Insets for the labels.
ExteriorLabelModel
  north : ILabelModelParameter
[static] [read-only] A convenience parameter instance that can be shared between label instances.
ExteriorLabelModel
  northEast : ILabelModelParameter
[static] [read-only] A convenience parameter instance that can be shared between label instances.
ExteriorLabelModel
  northWest : ILabelModelParameter
[static] [read-only] A convenience parameter instance that can be shared between label instances.
ExteriorLabelModel
  south : ILabelModelParameter
[static] [read-only] A convenience parameter instance that can be shared between label instances.
ExteriorLabelModel
  southEast : ILabelModelParameter
[static] [read-only] A convenience parameter instance that can be shared between label instances.
ExteriorLabelModel
  southWest : ILabelModelParameter
[static] [read-only] A convenience parameter instance that can be shared between label instances.
ExteriorLabelModel
  west : ILabelModelParameter
[static] [read-only] A convenience parameter instance that can be shared between label instances.
ExteriorLabelModel
Public Methods
 MethodDefined By
  
Creates a new instance of this model
ExteriorLabelModel
  
Creates a default parameter that can be used for this model.
ExteriorLabelModel
  
Factory method to generate ILabelModelParameters for the provided position.
ExteriorLabelModel
  
Provides a lookup context for the given combination of label and parameter.
ExteriorLabelModel
  
Calculates the geometry in form of an IOrientedRectangle for a given label using the given model parameter.
ExteriorLabelModel
  
Returns an iterator over a set of possible ILabelModelParameter instances that can be used for the given label and model.
ExteriorLabelModel
  
lookup(type:Class):Object
Returns an instance that implements the given type or null.
ExteriorLabelModel
Public Constants
 ConstantDefined By
  POSITION_EAST : String = ExteriorLabelModel#EAST
[static] Encodes a position outside the node at the right side
ExteriorLabelModel
  POSITION_NORTH : String = ExteriorLabelModel#NORTH
[static] Encodes a position outside the node at the top
ExteriorLabelModel
  POSITION_NORTH_EAST : String = ExteriorLabelModel#NORTH_EAST
[static] Encodes a position outside the node at the upper right corner
ExteriorLabelModel
  POSITION_NORTH_WEST : String = ExteriorLabelModel#NORTH_WEST
[static] Encodes a position outside the node at the upper left corner
ExteriorLabelModel
  POSITION_SOUTH : String = ExteriorLabelModel#SOUTH
[static] Encodes a position outside the node at the bottom
ExteriorLabelModel
  POSITION_SOUTH_EAST : String = ExteriorLabelModel#SOUTH_EAST
[static] Encodes a position outside the node at the lower right corner
ExteriorLabelModel
  POSITION_SOUTH_WEST : String = ExteriorLabelModel#SOUTH_WEST
[static] Encodes a position outside the node at the lower left corner
ExteriorLabelModel
  POSITION_WEST : String = ExteriorLabelModel#WEST
[static] Encodes a position outside the node at the left side
ExteriorLabelModel
Property Detail
eastproperty
east:ILabelModelParameter  [read-only]

A convenience parameter instance that can be shared between label instances.

Although the parameter's model can be cast to a ExteriorLabelModel, trying to change that instances' insets will raise an IllegalOperationError.


Implementation
    public static function get east():ILabelModelParameter
insetsproperty 
insets:Rectangle

Insets for the labels.


Implementation
    public function get insets():Rectangle
    public function set insets(value:Rectangle):void
northproperty 
north:ILabelModelParameter  [read-only]

A convenience parameter instance that can be shared between label instances.

Although the parameter's model can be cast to a ExteriorLabelModel, trying to change that instances' insets will raise an IllegalOperationError.


Implementation
    public static function get north():ILabelModelParameter
northEastproperty 
northEast:ILabelModelParameter  [read-only]

A convenience parameter instance that can be shared between label instances.

Although the parameter's model can be cast to a ExteriorLabelModel, trying to change that instances' insets will raise an IllegalOperationError.


Implementation
    public static function get northEast():ILabelModelParameter
northWestproperty 
northWest:ILabelModelParameter  [read-only]

A convenience parameter instance that can be shared between label instances.

Although the parameter's model can be cast to a ExteriorLabelModel, trying to change that instances' insets will raise an IllegalOperationError.


Implementation
    public static function get northWest():ILabelModelParameter
southproperty 
south:ILabelModelParameter  [read-only]

A convenience parameter instance that can be shared between label instances.

Although the parameter's model can be cast to a ExteriorLabelModel, trying to change that instances' insets will raise an IllegalOperationError.


Implementation
    public static function get south():ILabelModelParameter
southEastproperty 
southEast:ILabelModelParameter  [read-only]

A convenience parameter instance that can be shared between label instances.

Although the parameter's model can be cast to a ExteriorLabelModel, trying to change that instances' insets will raise an IllegalOperationError.


Implementation
    public static function get southEast():ILabelModelParameter
southWestproperty 
southWest:ILabelModelParameter  [read-only]

A convenience parameter instance that can be shared between label instances.

Although the parameter's model can be cast to a ExteriorLabelModel, trying to change that instances' insets will raise an IllegalOperationError.


Implementation
    public static function get southWest():ILabelModelParameter
westproperty 
west:ILabelModelParameter  [read-only]

A convenience parameter instance that can be shared between label instances.

Although the parameter's model can be cast to a ExteriorLabelModel, trying to change that instances' insets will raise an IllegalOperationError.


Implementation
    public static function get west():ILabelModelParameter
Constructor Detail
ExteriorLabelModel()Constructor
public function ExteriorLabelModel()

Creates a new instance of this model

Method Detail
createDefaultParameter()method
public function createDefaultParameter():ILabelModelParameter

Creates a default parameter that can be used for this model.

Returns
ILabelModelParameter — A parameter for this model instance.
createParameter()method 
public function createParameter(position:String):ILabelModelParameter

Factory method to generate ILabelModelParameters for the provided position.

Users should use the convenience parameters preferably.

Parameters

position:String — String that determines the label model parameter's position as defined in the below constants POSITION_...

Returns
ILabelModelParameter — A newly created label model parameter for the provided position.
getContext()method 
public function getContext(label:ILabel, parameter:ILabelModelParameter):ILookup

Provides a lookup context for the given combination of label and parameter.

Parameters

label:ILabel — The label to use in the context.
 
parameter:ILabelModelParameter — The parameter to use for the label in the context.

Returns
ILookup — An implementation of the ILookup interface that can be used to query additional aspects of the label/parameter combination.
getGeometry()method 
public function getGeometry(modelParameter:ILabelModelParameter, label:ILabel):IOrientedRectangle

Calculates the geometry in form of an IOrientedRectangle for a given label using the given model parameter.

Parameters

modelParameter:ILabelModelParameter — A parameter that has been created by this model. This is typically the parameter that yielded this instance through its ILabelModelParameter.model property.
 
label:ILabel — The label to calculate the geometry for

Returns
IOrientedRectangle — An instance that describes the geometry. This is typically an instance designed as a flyweight, so clients should not cache the instance but store the values if they need a snapshot for later use
getParameters()method 
public function getParameters(label:ILabel, model:ILabelModel):Iterator

Returns an iterator over a set of possible ILabelModelParameter instances that can be used for the given label and model.

Parameters

label:ILabel — The label instance to use.
 
model:ILabelModel — The model to provide parameters for.

Returns
Iterator — A possibly empty iterator over a set of label model parameters.
lookup()method 
public function lookup(type:Class):Object

Returns an instance that implements the given type or null.

Typically, this method will be called in order to obtain a different view or aspect of the current instance. This is quite similar to casting or using a super type or interface of this instance, but is not limited to inheritance or compile time constraints. An instance implementing this method is not required to return non-null implementations for the types, nor does it have to return the same instance any time. Also it depends on the type and context whether the instance returned stays up to date or needs to be reobtained for subsequent use.

Parameters

type:Class — the type for which an instance shall be returned

Returns
Object — an instance that is assignable to type or null
Constant Detail
POSITION_EASTConstant
public static const POSITION_EAST:String = ExteriorLabelModel#EAST

Encodes a position outside the node at the right side

POSITION_NORTHConstant 
public static const POSITION_NORTH:String = ExteriorLabelModel#NORTH

Encodes a position outside the node at the top

POSITION_NORTH_EASTConstant 
public static const POSITION_NORTH_EAST:String = ExteriorLabelModel#NORTH_EAST

Encodes a position outside the node at the upper right corner

POSITION_NORTH_WESTConstant 
public static const POSITION_NORTH_WEST:String = ExteriorLabelModel#NORTH_WEST

Encodes a position outside the node at the upper left corner

POSITION_SOUTHConstant 
public static const POSITION_SOUTH:String = ExteriorLabelModel#SOUTH

Encodes a position outside the node at the bottom

POSITION_SOUTH_EASTConstant 
public static const POSITION_SOUTH_EAST:String = ExteriorLabelModel#SOUTH_EAST

Encodes a position outside the node at the lower right corner

POSITION_SOUTH_WESTConstant 
public static const POSITION_SOUTH_WEST:String = ExteriorLabelModel#SOUTH_WEST

Encodes a position outside the node at the lower left corner

POSITION_WESTConstant 
public static const POSITION_WEST:String = ExteriorLabelModel#WEST

Encodes a position outside the node at the left side