API / geotoolkit / controls / editing / scaling / LegendAdapter / LegendAdapter
scaling.LegendAdapter.LegendAdapter
Legend adapter tool inherits from rectangle adapter. Sets the bounds to the 'legend', instead of setting the transformation
↳
LegendAdapter
Constructors
Methods
Constructors
• new LegendAdapter<T>(options?)
| Name | Type |
|---|---|
Optional options | Options |
RectangularShapeAdapter<T>.constructor
Methods
▸ dispose(): void
Dispose.
void
RectangularShapeAdapter.dispose
▸ getActiveHandle(): AbstractHandle
Gets active handle
RectangularShapeAdapter.getActiveHandle
▸ getClassName(): string
string
RectangularShapeAdapter.getClassName
▸ getHandle(): BoxHandle
Return box handle
RectangularShapeAdapter.getHandle
▸ getManipulatorLayer(): CompositeNode<Node>
Return manipulator layer
RectangularShapeAdapter.getManipulatorLayer
▸ getOptions(): OptionsBase
Get display options
options
RectangularShapeAdapter.getOptions
▸ getPosition(): Point
Gets position
RectangularShapeAdapter.getPosition
▸ getProperties(): any
Gets properties pertaining to this handle
any
properties properties
RectangularShapeAdapter.getProperties
▸ getShape(): T
Shape
T
RectangularShapeAdapter.getShape
▸ getShapeBounds(): Rect
Return shape bounds
bounds
RectangularShapeAdapter.getShapeBounds
▸ getTransformation(): Transformation
Return transformation
RectangularShapeAdapter.getTransformation
▸ hasEventListener(type, callback?): boolean
Check if a list of event listeners for this type contains this listener
| Name | Type | Description |
|---|---|---|
type | string | type of event or property |
Optional callback | Function | to be called, if null, check if any callback is registered |
boolean
RectangularShapeAdapter.hasEventListener
▸ initialize(): boolean
Initialize
boolean
RectangularShapeAdapter.initialize
▸ isActive(): boolean
Returns active state of this handle
boolean
RectangularShapeAdapter.isActive
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
RectangularShapeAdapter.isDisposed
▸ isInitialized(): boolean
Get state of the adapter
boolean
RectangularShapeAdapter.isInitialized
▸ isSilent(): boolean
Return true if the event dispatcher doesn't notify any events
boolean
RectangularShapeAdapter.isSilent
▸ move(x, y): LegendAdapter<T>
Move adapter and send event Events.Moved
| Name | Type | Description |
|---|---|---|
x | number | x position |
y | number | y position |
this
▸ notify<E>(type, source, args?): LegendAdapter<T>
Notify listeners
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | event types |
source | ShapeAdapter<T> | of the event |
Optional args | EventMap[E] | arguments of the event |
this
RectangularShapeAdapter.notify
▸ off<E>(type?, callback?): LegendAdapter<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.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
Optional type | E | type of the event |
Optional callback | (eventType: E, sender: LegendAdapter<T>, args: EventMap[E]) => void | function to be called |
this
▸ on<E>(type, callback): LegendAdapter<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.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of event or property |
callback | (eventType: E, sender: LegendAdapter<T>, args: EventMap[E]) => void | to be called |
this
▸ onActiveStateChanged(active): void
Active state is changed
| Name | Type | Description |
|---|---|---|
active | boolean | active state or not |
void
RectangularShapeAdapter.onActiveStateChanged
▸ onInitialize(): boolean
OnInitialize
boolean
success true if initialized successfully
RectangularShapeAdapter.onInitialize
▸ onMove(x, y): LegendAdapter<T>
OnMove
| Name | Type | Description |
|---|---|---|
x | number | x coordinate |
y | number | y coordinate |
this
RectangularShapeAdapter.onMove
▸ setActive(active): LegendAdapter<T>
Activate
| Name | Type | Description |
|---|---|---|
active | boolean | active state or not |
RectangularShapeAdapter.setActive
▸ setActiveHandle(handle): LegendAdapter<T>
Sets active handle
| Name | Type | Description |
|---|---|---|
handle | AbstractHandle | active handle |
this
RectangularShapeAdapter.setActiveHandle
▸ setOptions(options?): LegendAdapter<T>
Set display options
| Name | Type | Description |
|---|---|---|
Optional options | Options | options |
this
RectangularShapeAdapter.setOptions
▸ setPosition(x?, y?): LegendAdapter<T>
Sets position
| Name | Type | Description |
|---|---|---|
Optional x | number | x coordinate |
Optional y | number | y coordinate |
RectangularShapeAdapter.setPosition
▸ setProperties(props?): LegendAdapter<T>
Sets properties pertaining to this object
| Name | Type | Description |
|---|---|---|
Optional props | any | An object containing the properties to set |
this
RectangularShapeAdapter.setProperties
▸ setRegistry(registry): LegendAdapter<T>
Sets registry
| Name | Type | Description |
|---|---|---|
registry | ShapeAdapterRegistry | associated with current shape adapter |
this
RectangularShapeAdapter.setRegistry
▸ setShape(shape): LegendAdapter<T>
Sets shape
| Name | Type | Description |
|---|---|---|
shape | T | current shape |
RectangularShapeAdapter.setShape
▸ setSilent(bool): LegendAdapter<T>
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
RectangularShapeAdapter.setSilent
▸ setStyle(json?): LegendAdapter<T>
Sets linestyle and fillstyle for the main handle (rectangle) and all the corner handles (squares)
| Name | Type | Description |
|---|---|---|
Optional json | Style | json object for new style |
this
RectangularShapeAdapter.setStyle
▸ update(): void
Update
void
RectangularShapeAdapter.update
▸ updateHandles(): LegendAdapter<T>
Update handles
this
RectangularShapeAdapter.updateHandles
▸ Static getClassName(): string
string