Last updated

API / geotoolkit / controls / editing / scaling / RectangularShapeAdapter / RectangularShapeAdapter

Class: RectangularShapeAdapter<T>

scaling.RectangularShapeAdapter.RectangularShapeAdapter

Defines adapter to scale and move rectangular shape

Type parameters

NameType
Textends AbstractNode & { getBounds: () => Rect | null } = Rectangle

Hierarchy

Table of contents

Constructors
Methods

Contents

Constructors

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

new RectangularShapeAdapter<T>(options?)

Type parameters

NameType
Textends AbstractNode<T> & { getBounds: () => Rect } = Rectangle

Parameters

Name Type
Optional optionsOptions

Overrides

ShapeAdapter&lt;T&amp;gt;.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


getHandle

getHandle(): BoxHandle

Return box handle

Returns

BoxHandle


getManipulatorLayer

getManipulatorLayer(): CompositeNode<Node>

Return manipulator layer

Returns

CompositeNode<Node>

Inherited from

ShapeAdapter.getManipulatorLayer


getOptions

getOptions(): OptionsBase

Get display options

Returns

OptionsBase

options


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(): T

Shape

Returns

T

Inherited from

ShapeAdapter.getShape


getShapeBounds

getShapeBounds(): Rect

Return shape bounds

Returns

Rect

bounds


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): RectangularShapeAdapter<T>

Move adapter and send event Events.Moved

Parameters

Name Type Description
xnumberx position
ynumbery position

Returns

RectangularShapeAdapter<T>

this

Inherited from

ShapeAdapter.move


notify

notify<E>(type, source, args?): RectangularShapeAdapter<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

RectangularShapeAdapter<T>

this

Inherited from

ShapeAdapter.notify


off

off<E>(type?, callback?): RectangularShapeAdapter<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: RectangularShapeAdapter<T>, args: EventMap[E]) => voidfunction to be called

Returns

RectangularShapeAdapter<T>

this

Inherited from

ShapeAdapter.off


on

on<E>(type, callback): RectangularShapeAdapter<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: RectangularShapeAdapter<T>, args: EventMap[E]) => voidto be called

Returns

RectangularShapeAdapter<T>

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): RectangularShapeAdapter<T>

OnMove

Parameters

Name Type Description
xnumberx coordinate
ynumbery coordinate

Returns

RectangularShapeAdapter<T>

Overrides

ShapeAdapter.onMove


setActive

setActive(active): RectangularShapeAdapter<T>

Activate

Parameters

Name Type Description
activebooleanactive state or not

Returns

RectangularShapeAdapter<T>

Inherited from

ShapeAdapter.setActive


setActiveHandle

setActiveHandle(handle): RectangularShapeAdapter<T>

Sets active handle

Parameters

Name Type Description
handleAbstractHandleactive handle

Returns

RectangularShapeAdapter<T>

this

Inherited from

ShapeAdapter.setActiveHandle


setOptions

setOptions(options?): RectangularShapeAdapter<T>

Set display options

Parameters

Name Type Description
Optional optionsOptionsoptions

Returns

RectangularShapeAdapter<T>

this


setPosition

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

Sets position

Parameters

Name Type Description
Optional xnumberx coordinate
Optional ynumbery coordinate

Returns

RectangularShapeAdapter<T>

Inherited from

ShapeAdapter.setPosition


setProperties

setProperties(props?): RectangularShapeAdapter<T>

Sets properties pertaining to this object

Parameters

Name Type Description
Optional propsanyAn object containing the properties to set

Returns

RectangularShapeAdapter<T>

this

Inherited from

ShapeAdapter.setProperties


setRegistry

setRegistry(registry): RectangularShapeAdapter<T>

Sets registry

Parameters

Name Type Description
registryShapeAdapterRegistryassociated with current shape adapter

Returns

RectangularShapeAdapter<T>

this

Inherited from

ShapeAdapter.setRegistry


setShape

setShape(shape): RectangularShapeAdapter<T>

Sets shape

Parameters

Name Type Description
shapeTcurrent shape

Returns

RectangularShapeAdapter<T>

Overrides

ShapeAdapter.setShape


setSilent

setSilent(bool): RectangularShapeAdapter<T>

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

RectangularShapeAdapter<T>

this

Inherited from

ShapeAdapter.setSilent


setStyle

setStyle(json?): RectangularShapeAdapter<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

RectangularShapeAdapter<T>

this


update

update(): void

Update

Returns

void

Inherited from

ShapeAdapter.update


updateHandles

updateHandles(): RectangularShapeAdapter<T>

Update handles

Returns

RectangularShapeAdapter<T>

this

Overrides

ShapeAdapter.updateHandles


getClassName

Static getClassName(): string

Returns

string

Inherited from

ShapeAdapter.getClassName