Interface: DvtDiagramLayoutContextLink

Oracle® JavaScript Extension Toolkit (JET)
3.2.0

E87541-01

QuickNav

oj. DvtDiagramLayoutContextLink

Version:
  • 3.2.0
The DvtDiagramLayoutContextLink interface defines the link context for a layout call.
Source:

Methods

getCoordinateSpace() → {string}

Get coordinate space for the link. If the coordinate container id is specified, the link points will be applied relative to that container. If the coordinate container id is not specified, the link points are in the global coordinate space. The coordinate space is global by default. The coordinate space can be any container id that is an ancestor of both the start and end nodes.
Source:
Returns:
coordinate container id for the link
Type
string

getData() → {object|array}

Get the corresponding data for the diagram link.
Source:
Returns:
a data object for the link if the link is not promoted or an array of data objects for each link that is represented by the promoted link if the link is promoted
Type
object | array

getEndConnectorOffset() → {number}

Get the offset of the end connector. This is the amount of space that the link should leave between its ending point and the node for the connector to be drawn.
Source:
Returns:
Type
number

getEndId() → {string}

Get the id of the end node of this link.
Source:
Returns:
Type
string

getId() → {string}

Get the id of the link.
Source:
Returns:
Type
string

getLabelBounds() → {Object}

Get the label bounds. The bounds are in the coordinate system of the label.
Properties:
Name Type Description
x number x-coordinate
y number y-coordinate
w number width
h number height
Source:
Returns:
An object with the following properties for the label bound
Type
Object

getLabelHalign() → {string}

Get the horizontal alignment of the link label. The default value is left for locales with left-to-right reading direction and right for locales with right-to-left reading direction.
Supported Values:
Name Type
"left" string
"center" string
"right" string
Source:
Returns:
A string that specifies the horizontal label alignment
Type
string

getLabelPosition() → {Object}

Get the position of the link label. The position is in the coordinate system of the link's container. The position represents the upper-left corner for locales with left-to-right reading direction and the upper-right corner for locales with right-to-left reading direction in the default alignment.
Properties:
Name Type Description
x number x-coordinate
y number y-coordinate
Source:
Returns:
An object with the following properties for the position of the link label
Type
Object

getLabelRotationAngle() → {number}

Get the angle of rotation of the link label, relative to the label rotation point, in radians.
Source:
Returns:
Type
number

getLabelRotationPoint() → {Object}

Get the point about which to rotate the link label, in the coordinate system of the label.
Properties:
Name Type Description
x number x-coordinate
y number y-coordinate
Source:
Returns:
An object with the following properties for the label rotation point
Type
Object

getLabelValign() → {string}

Get the vertical alignment of the link label.
Supported Values:
Name Type
"top" string
"middle" string
"bottom" string
"baseline" string
Default Value:
  • "top"
Source:
Returns:
A string that specifies the vertical label alignment
Type
string

getLayoutAttributes() → {object}

Get the corresponding object from the links option array.
Deprecated:
Source:
Returns:
Type
object

getLinkWidth() → {number}

Get the width of this link.
Source:
Returns:
Type
number

getPoints() → {array}

Get the points to use for rendering this link. The returned array can contain coordinates, like [x1, y1, x2, y2, ..., xn, yn], or SVG path commands, like ["M", x1, y1, "L", x2, y2, ..., "L", xn, yn]. The points are in the coordinate system of the link's container.
Source:
Returns:
Type
array

getSelected() → {boolean}

Determine whether this link is selected.
Source:
Returns:
Type
boolean

getStartConnectorOffset() → {number}

Get the offset of the start connector. This is the amount of space that the link should leave between its starting point and the node for the connector to be drawn.
Source:
Returns:
Type
number

getStartId() → {string}

Get the id of the start node of this link.
Source:
Returns:
Type
string

isPromoted() → {boolean}

Determine whether this link is promoted.
Source:
Returns:
true if the link is promoted
Type
boolean

setCoordinateSpace(containerId)

Set coordinate space for the link. If the coordinate container id is specified, the link points will be applied relative to that container. If the coordinate container id is not specified, the link points are in the global coordinate space. The coordinate space is global by default. The coordinate space can be any container id that is an ancestor of both the start and end nodes.
Parameters:
Name Type Description
containerId string coordinate container id for the link
Source:

setLabelHalign(halign)

Set the horizontal alignment of the link label. The default value is left for locales with left-to-right reading direction and right for locales with right-to-left reading direction.
Parameters:
Name Type Description
halign string A string that specifies the horizontal label alignment
Supported Values:
Name Type
"left" string
"center" string
"right" string
Source:

setLabelPosition(pos)

Set the position of the link label. The position is in the coordinate system of the link's container. The position represents the upper-left corner for locales with left-to-right reading direction and the upper-right corner for locales with right-to-left reading direction in the default alignment.
Parameters:
Name Type Description
pos Object An object with the following properties for the position of the link label
Properties:
Name Type Description
x number x-coordinate
y number y-coordinate
Source:

setLabelRotationAngle(angle)

Set the angle of rotation of the link label, relative to the label rotation point, in radians.
Parameters:
Name Type Description
angle number angle of rotation
Source:

setLabelRotationPoint(point)

Set the point about which to rotate the link label, in the coordinate system of the label.
Parameters:
Name Type Description
point Object An object with the following properties for the label rotation point
Properties:
Name Type Description
x number x-coordinate
y number y-coordinate
Source:

setLabelValign(valign)

Set the vertical alignment of the link label.
Parameters:
Name Type Description
valign string A string that specifies the vertical label alignment
Supported Values:
Name Type
"top" string
"middle" string
"bottom" string
"baseline" string
Default Value:
  • "top"
Source:

setPoints(points)

Set the points to use for rendering this link. The given array can contain coordinates, like [x1, y1, x2, y2, ..., xn, yn], or SVG path commands, like ["M", x1, y1, "L", x2, y2, ..., "L", xn, yn]. The points are in the coordinate system of the link's container.
Parameters:
Name Type Description
points array array of points to use for rendering this link
Source: