Class Segment
- java.lang.Object
-
- org.pepstock.charba.client.configuration.Segment
-
public class Segment extends Object
The segment configuration forLineOptions
.
Line segment styles can be overridden by scriptable options in the segment object.
Currently all of the border* and background color options are supported.
The segment styles are resolved for each section of the line between each point.
null
fallbacks to main line styles.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColorCallback<SegmentContext>
getBackgroundColorCallback()
Returns the background width callback, if set, otherwisenull
.CapStyleCallback<SegmentContext>
getBorderCapStyleCallback()
Returns the border cap-style callback, if set, otherwisenull
.ColorCallback<SegmentContext>
getBorderColorCallback()
Returns the border width callback, if set, otherwisenull
.BorderDashCallback<SegmentContext>
getBorderDashCallback()
Returns the border dash callback, if set, otherwisenull
.BorderDashOffsetCallback<SegmentContext>
getBorderDashOffsetCallback()
Returns the border dash callback, if set, otherwisenull
.JoinStyleCallback<SegmentContext>
getBorderJoinStyleCallback()
Returns the border join-style callback, if set, otherwisenull
.WidthCallback<SegmentContext>
getBorderWidthCallback()
Returns the border width callback, if set, otherwisenull
.IsChart
getChart()
Returns the chart instanceprotected ExtendedOptions
getConfiguration()
Returns the configuration element.protected ConfigurationOptions
getOptions()
Returns the configuration options.void
setBackgroundColor(ColorCallback<SegmentContext> backgroundColorCallback)
Sets the background color callback.void
setBackgroundColor(NativeCallback backgroundColorCallback)
Sets the background color callback.void
setBorderCapStyle(CapStyleCallback<SegmentContext> borderCapStyleCallback)
Sets the border cap-style callback.void
setBorderCapStyle(NativeCallback borderCapStyleCallback)
Sets the border cap-style callback.void
setBorderColor(ColorCallback<SegmentContext> borderColorCallback)
Sets the border color callback.void
setBorderColor(NativeCallback borderColorCallback)
Sets the border color callback.void
setBorderDash(BorderDashCallback<SegmentContext> borderDashCallback)
Sets the border dash callback.void
setBorderDash(NativeCallback borderDashCallback)
Sets the border dash callback.void
setBorderDashOffset(BorderDashOffsetCallback<SegmentContext> borderDashOffsetCallback)
Sets the border dash callback.void
setBorderDashOffset(NativeCallback borderDashOffsetCallback)
Sets the border dash callback.void
setBorderJoinStyle(JoinStyleCallback<SegmentContext> borderJoinStyleCallback)
Sets the border join-style callback.void
setBorderJoinStyle(NativeCallback borderJoinStyleCallback)
Sets the border join-style callback.void
setBorderWidth(NativeCallback borderWidthCallback)
Sets the border width callback.void
setBorderWidth(WidthCallback<SegmentContext> borderWidthCallback)
Sets the border width callback.
-
-
-
Method Detail
-
getBackgroundColorCallback
public ColorCallback<SegmentContext> getBackgroundColorCallback()
Returns the background width callback, if set, otherwisenull
.- Returns:
- the background width callback, if set, otherwise
null
.
-
setBackgroundColor
public void setBackgroundColor(ColorCallback<SegmentContext> backgroundColorCallback)
Sets the background color callback.- Parameters:
backgroundColorCallback
- the background color callback to set
-
setBackgroundColor
public void setBackgroundColor(NativeCallback backgroundColorCallback)
Sets the background color callback.- Parameters:
backgroundColorCallback
- the background color callback to set
-
getBorderWidthCallback
public WidthCallback<SegmentContext> getBorderWidthCallback()
Returns the border width callback, if set, otherwisenull
.- Returns:
- the border width callback, if set, otherwise
null
.
-
setBorderWidth
public void setBorderWidth(WidthCallback<SegmentContext> borderWidthCallback)
Sets the border width callback.- Parameters:
borderWidthCallback
- the border width callback to set
-
setBorderWidth
public void setBorderWidth(NativeCallback borderWidthCallback)
Sets the border width callback.- Parameters:
borderWidthCallback
- the border width callback to set
-
getBorderColorCallback
public ColorCallback<SegmentContext> getBorderColorCallback()
Returns the border width callback, if set, otherwisenull
.- Returns:
- the border width callback, if set, otherwise
null
.
-
setBorderColor
public void setBorderColor(ColorCallback<SegmentContext> borderColorCallback)
Sets the border color callback.- Parameters:
borderColorCallback
- the border color callback to set
-
setBorderColor
public void setBorderColor(NativeCallback borderColorCallback)
Sets the border color callback.- Parameters:
borderColorCallback
- the border color callback to set
-
getBorderCapStyleCallback
public CapStyleCallback<SegmentContext> getBorderCapStyleCallback()
Returns the border cap-style callback, if set, otherwisenull
.- Returns:
- the border cap-style callback, if set, otherwise
null
.
-
setBorderCapStyle
public void setBorderCapStyle(CapStyleCallback<SegmentContext> borderCapStyleCallback)
Sets the border cap-style callback.- Parameters:
borderCapStyleCallback
- the border cap-style callback to set
-
setBorderCapStyle
public void setBorderCapStyle(NativeCallback borderCapStyleCallback)
Sets the border cap-style callback.- Parameters:
borderCapStyleCallback
- the border cap-style callback to set
-
getBorderJoinStyleCallback
public JoinStyleCallback<SegmentContext> getBorderJoinStyleCallback()
Returns the border join-style callback, if set, otherwisenull
.- Returns:
- the border join-style callback, if set, otherwise
null
.
-
setBorderJoinStyle
public void setBorderJoinStyle(JoinStyleCallback<SegmentContext> borderJoinStyleCallback)
Sets the border join-style callback.- Parameters:
borderJoinStyleCallback
- the border join-style callback to set
-
setBorderJoinStyle
public void setBorderJoinStyle(NativeCallback borderJoinStyleCallback)
Sets the border join-style callback.- Parameters:
borderJoinStyleCallback
- the border join-style callback to set
-
getBorderDashCallback
public BorderDashCallback<SegmentContext> getBorderDashCallback()
Returns the border dash callback, if set, otherwisenull
.- Returns:
- the border dash callback, if set, otherwise
null
.
-
setBorderDash
public void setBorderDash(BorderDashCallback<SegmentContext> borderDashCallback)
Sets the border dash callback.- Parameters:
borderDashCallback
- the border dash callback to set
-
setBorderDash
public void setBorderDash(NativeCallback borderDashCallback)
Sets the border dash callback.- Parameters:
borderDashCallback
- the border dash callback to set
-
getBorderDashOffsetCallback
public BorderDashOffsetCallback<SegmentContext> getBorderDashOffsetCallback()
Returns the border dash callback, if set, otherwisenull
.- Returns:
- the border dash callback, if set, otherwise
null
.
-
setBorderDashOffset
public void setBorderDashOffset(BorderDashOffsetCallback<SegmentContext> borderDashOffsetCallback)
Sets the border dash callback.- Parameters:
borderDashOffsetCallback
- the border dash callback to set
-
setBorderDashOffset
public void setBorderDashOffset(NativeCallback borderDashOffsetCallback)
Sets the border dash callback.- Parameters:
borderDashOffsetCallback
- the border dash 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
-
-