API / geotoolkit / flowcharts / shapes / connectors / ILink / ILink
connectors.ILink.ILink
Base interface for links
Interface
↳
ILink
Constructors
Methods
Methods
▸ Abstract connectTo(visual, linkSide, visualModelPoint): boolean
Connects self to the given visual, using the given linkside to the model point (in coordinates of visual)
| Name | Type | Description |
|---|---|---|
visual | Component | a visual to connect to |
linkSide | LinkSide | link side (begin or end) |
visualModelPoint | Point | model coordinates (in visual model space) |
boolean
true on success, false on fail
▸ 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.
| Name | Type | Description |
|---|---|---|
linkSide | LinkSide | defines side of the link |
void
▸ Abstract getCategory(): string
Drawing category. The default value is 'default'
string
▸ getClassName(): string
string
▸ Abstract getConnections(): Record<LinkSide, LinkConnection>
Gets array of connections
Record<LinkSide, LinkConnection>
an array of connections
▸ Abstract getDefaultIconSize(): Dimension
▸ Abstract getDefaultSize(): Dimension
Defines default visual size in UI units (pixels by default). Default value is (50, 50)
▸ Abstract getGeometry(): Node
gets geometry for the drawing
▸ 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'
Point[]
▸ 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
▸ Abstract getPrototypeId(): string
Returns component class, string value
string
▸ Abstract getPrototypeName(): string
The name of the component
string
▸ Abstract getSearchKeywords(): string[]
Cue words for the component search. By default, the shape will not be searched
string[]
▸ Abstract getUrl(): string
Gets URL for an icon
string
▸ Abstract setDefaultSize(dimension): ILink
Defines default visual size in UI units (pixels by default). Default value is (50, 50)
| Name | Type | Description |
|---|---|---|
dimension | Dimension | new default dimension |
this
▸ Abstract setLinkPoints(points): void
Sets link points. Link points must be defined in the shapes's model space
| Name | Type | Description |
|---|---|---|
points | Point[] | an array of model-space points that represent possible connections |
void
▸ Abstract setText(textOptions): ILink
Sets text and its options
| Name | Type | Description |
|---|---|---|
textOptions | Text | text and/or its options |
this instance
▸ Abstract setUrl(url): ILink
| Name | Type |
|---|---|
url | string |
this
▸ Abstract updateBounds(): ILink
Update shape bounds
▸ Abstract updateLinks(force?): void
Gets array of connections
| Name | Type | Description |
|---|---|---|
Optional force | boolean | force |
void
▸ Static getClassName(): string
string