Last updated

API / geotoolkit / controls / editing / TextShapeAdapter / TextShapeAdapter

Class: TextShapeAdapter<T>

editing.TextShapeAdapter.TextShapeAdapter

Defines adapter to move text shape

Type parameters

NameType
Textends Text

Hierarchy

Table of contents

Constructors
Methods

Contents

Constructors

new TextShapeAdapter&lt;T&amp;gt;(options)

new TextShapeAdapter<T>(options?)

Type parameters

NameType
Textends Text<T>

Parameters

Name Type
Optional optionsOptions

Inherited from

RectangularShapeAdapter<T>.constructor

Methods

dispose

dispose(): void

Dispose.

Returns

void

Inherited from

RectangularShapeAdapter.dispose


getActiveHandle

getActiveHandle(): AbstractHandle

Gets active handle

Returns

AbstractHandle

Inherited from

RectangularShapeAdapter.getActiveHandle


getClassName

getClassName(): string

Returns

string

Inherited from

RectangularShapeAdapter.getClassName


getHandle

getHandle(): BoxHandle

Return box handle

Returns

BoxHandle

Inherited from

RectangularShapeAdapter.getHandle


getManipulatorLayer

getManipulatorLayer(): CompositeNode<Node>

Return manipulator layer

Returns

CompositeNode<Node>

Inherited from

RectangularShapeAdapter.getManipulatorLayer


getOptions

getOptions(): OptionsBase

Get display options

Returns

OptionsBase

options

Inherited from

RectangularShapeAdapter.getOptions


getPosition

getPosition(): Point

Gets position

Returns

Point

Inherited from

RectangularShapeAdapter.getPosition


getProperties

getProperties(): any

Gets properties pertaining to this handle

Returns

any

properties properties

Inherited from

RectangularShapeAdapter.getProperties


getShape

getShape(): T

Shape

Returns

T

Inherited from

RectangularShapeAdapter.getShape


getShapeBounds

getShapeBounds(): Rect

Return shape bounds

Returns

Rect

bounds

Overrides

RectangularShapeAdapter.getShapeBounds


getTransformation

getTransformation(): Transformation

Return transformation

Returns

Transformation

Inherited from

RectangularShapeAdapter.getTransformation


hasEventListener

hasEventListener(type, callback?): boolean

Check if a list of event listeners for this type contains this listener

Parameters

Name Type Description
typestringtype of event or property
Optional callbackFunctionto be called, if null, check if any callback is registered

Returns

boolean

Inherited from

RectangularShapeAdapter.hasEventListener


initialize

initialize(): boolean

Initialize

Returns

boolean

Inherited from

RectangularShapeAdapter.initialize


isActive

isActive(): boolean

Returns active state of this handle

Returns

boolean

Inherited from

RectangularShapeAdapter.isActive


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

RectangularShapeAdapter.isDisposed


isInitialized

isInitialized(): boolean

Get state of the adapter

Returns

boolean

Inherited from

RectangularShapeAdapter.isInitialized


isSilent

isSilent(): boolean

Return true if the event dispatcher doesn't notify any events

Returns

boolean

Inherited from

RectangularShapeAdapter.isSilent


move

move(x, y): TextShapeAdapter<T>

Move adapter and send event Events.Moved

Parameters

Name Type Description
xnumberx position
ynumbery position

Returns

TextShapeAdapter<T>

this

Inherited from

RectangularShapeAdapter.move


notify

notify<E>(type, source, args?): TextShapeAdapter<T>

Notify listeners

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEevent types
sourceShapeAdapter<T>of the event
Optional argsEventMap[E]arguments of the event

Returns

TextShapeAdapter<T>

this

Inherited from

RectangularShapeAdapter.notify


off

off<E>(type?, callback?): TextShapeAdapter<T>

Detach listener on event. Calling .off() with no arguments removes all attached listeners. Calling .off(type) with no callback removes all attached listeners for specific type.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
Optional typeEtype of the event
Optional callback(eventType: E, sender: TextShapeAdapter<T>, args: EventMap[E]) => voidfunction to be called

Returns

TextShapeAdapter<T>

this

Inherited from

RectangularShapeAdapter.off


on

on<E>(type, callback): TextShapeAdapter<T>

Attach listener on event that will be called whenever the specified event is delivered to the target

If the callback function is already in the list of event listeners for this target, the function is not added a second time.

If a particular anonymous function is in the list of event listeners registered for a certain target, and then later in the code, an identical anonymous function is given in an "on" call, the second function will also be added to the list of event listeners for that target.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEtype of event or property
callback(eventType: E, sender: TextShapeAdapter<T>, args: EventMap[E]) => voidto be called

Returns

TextShapeAdapter<T>

this

Inherited from

RectangularShapeAdapter.on


onActiveStateChanged

onActiveStateChanged(active): void

Active state is changed

Parameters

Name Type Description
activebooleanactive state or not

Returns

void

Overrides

RectangularShapeAdapter.onActiveStateChanged


onInitialize

onInitialize(): boolean

OnInitialize

Returns

boolean

success true if initialized successfully

Overrides

RectangularShapeAdapter.onInitialize


onMove

Protected onMove(x, y): TextShapeAdapter<T>

OnMove

Parameters

Name Type Description
xnumberx coordinate
ynumbery coordinate

Returns

TextShapeAdapter<T>

Inherited from

RectangularShapeAdapter.onMove


setActive

setActive(active): TextShapeAdapter<T>

Activate

Parameters

Name Type Description
activebooleanactive state or not

Returns

TextShapeAdapter<T>

Inherited from

RectangularShapeAdapter.setActive


setActiveHandle

setActiveHandle(handle): TextShapeAdapter<T>

Sets active handle

Parameters

Name Type Description
handleAbstractHandleactive handle

Returns

TextShapeAdapter<T>

this

Inherited from

RectangularShapeAdapter.setActiveHandle


setOptions

setOptions(options?): TextShapeAdapter<T>

Set display options

Parameters

Name Type Description
Optional optionsOptionsoptions

Returns

TextShapeAdapter<T>

this

Inherited from

RectangularShapeAdapter.setOptions


setPosition

setPosition(x?, y?): TextShapeAdapter<T>

Sets position

Parameters

Name Type Description
Optional xnumberx coordinate
Optional ynumbery coordinate

Returns

TextShapeAdapter<T>

Inherited from

RectangularShapeAdapter.setPosition


setProperties

setProperties(props?): TextShapeAdapter<T>

Sets properties pertaining to this object

Parameters

Name Type Description
Optional propsanyAn object containing the properties to set

Returns

TextShapeAdapter<T>

this

Inherited from

RectangularShapeAdapter.setProperties


setRegistry

setRegistry(registry): TextShapeAdapter<T>

Sets registry

Parameters

Name Type Description
registryShapeAdapterRegistryassociated with current shape adapter

Returns

TextShapeAdapter<T>

this

Inherited from

RectangularShapeAdapter.setRegistry


setShape

setShape(shape): TextShapeAdapter<T>

Sets shape

Parameters

Name Type Description
shapeTshape to be set

Returns

TextShapeAdapter<T>

Overrides

RectangularShapeAdapter.setShape


setSilent

setSilent(bool): TextShapeAdapter<T>

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

TextShapeAdapter<T>

this

Inherited from

RectangularShapeAdapter.setSilent


setStyle

setStyle(json?): TextShapeAdapter<T>

Sets linestyle and fillstyle for the main handle (rectangle) and all the corner handles (squares)

Parameters

Name Type Description
Optional jsonStylejson object for new style

Returns

TextShapeAdapter<T>

this

Inherited from

RectangularShapeAdapter.setStyle


update

update(): void

Update

Returns

void

Inherited from

RectangularShapeAdapter.update


updateHandles

updateHandles(): TextShapeAdapter<T>

Update handles

Returns

TextShapeAdapter<T>

this

Overrides

RectangularShapeAdapter.updateHandles


getClassName

Static getClassName(): string

Returns

string

Inherited from

RectangularShapeAdapter.getClassName