Class AbstractScriptablePadding<T extends ChartContext>
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.options.AbstractPadding
-
- org.pepstock.charba.client.options.AbstractScriptablePadding<T>
-
- Type Parameters:
T
- type of scriptable context
- All Implemented Interfaces:
IsDefaultPadding
,IsPadding
public abstract class AbstractScriptablePadding<T extends ChartContext> extends AbstractPadding
Object can be provided with additional configuration by callbacks to define padding options at runtime, and with the possibility to resetPaddingCallback
if theIsScriptablePaddingProvider
instance has been set with aPaddingCallback
.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractScriptablePadding(IsScriptablePaddingProvider<T> scriptablePaddingProvider, IsDefaultPadding defaultValues)
Creates an empty padding to use for chart configuration.protected
AbstractScriptablePadding(IsScriptablePaddingProvider<T> scriptablePaddingProvider, IsDefaultPadding defaultValues, NativeObject nativeObject)
Creates a padding to use for chart configuration, wrapping a native object instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
resetCallback()
Invokes when any property of the padding is being set, in order to reset thePaddingCallback
if existsvoid
setBottom(int value)
Sets the padding bottom in pixel.void
setLeft(int value)
Sets the padding left in pixel.void
setRight(int value)
Sets the padding right in pixel.void
setTop(int value)
Sets the padding top in pixel.-
Methods inherited from class org.pepstock.charba.client.options.AbstractPadding
getBottom, getLeft, getObject, getRight, getTop
-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pepstock.charba.client.defaults.IsDefaultPadding
create, create
-
-
-
-
Constructor Detail
-
AbstractScriptablePadding
protected AbstractScriptablePadding(IsScriptablePaddingProvider<T> scriptablePaddingProvider, IsDefaultPadding defaultValues)
Creates an empty padding to use for chart configuration.- Parameters:
scriptablePaddingProvider
- the provider of padding callbackdefaultValues
- default provider
-
AbstractScriptablePadding
protected AbstractScriptablePadding(IsScriptablePaddingProvider<T> scriptablePaddingProvider, IsDefaultPadding defaultValues, NativeObject nativeObject)
Creates a padding to use for chart configuration, wrapping a native object instance.- Parameters:
scriptablePaddingProvider
- the provider of padding callbackdefaultValues
- default providernativeObject
- native object to map java script properties
-
-
Method Detail
-
setLeft
public void setLeft(int value)
Description copied from class:AbstractPadding
Sets the padding left in pixel.- Specified by:
setLeft
in interfaceIsPadding
- Overrides:
setLeft
in classAbstractPadding
- Parameters:
value
- the padding left in pixel.
-
setRight
public void setRight(int value)
Description copied from class:AbstractPadding
Sets the padding right in pixel.- Specified by:
setRight
in interfaceIsPadding
- Overrides:
setRight
in classAbstractPadding
- Parameters:
value
- the padding right in pixel.
-
setTop
public void setTop(int value)
Description copied from class:AbstractPadding
Sets the padding top in pixel.- Specified by:
setTop
in interfaceIsPadding
- Overrides:
setTop
in classAbstractPadding
- Parameters:
value
- the padding top in pixel.
-
setBottom
public void setBottom(int value)
Description copied from class:AbstractPadding
Sets the padding bottom in pixel.- Specified by:
setBottom
in interfaceIsPadding
- Overrides:
setBottom
in classAbstractPadding
- Parameters:
value
- the padding bottom in pixel.
-
resetCallback
protected void resetCallback()
Invokes when any property of the padding is being set, in order to reset thePaddingCallback
if exists
-
-