Package | com.yworks.yfiles.layout.labeling |
Class | public class MISLabelingAlgorithm |
Inheritance | MISLabelingAlgorithm AbstractLabelingAlgorithm AbstractLayoutStage YObject Object |
Subclasses | GreedyMISLabeling, SALabeling |
Property | Defined By | ||
---|---|---|---|
applyPostprocessing : Boolean
Getter:
Returns true if the postprocessing step is applied. | AbstractLabelingAlgorithm | ||
autoFlippingEnabled : Boolean
Determines whether or not edge labels associated with a "free" label model (see for example y.view.SmartEdgeLabelModel) should be automatically flipped if they would be upside-down. | AbstractLabelingAlgorithm | ||
boxesToNodesInternal : Map [read-only] | MISLabelingAlgorithm | ||
conflictGraphInternal : Graph [read-only] | MISLabelingAlgorithm | ||
coreLayouter : Layouter
Specifies the core layouter. | AbstractLayoutStage | ||
customProfitModelRatio : Number
Getter:
Returns the custom profit model ratio. | MISLabelingAlgorithm | ||
edgeGroupOverlapAllowed : Boolean
Getter:
Returns whether edge labels may overlap with edges belonging to the same edge group. | AbstractLabelingAlgorithm | ||
graph : LayoutGraph | MISLabelingAlgorithm | ||
moveInternalNodeLabels : Boolean
Specifies true if the labeling algorithm is allowed to move internal node labels. | AbstractLabelingAlgorithm | ||
nodesToIDInternal : NodeMap [read-only] | MISLabelingAlgorithm | ||
optimizationStrategy : int
Specifies the optimization strategy of the labeling algorithm. | MISLabelingAlgorithm | ||
placeEdgeLabels : Boolean
Specifies whether labels assigned to edges in a graph should be placed or ignored. | AbstractLabelingAlgorithm | ||
placeNodeLabels : Boolean
Specifies whether labels assigned to nodes in a graph should be placed or ignored. | AbstractLabelingAlgorithm | ||
profitModel : ProfitModel
Sets the profit model that is used to rank the available positions for each label. | AbstractLabelingAlgorithm | ||
rects : YList [read-only]
Returns the set of all generated candidate rectangles. | AbstractLabelingAlgorithm | ||
removeEdgeOverlaps : Boolean
Specifies how label candidates which overlap with edges are handled. | AbstractLabelingAlgorithm | ||
removeNodeOverlaps : Boolean
Specifies how label candidates which overlap with nodes are handled. | AbstractLabelingAlgorithm | ||
selectedLabelsDpKey : Object
Getter:
Returns the labeling selection DataProvider key. | AbstractLabelingAlgorithm | ||
storeRects : Boolean
Specifies whether the candidate rectangles should be stored to be retrieved. | AbstractLabelingAlgorithm | ||
useAlternativeSideHandling : Boolean
Getter:
Returns true if the preference on which side of an edge a corresponding label should be placed is interpreted by human perception instead of always following the edge from source to target. | AbstractLabelingAlgorithm |
Property | Defined By | ||
---|---|---|---|
boxesToNodes : Map | MISLabelingAlgorithm | ||
conflictGraph : Graph
the conflict graph
| MISLabelingAlgorithm | ||
nodesToBoxes : NodeMap
holds for each node in the conflictGraph the corresponding LabelCandidate
| MISLabelingAlgorithm | ||
nodesToID : NodeMap
holds for each node in the conflictGraph the corresponding integer index of the Label[]
| MISLabelingAlgorithm |
Method | Defined By | ||
---|---|---|---|
MISLabelingAlgorithm(init:Boolean = true) | MISLabelingAlgorithm | ||
canLayout(graph:LayoutGraph):Boolean [override]
Returns true. | AbstractLabelingAlgorithm | ||
doLayout(graph:LayoutGraph):void [override]
Place the labels in the graph. | AbstractLabelingAlgorithm | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | MISLabelingAlgorithm | ||
getProfit(l:LabelCandidate):Number
Returns the profit model that is used to rank the available positions for each label. | AbstractLabelingAlgorithm | ||
hashCode():int | YObject | ||
label(gl:LayoutGraph):void
Place the labels in the graph. | AbstractLabelingAlgorithm | ||
labelSome(gl:LayoutGraph, key:Object):void
Place a subset of the labels. | AbstractLabelingAlgorithm | ||
Place some labels in the graph. | AbstractLabelingAlgorithm |
Method | Defined By | ||
---|---|---|---|
Creates a node map which assigns to each node the profit. | MISLabelingAlgorithm | ||
canLayoutCore(graph:LayoutGraph):Boolean
Queries the core layouter whether or not the given graph can be laid out. | AbstractLayoutStage | ||
checkGroupNodeSize(layout:GraphLayout, node:Object):void
This method throws an com.yworks.bridge.util.IllegalArgumentException if the width/height of the given group node object is zero. | AbstractLabelingAlgorithm | ||
checkNodeSize(layout:GraphLayout, node:Object):void
This method throws an com.yworks.bridge.util.IllegalArgumentException if the width/height of the given node object is zero. | AbstractLabelingAlgorithm | ||
createEdges():void
Creates one edge between two nodes if the corresponding label candidates are intersecting. | MISLabelingAlgorithm | ||
doLayoutCore(graph:LayoutGraph):void
Invokes the layout routine of the core layouter. | AbstractLayoutStage | ||
Calculates the overlapping factor between a label candidate and an edge segment. | MISLabelingAlgorithm | ||
Calculates the overlapping factor between a label candidate and a node halo. | MISLabelingAlgorithm | ||
Calculates the overlapping factor between two label candidates. | MISLabelingAlgorithm | ||
Calculates the overlapping factor between a label candidate and a node. | MISLabelingAlgorithm | ||
AbstractLabelingAlgorithm | |||
initAbstractLayoutStage1():void | AbstractLayoutStage | ||
initAbstractLayoutStage2(core:Layouter):void | AbstractLayoutStage | ||
initMISLabelingAlgorithm():void | MISLabelingAlgorithm |
Constant | Defined By | ||
---|---|---|---|
LABEL_MODEL_DPKEY : Object = y.layout.labeling.AbstractLabelingAlgorithm.LABEL_MODEL_DPKEY [static]
com.yworks.yfiles.base.DataProvider key to specify for each com.yworks.yfiles.layout.EdgeLabelLayout s and each com.yworks.yfiles.layout.NodeLabelLayout a replacement com.yworks.yfiles.layout.EdgeLabelModel or com.yworks.yfiles.layout.NodeLabelModel, respectively, that is used by the labeling algorithm instead of the original label model. | AbstractLabelingAlgorithm | ||
OPTIMIZATION_BALANCED : int = 0 [static]
Use a balanced optimization strategy. | MISLabelingAlgorithm | ||
OPTIMIZATION_EDGE_OVERLAP : int = 3 [static]
Use an optimization strategy that especially reduces overlaps between labels and edges. | MISLabelingAlgorithm | ||
OPTIMIZATION_LABEL_OVERLAP : int = 2 [static]
Use an optimization strategy that especially reduces overlaps between labels. | MISLabelingAlgorithm | ||
OPTIMIZATION_NODE_OVERLAP : int = 1 [static]
Use an optimization strategy that especially reduces overlaps between labels and nodes as well as labels and node halos. | MISLabelingAlgorithm | ||
OPTIMIZATION_NONE : int = 4 [static]
Use no optimization strategy. | MISLabelingAlgorithm |
boxesToNodes | property |
protected var boxesToNodes:Map
boxesToNodesInternal | property |
conflictGraph | property |
protected var conflictGraph:Graph
the conflict graph
conflictGraphInternal | property |
conflictGraphInternal:Graph
[read-only] public function get conflictGraphInternal():Graph
customProfitModelRatio | property |
customProfitModelRatio:Number
Getter: Returns the custom profit model ratio.
Setter: If an optimization strategy is set (see optimizationStrategy) as well as a profit model (see profitModel), the specified ratio (0 <= customProfitModelRatio <= 1) determines the ratio between the internal profit (ip) depending on the used optimization strategy as well as the profit returned by the specified profit model (sp), i.e., overall profit = customProfitModelRatio * sp + (1 - customProfitModelRatio) * ip. public function get customProfitModelRatio():Number
public function set customProfitModelRatio(value:Number):void
See also
graph | property |
public var graph:LayoutGraph
nodesToBoxes | property |
protected var nodesToBoxes:NodeMap
holds for each node in the conflictGraph the corresponding LabelCandidate
nodesToID | property |
protected var nodesToID:NodeMap
holds for each node in the conflictGraph the corresponding integer index of the Label[]
nodesToIDInternal | property |
nodesToIDInternal:NodeMap
[read-only] public function get nodesToIDInternal():NodeMap
optimizationStrategy | property |
optimizationStrategy:int
Specifies the optimization strategy of the labeling algorithm. Possible values are: OPTIMIZATION_NONE, OPTIMIZATION_BALANCED, OPTIMIZATION_NODE_OVERLAP, OPTIMIZATION_EDGE_OVERLAP and OPTIMIZATION_LABEL_OVERLAP.
public function get optimizationStrategy():int
public function set optimizationStrategy(value:int):void
See also
MISLabelingAlgorithm | () | Constructor |
public function MISLabelingAlgorithm(init:Boolean = true)
init:Boolean (default = true )
|
assignProfit | () | method |
protected function assignProfit():NodeMap
Creates a node map which assigns to each node the profit.
ReturnsNodeMap |
createEdges | () | method |
protected function createEdges():void
Creates one edge between two nodes if the corresponding label candidates are intersecting.
foundEdgeOverlap | () | method |
protected function foundEdgeOverlap(lc:LabelCandidate, e:Edge, eSegment:LineSegment):void
Calculates the overlapping factor between a label candidate and an edge segment.
Parameters
lc:LabelCandidate | |
e:Edge | |
eSegment:LineSegment |
foundHaloOverlap | () | method |
protected function foundHaloOverlap(lc:LabelCandidate, n:Node, haloRect:YRectangle):void
Calculates the overlapping factor between a label candidate and a node halo.
Parameters
lc:LabelCandidate | |
n:Node | |
haloRect:YRectangle |
foundLabelOverlap | () | method |
protected function foundLabelOverlap(lc1:LabelCandidate, lc2:LabelCandidate, e:Edge):void
Calculates the overlapping factor between two label candidates. Default value is 1.0.
Parameters
lc1:LabelCandidate | |
lc2:LabelCandidate | |
e:Edge |
foundNodeOverlap | () | method |
protected function foundNodeOverlap(lc:LabelCandidate, n:Node, nBox:YRectangle):void
Calculates the overlapping factor between a label candidate and a node.
Parameters
lc:LabelCandidate | |
n:Node | |
nBox:YRectangle |
getClass | () | method |
override public function getClass():Class
ReturnsClass |
initMISLabelingAlgorithm | () | method |
protected final function initMISLabelingAlgorithm():void
OPTIMIZATION_BALANCED | Constant |
public static const OPTIMIZATION_BALANCED:int = 0
Use a balanced optimization strategy.
OPTIMIZATION_EDGE_OVERLAP | Constant |
public static const OPTIMIZATION_EDGE_OVERLAP:int = 3
Use an optimization strategy that especially reduces overlaps between labels and edges.
OPTIMIZATION_LABEL_OVERLAP | Constant |
public static const OPTIMIZATION_LABEL_OVERLAP:int = 2
Use an optimization strategy that especially reduces overlaps between labels.
OPTIMIZATION_NODE_OVERLAP | Constant |
public static const OPTIMIZATION_NODE_OVERLAP:int = 1
Use an optimization strategy that especially reduces overlaps between labels and nodes as well as labels and node halos.
OPTIMIZATION_NONE | Constant |
public static const OPTIMIZATION_NONE:int = 4
Use no optimization strategy.