Class Layout
- java.lang.Object
-
- org.pepstock.charba.client.configuration.Layout
-
- All Implemented Interfaces:
IsScriptablePaddingProvider<ChartContext>
public class Layout extends Object implements IsScriptablePaddingProvider<ChartContext>
The layout configuration is needed to set the padding.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IsChart
getChart()
Returns the chart instanceprotected ExtendedOptions
getConfiguration()
Returns the configuration element.protected ConfigurationOptions
getOptions()
Returns the configuration options.Padding
getPadding()
Returns the padding element.PaddingCallback<ChartContext>
getPaddingCallback()
Returns the padding callback, if set, otherwisenull
.boolean
isAutoPadding()
Returnstrue
to apply automatic padding so visible elements are completely drawn.void
setAutoPadding(boolean autoPadding)
Setstrue
to apply automatic padding so visible elements are completely drawn.void
setPadding(NativeCallback paddingCallback)
Sets the padding callback.void
setPadding(PaddingCallback<ChartContext> paddingCallback)
Sets the padding callback.
-
-
-
Method Detail
-
getPadding
public Padding getPadding()
Returns the padding element.- Returns:
- the padding
-
setAutoPadding
public void setAutoPadding(boolean autoPadding)
Setstrue
to apply automatic padding so visible elements are completely drawn.- Parameters:
autoPadding
-true
to apply automatic padding so visible elements are completely drawn
-
isAutoPadding
public boolean isAutoPadding()
Returnstrue
to apply automatic padding so visible elements are completely drawn.- Returns:
true
to apply automatic padding so visible elements are completely drawn
-
getPaddingCallback
public PaddingCallback<ChartContext> getPaddingCallback()
Returns the padding callback, if set, otherwisenull
.- Specified by:
getPaddingCallback
in interfaceIsScriptablePaddingProvider<ChartContext>
- Returns:
- the padding callback, if set, otherwise
null
.
-
setPadding
public void setPadding(PaddingCallback<ChartContext> paddingCallback)
Sets the padding callback.- Specified by:
setPadding
in interfaceIsScriptablePaddingProvider<ChartContext>
- Parameters:
paddingCallback
- the padding callback to set
-
setPadding
public void setPadding(NativeCallback paddingCallback)
Sets the padding callback.- Specified by:
setPadding
in interfaceIsScriptablePaddingProvider<ChartContext>
- Parameters:
paddingCallback
- the padding callback to set
-
getOptions
protected final ConfigurationOptions getOptions()
Returns the configuration options.- Returns:
- the configuration options.
-
getConfiguration
protected final ExtendedOptions getConfiguration()
Returns the configuration element.- Returns:
- the configuration element.
-
getChart
public final IsChart getChart()
Returns the chart instance- Returns:
- the chart
-
-