|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.chart.plot.Plot
org.jfree.chart.plot.CategoryPlot
A general plotting class that uses data from a CategoryDataset
and renders each data
item using a CategoryItemRenderer
.
Field Summary | |
static boolean |
DEFAULT_DOMAIN_GRIDLINES_VISIBLE
The default visibility of the grid lines plotted against the domain axis. |
static java.awt.Paint |
DEFAULT_GRIDLINE_PAINT
The default grid line paint. |
static java.awt.Stroke |
DEFAULT_GRIDLINE_STROKE
The default grid line stroke. |
static boolean |
DEFAULT_RANGE_GRIDLINES_VISIBLE
The default visibility of the grid lines plotted against the range axis. |
static java.awt.Font |
DEFAULT_VALUE_LABEL_FONT
The default value label font. |
protected static java.util.ResourceBundle |
localizationResources
The resourceBundle for the localization. |
Fields inherited from class org.jfree.chart.plot.Plot |
DEFAULT_BACKGROUND_ALPHA, DEFAULT_BACKGROUND_PAINT, DEFAULT_FOREGROUND_ALPHA, DEFAULT_INSETS, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, MINIMUM_HEIGHT_TO_DRAW, MINIMUM_WIDTH_TO_DRAW, ZERO |
Constructor Summary | |
CategoryPlot()
Default constructor. |
|
CategoryPlot(CategoryDataset dataset,
CategoryAxis domainAxis,
ValueAxis rangeAxis,
CategoryItemRenderer renderer)
Creates a new plot. |
Method Summary | |
void |
addAnnotation(CategoryAnnotation annotation)
Adds an annotation to the plot. |
void |
addRangeMarker(Marker marker)
Adds a marker for display against the range axis. |
void |
addRangeMarker(Marker marker,
org.jfree.ui.Layer layer)
Adds a marker for display against the range axis. |
void |
addSecondaryRangeMarker(int index,
Marker marker,
org.jfree.ui.Layer layer)
Adds a marker for display against the secondary range axis. |
void |
addSecondaryRangeMarker(Marker marker)
Deprecated. Use addSecondaryRangeMarker(int, Marker, Layer). |
protected AxisSpace |
calculateAxisSpace(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea)
Calculates the space required for the axes. |
protected AxisSpace |
calculateDomainAxisSpace(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
AxisSpace space)
Calculates the space required for the domain axis/axes. |
protected AxisSpace |
calculateRangeAxisSpace(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
AxisSpace space)
Calculates the space required for the range axis/axes. |
void |
clearRangeMarkers()
Clears all the range markers for the plot. |
void |
clearSecondaryDomainAxes()
Clears the secondary domain axes from the plot. |
void |
clearSecondaryRangeAxes()
Clears the secondary range axes from the plot. |
void |
clearSecondaryRangeMarkers()
Deprecated. Use clearSecondaryRangeMarkers(int). |
void |
clearSecondaryRangeMarkers(int index)
Clears all the secondary range markers for the plot. |
java.lang.Object |
clone()
Returns a clone of the plot. |
void |
configureSecondaryDomainAxes()
Configures the secondary domain axes. |
void |
configureSecondaryRangeAxes()
Configures the secondary range axes. |
void |
datasetChanged(DatasetChangeEvent event)
Receives notification of a change to the plot's dataset. |
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
PlotState parentState,
PlotRenderingInfo state)
Draws the plot on a Java 2D graphics device (such as the screen or a printer). |
protected void |
drawAnnotations(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea)
Draws the annotations... |
protected java.util.Map |
drawAxes(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D dataArea)
A utility method for drawing the plot's axes. |
protected void |
drawDomainGridlines(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea)
Draws the gridlines for the plot. |
protected void |
drawRangeGridlines(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
java.util.List ticks)
Draws the gridlines for the plot. |
protected void |
drawRangeLine(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
double value,
java.awt.Stroke stroke,
java.awt.Paint paint)
Utility method for drawing a line perpendicular to the range axis (used for crosshairs). |
protected void |
drawRangeMarkers(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
org.jfree.ui.Layer layer)
Draws the range markers (if any) for the specified layer. |
protected void |
drawSecondaryRangeMarkers(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea)
Deprecated. Use drawSecondaryRangeMarkers(g2, dataArea, int, Layer). |
protected void |
drawSecondaryRangeMarkers(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
int index,
org.jfree.ui.Layer layer)
Draws the secondary range markers (if any) for an axis and layer. |
boolean |
equals(java.lang.Object object)
Tests the plot for equality with an arbitrary object. |
double |
getAnchorValue()
Returns the anchor value. |
java.util.List |
getAnnotations()
Returns the list of annotations. |
Spacer |
getAxisOffset()
Returns the axis offset. |
java.util.List |
getCategories()
Returns a list of the categories for the plot. |
org.jfree.util.SortOrder |
getColumnRenderingOrder()
Returns the order in which the columns are rendered. |
Range |
getDataRange(ValueAxis axis)
Returns the range of data values that will be plotted against the range axis. |
CategoryDataset |
getDataset()
Returns the primary dataset for the plot. |
DatasetRenderingOrder |
getDatasetRenderingOrder()
Returns the dataset rendering order. |
CategoryAxis |
getDomainAxis()
Returns the domain axis for the plot. |
org.jfree.ui.RectangleEdge |
getDomainAxisEdge()
Returns the domain axis edge. |
AxisLocation |
getDomainAxisLocation()
Returns the domain axis location. |
java.awt.Paint |
getDomainGridlinePaint()
Returns the paint used to draw grid-lines against the domain axis. |
CategoryAnchor |
getDomainGridlinePosition()
Returns the position used for the domain gridlines. |
java.awt.Stroke |
getDomainGridlineStroke()
Returns the stroke used to draw grid-lines against the domain axis. |
boolean |
getDrawSharedDomainAxis()
Returns the flag that controls whether or not the shared domain axis is drawn for each subplot. |
AxisSpace |
getFixedDomainAxisSpace()
Returns the fixed domain axis space. |
AxisSpace |
getFixedRangeAxisSpace()
Returns the fixed range axis space. |
LegendItemCollection |
getLegendItems()
Returns the legend items for the plot. |
PlotOrientation |
getOrientation()
Returns the orientation of the plot. |
java.lang.String |
getPlotType()
Returns a string describing the type of plot. |
ValueAxis |
getRangeAxis()
Returns the range axis for the plot. |
org.jfree.ui.RectangleEdge |
getRangeAxisEdge()
Returns the range axis edge. |
ValueAxis |
getRangeAxisForSecondaryDataset(int index)
Returns the range axis for a secondary dataset. |
AxisLocation |
getRangeAxisLocation()
Returns the range axis location. |
java.awt.Paint |
getRangeCrosshairPaint()
Returns the range crosshair color. |
java.awt.Stroke |
getRangeCrosshairStroke()
Returns the pen-style ( Stroke ) used to draw the crosshair (if visible). |
double |
getRangeCrosshairValue()
Returns the range crosshair value. |
java.awt.Paint |
getRangeGridlinePaint()
Returns the paint used to draw the grid-lines against the range axis. |
java.awt.Stroke |
getRangeGridlineStroke()
Returns the stroke used to draw the grid-lines against the range axis. |
java.util.List |
getRangeMarkers()
Deprecated. Use getRangeMarkers(Layer). |
java.util.List |
getRangeMarkers(org.jfree.ui.Layer layer)
Returns the list of range markers (read only) for the specified layer. |
CategoryItemRenderer |
getRenderer()
Returns a reference to the renderer for the plot. |
org.jfree.util.SortOrder |
getRowRenderingOrder()
Returns the order in which the rows should be rendered. |
CategoryDataset |
getSecondaryDataset(int index)
Returns one of the secondary datasets. |
CategoryAxis |
getSecondaryDomainAxis(int index)
Returns a secondary domain axis. |
org.jfree.ui.RectangleEdge |
getSecondaryDomainAxisEdge(int index)
Returns the edge for a secondary domain axis. |
AxisLocation |
getSecondaryDomainAxisLocation(int index)
Returns the location for a secondary domain axis. |
ValueAxis |
getSecondaryRangeAxis(int index)
Returns a secondary range axis. |
org.jfree.ui.RectangleEdge |
getSecondaryRangeAxisEdge(int index)
Returns the edge for a secondary range axis. |
AxisLocation |
getSecondaryRangeAxisLocation(int index)
Returns the location for a secondary range axis. |
java.util.List |
getSecondaryRangeMarkers()
Deprecated. Use getSecondaryRangeMarkers(int, Layer), and note that it returns a Collection rather than a List. |
java.util.Collection |
getSecondaryRangeMarkers(int index,
org.jfree.ui.Layer layer)
Returns a collection of secondary range markers for a particular axis and layer. |
CategoryItemRenderer |
getSecondaryRenderer(int index)
Returns a secondary renderer. |
int |
getWeight()
Returns the weight for this plot when it is used as a subplot within a combined plot. |
void |
handleClick(int x,
int y,
PlotRenderingInfo info)
Handles a 'click' on the plot by updating the anchor value. |
boolean |
isDomainGridlinesVisible()
Returns the flag that controls whether the domain grid-lines are visible. |
boolean |
isRangeCrosshairLockedOnData()
Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values. |
boolean |
isRangeCrosshairVisible()
Returns a flag indicating whether or not the range crosshair is visible. |
boolean |
isRangeGridlinesVisible()
Returns the flag that controls whether the range grid-lines are visible. |
void |
mapSecondaryDatasetToDomainAxis(int index,
java.lang.Integer key)
Maps a secondary dataset to a particular domain axis. |
void |
mapSecondaryDatasetToRangeAxis(int index,
java.lang.Integer key)
Maps a secondary dataset to a particular range axis. |
void |
render(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
PlotRenderingInfo info)
Draws a representation of the data within the dataArea region, using the current renderer. |
void |
render2(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
PlotRenderingInfo info)
Draws a representation of the data in the secondary dataset(s) within the dataArea region, using the current renderer. |
void |
rendererChanged(RendererChangeEvent event)
Receives notification of a renderer change event. |
void |
setAnchorValue(double value)
Sets the anchor value. |
void |
setAnchorValue(double value,
boolean notify)
Sets the anchor value. |
void |
setAxisOffset(Spacer offset)
Sets the axis offsets (gap between the data area and the axes). |
void |
setColumnRenderingOrder(org.jfree.util.SortOrder order)
Sets the order in which the columns should be rendered. |
void |
setDataset(CategoryDataset dataset)
Sets the dataset for the plot, replacing the existing dataset if there is one. |
void |
setDatasetRenderingOrder(DatasetRenderingOrder order)
Sets the rendering order. |
void |
setDomainAxis(CategoryAxis axis)
Sets the domain axis for the plot (this must be compatible with the plot type or an exception is thrown). |
void |
setDomainAxisLocation(AxisLocation location)
Sets the location of the domain axis. |
void |
setDomainAxisLocation(AxisLocation location,
boolean notify)
Sets the location of the domain axis. |
void |
setDomainGridlinePaint(java.awt.Paint paint)
Sets the paint used to draw the grid-lines (if any) against the domain axis. |
void |
setDomainGridlinePosition(CategoryAnchor position)
Sets the position used for the domain gridlines. |
void |
setDomainGridlineStroke(java.awt.Stroke stroke)
Sets the stroke used to draw grid-lines against the domain axis. |
void |
setDomainGridlinesVisible(boolean visible)
Sets the flag that controls whether or not grid-lines are drawn against the domain axis. |
void |
setFixedDomainAxisSpace(AxisSpace space)
Sets the fixed domain axis space. |
void |
setFixedRangeAxisSpace(AxisSpace space)
Sets the fixed range axis space. |
void |
setOrientation(PlotOrientation orientation)
Sets the orientation for the plot. |
void |
setRangeAxis(ValueAxis axis)
Sets the range axis for the plot. |
void |
setRangeAxisLocation(AxisLocation location)
Sets the location of the range axis. |
void |
setRangeAxisLocation(AxisLocation location,
boolean notify)
Sets the location of the range axis. |
void |
setRangeCrosshairLockedOnData(boolean flag)
Sets the flag indicating whether or not the range crosshair should "lock-on" to actual data values. |
void |
setRangeCrosshairPaint(java.awt.Paint paint)
Sets the Paint used to color the crosshairs (if visible) and notifies registered listeners that the axis has been modified. |
void |
setRangeCrosshairStroke(java.awt.Stroke stroke)
Sets the pen-style ( Stroke ) used to draw the crosshairs (if visible). |
void |
setRangeCrosshairValue(double value)
Sets the domain crosshair value. |
void |
setRangeCrosshairValue(double value,
boolean notify)
Sets the range crosshair value. |
void |
setRangeCrosshairVisible(boolean flag)
Sets the flag indicating whether or not the range crosshair is visible. |
void |
setRangeGridlinePaint(java.awt.Paint paint)
Sets the paint used to draw the grid lines against the range axis. |
void |
setRangeGridlineStroke(java.awt.Stroke stroke)
Sets the stroke used to draw the grid-lines against the range axis. |
void |
setRangeGridlinesVisible(boolean visible)
Sets the flag that controls whether or not grid-lines are drawn against the range axis. |
void |
setRenderer(CategoryItemRenderer renderer)
Sets the renderer for the plot. |
void |
setRenderer(CategoryItemRenderer renderer,
boolean notify)
Sets the renderer for the plot. |
void |
setRowRenderingOrder(org.jfree.util.SortOrder order)
Sets the order in which the rows should be rendered. |
void |
setSecondaryDataset(int index,
CategoryDataset dataset)
Adds or changes a secondary dataset for the plot. |
void |
setSecondaryDomainAxis(int index,
CategoryAxis axis)
Sets a secondary domain axis. |
void |
setSecondaryDomainAxisLocation(int index,
AxisLocation location)
Sets the location for a secondary domain axis. |
void |
setSecondaryRangeAxis(int index,
ValueAxis axis)
Sets a secondary range axis. |
void |
setSecondaryRangeAxisLocation(int index,
AxisLocation location)
Sets the location for a secondary range axis. |
void |
setSecondaryRenderer(int index,
CategoryItemRenderer renderer)
Sets a secondary renderer. |
void |
setWeight(int weight)
Sets the weight for the plot. |
void |
zoom(double percent)
Zooms (in or out) on the plot's value axis. |
void |
zoomHorizontalAxes(double factor)
Multiplies the range on the horizontal axis/axes by the specified factor. |
void |
zoomHorizontalAxes(double lowerPercent,
double upperPercent)
Zooms in on the horizontal axes. |
void |
zoomVerticalAxes(double factor)
Multiplies the range on the vertical axis/axes by the specified factor. |
void |
zoomVerticalAxes(double lowerPercent,
double upperPercent)
Zooms in on the vertical axes. |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final boolean DEFAULT_DOMAIN_GRIDLINES_VISIBLE
public static final boolean DEFAULT_RANGE_GRIDLINES_VISIBLE
public static final java.awt.Stroke DEFAULT_GRIDLINE_STROKE
public static final java.awt.Paint DEFAULT_GRIDLINE_PAINT
public static final java.awt.Font DEFAULT_VALUE_LABEL_FONT
protected static java.util.ResourceBundle localizationResources
Constructor Detail |
public CategoryPlot()
public CategoryPlot(CategoryDataset dataset, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryItemRenderer renderer)
dataset
- the dataset.domainAxis
- the domain axis.rangeAxis
- the range axis.renderer
- the item renderer.Method Detail |
public java.lang.String getPlotType()
getPlotType
in class Plot
public PlotOrientation getOrientation()
public void setOrientation(PlotOrientation orientation)
orientation
- the orientation.public Spacer getAxisOffset()
public void setAxisOffset(Spacer offset)
offset
- the offset.public CategoryAxis getDomainAxis()
null
, then the method will return the parent plot's domain axis (if
there is a parent plot).
public void setDomainAxis(CategoryAxis axis)
axis
- the new axis.public AxisLocation getDomainAxisLocation()
public void setDomainAxisLocation(AxisLocation location)
PlotChangeEvent
is sent to all registered
listeners.
location
- the axis location.public void setDomainAxisLocation(AxisLocation location, boolean notify)
location
- the axis location.notify
- a flag that controls whether listeners are notified.public org.jfree.ui.RectangleEdge getDomainAxisEdge()
public CategoryAxis getSecondaryDomainAxis(int index)
index
- the axis index.
null
possible).public void setSecondaryDomainAxis(int index, CategoryAxis axis)
index
- the axis index.axis
- the axis.public void clearSecondaryDomainAxes()
public void configureSecondaryDomainAxes()
public AxisLocation getSecondaryDomainAxisLocation(int index)
index
- the axis index.
public void setSecondaryDomainAxisLocation(int index, AxisLocation location)
index
- the axis index.location
- the location.public org.jfree.ui.RectangleEdge getSecondaryDomainAxisEdge(int index)
index
- the axis index.
public ValueAxis getRangeAxis()
public void setRangeAxis(ValueAxis axis)
An exception is thrown if the new axis and the plot are not mutually compatible.
axis
- the new axis.public AxisLocation getRangeAxisLocation()
public void setRangeAxisLocation(AxisLocation location)
location
- the location.public void setRangeAxisLocation(AxisLocation location, boolean notify)
location
- the location.notify
- a flag that controls whether listeners are notified.public org.jfree.ui.RectangleEdge getRangeAxisEdge()
public ValueAxis getSecondaryRangeAxis(int index)
index
- the axis index.
null
possible).public void setSecondaryRangeAxis(int index, ValueAxis axis)
index
- the axis index.axis
- the axis.public void clearSecondaryRangeAxes()
public void configureSecondaryRangeAxes()
public AxisLocation getSecondaryRangeAxisLocation(int index)
index
- the axis index.
public void setSecondaryRangeAxisLocation(int index, AxisLocation location)
index
- the axis index.location
- the location.public org.jfree.ui.RectangleEdge getSecondaryRangeAxisEdge(int index)
index
- the axis index.
public CategoryDataset getDataset()
null
).public void setDataset(CategoryDataset dataset)
dataset
- the dataset (null
permitted).public CategoryDataset getSecondaryDataset(int index)
index
- the dataset index.
null
).public void setSecondaryDataset(int index, CategoryDataset dataset)
index
- the dataset index.dataset
- the dataset.public void mapSecondaryDatasetToDomainAxis(int index, java.lang.Integer key)
index
- the dataset index (zero-based).key
- the key (null
for primary axis, or the index of the secondary
axis).public void mapSecondaryDatasetToRangeAxis(int index, java.lang.Integer key)
index
- the dataset index (zero-based).key
- the key (null
for primary axis, or the index of the secondary
axis).public ValueAxis getRangeAxisForSecondaryDataset(int index)
You can change the axis for a dataset using the mapSecondaryDatasetToRangeAxis method.
index
- the dataset index.
public CategoryItemRenderer getRenderer()
public void setRenderer(CategoryItemRenderer renderer)
PlotChangeEvent
is sent to all registered
listeners.
renderer
- the renderer.public void setRenderer(CategoryItemRenderer renderer, boolean notify)
You can set the renderer to null
, but this is not recommended because:
renderer
- the renderer (null
permitted).notify
- notify listeners?public CategoryItemRenderer getSecondaryRenderer(int index)
index
- the renderer index.
null
).public void setSecondaryRenderer(int index, CategoryItemRenderer renderer)
PlotChangeEvent
is sent to all registered listeners.
index
- the index.renderer
- the renderer.public DatasetRenderingOrder getDatasetRenderingOrder()
public void setDatasetRenderingOrder(DatasetRenderingOrder order)
PlotChangeEvent
is sent to all registered listeners.
By default, the plot renders the secondary dataset first, then the primary dataset (so that the primary dataset overlays the secondary dataset). You can reverse this if you want to.
order
- the rendering order.public org.jfree.util.SortOrder getColumnRenderingOrder()
public void setColumnRenderingOrder(org.jfree.util.SortOrder order)
order
- the order.public org.jfree.util.SortOrder getRowRenderingOrder()
public void setRowRenderingOrder(org.jfree.util.SortOrder order)
order
- the order.public boolean isDomainGridlinesVisible()
true
or false
.public void setDomainGridlinesVisible(boolean visible)
If the flag value changes, a PlotChangeEvent
is sent to all registered listeners.
visible
- the new value of the flag.public CategoryAnchor getDomainGridlinePosition()
public void setDomainGridlinePosition(CategoryAnchor position)
position
- the position.public java.awt.Stroke getDomainGridlineStroke()
public void setDomainGridlineStroke(java.awt.Stroke stroke)
PlotChangeEvent
is sent to all registered listeners.
stroke
- the stroke.public java.awt.Paint getDomainGridlinePaint()
public void setDomainGridlinePaint(java.awt.Paint paint)
PlotChangeEvent
is sent to all registered listeners.
paint
- the paint.public boolean isRangeGridlinesVisible()
public void setRangeGridlinesVisible(boolean visible)
PlotChangeEvent
is sent to all registered listeners.
visible
- the new value of the flag.public java.awt.Stroke getRangeGridlineStroke()
public void setRangeGridlineStroke(java.awt.Stroke stroke)
PlotChangeEvent
is sent to all registered listeners.
stroke
- the stroke.public java.awt.Paint getRangeGridlinePaint()
public void setRangeGridlinePaint(java.awt.Paint paint)
PlotChangeEvent
is sent to all registered listeners.
paint
- the paint.public LegendItemCollection getLegendItems()
getLegendItems
in class Plot
public void handleClick(int x, int y, PlotRenderingInfo info)
handleClick
in class Plot
x
- x-coordinate of the click (in Java2D space).y
- y-coordinate of the click (in Java2D space).info
- information about the plot's dimensions.public void zoom(double percent)
If the value 0.0 is passed in as the zoom percent, the auto-range calculation for the axis is restored (which sets the range to include the minimum and maximum data values, thus displaying all the data).
zoom
in class Plot
percent
- the zoom amount.public void datasetChanged(DatasetChangeEvent event)
The range axis bounds will be recalculated if necessary.
datasetChanged
in interface DatasetChangeListener
datasetChanged
in class Plot
event
- information about the event (not used here).public void rendererChanged(RendererChangeEvent event)
rendererChanged
in interface RendererChangeListener
event
- the event.public void addRangeMarker(Marker marker)
Typically a marker will be drawn by the renderer as a line perpendicular to the range axis, however this is entirely up to the renderer.
marker
- the marker.public void addRangeMarker(Marker marker, org.jfree.ui.Layer layer)
Typically a marker will be drawn by the renderer as a line perpendicular to the range axis, however this is entirely up to the renderer.
marker
- the marker.layer
- the layer (foreground or background).public void clearRangeMarkers()
public java.util.List getRangeMarkers()
public java.util.List getRangeMarkers(org.jfree.ui.Layer layer)
layer
- the layer (foreground or background).
public void addSecondaryRangeMarker(Marker marker)
Typically a marker will be drawn by the renderer as a line perpendicular to the range axis, however this is entirely up to the renderer.
marker
- the marker.public void addSecondaryRangeMarker(int index, Marker marker, org.jfree.ui.Layer layer)
Typically a marker will be drawn by the renderer as a line perpendicular to the range axis, however this is entirely up to the renderer.
index
- the secondary axis index.marker
- the marker.layer
- the layer.public void clearSecondaryRangeMarkers()
public void clearSecondaryRangeMarkers(int index)
index
- the secondary axis index.public java.util.List getSecondaryRangeMarkers()
public java.util.Collection getSecondaryRangeMarkers(int index, org.jfree.ui.Layer layer)
index
- the secondary axis index.layer
- the layer.
null
).public boolean isRangeCrosshairVisible()
public void setRangeCrosshairVisible(boolean flag)
flag
- the new value of the flag.public boolean isRangeCrosshairLockedOnData()
public void setRangeCrosshairLockedOnData(boolean flag)
flag
- the flag.public double getRangeCrosshairValue()
public void setRangeCrosshairValue(double value)
Registered listeners are notified that the plot has been modified, but only if the crosshair is visible.
value
- the new value.public void setRangeCrosshairValue(double value, boolean notify)
Registered listeners are notified that the axis has been modified, but only if the crosshair is visible.
value
- the new value.notify
- a flag that controls whether or not listeners are notified.public java.awt.Stroke getRangeCrosshairStroke()
Stroke
) used to draw the crosshair (if visible).
public void setRangeCrosshairStroke(java.awt.Stroke stroke)
Stroke
) used to draw the crosshairs (if visible).
A PlotChangeEvent
is sent to all registered listeners.
stroke
- the new crosshair stroke.public java.awt.Paint getRangeCrosshairPaint()
public void setRangeCrosshairPaint(java.awt.Paint paint)
paint
- the new crosshair paint.public java.util.List getAnnotations()
public void addAnnotation(CategoryAnnotation annotation)
annotation
- the annotation.protected AxisSpace calculateDomainAxisSpace(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, AxisSpace space)
g2
- the graphics device.plotArea
- the plot area.space
- a carrier for the result (null
permitted).
protected AxisSpace calculateRangeAxisSpace(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, AxisSpace space)
g2
- the graphics device.plotArea
- the plot area.space
- a carrier for the result (null
permitted).
protected AxisSpace calculateAxisSpace(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea)
g2
- the graphics device.plotArea
- the plot area.
public void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, PlotState parentState, PlotRenderingInfo state)
At your option, you may supply an instance of PlotRenderingInfo
.
If you do, it will be populated with information about the drawing,
including various plot dimensions and tooltip info.
draw
in class Plot
g2
- the graphics device.plotArea
- the area within which the plot (including axes) should be drawn.parentState
- the state from the parent plot, if there is one.state
- collects info as the chart is drawn.protected java.util.Map drawAxes(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, java.awt.geom.Rectangle2D dataArea)
g2
- the graphics device.plotArea
- the plot area.dataArea
- the data area.
public void render(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, PlotRenderingInfo info)
g2
- the graphics device.dataArea
- the region in which the data is to be drawn.info
- an optional object for collection dimension information.public void render2(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, PlotRenderingInfo info)
g2
- the graphics device.dataArea
- the region in which the data is to be drawn.info
- an optional object for collection dimension information.protected void drawDomainGridlines(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea)
g2
- the graphics device.dataArea
- the area inside the axes.protected void drawRangeGridlines(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, java.util.List ticks)
g2
- the graphics device.dataArea
- the area inside the axes.ticks
- the ticks.protected void drawAnnotations(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea)
g2
- the graphics device.dataArea
- the data area.protected void drawRangeMarkers(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, org.jfree.ui.Layer layer)
g2
- the graphics device.dataArea
- the data area.layer
- the layer (foreground or background).protected void drawSecondaryRangeMarkers(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea)
g2
- the graphics device.dataArea
- the data area.protected void drawSecondaryRangeMarkers(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, int index, org.jfree.ui.Layer layer)
g2
- the graphics device.dataArea
- the data area.index
- the secondary axis index.layer
- the layer (foreground or background).protected void drawRangeLine(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, double value, java.awt.Stroke stroke, java.awt.Paint paint)
g2
- the graphics device.dataArea
- the area defined by the axes.value
- the data value.stroke
- the line stroke.paint
- the line paint.public Range getDataRange(ValueAxis axis)
If the dataset is null
, this method returns null
.
getDataRange
in interface ValueAxisPlot
axis
- the axis.
public int getWeight()
public void setWeight(int weight)
weight
- the weight.public AxisSpace getFixedDomainAxisSpace()
null
).public void setFixedDomainAxisSpace(AxisSpace space)
space
- the space.public AxisSpace getFixedRangeAxisSpace()
public void setFixedRangeAxisSpace(AxisSpace space)
space
- the space.public java.util.List getCategories()
public boolean getDrawSharedDomainAxis()
public void zoomHorizontalAxes(double factor)
zoomHorizontalAxes
in interface ValueAxisPlot
factor
- the zoom factor.public void zoomHorizontalAxes(double lowerPercent, double upperPercent)
zoomHorizontalAxes
in interface ValueAxisPlot
lowerPercent
- the lower bound.upperPercent
- the upper bound.public void zoomVerticalAxes(double factor)
zoomVerticalAxes
in interface ValueAxisPlot
factor
- the zoom factor.public void zoomVerticalAxes(double lowerPercent, double upperPercent)
zoomVerticalAxes
in interface ValueAxisPlot
lowerPercent
- the lower bound.upperPercent
- the upper bound.public double getAnchorValue()
public void setAnchorValue(double value)
value
- the anchor value.public void setAnchorValue(double value, boolean notify)
value
- the value.notify
- notify listeners?public boolean equals(java.lang.Object object)
equals
in class Plot
object
- the object to test against.
true
or false
.public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface org.jfree.util.PublicCloneable
clone
in class Plot
java.lang.CloneNotSupportedException
- if the cloning is not supported.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |