Skip to content

API / geotoolkit / attributes / Style / Style

Class: Style

attributes.Style.Style

Parent class for all styles

Hierarchy

Table of contents

Constructors
  • [new Style()](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.attributes.style.style.md#new style())
Methods

Contents

Constructors

new Style()

• Protected new Style()

Creates style

Overrides

EventDispatcher.constructor

Methods

clone

▸ clone(): Style

All inheritors should implement copy constructor or provide custom implementation for this method

Returns

Style

this


copyConstructor

▸ Protected copyConstructor(src, deepCopy?): Style

copy constructor

Parameters

Name Type Description
srcStyleSource to copy from
Optional deepCopybooleandeep copy

Returns

Style

this


dispose

▸ dispose(): void

Dispose.

Returns

void

Inherited from

EventDispatcher.dispose


getClassName

▸ getClassName(): string

Returns

string

Inherited from

EventDispatcher.getClassName


getProperties

▸ getProperties(context?): Record<string, any&gt;

Gets all the properties pertaining to this object

Parameters

Name Type Description
Optional contextISerializationContextserialization context

Returns

Record<string, any&gt;

properties properties


getTimeStamp

▸ getTimeStamp(): number

Gets time stamp

Returns

number

timeStamp


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

EventDispatcher.hasEventListener


invalidate

▸ invalidate(): Style

notify the node that the style is invalidated

Returns

Style

this


isDisposed

▸ isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

EventDispatcher.isDisposed


isSilent

▸ isSilent(): boolean

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

Returns

boolean

Inherited from

EventDispatcher.isSilent


notify

▸ notify<E&gt;(type, source, args?): Style

Notify listeners

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEevent types
sourceStyleof the event
Optional argsEventMap[E]arguments of the event

Returns

Style

this

Overrides

EventDispatcher.notify


off

▸ off<E&gt;(type?, callback?): Style

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

Returns

Style

this

Overrides

EventDispatcher.off


on

▸ on<E&gt;(type, callback): Style

Attach listener on event that will be called whenever the specified event is delivered to the target <p> If the callback function is already in the list of event listeners for this target, the function is not added a second time. </p> <p> 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. </p>

Type parameters

NameType
Eextends string

Parameters

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

Returns

Style

this

Overrides

EventDispatcher.on


setProperties

▸ setProperties(properties?, context?): Style

Sets all the properties pertaining to this object

Parameters

Name Type Description
Optional propertiesRecord<string, any&gt;An object containing the properties to set
Optional contextIDeserializationContextdeserialization context

Returns

Style

this


setSilent

▸ setSilent(bool, force?): Style

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode
Optional forcebooleantrue if parent should be invalidated immediately

Returns

Style

this

Overrides

EventDispatcher.setSilent


updateTimeStamp

▸ updateTimeStamp(silent?): Style

Update time stamp to indicate that style has been changed.

Parameters

Name Type Description
Optional silentbooleansilent mode. If this parameter equals to true then style doesn't send invalidate event

Returns

Style

this


getClassName

▸ Static getClassName(): string

Returns

string

Inherited from

EventDispatcher.getClassName


isStyleNotificationEnabled

▸ Static isStyleNotificationEnabled(): boolean

Return status of the global notification for all styles.

Returns

boolean