Last updated

API / geotoolkit / controls / editing / LineShapeAdapter / LineShapeAdapter

Class: LineShapeAdapter

editing.LineShapeAdapter.LineShapeAdapter

Defines adapter to move and modify a Line shape

Hierarchy

Table of contents

Constructors
Methods

Contents

Constructors

new LineShapeAdapter()

new LineShapeAdapter()

Overrides

ShapeAdapter<Line>.constructor

Methods

dispose

dispose(): void

Dispose.

Returns

void

Inherited from

ShapeAdapter.dispose


getActiveHandle

getActiveHandle(): AbstractHandle

Gets active handle

Returns

AbstractHandle

Inherited from

ShapeAdapter.getActiveHandle


getClassName

getClassName(): string

Returns

string

Inherited from

ShapeAdapter.getClassName


getManipulatorLayer

getManipulatorLayer(): CompositeNode<Node>

Return manipulator layer

Returns

CompositeNode<Node>

Inherited from

ShapeAdapter.getManipulatorLayer


getPosition

getPosition(): Point

Gets position

Returns

Point

Inherited from

ShapeAdapter.getPosition


getProperties

getProperties(): any

Gets properties pertaining to this handle

Returns

any

properties properties

Inherited from

ShapeAdapter.getProperties


getShape

getShape(): Line

Shape

Returns

Line

Inherited from

ShapeAdapter.getShape


getTransformation

getTransformation(): Transformation

Return transformation

Returns

Transformation

Inherited from

ShapeAdapter.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

ShapeAdapter.hasEventListener


initialize

initialize(): boolean

Initialize

Returns

boolean

Inherited from

ShapeAdapter.initialize


isActive

isActive(): boolean

Returns active state of this handle

Returns

boolean

Inherited from

ShapeAdapter.isActive


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

ShapeAdapter.isDisposed


isInitialized

isInitialized(): boolean

Get state of the adapter

Returns

boolean

Inherited from

ShapeAdapter.isInitialized


isSilent

isSilent(): boolean

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

Returns

boolean

Inherited from

ShapeAdapter.isSilent


move

move(x, y): LineShapeAdapter

Move adapter and send event Events.Moved

Parameters

Name Type Description
xnumberx position
ynumbery position

Returns

LineShapeAdapter

this

Inherited from

ShapeAdapter.move


notify

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

Notify listeners

Type parameters

NameType
Eextends string

Parameters

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

Returns

LineShapeAdapter

this

Inherited from

ShapeAdapter.notify


off

off<E>(type?, callback?): LineShapeAdapter

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: LineShapeAdapter, args: EventMap[E]) => voidfunction to be called

Returns

LineShapeAdapter

this

Inherited from

ShapeAdapter.off


on

on<E>(type, callback): LineShapeAdapter

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: LineShapeAdapter, args: EventMap[E]) => voidto be called

Returns

LineShapeAdapter

this

Inherited from

ShapeAdapter.on


onActiveStateChanged

onActiveStateChanged(active): void

Active state is changed

Parameters

Name Type Description
activebooleanactive state or not

Returns

void

Overrides

ShapeAdapter.onActiveStateChanged


onInitialize

onInitialize(): boolean

OnInitialize

Returns

boolean

success true if initialized successfully

Overrides

ShapeAdapter.onInitialize


onMove

Protected onMove(x, y): LineShapeAdapter

OnMove

Parameters

Name Type Description
xnumberx coordinate
ynumbery coordinate

Returns

LineShapeAdapter

Overrides

ShapeAdapter.onMove


setActive

setActive(active): LineShapeAdapter

Activate

Parameters

Name Type Description
activebooleanactive state or not

Returns

LineShapeAdapter

Inherited from

ShapeAdapter.setActive


setActiveHandle

setActiveHandle(handle): LineShapeAdapter

Sets active handle

Parameters

Name Type Description
handleAbstractHandleactive handle

Returns

LineShapeAdapter

this

Inherited from

ShapeAdapter.setActiveHandle


setPosition

setPosition(x?, y?): LineShapeAdapter

Sets position

Parameters

Name Type Description
Optional xnumberx coordinate
Optional ynumbery coordinate

Returns

LineShapeAdapter

Inherited from

ShapeAdapter.setPosition


setProperties

setProperties(props?): LineShapeAdapter

Sets properties pertaining to this object

Parameters

Name Type Description
Optional propsanyAn object containing the properties to set

Returns

LineShapeAdapter

this

Inherited from

ShapeAdapter.setProperties


setRegistry

setRegistry(registry): LineShapeAdapter

Sets registry

Parameters

Name Type Description
registryShapeAdapterRegistryassociated with current shape adapter

Returns

LineShapeAdapter

this

Inherited from

ShapeAdapter.setRegistry


setShape

setShape(shape): LineShapeAdapter

Sets shape

Parameters

Name Type Description
shapeLineshape to be modified

Returns

LineShapeAdapter

this

Overrides

ShapeAdapter.setShape


setSilent

setSilent(bool): LineShapeAdapter

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

LineShapeAdapter

this

Inherited from

ShapeAdapter.setSilent


update

update(): void

Update

Returns

void

Inherited from

ShapeAdapter.update


updateHandles

updateHandles(): LineShapeAdapter

Update handles

Returns

LineShapeAdapter

this

Overrides

ShapeAdapter.updateHandles


getClassName

Static getClassName(): string

Returns

string

Inherited from

ShapeAdapter.getClassName