Search this API

y.layout
Class EdgeLabelLayoutImpl

java.lang.Object
  extended by y.layout.LabelLayoutImpl
      extended by y.layout.EdgeLabelLayoutImpl
All Implemented Interfaces:
EdgeLabelLayout, LabelLayout, LabelLayoutConstants

public class EdgeLabelLayoutImpl
extends LabelLayoutImpl
implements EdgeLabelLayout

EdgeLabelLayoutImpl is a default implementation of the EdgeLabelLayout interface.

 

Field Summary
 
Fields inherited from interface y.layout.LabelLayoutConstants
PLACE_ANYWHERE, PLACE_AT_CENTER, PLACE_AT_SOURCE, PLACE_AT_SOURCE_PORT, PLACE_AT_TARGET, PLACE_AT_TARGET_PORT, PLACE_LEFT_OF_EDGE, PLACE_ON_EDGE, PLACE_RIGHT_OF_EDGE, PLACEMENT_ALONG_EDGE_MASK, PLACEMENT_ON_SIDE_OF_EDGE_MASK
 
Constructor Summary
EdgeLabelLayoutImpl()
          Creates a new EdgeLabelLayoutImpl instance with default settings.
 
Method Summary
 EdgeLabelModel getLabelModel()
          Returns the label model that describes the valid locations for this label.
 byte getPreferredPlacement()
          Deprecated. use setPreferredPlacementDescriptor(PreferredPlacementDescriptor) instead
 PreferredPlacementDescriptor getPreferredPlacementDescriptor()
          Returns the preferred placement of this edge label.
 void setEdgeLabelModel(EdgeLabelModel labelModel)
          Specifies the label model that describes the valid locations for this label.
 void setPreferredPlacement(byte placement)
          Deprecated. use setPreferredPlacementDescriptor(PreferredPlacementDescriptor) instead
 void setPreferredPlacementDescriptor(PreferredPlacementDescriptor placement)
          Specifies the preferred placement of this edge label.
 
Methods inherited from class y.layout.LabelLayoutImpl
getBox, getModelParameter, getOrientedBox, setBox, setModelParameter, setOrientedBox
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface y.layout.LabelLayout
getBox, getModelParameter, getOrientedBox, setModelParameter
 

Constructor Detail

EdgeLabelLayoutImpl

public EdgeLabelLayoutImpl()
Creates a new EdgeLabelLayoutImpl instance with default settings.

Method Detail

getLabelModel

public EdgeLabelModel getLabelModel()
Returns the label model that describes the valid locations for this label.

Specified by:
getLabelModel in interface EdgeLabelLayout
Returns:
the EdgeLabelModel associated with this EdgeLabelLayout
See Also:
setEdgeLabelModel(EdgeLabelModel)

setEdgeLabelModel

public void setEdgeLabelModel(EdgeLabelModel labelModel)
Specifies the label model that describes the valid locations for this label.

Parameters:
labelModel - the EdgeLabelModel associated with this EdgeLabelLayout

setPreferredPlacement

public void setPreferredPlacement(byte placement)
Deprecated. use setPreferredPlacementDescriptor(PreferredPlacementDescriptor) instead

Specifies the preferred placement of this edge label.

Default Value:
The default value is LabelLayoutConstants.PLACE_ANYWHERE
Parameters:
placement - the preferred placement

getPreferredPlacement

public byte getPreferredPlacement()
Deprecated. use setPreferredPlacementDescriptor(PreferredPlacementDescriptor) instead

Returns the preferred placement of this edge label.

Returns:
the preferred placement
See Also:
setPreferredPlacement(byte)

setPreferredPlacementDescriptor

public void setPreferredPlacementDescriptor(PreferredPlacementDescriptor placement)
Specifies the preferred placement of this edge label.

Default Value:
The default value is PreferredPlacementDescriptor. A descriptor that allows all placements LabelLayoutConstants.PLACE_ANYWHERE
Parameters:
placement - the desired placement
Throws:
java.lang.IllegalArgumentException - if the specified descriptor is null.

getPreferredPlacementDescriptor

public PreferredPlacementDescriptor getPreferredPlacementDescriptor()
Returns the preferred placement of this edge label.

Specified by:
getPreferredPlacementDescriptor in interface EdgeLabelLayout
Returns:
the desired placement
See Also:
setPreferredPlacementDescriptor(PreferredPlacementDescriptor)

© Copyright 2000-2021,
yWorks GmbH.
All rights reserved.