org.jfree.chart.renderer.xy
public class XYBlockRenderer extends AbstractXYItemRenderer implements XYItemRenderer, Cloneable, PublicCloneable, Serializable
XYBlockChartDemo1.java
program included in the JFreeChart
demo collection:
Since: 1.0.4
Constructor Summary | |
---|---|
XYBlockRenderer()
Creates a new XYBlockRenderer instance with default
attributes. |
Method Summary | |
---|---|
Object | clone()
Returns a clone of this renderer.
|
void | drawItem(Graphics2D g2, XYItemRendererState state, Rectangle2D dataArea, PlotRenderingInfo info, XYPlot plot, ValueAxis domainAxis, ValueAxis rangeAxis, XYDataset dataset, int series, int item, CrosshairState crosshairState, int pass)
Draws the block representing the specified item.
|
boolean | equals(Object obj)
Tests this XYBlockRenderer for equality with an arbitrary
object. |
Range | findDomainBounds(XYDataset dataset)
Returns the lower and upper bounds (range) of the x-values in the
specified dataset.
|
Range | findRangeBounds(XYDataset dataset)
Returns the range of values the renderer requires to display all the
items from the specified dataset.
|
RectangleAnchor | getBlockAnchor()
Returns the anchor point used to align a block at its (x, y) location.
|
double | getBlockHeight()
Returns the block height, in data/axis units.
|
double | getBlockWidth()
Returns the block width, in data/axis units.
|
PaintScale | getPaintScale()
Returns the paint scale used by the renderer.
|
void | setBlockAnchor(RectangleAnchor anchor)
Sets the anchor point used to align a block at its (x, y) location and
sends a RendererChangeEvent to all registered listeners.
|
void | setBlockHeight(double height)
Sets the height of the blocks used to represent each data item and
sends a RendererChangeEvent to all registered listeners.
|
void | setBlockWidth(double width)
Sets the width of the blocks used to represent each data item and
sends a RendererChangeEvent to all registered listeners.
|
void | setPaintScale(PaintScale scale)
Sets the paint scale used by the renderer and sends a
RendererChangeEvent to all registered listeners.
|
XYBlockRenderer
instance with default
attributes.Returns: A clone of this renderer.
Throws: CloneNotSupportedException if there is a problem creating the clone.
Parameters: g2 the graphics device. state the state. dataArea the data area. info the plot rendering info. plot the plot. domainAxis the x-axis. rangeAxis the y-axis. dataset the dataset. series the series index. item the item index. crosshairState the crosshair state. pass the pass index.
XYBlockRenderer
for equality with an arbitrary
object. This method returns true
if and only if:
obj
is an instance of XYBlockRenderer
(not
null
);obj
has the same field values as this
XYBlockRenderer
;Parameters: obj the object (null
permitted).
Returns: A boolean.
Parameters: dataset the dataset (null
permitted).
Returns: The range (null
if the dataset is null
or empty).
See Also: findRangeBounds
Parameters: dataset the dataset (null
permitted).
Returns: The range (null
if the dataset is null
or empty).
See Also: findDomainBounds
Returns: The anchor point (never null
).
See Also: setBlockAnchor
Returns: The block height.
See Also: XYBlockRenderer
Returns: The block width.
See Also: XYBlockRenderer
Returns: The paint scale (never null
).
Since: 1.0.4
See Also: setPaintScale
Parameters: anchor the anchor.
See Also: getBlockAnchor
Parameters: height the new height, in data/axis units (must be > 0.0).
See Also: getBlockHeight
Parameters: width the new width, in data/axis units (must be > 0.0).
See Also: getBlockWidth
Parameters: scale the scale (null
not permitted).
Since: 1.0.4
See Also: getPaintScale