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 IsChartgetChart()Returns the chart instanceprotected ExtendedOptionsgetConfiguration()Returns the configuration element.protected ConfigurationOptionsgetOptions()Returns the configuration options.PaddinggetPadding()Returns the padding element.PaddingCallback<ChartContext>getPaddingCallback()Returns the padding callback, if set, otherwisenull.booleanisAutoPadding()Returnstrueto apply automatic padding so visible elements are completely drawn.voidsetAutoPadding(boolean autoPadding)Setstrueto apply automatic padding so visible elements are completely drawn.voidsetPadding(NativeCallback paddingCallback)Sets the padding callback.voidsetPadding(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)
Setstrueto apply automatic padding so visible elements are completely drawn.- Parameters:
autoPadding-trueto apply automatic padding so visible elements are completely drawn
-
isAutoPadding
public boolean isAutoPadding()
Returnstrueto apply automatic padding so visible elements are completely drawn.- Returns:
trueto apply automatic padding so visible elements are completely drawn
-
getPaddingCallback
public PaddingCallback<ChartContext> getPaddingCallback()
Returns the padding callback, if set, otherwisenull.- Specified by:
getPaddingCallbackin interfaceIsScriptablePaddingProvider<ChartContext>- Returns:
- the padding callback, if set, otherwise
null.
-
setPadding
public void setPadding(PaddingCallback<ChartContext> paddingCallback)
Sets the padding callback.- Specified by:
setPaddingin interfaceIsScriptablePaddingProvider<ChartContext>- Parameters:
paddingCallback- the padding callback to set
-
setPadding
public void setPadding(NativeCallback paddingCallback)
Sets the padding callback.- Specified by:
setPaddingin 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
-
-