Package | com.yworks.graph.model |
Class | public class InteriorLabelModel |
Inheritance | InteriorLabelModel Object |
Implements | ILabelModel, ILabelModelParameterProvider |
This label model supports nine positions inside of the layout's bounds.
Property | Defined By | ||
---|---|---|---|
center : ILabelModelParameter [static] [read-only]
A convenience parameter instance that can be shared between label instances. | InteriorLabelModel | ||
east : ILabelModelParameter [static] [read-only]
A convenience parameter instance that can be shared between label instances. | InteriorLabelModel | ||
insets : Rectangle
The insets provided as a rectangle. | InteriorLabelModel | ||
north : ILabelModelParameter [static] [read-only]
A convenience parameter instance that can be shared between label instances. | InteriorLabelModel | ||
northEast : ILabelModelParameter [static] [read-only]
A convenience parameter instance that can be shared between label instances. | InteriorLabelModel | ||
northWest : ILabelModelParameter [static] [read-only]
A convenience parameter instance that can be shared between label instances. | InteriorLabelModel | ||
south : ILabelModelParameter [static] [read-only]
A convenience parameter instance that can be shared between label instances. | InteriorLabelModel | ||
southEast : ILabelModelParameter [static] [read-only]
A convenience parameter instance that can be shared between label instances. | InteriorLabelModel | ||
southWest : ILabelModelParameter [static] [read-only]
A convenience parameter instance that can be shared between label instances. | InteriorLabelModel | ||
west : ILabelModelParameter [static] [read-only]
A convenience parameter instance that can be shared between label instances. | InteriorLabelModel |
Method | Defined By | ||
---|---|---|---|
Creates a new instance. | InteriorLabelModel | ||
Creates a default parameter that can be used for this model. | InteriorLabelModel | ||
createParameter(position:String):ILabelModelParameter
Creates the parameter for the given position. | InteriorLabelModel | ||
Provides a lookup context for the given combination of label and parameter. | InteriorLabelModel | ||
Calculates the geometry in form of an IOrientedRectangle
for a given label using the given model parameter. | InteriorLabelModel | ||
Returns the insets this model would require for the node owner of the label if the the given label
was used with the provided parameter. | InteriorLabelModel | ||
Returns an iterator over a set of possible ILabelModelParameter
instances that can be used for the given label and model. | InteriorLabelModel | ||
lookup(type:Class):Object
Returns an instance that implements the given type or null. | InteriorLabelModel |
Constant | Defined By | ||
---|---|---|---|
POSITION_CENTER : String = InteriorLabelModel#CENTER [static]
Encodes a position at the center of the node interior. | InteriorLabelModel | ||
POSITION_EAST : String = InteriorLabelModel#EAST [static]
Encodes a position at the right side of the node interior. | InteriorLabelModel | ||
POSITION_NORTH : String = InteriorLabelModel#NORTH [static]
Encodes a position at the top side of the node interior. | InteriorLabelModel | ||
POSITION_NORTH_EAST : String = InteriorLabelModel#NORTH_EAST [static]
Encodes a position at the top right corner of the node interior. | InteriorLabelModel | ||
POSITION_NORTH_WEST : String = InteriorLabelModel#NORTH_WEST [static]
Encodes a position at the top left corner of the node interior. | InteriorLabelModel | ||
POSITION_SOUTH : String = InteriorLabelModel#SOUTH [static]
Encodes a position at the bottom side of the node interior. | InteriorLabelModel | ||
POSITION_SOUTH_EAST : String = InteriorLabelModel#SOUTH_EAST [static]
Encodes a position at the bottom right corner of the node interior. | InteriorLabelModel | ||
POSITION_SOUTH_WEST : String = InteriorLabelModel#SOUTH_WEST [static]
Encodes a position at the bottom left corner of the node interior. | InteriorLabelModel | ||
POSITION_WEST : String = InteriorLabelModel#WEST [static]
Encodes a position at the left side of the node interior. | InteriorLabelModel |
center | property |
center:ILabelModelParameter
[read-only] A convenience parameter instance that can be shared between label instances.
Although the parameter's model can be cast
to a InteriorLabelModel
, trying to change that instances' insets
will raise an IllegalOperationError
.
public static function get center():ILabelModelParameter
east | property |
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 InteriorLabelModel
, trying to change that instances' insets
will raise an IllegalOperationError
.
public static function get east():ILabelModelParameter
insets | property |
insets:Rectangle
The insets provided as a rectangle.
public function get insets():Rectangle
public function set insets(value:Rectangle):void
north | property |
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 InteriorLabelModel
, trying to change that instances' insets
will raise an IllegalOperationError
.
public static function get north():ILabelModelParameter
northEast | property |
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 InteriorLabelModel
, trying to change that instances' insets
will raise an IllegalOperationError
.
public static function get northEast():ILabelModelParameter
northWest | property |
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 InteriorLabelModel
, trying to change that instances' insets
will raise an IllegalOperationError
.
public static function get northWest():ILabelModelParameter
south | property |
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 InteriorLabelModel
, trying to change that instances' insets
will raise an IllegalOperationError
.
public static function get south():ILabelModelParameter
southEast | property |
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 InteriorLabelModel
, trying to change that instances' insets
will raise an IllegalOperationError
.
public static function get southEast():ILabelModelParameter
southWest | property |
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 InteriorLabelModel
, trying to change that instances' insets
will raise an IllegalOperationError
.
public static function get southWest():ILabelModelParameter
west | property |
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 InteriorLabelModel
, trying to change that instances' insets
will raise an IllegalOperationError
.
public static function get west():ILabelModelParameter
InteriorLabelModel | () | Constructor |
public function InteriorLabelModel()
Creates a new instance.
createDefaultParameter | () | method |
public function createDefaultParameter():ILabelModelParameter
Creates a default parameter that can be used for this model.
ReturnsILabelModelParameter — A parameter for this model instance.
|
createParameter | () | method |
public function createParameter(position:String):ILabelModelParameter
Creates the parameter for the given position.
Parameters
position:String — The position.
|
ILabelModelParameter — The newly created parameter.
|
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.
|
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
|
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
|
getNodeInsets | () | method |
public function getNodeInsets(label:ILabel, parameter:ILabelModelParameter):IRectangle
Returns the insets this model would require for the node owner of the label if the the given label was used with the provided parameter.
Parameters
label:ILabel — The label to use.
| |
parameter:ILabelModelParameter — The parameter to use.
|
IRectangle — The insets rectangle.
|
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.
|
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
|
Object — an instance that is assignable to type or null
|
POSITION_CENTER | Constant |
public static const POSITION_CENTER:String = InteriorLabelModel#CENTER
Encodes a position at the center of the node interior.
POSITION_EAST | Constant |
public static const POSITION_EAST:String = InteriorLabelModel#EAST
Encodes a position at the right side of the node interior.
POSITION_NORTH | Constant |
public static const POSITION_NORTH:String = InteriorLabelModel#NORTH
Encodes a position at the top side of the node interior.
POSITION_NORTH_EAST | Constant |
public static const POSITION_NORTH_EAST:String = InteriorLabelModel#NORTH_EAST
Encodes a position at the top right corner of the node interior.
POSITION_NORTH_WEST | Constant |
public static const POSITION_NORTH_WEST:String = InteriorLabelModel#NORTH_WEST
Encodes a position at the top left corner of the node interior.
POSITION_SOUTH | Constant |
public static const POSITION_SOUTH:String = InteriorLabelModel#SOUTH
Encodes a position at the bottom side of the node interior.
POSITION_SOUTH_EAST | Constant |
public static const POSITION_SOUTH_EAST:String = InteriorLabelModel#SOUTH_EAST
Encodes a position at the bottom right corner of the node interior.
POSITION_SOUTH_WEST | Constant |
public static const POSITION_SOUTH_WEST:String = InteriorLabelModel#SOUTH_WEST
Encodes a position at the bottom left corner of the node interior.
POSITION_WEST | Constant |
public static const POSITION_WEST:String = InteriorLabelModel#WEST
Encodes a position at the left side of the node interior.