Class DefaultBar
- java.lang.Object
-
- org.pepstock.charba.client.defaults.globals.DefaultBar
-
- All Implemented Interfaces:
IsDefaultBar,IsDefaultOptionsElement,IsDefaultPointStyleHandler
public final class DefaultBar extends Object implements IsDefaultBar
CHART.JS default values for BAR element.- Author:
- Andrea "Stock" Stocchero
-
-
Field Summary
Fields Modifier and Type Field Description static StringAUTO_INFLATE_AMOUNTValue to store in the CHART.JS configuration when the amount of pixels to inflate the bar rectangles, when drawing, is automatically calculated, "auto".
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBackgroundColorAsString()Returns the background color.StringgetBorderColorAsString()Returns the border color.intgetBorderRadius()Returns the bar border radius (in pixels).BorderSkippedgetBorderSkipped()Returns the edge to skip drawing the border for.intgetBorderWidth()Returns the border width.StringgetHoverBackgroundColorAsString()Returns the background color when hovered.StringgetHoverBorderColorAsString()Returns the border color when hovered.intgetHoverBorderRadius()Returns the bar border radius (in pixels) when hovered.intgetHoverBorderWidth()Returns the border width when hovered.intgetInflateAmount()Returns the amount of pixels to inflate the bar rectangles, when drawing.PointStylegetPointStyle()Returns the style of the point.CanvasgetPointStyleAsCanvas()Returns the style of the point as canvas.
If property is missing or not an canvas, returnsnull.ImggetPointStyleAsImage()Returns the style of the point as image.
If property is missing or not an image, returnsnull.PointStyleTypegetPointStyleType()Returns the type of point style.booleanisAutoInflateAmount()Returnstrueif the amount of pixels to inflate the bar rectangles, when drawing, is automatically calculated.booleanisEnableBorderRadius()Iftrue, it only shows the borderRadius of a bar when the bar is at the end of the stack.-
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.IsDefaultOptionsElement
getBackgroundColorAsString, getBorderColorAsString, getBorderWidth, getHoverBackgroundColorAsString, getHoverBorderColorAsString, getHoverBorderWidth
-
-
-
-
Field Detail
-
AUTO_INFLATE_AMOUNT
public static final String AUTO_INFLATE_AMOUNT
Value to store in the CHART.JS configuration when the amount of pixels to inflate the bar rectangles, when drawing, is automatically calculated, "auto".- See Also:
- Constant Field Values
-
-
Method Detail
-
getBorderSkipped
public BorderSkipped getBorderSkipped()
Description copied from interface:IsDefaultBarReturns the edge to skip drawing the border for.- Specified by:
getBorderSkippedin interfaceIsDefaultBar- Returns:
- the edge to skip drawing the border for.
-
getBorderRadius
public int getBorderRadius()
Description copied from interface:IsDefaultBarReturns the bar border radius (in pixels).- Specified by:
getBorderRadiusin interfaceIsDefaultBar- Returns:
- the bar border radius (in pixels).
-
getPointStyle
public PointStyle getPointStyle()
Description copied from interface:IsDefaultPointStyleHandlerReturns the style of the point.- Specified by:
getPointStylein interfaceIsDefaultPointStyleHandler- Returns:
- the style of the point.
-
getPointStyleType
public PointStyleType getPointStyleType()
Description copied from interface:IsDefaultPointStyleHandlerReturns the type of point style.- Specified by:
getPointStyleTypein interfaceIsDefaultPointStyleHandler- Returns:
- the type of point style
-
getPointStyleAsImage
public Img getPointStyleAsImage()
Description copied from interface:IsDefaultPointStyleHandlerReturns the style of the point as image.
If property is missing or not an image, returnsnull.- Specified by:
getPointStyleAsImagein interfaceIsDefaultPointStyleHandler- Returns:
- image of the style of the point as image.
If property is missing or not a image, returnsnull.
-
getPointStyleAsCanvas
public Canvas getPointStyleAsCanvas()
Description copied from interface:IsDefaultPointStyleHandlerReturns the style of the point as canvas.
If property is missing or not an canvas, returnsnull.- Specified by:
getPointStyleAsCanvasin interfaceIsDefaultPointStyleHandler- Returns:
- image of the style of the point as canvas.
If property is missing or not a canvas, returnsnull.
-
getHoverBorderRadius
public int getHoverBorderRadius()
Description copied from interface:IsDefaultBarReturns the bar border radius (in pixels) when hovered.- Specified by:
getHoverBorderRadiusin interfaceIsDefaultBar- Returns:
- the bar border radius (in pixels) when hovered.
-
isEnableBorderRadius
public boolean isEnableBorderRadius()
Description copied from interface:IsDefaultBarIftrue, it only shows the borderRadius of a bar when the bar is at the end of the stack.- Specified by:
isEnableBorderRadiusin interfaceIsDefaultBar- Returns:
- if
true, it only shows the borderRadius of a bar when the bar is at the end of the stack
-
isAutoInflateAmount
public boolean isAutoInflateAmount()
Description copied from interface:IsDefaultBarReturnstrueif the amount of pixels to inflate the bar rectangles, when drawing, is automatically calculated.- Specified by:
isAutoInflateAmountin interfaceIsDefaultBar- Returns:
trueif the amount of pixels to inflate the bar rectangles, when drawing, is automatically calculated
-
getInflateAmount
public int getInflateAmount()
Description copied from interface:IsDefaultBarReturns the amount of pixels to inflate the bar rectangles, when drawing.- Specified by:
getInflateAmountin interfaceIsDefaultBar- Returns:
- the amount of pixels to inflate the bar rectangles, when drawing
-
getBackgroundColorAsString
public final String getBackgroundColorAsString()
Description copied from interface:IsDefaultOptionsElementReturns the background color.- Specified by:
getBackgroundColorAsStringin interfaceIsDefaultOptionsElement- Returns:
- the background color.
-
getBorderWidth
public final int getBorderWidth()
Description copied from interface:IsDefaultOptionsElementReturns the border width.- Specified by:
getBorderWidthin interfaceIsDefaultOptionsElement- Returns:
- the border width.
-
getBorderColorAsString
public final String getBorderColorAsString()
Description copied from interface:IsDefaultOptionsElementReturns the border color.- Specified by:
getBorderColorAsStringin interfaceIsDefaultOptionsElement- Returns:
- the border color.
-
getHoverBackgroundColorAsString
public String getHoverBackgroundColorAsString()
Description copied from interface:IsDefaultOptionsElementReturns the background color when hovered.- Specified by:
getHoverBackgroundColorAsStringin interfaceIsDefaultOptionsElement- Returns:
- the background color when hovered.
-
getHoverBorderWidth
public int getHoverBorderWidth()
Description copied from interface:IsDefaultOptionsElementReturns the border width when hovered.- Specified by:
getHoverBorderWidthin interfaceIsDefaultOptionsElement- Returns:
- the border width when hovered.
-
getHoverBorderColorAsString
public String getHoverBorderColorAsString()
Description copied from interface:IsDefaultOptionsElementReturns the border color when hovered.- Specified by:
getHoverBorderColorAsStringin interfaceIsDefaultOptionsElement- Returns:
- the border color when hovered.
-
-