Class MatrixElementOptions
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.items.ChartElementOptions
-
- org.pepstock.charba.client.items.CommonElementOptions
-
- org.pepstock.charba.client.matrix.MatrixElementOptions
-
public final class MatrixElementOptions extends CommonElementOptions
Maps the out-of-the-box CHART.JS element options used to represents boxes for matrix on the charts.- Author:
- Andrea "Stock" Stocchero
-
-
Field Summary
Fields Modifier and Type Field Description static ElementFactory<MatrixElementOptions>
FACTORY
Element factory to get ""matrix"" element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BarBorderRadius
getBarBorderRadius()
Returns the border radius of the dataset item in pixels asBarBorderRadius
.int
getBorderRadius()
Returns the bar border radius (in pixels).int
getBorderWidth()
Returns the border width of the dataset item in pixels.BarBorderWidth
getBorderWidthAsObject()
Returns the border width of the dataset item in pixels asBarBorderWidth
.protected int
getDefaultBorderWidth()
This method must be overrided by all element where the border width is stored in different object.double
getHeight()
Returns the height of matrix element in pixels.double
getWidth()
Returns the width of matrix element in pixels.Anchor
getXAnchor()
Returns the anchor point on X orientation of matrix element.Anchor
getYAnchor()
Returns the anchor point on Y orientation of matrix element.boolean
isBorderRadiusAsObject()
Returnstrue
if the border width is defined asBarBorderRadius
.boolean
isBorderWidthAsObject()
Returnstrue
if the border width is defined asBarBorderWidth
.void
setBorderRadius(int borderRadius)
Sets the border radius (in pixels).void
setBorderRadius(BarBorderRadius borderRadius)
Sets the border radius (in pixels).void
setBorderWidth(BarBorderWidth borderWidth)
Sets the border width (in pixels).void
setHeight(double height)
Sets the height of matrix element in pixels.void
setWidth(double width)
Sets the width of matrix element in pixels.void
setXAnchor(Anchor anchor)
Sets the anchor point on X orientation of matrix element.void
setYAnchor(Anchor anchor)
Sets the anchor point on Y orientation of matrix element.-
Methods inherited from class org.pepstock.charba.client.items.CommonElementOptions
createTooltipLabelColor, getBackgroundColor, getBackgroundColorAsCanvasGradient, getBackgroundColorAsCanvasPattern, getBackgroundColorAsGradient, getBackgroundColorAsPattern, getBackgroundColorAsString, getBorderColor, getBorderColorAsCanvasGradient, getBorderColorAsGradient, getBorderColorAsString, inRange, inXRange, inYRange, isBackgroundColorAsColor, isBackgroundColorAsGradient, isBackgroundColorAsPattern, isBorderColorAsColor, isBorderColorAsGradient, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBorderColor, setBorderColor, setBorderColor, setBorderWidth
-
Methods inherited from class org.pepstock.charba.client.commons.AbstractNode
checkAndAddToParent, getChildKey, getParentNode, getRootNode, getUpdateListener, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setUpdateListener, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkAndGetColor, 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, 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
-
-
-
-
Field Detail
-
FACTORY
public static final ElementFactory<MatrixElementOptions> FACTORY
Element factory to get ""matrix"" element.
-
-
Method Detail
-
getDefaultBorderWidth
protected int getDefaultBorderWidth()
Description copied from class:CommonElementOptions
This method must be overrided by all element where the border width is stored in different object.- Overrides:
getDefaultBorderWidth
in classCommonElementOptions
- Returns:
- an undefined integer
-
getHeight
public double getHeight()
Returns the height of matrix element in pixels.- Returns:
- the height of matrix element in pixels
-
setHeight
public void setHeight(double height)
Sets the height of matrix element in pixels.- Parameters:
height
- the height of matrix element in pixels
-
getWidth
public double getWidth()
Returns the width of matrix element in pixels.- Returns:
- the width of matrix element in pixels.
-
setWidth
public void setWidth(double width)
Sets the width of matrix element in pixels.- Parameters:
width
- the width of matrix element in pixels
-
getXAnchor
public Anchor getXAnchor()
Returns the anchor point on X orientation of matrix element.- Returns:
- the anchor point on X orientation of matrix element
-
setXAnchor
public void setXAnchor(Anchor anchor)
Sets the anchor point on X orientation of matrix element.- Parameters:
anchor
- the anchor point on X orientation of matrix element
-
getYAnchor
public Anchor getYAnchor()
Returns the anchor point on Y orientation of matrix element.- Returns:
- the anchor point on Y orientation of matrix element
-
setYAnchor
public void setYAnchor(Anchor anchor)
Sets the anchor point on Y orientation of matrix element.- Parameters:
anchor
- the anchor point on Y orientation of matrix element
-
getBorderRadius
public int getBorderRadius()
Returns the bar border radius (in pixels).- Returns:
- the bar border radius (in pixels).
-
isBorderRadiusAsObject
public boolean isBorderRadiusAsObject()
Returnstrue
if the border width is defined asBarBorderRadius
.- Returns:
true
if the border width is defined asBarBorderRadius
-
getBarBorderRadius
public BarBorderRadius getBarBorderRadius()
Returns the border radius of the dataset item in pixels asBarBorderRadius
.- Returns:
- the border radius of the dataset item in pixels as
BarBorderRadius
.
-
setBorderRadius
public void setBorderRadius(int borderRadius)
Sets the border radius (in pixels).- Parameters:
borderRadius
- the border radius (in pixels).
-
setBorderRadius
public void setBorderRadius(BarBorderRadius borderRadius)
Sets the border radius (in pixels).- Parameters:
borderRadius
- the border radius (in pixels).
-
getBorderWidth
public int getBorderWidth()
Returns the border width of the dataset item in pixels.- Overrides:
getBorderWidth
in classCommonElementOptions
- Returns:
- the border width of the dataset item in pixels.
-
getBorderWidthAsObject
public BarBorderWidth getBorderWidthAsObject()
Returns the border width of the dataset item in pixels asBarBorderWidth
.- Returns:
- the border width of the dataset item in pixels as
BarBorderWidth
.
-
isBorderWidthAsObject
public boolean isBorderWidthAsObject()
Returnstrue
if the border width is defined asBarBorderWidth
.- Returns:
true
if the border width is defined asBarBorderWidth
-
setBorderWidth
public void setBorderWidth(BarBorderWidth borderWidth)
Sets the border width (in pixels).- Parameters:
borderWidth
- the border width (in pixels).
-
-