Package org.swtchart
Interface IBarSeries
- All Superinterfaces:
ISeries
- All Known Implementing Classes:
BarSeries
Bar series.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.swtchart.ISeries
ISeries.SeriesType
-
Method Summary
Modifier and TypeMethodDescriptionColor
Gets the bar color.int
Gets the bar padding in percentage.int
Gets the bar width in pixels.Gets the bar width style.Rectangle[]
Gets the array of bar rectangles.void
setBarColor
(Color color) Sets the bar color.void
setBarPadding
(int padding) Sets the bar padding in percentage.void
setBarWidth
(int width) Sets the bar width in pixels.void
Sets the bar width style.Methods inherited from interface org.swtchart.ISeries
addDisposeListener, enableStack, getDescription, getId, getLabel, getPixelCoordinates, getType, getXAxisId, getXDateSeries, getXErrorBar, getXSeries, getYAxisId, getYErrorBar, getYSeries, isStackEnabled, isVisible, isVisibleInLegend, setDescription, setVisible, setVisibleInLegend, setXAxisId, setXDateSeries, setXSeries, setYAxisId, setYSeries
-
Method Details
-
getBarWidthStyle
Gets the bar width style.- Parameters:
style
- the bar width style- Returns:
- the bar width style
-
setBarWidthStyle
Sets the bar width style. The default is BarWidthStyle.STRETCHED .- Parameters:
style
- the bar width style
-
getBarWidth
int getBarWidth()Gets the bar width in pixels.- Returns:
- the bar width in pixels
-
setBarWidth
void setBarWidth(int width) Sets the bar width in pixels. The specified bar width is active only when the bar width style is set to BarWidthStyle.FIXED.- Parameters:
width
- the bar width in pixels
-
getBarPadding
int getBarPadding()Gets the bar padding in percentage.- Returns:
- the bar padding in percentage
-
setBarPadding
void setBarPadding(int padding) Sets the bar padding in percentage. The specified padding is active only when the bar width style is set to BarWidthStyle.STRETCHED.- Parameters:
padding
- the bar padding in percentage
-
getBarColor
Color getBarColor()Gets the bar color.- Returns:
- the bar color
-
setBarColor
void setBarColor(Color color) Sets the bar color. If null is given, default color will be set.- Parameters:
color
- the bar color
-
getBounds
Rectangle[] getBounds()Gets the array of bar rectangles. This method is typically used for mouse listener to check whether mouse cursor is on bar.The returned array has the same size as data points. Depending on X axis range, some bars can be out of screen. In this case, the rectangles for invisible bars will be null in the returned array.
- Returns:
- the array of bar rectangles in pixels.
-