Package org.swtchart
Interface IBarSeries
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
IBarSeries.BarWidthStyle
Bar width style.-
Nested classes/interfaces inherited from interface org.swtchart.ISeries
ISeries.SeriesType
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Color
getBarColor()
Gets the bar color.int
getBarPadding()
Gets the bar padding in percentage.int
getBarWidth()
Gets the bar width in pixels.IBarSeries.BarWidthStyle
getBarWidthStyle(IBarSeries.BarWidthStyle style)
Gets the bar width style.Rectangle[]
getBounds()
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
setBarWidthStyle(IBarSeries.BarWidthStyle style)
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 Detail
-
getBarWidthStyle
IBarSeries.BarWidthStyle getBarWidthStyle(IBarSeries.BarWidthStyle style)
Gets the bar width style.- Parameters:
style
- the bar width style- Returns:
- the bar width style
-
setBarWidthStyle
void setBarWidthStyle(IBarSeries.BarWidthStyle style)
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.
-
-