Packagecom.yworks.graph.model
Classpublic class LabelCandidateDescriptor
InheritanceLabelCandidateDescriptor Inheritance Object
Implements ILabelCandidateDescriptor, IMarkupExtensionFactory

A simple mutable default implementation of the ILabelCandidateDescriptor interface.

All properties are read/write in this implementation.



Public Properties
 PropertyDefined By
  externalCandidate : Boolean
Gets a value indicating whether this candidate is deemed an external candidate.
LabelCandidateDescriptor
  externalDescriptor : ILabelCandidateDescriptor
[static] [read-only] A sharable immutable implementation of the ILabelCandidateDescriptor interface that has penalties of 1.0 and a profit of 1.0 and yields true for the ILabelCandidateDescriptor.externalCandidate property.
LabelCandidateDescriptor
  externalDescriptorLookup : ILookup
[static] [read-only]
LabelCandidateDescriptor
  internalDescriptor : ILabelCandidateDescriptor
[static] [read-only] A sharable immutable implementation of the ILabelCandidateDescriptor interface that has penalties of 1.0 and a profit of 1.0 and yields false for the ILabelCandidateDescriptor.externalCandidate property.
LabelCandidateDescriptor
  internalDescriptorLookup : ILookup
[static] [read-only]
LabelCandidateDescriptor
  profit : Number
Gets the profit to weigh in if this candidate is chosen.
LabelCandidateDescriptor
Public Methods
 MethodDefined By
  
LabelCandidateDescriptor(externalCandidate:Boolean = false, profit:Number = 1)
Creates a new instance of LabelCandidateDescriptor.
LabelCandidateDescriptor
  
Creates a markup extension that can be used instead of the original class.
LabelCandidateDescriptor
Property Detail
externalCandidateproperty
externalCandidate:Boolean

Gets a value indicating whether this candidate is deemed an external candidate.

This is mainly for INode labels, where the label may be a visual part of the node's internals, but could be used for edge labels, too, if the edge occupies significant amounts of space, visually.

The default value is false.


Implementation
    public function get externalCandidate():Boolean
    public function set externalCandidate(value:Boolean):void
externalDescriptorproperty 
externalDescriptor:ILabelCandidateDescriptor  [read-only]

A sharable immutable implementation of the ILabelCandidateDescriptor interface that has penalties of 1.0 and a profit of 1.0 and yields true for the ILabelCandidateDescriptor.externalCandidate property.


Implementation
    public static function get externalDescriptor():ILabelCandidateDescriptor
externalDescriptorLookupproperty 
externalDescriptorLookup:ILookup  [read-only]


Implementation
    public static function get externalDescriptorLookup():ILookup
internalDescriptorproperty 
internalDescriptor:ILabelCandidateDescriptor  [read-only]

A sharable immutable implementation of the ILabelCandidateDescriptor interface that has penalties of 1.0 and a profit of 1.0 and yields false for the ILabelCandidateDescriptor.externalCandidate property.


Implementation
    public static function get internalDescriptor():ILabelCandidateDescriptor
internalDescriptorLookupproperty 
internalDescriptorLookup:ILookup  [read-only]


Implementation
    public static function get internalDescriptorLookup():ILookup
profitproperty 
profit:Number

Gets the profit to weigh in if this candidate is chosen.

The default value is 1.


Implementation
    public function get profit():Number
    public function set profit(value:Number):void
Constructor Detail
LabelCandidateDescriptor()Constructor
public function LabelCandidateDescriptor(externalCandidate:Boolean = false, profit:Number = 1)

Creates a new instance of LabelCandidateDescriptor.

Parameters
externalCandidate:Boolean (default = false) — Indicating whether this candidate is deemed an external candidate.
 
profit:Number (default = 1) — The profit to weigh in if this candidate is chosen.
Method Detail
createMarkupExtension()method
public function createMarkupExtension(context:ILookup):MarkupExtension

Creates a markup extension that can be used instead of the original class.

Parameters

context:ILookup — The context that shall be considered when creating the markup extension.

Returns
MarkupExtension