Last updated

API / geotoolkit / flowcharts / shapes / connectors / ILink / ILink

connectors.ILink.ILink

Base interface for links

Interface

Hierarchy

Implemented by

Table of contents

Constructors
Methods

Contents

Constructors

new ILink()

Inherited from

IComponent.constructor

Methods

connectTo

Abstract connectTo(visual, linkSide, visualModelPoint): boolean

Connects self to the given visual, using the given linkside to the model point (in coordinates of visual)

Parameters

Name Type Description
visualComponenta visual to connect to
linkSideLinkSidelink side (begin or end)
visualModelPointPointmodel coordinates (in visual model space)

Returns

boolean

true on success, false on fail


disconnectFrom

Abstract disconnectFrom(linkSide): void

Checks if the link visual was previously connected and disconnects if so. If devicePoint coordinates are specified, then a point with index pointIndex will be set to model position, calculated from devicePoint value. The devicePoint X Y values are used to provide "sticky" behavior for hot points.

Parameters

Name Type Description
linkSideLinkSidedefines side of the link

Returns

void


getCategory

Abstract getCategory(): string

Drawing category. The default value is 'default'

Returns

string

Inherited from

IComponent.getCategory


getClassName

getClassName(): string

Returns

string

Inherited from

IComponent.getClassName


getConnections

Abstract getConnections(): Record<LinkSide, LinkConnection>

Gets array of connections

Returns

Record<LinkSide, LinkConnection>

an array of connections


getDefaultIconSize

Abstract getDefaultIconSize(): Dimension

Returns

Dimension

Inherited from

IComponent.getDefaultIconSize


getDefaultSize

Abstract getDefaultSize(): Dimension

Defines default visual size in UI units (pixels by default). Default value is (50, 50)

Returns

Dimension

Inherited from

IComponent.getDefaultSize


getGeometry

Abstract getGeometry(): Node

gets geometry for the drawing

Returns

Node

Inherited from

IComponent.getGeometry


getLinkPoints

Abstract getLinkPoints(): Point[]

Gets default link points in model space. If not specified, the 'outline' property will be used. If 'ouline' is not set, then the shape becomes 'unconnectable'

Returns

Point[]

Inherited from

IComponent.getLinkPoints


getOutline

Abstract getOutline(): GraphicsPath

gets outline for the drawing. This outline will be used as path with possible connection along. By default, no outline will be used

Returns

GraphicsPath

Inherited from

IComponent.getOutline


getPrototypeId

Abstract getPrototypeId(): string

Returns component class, string value

Returns

string

Inherited from

IComponent.getPrototypeId


getPrototypeName

Abstract getPrototypeName(): string

The name of the component

Returns

string

Inherited from

IComponent.getPrototypeName


getSearchKeywords

Abstract getSearchKeywords(): string[]

Cue words for the component search. By default, the shape will not be searched

Returns

string[]

Inherited from

IComponent.getSearchKeywords


getUrl

Abstract getUrl(): string

Gets URL for an icon

Returns

string

Inherited from

IComponent.getUrl


setDefaultSize

Abstract setDefaultSize(dimension): ILink

Defines default visual size in UI units (pixels by default). Default value is (50, 50)

Parameters

Name Type Description
dimensionDimensionnew default dimension

Returns

ILink

this

Inherited from

IComponent.setDefaultSize


setLinkPoints

Abstract setLinkPoints(points): void

Sets link points. Link points must be defined in the shapes's model space

Parameters

Name Type Description
pointsPoint[]an array of model-space points that represent possible connections

Returns

void

Inherited from

IComponent.setLinkPoints


setText

Abstract setText(textOptions): ILink

Sets text and its options

Parameters

Name Type Description
textOptionsTexttext and/or its options

Returns

ILink

this instance

Inherited from

IComponent.setText


setUrl

Abstract setUrl(url): ILink

Parameters

Name Type
urlstring

Returns

ILink

this

Inherited from

IComponent.setUrl


updateBounds

Abstract updateBounds(): ILink

Update shape bounds

Returns

ILink


Abstract updateLinks(force?): void

Gets array of connections

Parameters

Name Type Description
Optional forcebooleanforce

Returns

void


getClassName

Static getClassName(): string

Returns

string

Inherited from

IComponent.getClassName