T
- The type of styleable object.public abstract class StyleBase<T extends com.scichart.core.framework.ISuspendable> extends java.lang.Object implements IStyle<T>
Modifier | Constructor and Description |
---|---|
protected |
StyleBase(java.lang.Class<T> styleableObjectType)
Creates a new instance of
StyleBase class. |
Modifier and Type | Method and Description |
---|---|
void |
applyStyle(T styleableObject)
Applies this style to specified styleable object.
|
protected abstract void |
applyStyleInternal(T styleableObject)
Applies this style to specified styleable object.
|
void |
discardStyle(T styleableObject)
Discards this style on specified styleable object.
|
protected abstract void |
discardStyleInternal(T objectToStyle)
Discards this style on specified styleable object.
|
protected <TProperty> |
getPropertyValue(T objectToStyle,
java.lang.String propertyName,
java.lang.Class<TProperty> propertyType)
Reads the specified property from internal property storage.
|
java.lang.Class<? extends T> |
getStyleableObjectType()
Gets the target styleable object type.
|
protected <TProperty> |
putPropertyValue(T objectToStyle,
java.lang.String propertyName,
TProperty propertyValue)
Saves the specified property into internal property storage.
|
public final java.lang.Class<? extends T> getStyleableObjectType()
getStyleableObjectType
in interface IStyle<T extends com.scichart.core.framework.ISuspendable>
public final void applyStyle(T styleableObject)
applyStyle
in interface IStyle<T extends com.scichart.core.framework.ISuspendable>
styleableObject
- The target styleable object.protected abstract void applyStyleInternal(T styleableObject)
styleableObject
- The styleable object instance.public final void discardStyle(T styleableObject)
discardStyle
in interface IStyle<T extends com.scichart.core.framework.ISuspendable>
styleableObject
- The target styleable object.protected abstract void discardStyleInternal(T objectToStyle)
objectToStyle
- The styleable object instance.protected final <TProperty> void putPropertyValue(T objectToStyle, java.lang.String propertyName, TProperty propertyValue)
TProperty
- The type of value.objectToStyle
- The target styleable object.propertyName
- The property name to save.propertyValue
- The property value to save.protected final <TProperty> TProperty getPropertyValue(T objectToStyle, java.lang.String propertyName, java.lang.Class<TProperty> propertyType)
TProperty
- The type of value.objectToStyle
- The target styleable object.propertyName
- The property name to save.propertyType
- The type of value.