Package org.pepstock.charba.client.geo
Class Margin
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.geo.Margin
-
public final class Margin extends NativeObjectContainer
Defines the margin pixels for legend such that it doesn't stick to the edge of the chart .- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Constructor Description Margin()
Creates an empty margin object.Margin(int topBottom, int leftRight)
Creates an margin setting top-bottom and left-right initial values.Margin(int top, int right, int bottom, int left)
Creates an margin setting top-bottom and left-right initial values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBottom()
Returns the margin bottom of legend.int
getLeft()
Returns the margin left of legend.int
getRight()
Returns the margin right of legend.int
getTop()
Returns the margin top of legend.void
setBottom(int bottom)
Sets the margin bottom of legend.void
setLeft(int left)
Sets the margin left of legend.void
setRight(int right)
Sets the margin right of legend.void
setTop(int top)
Sets the margin top of legend.-
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, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Constructor Detail
-
Margin
public Margin()
Creates an empty margin object.
-
Margin
public Margin(int topBottom, int leftRight)
Creates an margin setting top-bottom and left-right initial values.- Parameters:
topBottom
- a values to set top and bottom dimensionsleftRight
- a values to set left and right dimensions
-
Margin
public Margin(int top, int right, int bottom, int left)
Creates an margin setting top-bottom and left-right initial values.- Parameters:
top
- a values to set top dimensionright
- a values to set right dimensionbottom
- a values to set bottom dimensionleft
- a values to set left dimension
-
-
Method Detail
-
setTop
public void setTop(int top)
Sets the margin top of legend.- Parameters:
top
- the margin top of legend.
-
getTop
public int getTop()
Returns the margin top of legend.- Returns:
- the margin top of legend.
-
setRight
public void setRight(int right)
Sets the margin right of legend.- Parameters:
right
- the margin right of legend.
-
getRight
public int getRight()
Returns the margin right of legend.- Returns:
- the margin right of legend.
-
setBottom
public void setBottom(int bottom)
Sets the margin bottom of legend.- Parameters:
bottom
- the margin bottom of legend.
-
getBottom
public int getBottom()
Returns the margin bottom of legend.- Returns:
- the margin bottom of legend.
-
setLeft
public void setLeft(int left)
Sets the margin left of legend.- Parameters:
left
- the margin left of legend.
-
getLeft
public int getLeft()
Returns the margin left of legend.- Returns:
- the margin left of legend.
-
-