|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.chart.render.AbstractRenderer com.jidesoft.chart.render.AbstractBarRenderer com.jidesoft.chart.render.RaisedBarRenderer
public class RaisedBarRenderer
A Bar Renderer that makes the bar appear to be raised out of the screen like a candy bar.
This renderer takes account of negative heights. If a negative height is supplied, then the y coordinate and height are adjusted so that the height becomes positive and the shape is paintable.
NOTE: Widths are currently assumed to be positive
Field Summary |
---|
Fields inherited from class com.jidesoft.chart.render.AbstractRenderer |
---|
alwaysShowOutlines, PROPERTY_OUTLINE_WIDTH, ROLLOVER_INTENSITY, support |
Constructor Summary | |
---|---|
RaisedBarRenderer()
|
|
RaisedBarRenderer(int edgeSize)
Create a RaisedBarRenderer using the supplied edge size |
Method Summary | |
---|---|
protected Paint |
createBottomPaint(Orientation orientation,
Color color,
int x,
int y,
int width,
int edgeSize)
Create a Paint to use for the bottom part of the bar |
protected Paint |
createLeftPaint(Orientation orientation,
Color color,
int x,
int y,
int width,
int edgeSize)
Create a Paint to use for the left part of the bar |
protected Paint |
createLowerTopPaint(Orientation orientation,
Color color,
int x,
int y,
int width,
int edgeSize)
Create a Paint to use for the lower half of the top of the bar |
protected Paint |
createRightPaint(Orientation orientation,
Color color,
int x,
int y,
int width,
int edgeSize)
Create a Paint to use for the right part of the bar |
protected Paint |
createUpperTopPaint(Orientation orientation,
Color color,
int x,
int y,
int width,
int edgeSize)
Create a Paint to use for the upper half of the top of the bar |
int |
getEdgeSize()
|
int |
getMinimumBreadth()
|
Shape |
renderBar(Graphics2D g,
Chart chart,
ChartModel m,
Chartable p,
boolean isSelected,
boolean hasRollover,
boolean hasFocus,
double x,
double y,
double width,
double height)
There is one call to this method for each bar to be rendered in a bar chart. |
Shape |
renderBar(Graphics g,
Chart chart,
ChartModel m,
Chartable p,
boolean isSelected,
boolean hasRollover,
boolean hasFocus,
int x,
int y,
int width,
int height)
There is one call to this method for each bar to be rendered in a bar chart. |
void |
setEdgeSize(int edgeSize)
Specify the size, in pixels, of the edge effect that gives the raised bars their 'candy bar' appearance. |
Methods inherited from class com.jidesoft.chart.render.AbstractBarRenderer |
---|
computeLabel, createBarPaint, getBarColor, getLabelStyle, getPointLabeler, isLabelsVisible, isZeroHeightBarsVisible, renderBarLabel, setLabelStyle, setLabelsVisible, setPointLabeler, setZeroHeightBarsVisible |
Methods inherited from class com.jidesoft.chart.render.AbstractRenderer |
---|
addPropertyChangeListener, getOutlineColor, getOutlineWidth, getSelectionColor, isAlwaysShowOutlines, removePropertyChangeListener, setAlwaysShowOutlines, setOutlineColor, setOutlineWidth, setSelectionColor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RaisedBarRenderer()
public RaisedBarRenderer(int edgeSize)
edgeSize
- the edge size for the raised effectMethod Detail |
---|
public int getEdgeSize()
public void setEdgeSize(int edgeSize)
edgeSize
- the new edge sizepublic Shape renderBar(Graphics2D g, Chart chart, ChartModel m, Chartable p, boolean isSelected, boolean hasRollover, boolean hasFocus, double x, double y, double width, double height)
renderBar
in interface BarRenderer2D
g
- the graphics context onto which the bar is drawnchart
- the chart objectm
- the chart model from which the bar/point comesp
- the point of the model corresponding to the barisSelected
- whether the bar is currently selectedhasRollover
- whether the bar currently is under the mouse cursorhasFocus
- whether the bar currently has focus (not yet supported)x
- the x pixel coordinate for the top left of the bary
- the y pixel coordinate for the top left of the barwidth
- the width of the bar in pixelsheight
- the height of the bar in pixelspublic Shape renderBar(Graphics g, Chart chart, ChartModel m, Chartable p, boolean isSelected, boolean hasRollover, boolean hasFocus, int x, int y, int width, int height)
renderBar
in interface BarRenderer
g
- the graphics context onto which the bar is drawnchart
- the chart objectm
- the chart model from which the bar/point comesp
- the point of the model corresponding to the barisSelected
- whether the bar is currently selectedhasRollover
- whether the bar currently is under the mouse cursorhasFocus
- whether the bar currently has focus (not yet supported)x
- the x pixel coordinate for the top left of the bary
- the y pixel coordinate for the top left of the barwidth
- the width of the bar in pixelsheight
- the height of the bar in pixelsprotected Paint createUpperTopPaint(Orientation orientation, Color color, int x, int y, int width, int edgeSize)
protected Paint createLowerTopPaint(Orientation orientation, Color color, int x, int y, int width, int edgeSize)
protected Paint createBottomPaint(Orientation orientation, Color color, int x, int y, int width, int edgeSize)
protected Paint createLeftPaint(Orientation orientation, Color color, int x, int y, int width, int edgeSize)
protected Paint createRightPaint(Orientation orientation, Color color, int x, int y, int width, int edgeSize)
public int getMinimumBreadth()
getMinimumBreadth
in interface BarRenderer
getMinimumBreadth
in interface BarRenderer2D
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |