Skip to content
Reference > Classes

StyleSet

Definition

StyleSet var = .... ;

Extends

Extended By

None

Description

Represents a set of attributes that makes up a style

Method Summary

Owner Name Return Type Description
Object getClassName() String Returns the string name of this object's class type.
StyleSet getDefinedKeys() Set Returns a set of keys for style options that are set on this styleset.
StyleSet getDefinition(key) StyleOptionDefinition Returns the definition for a particular style option, including type, name and constaints.
StyleSet getKeys() Set Returns a set of all permissible keys for style options.
StyleSet getParent() StyleSet Returns the style that this style set inherits from.
StyleSet getResolvedValue(key) Object Returns the value associated with the supplied style key, considering inherited parent styles if its not defined by this style. The returned value will be null only when the key is invalid.
StyleSet getStyleId() StyleSet Returns the style id.
StyleSet getValue(key) Object Returns the value associated with the supplied style key or null if the value is not defined for this key.
StyleSet reset() Boolean Resets all values on this style to the default (values configured via the gui). Always succeeds.
StyleSet resetValue(key) Boolean Resets value for the given key on this style to the default (values configured via the gui). Returns true if operation succeeds, false if key is invalid.
StyleSet setParent(parentStyle) Boolean Sets the parent style.
StyleSet setValue(key, value) Object Sets the value associated with the supplied style, if value is null, then the value will use the parent's inherited value. Setting null on the root style will return false. Returns true if the set succeeded, such that the key exists and the value is valid for the given key, false otherwise.
Object toJson() String Returns a json representation of this object.

Method Definitions


getDefinedKeys()

Set StyleSet::getDefinedKeys()

Description

Returns a set of keys for style options that are set on this styleset.


getDefinition(key)

StyleOptionDefinition StyleSet::getDefinition(String key)

Description

Returns the definition for a particular style option, including type, name and constaints.

Parameter Definition

Name Type Description
key String 

getKeys()

Set StyleSet::getKeys()

Description

Returns a set of all permissible keys for style options.


getParent()

StyleSet StyleSet::getParent()

Description

Returns the style that this style set inherits from.


getResolvedValue(key)

Object StyleSet::getResolvedValue(String key)

Description

Returns the value associated with the supplied style key, considering inherited parent styles if its not defined by this style. The returned value will be null only when the key is invalid.

Parameter Definition

Name Type Description
key String 

getStyleId()

StyleSet StyleSet::getStyleId()

Description

Returns the style id.


getValue(key)

Object StyleSet::getValue(String key)

Description

Returns the value associated with the supplied style key or null if the value is not defined for this key.

Parameter Definition

Name Type Description
key String 

reset()

Boolean StyleSet::reset()

Description

Resets all values on this style to the default (values configured via the gui). Always succeeds.


resetValue(key)

Boolean StyleSet::resetValue(String key)

Description

Resets value for the given key on this style to the default (values configured via the gui). Returns true if operation succeeds, false if key is invalid.

Parameter Definition

Name Type Description
key String 

setParent(parentStyle)

Boolean StyleSet::setParent(String parentStyle)

Description

Sets the parent style.

Parameter Definition

Name Type Description
parentStyle String 

setValue(key,value)

Object StyleSet::setValue(String key, Object value)

Description

Sets the value associated with the supplied style, if value is null, then the value will use the parent's inherited value. Setting null on the root style will return false. Returns true if the set succeeded, such that the key exists and the value is valid for the given key, false otherwise.

Parameter Definition

Name Type Description
key String 
value Object