| java.lang.Object org.jfree.chart.plot.Plot org.jfree.chart.plot.CategoryPlot
All known Subclasses: org.jfree.chart.plot.CombinedRangeCategoryPlot, org.jfree.chart.plot.CombinedDomainCategoryPlot,
Method Summary | |
public void | addAnnotation(CategoryAnnotation annotation) Adds an annotation to the plot and sends a
PlotChangeEvent to all
registered listeners. | public void | addDomainMarker(CategoryMarker marker) Adds a marker for display (in the foreground) against the domain axis and
sends a
PlotChangeEvent to all registered listeners. | public void | addDomainMarker(CategoryMarker marker, Layer layer) Adds a marker for display against the domain axis and sends a
PlotChangeEvent to all registered listeners. | public void | addDomainMarker(int index, CategoryMarker marker, Layer layer) Adds a marker for display by a particular renderer. | public void | addRangeMarker(Marker marker) Adds a marker for display (in the foreground) against the range axis and
sends a
PlotChangeEvent to all registered listeners. | public void | addRangeMarker(Marker marker, Layer layer) Adds a marker for display against the range axis and sends a
PlotChangeEvent to all registered listeners. | public void | addRangeMarker(int index, Marker marker, Layer layer) Adds a marker for display by a particular renderer. | protected AxisSpace | calculateAxisSpace(Graphics2D g2, Rectangle2D plotArea) Calculates the space required for the axes.
Parameters: g2 - the graphics device. Parameters: plotArea - the plot area. | protected AxisSpace | calculateDomainAxisSpace(Graphics2D g2, Rectangle2D plotArea, AxisSpace space) Calculates the space required for the domain axis/axes.
Parameters: g2 - the graphics device. Parameters: plotArea - the plot area. Parameters: space - a carrier for the result (null permitted). | protected AxisSpace | calculateRangeAxisSpace(Graphics2D g2, Rectangle2D plotArea, AxisSpace space) Calculates the space required for the range axis/axes.
Parameters: g2 - the graphics device. Parameters: plotArea - the plot area. Parameters: space - a carrier for the result (null permitted). | public void | clearAnnotations() Clears all the annotations and sends a
PlotChangeEvent to all
registered listeners. | public void | clearDomainAxes() Clears the domain axes from the plot and sends a
PlotChangeEvent to all registered listeners. | public void | clearDomainMarkers() Clears all the domain markers for the plot and sends a
PlotChangeEvent to all registered listeners. | public void | clearDomainMarkers(int index) Clears all the domain markers for the specified renderer. | public void | clearRangeAxes() Clears the range axes from the plot and sends a
PlotChangeEvent
to all registered listeners. | public void | clearRangeMarkers() Clears all the range markers for the plot and sends a
PlotChangeEvent to all registered listeners. | public void | clearRangeMarkers(int index) Clears all the range markers for the specified renderer. | public Object | clone() Returns a clone of the plot. | public void | configureDomainAxes() Configures the domain axes. | public void | configureRangeAxes() Configures the range axes. | public void | datasetChanged(DatasetChangeEvent event) Receives notification of a change to the plot's dataset. | public void | draw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo state) Draws the plot on a Java 2D graphics device (such as the screen or a
printer). | protected void | drawAnnotations(Graphics2D g2, Rectangle2D dataArea) Draws the annotations... | protected Map | drawAxes(Graphics2D g2, Rectangle2D plotArea, Rectangle2D dataArea, PlotRenderingInfo plotState) A utility method for drawing the plot's axes.
Parameters: g2 - the graphics device. Parameters: plotArea - the plot area. Parameters: dataArea - the data area. Parameters: plotState - collects information about the plot (null permitted). | public void | drawBackground(Graphics2D g2, Rectangle2D area) Draws the plot background (the background color and/or image).
This method will be called during the chart drawing process and is
declared public so that it can be accessed by the renderers used by
certain subclasses. | protected void | drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea) Draws the gridlines for the plot. | protected void | drawDomainMarkers(Graphics2D g2, Rectangle2D dataArea, int index, Layer layer) Draws the domain markers (if any) for an axis and layer. | protected void | drawRangeCrosshair(Graphics2D g2, Rectangle2D dataArea, PlotOrientation orientation, double value, ValueAxis axis, Stroke stroke, Paint paint) Draws a range crosshair. | protected void | drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea, List ticks) Draws the gridlines for the plot. | protected void | drawRangeLine(Graphics2D g2, Rectangle2D dataArea, double value, Stroke stroke, Paint paint) Utility method for drawing a line perpendicular to the range axis (used
for crosshairs). | protected void | drawRangeMarkers(Graphics2D g2, Rectangle2D dataArea, int index, Layer layer) Draws the range markers (if any) for an axis and layer. | public boolean | equals(Object obj) Tests the plot for equality with an arbitrary object.
Parameters: obj - the object to test against (null permitted). | public double | getAnchorValue() Returns the anchor value. | public List | getAnnotations() Returns the list of annotations. | public RectangleInsets | getAxisOffset() Returns the axis offset. | public List | getCategories() Returns a list of the categories in the plot's primary dataset. | public List | getCategoriesForAxis(CategoryAxis axis) Returns a list of the categories that should be displayed for the
specified axis. | public SortOrder | getColumnRenderingOrder() Returns the order in which the columns are rendered. | public Range | getDataRange(ValueAxis axis) Returns the range of data values that will be plotted against the range
axis. | public CategoryDataset | getDataset() Returns the primary dataset for the plot. | public CategoryDataset | getDataset(int index) Returns the dataset at the given index.
Parameters: index - the dataset index. | public int | getDatasetCount() Returns the number of datasets. | public DatasetRenderingOrder | getDatasetRenderingOrder() Returns the dataset rendering order. | public CategoryAxis | getDomainAxis() Returns the domain axis for the plot. | public CategoryAxis | getDomainAxis(int index) Returns a domain axis.
Parameters: index - the axis index. | public int | getDomainAxisCount() Returns the number of domain axes. | public RectangleEdge | getDomainAxisEdge() Returns the domain axis edge. | public RectangleEdge | getDomainAxisEdge(int index) Returns the edge for a domain axis.
Parameters: index - the axis index. | public CategoryAxis | getDomainAxisForDataset(int index) Returns the domain axis for a dataset. | public int | getDomainAxisIndex(CategoryAxis axis) Returns the index of the specified axis, or -1 if the axis
is not assigned to the plot.
Parameters: axis - the axis. | public AxisLocation | getDomainAxisLocation() Returns the domain axis location for the primary domain axis. | public AxisLocation | getDomainAxisLocation(int index) Returns the location for a domain axis.
Parameters: index - the axis index. | public Paint | getDomainGridlinePaint() Returns the paint used to draw grid-lines against the domain axis. | public CategoryAnchor | getDomainGridlinePosition() Returns the position used for the domain gridlines. | public Stroke | getDomainGridlineStroke() Returns the stroke used to draw grid-lines against the domain axis. | public Collection | getDomainMarkers(Layer layer) Returns the list of domain markers (read only) for the specified layer.
Parameters: layer - the layer (foreground or background). | public Collection | getDomainMarkers(int index, Layer layer) Returns a collection of domain markers for a particular renderer and
layer.
Parameters: index - the renderer index. Parameters: layer - the layer. | public boolean | getDrawSharedDomainAxis() Returns the flag that controls whether or not the shared domain axis is
drawn for each subplot. | public AxisSpace | getFixedDomainAxisSpace() Returns the fixed domain axis space. | public LegendItemCollection | getFixedLegendItems() Returns the fixed legend items, if any. | public AxisSpace | getFixedRangeAxisSpace() Returns the fixed range axis space. | public int | getIndexOf(CategoryItemRenderer renderer) Returns the index of the specified renderer, or -1 if the
renderer is not assigned to this plot.
Parameters: renderer - the renderer (null permitted). | public LegendItemCollection | getLegendItems() Returns the legend items for the plot. | public PlotOrientation | getOrientation() Returns the orientation of the plot. | public String | getPlotType() Returns a string describing the type of plot. | public ValueAxis | getRangeAxis() Returns the range axis for the plot. | public ValueAxis | getRangeAxis(int index) Returns a range axis.
Parameters: index - the axis index. | public int | getRangeAxisCount() Returns the number of range axes. | public RectangleEdge | getRangeAxisEdge() Returns the edge where the primary range axis is located. | public RectangleEdge | getRangeAxisEdge(int index) Returns the edge for a range axis.
Parameters: index - the axis index. | public ValueAxis | getRangeAxisForDataset(int index) Returns the range axis for a dataset. | public AxisLocation | getRangeAxisLocation() Returns the range axis location. | public AxisLocation | getRangeAxisLocation(int index) Returns the location for a range axis.
Parameters: index - the axis index. | public Paint | getRangeCrosshairPaint() Returns the paint used to draw the range crosshair. | public Stroke | getRangeCrosshairStroke() Returns the pen-style (Stroke ) used to draw the crosshair
(if visible). | public double | getRangeCrosshairValue() Returns the range crosshair value. | public Paint | getRangeGridlinePaint() Returns the paint used to draw the grid-lines against the range axis. | public Stroke | getRangeGridlineStroke() Returns the stroke used to draw the grid-lines against the range axis. | public Collection | getRangeMarkers(Layer layer) Returns the list of range markers (read only) for the specified layer.
Parameters: layer - the layer (foreground or background). | public Collection | getRangeMarkers(int index, Layer layer) Returns a collection of range markers for a particular renderer and
layer.
Parameters: index - the renderer index. Parameters: layer - the layer. | public CategoryItemRenderer | getRenderer() Returns a reference to the renderer for the plot. | public CategoryItemRenderer | getRenderer(int index) Returns the renderer at the given index.
Parameters: index - the renderer index. | public CategoryItemRenderer | getRendererForDataset(CategoryDataset dataset) Returns the renderer for the specified dataset. | public SortOrder | getRowRenderingOrder() Returns the order in which the rows should be rendered. | public int | getWeight() Returns the weight for this plot when it is used as a subplot within a
combined plot. | public void | handleClick(int x, int y, PlotRenderingInfo info) Handles a 'click' on the plot by updating the anchor value. | public boolean | isDomainGridlinesVisible() Returns the flag that controls whether the domain grid-lines are visible. | public boolean | isDomainZoomable() Returns false to indicate that the domain axes are not
zoomable. | public boolean | isRangeCrosshairLockedOnData() Returns a flag indicating whether or not the crosshair should "lock-on"
to actual data values. | public boolean | isRangeCrosshairVisible() Returns a flag indicating whether or not the range crosshair is visible. | public boolean | isRangeGridlinesVisible() Returns the flag that controls whether the range grid-lines are visible. | public boolean | isRangeZoomable() Returns true to indicate that the range axes are zoomable. | public void | mapDatasetToDomainAxis(int index, int axisIndex) Maps a dataset to a particular domain axis. | public void | mapDatasetToRangeAxis(int index, int axisIndex) Maps a dataset to a particular range axis. | public boolean | removeAnnotation(CategoryAnnotation annotation) Removes an annotation from the plot and sends a
PlotChangeEvent to all registered listeners.
Parameters: annotation - the annotation (null not permitted). | public boolean | render(Graphics2D g2, Rectangle2D dataArea, int index, PlotRenderingInfo info) Draws a representation of a dataset within the dataArea region using the
appropriate renderer.
Parameters: g2 - the graphics device. Parameters: dataArea - the region in which the data is to be drawn. Parameters: index - the dataset and renderer index. Parameters: info - an optional object for collection dimension information. | public void | rendererChanged(RendererChangeEvent event) Receives notification of a renderer change event. | public void | setAnchorValue(double value) Sets the anchor value and sends a
PlotChangeEvent to all
registered listeners. | public void | setAnchorValue(double value, boolean notify) Sets the anchor value and, if requested, sends a
PlotChangeEvent to all registered listeners. | public void | setAxisOffset(RectangleInsets offset) Sets the axis offsets (gap between the data area and the axes) and
sends a
PlotChangeEvent to all registered listeners. | public void | setColumnRenderingOrder(SortOrder order) Sets the column order in which the items in each dataset should be
rendered and sends a
PlotChangeEvent to all registered
listeners. | public void | setDataset(CategoryDataset dataset) Sets the dataset for the plot, replacing the existing dataset, if there
is one. | public void | setDataset(int index, CategoryDataset dataset) Sets a dataset for the plot. | public void | setDatasetRenderingOrder(DatasetRenderingOrder order) Sets the rendering order and sends a
PlotChangeEvent to all
registered listeners. | public void | setDomainAxes(CategoryAxis[] axes) Sets the domain axes for this plot and sends a
PlotChangeEvent to all registered listeners. | public void | setDomainAxis(CategoryAxis axis) Sets the domain axis for the plot and sends a
PlotChangeEvent to
all registered listeners. | public void | setDomainAxis(int index, CategoryAxis axis) Sets a domain axis and sends a
PlotChangeEvent to all
registered listeners. | public void | setDomainAxis(int index, CategoryAxis axis, boolean notify) Sets a domain axis and, if requested, sends a
PlotChangeEvent to
all registered listeners. | public void | setDomainAxisLocation(AxisLocation location) Sets the location of the domain axis and sends a
PlotChangeEvent to all registered listeners. | public void | setDomainAxisLocation(AxisLocation location, boolean notify) Sets the location of the domain axis and, if requested, sends a
PlotChangeEvent to all registered listeners. | public void | setDomainAxisLocation(int index, AxisLocation location) Sets the location for a domain axis and sends a
PlotChangeEvent to all registered listeners. | public void | setDomainAxisLocation(int index, AxisLocation location, boolean notify) Sets the location for a domain axis and sends a
PlotChangeEvent
to all registered listeners. | public void | setDomainGridlinePaint(Paint paint) Sets the paint used to draw the grid-lines (if any) against the domain
axis and sends a
PlotChangeEvent to all registered listeners. | public void | setDomainGridlinePosition(CategoryAnchor position) Sets the position used for the domain gridlines and sends a
PlotChangeEvent to all registered listeners. | public void | setDomainGridlineStroke(Stroke stroke) Sets the stroke used to draw grid-lines against the domain axis and
sends a
PlotChangeEvent to all registered listeners. | public void | setDomainGridlinesVisible(boolean visible) Sets the flag that controls whether or not grid-lines are drawn against
the domain axis. | public void | setDrawSharedDomainAxis(boolean draw) Sets the flag that controls whether the shared domain axis is drawn when
this plot is being used as a subplot. | public void | setFixedDomainAxisSpace(AxisSpace space) Sets the fixed domain axis space. | public void | setFixedLegendItems(LegendItemCollection items) Sets the fixed legend items for the plot. | public void | setFixedRangeAxisSpace(AxisSpace space) Sets the fixed range axis space. | public void | setOrientation(PlotOrientation orientation) Sets the orientation for the plot and sends a
PlotChangeEvent to
all registered listeners. | public void | setRangeAxes(ValueAxis[] axes) Sets the range axes for this plot and sends a
PlotChangeEvent to all registered listeners. | public void | setRangeAxis(ValueAxis axis) Sets the range axis for the plot and sends a
PlotChangeEvent to
all registered listeners. | public void | setRangeAxis(int index, ValueAxis axis) Sets a range axis and sends a
PlotChangeEvent to all registered
listeners. | public void | setRangeAxis(int index, ValueAxis axis, boolean notify) Sets a range axis and, if requested, sends a
PlotChangeEvent to
all registered listeners. | public void | setRangeAxisLocation(AxisLocation location) Sets the location of the range axis and sends a
PlotChangeEvent to all registered listeners. | public void | setRangeAxisLocation(AxisLocation location, boolean notify) Sets the location of the range axis and, if requested, sends a
PlotChangeEvent to all registered listeners. | public void | setRangeAxisLocation(int index, AxisLocation location) Sets the location for a range axis and sends a
PlotChangeEvent
to all registered listeners. | public void | setRangeAxisLocation(int index, AxisLocation location, boolean notify) Sets the location for a range axis and sends a
PlotChangeEvent
to all registered listeners. | public void | setRangeCrosshairLockedOnData(boolean flag) Sets the flag indicating whether or not the range crosshair should
"lock-on" to actual data values. | public void | setRangeCrosshairPaint(Paint paint) Sets the paint used to draw the range crosshair (if visible) and
sends a
PlotChangeEvent to all registered listeners. | public void | setRangeCrosshairStroke(Stroke stroke) Sets the pen-style (Stroke ) used to draw the range
crosshair (if visible), and sends a
PlotChangeEvent to all
registered listeners. | public void | setRangeCrosshairValue(double value) Sets the domain crosshair value. | public void | setRangeCrosshairValue(double value, boolean notify) Sets the range crosshair value and, if requested, sends a
PlotChangeEvent to all registered listeners (but only if the
crosshair is visible). | public void | setRangeCrosshairVisible(boolean flag) Sets the flag indicating whether or not the range crosshair is visible. | public void | setRangeGridlinePaint(Paint paint) Sets the paint used to draw the grid lines against the range axis and
sends a
PlotChangeEvent to all registered listeners. | public void | setRangeGridlineStroke(Stroke stroke) Sets the stroke used to draw the grid-lines against the range axis and
sends a
PlotChangeEvent to all registered listeners. | public void | setRangeGridlinesVisible(boolean visible) Sets the flag that controls whether or not grid-lines are drawn against
the range axis. | public void | setRenderer(CategoryItemRenderer renderer) Sets the renderer at index 0 (sometimes referred to as the "primary"
renderer) and sends a
PlotChangeEvent to all registered
listeners. | public void | setRenderer(CategoryItemRenderer renderer, boolean notify) Sets the renderer at index 0 (sometimes referred to as the "primary"
renderer) and, if requested, sends a
PlotChangeEvent to all
registered listeners. | public void | setRenderer(int index, CategoryItemRenderer renderer) Sets the renderer at the specified index and sends a
PlotChangeEvent to all registered listeners. | public void | setRenderer(int index, CategoryItemRenderer renderer, boolean notify) Sets a renderer. | public void | setRenderers(CategoryItemRenderer[] renderers) Sets the renderers for this plot and sends a
PlotChangeEvent to all registered listeners. | public void | setRowRenderingOrder(SortOrder order) Sets the row order in which the items in each dataset should be
rendered and sends a
PlotChangeEvent to all registered
listeners. | public void | setWeight(int weight) Sets the weight for the plot. | public void | zoom(double percent) Zooms (in or out) on the plot's value axis. | public void | zoomDomainAxes(double factor, PlotRenderingInfo state, Point2D source) This method does nothing, because CategoryPlot doesn't
support zooming on the domain. | public void | zoomDomainAxes(double lowerPercent, double upperPercent, PlotRenderingInfo state, Point2D source) This method does nothing, because CategoryPlot doesn't
support zooming on the domain. | public void | zoomRangeAxes(double factor, PlotRenderingInfo state, Point2D source) Multiplies the range on the range axis/axes by the specified factor. | public void | zoomRangeAxes(double lowerPercent, double upperPercent, PlotRenderingInfo state, Point2D source) Zooms in on the range axes. |
DEFAULT_CROSSHAIR_PAINT | final public static Paint DEFAULT_CROSSHAIR_PAINT(Code) | | The default crosshair paint.
since: 1.0.5 |
DEFAULT_CROSSHAIR_STROKE | final public static Stroke DEFAULT_CROSSHAIR_STROKE(Code) | | The default crosshair stroke.
since: 1.0.5 |
DEFAULT_CROSSHAIR_VISIBLE | final public static boolean DEFAULT_CROSSHAIR_VISIBLE(Code) | | The default crosshair visibility.
since: 1.0.5 |
DEFAULT_DOMAIN_GRIDLINES_VISIBLE | final public static boolean DEFAULT_DOMAIN_GRIDLINES_VISIBLE(Code) | | The default visibility of the grid lines plotted against the domain
axis.
|
DEFAULT_GRIDLINE_PAINT | final public static Paint DEFAULT_GRIDLINE_PAINT(Code) | | The default grid line paint.
|
DEFAULT_GRIDLINE_STROKE | final public static Stroke DEFAULT_GRIDLINE_STROKE(Code) | | The default grid line stroke.
|
DEFAULT_RANGE_GRIDLINES_VISIBLE | final public static boolean DEFAULT_RANGE_GRIDLINES_VISIBLE(Code) | | The default visibility of the grid lines plotted against the range
axis.
|
DEFAULT_VALUE_LABEL_FONT | final public static Font DEFAULT_VALUE_LABEL_FONT(Code) | | The default value label font.
|
localizationResources | protected static ResourceBundle localizationResources(Code) | | The resourceBundle for the localization.
|
CategoryPlot | public CategoryPlot()(Code) | | Default constructor.
|
CategoryPlot | public CategoryPlot(CategoryDataset dataset, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryItemRenderer renderer)(Code) | | Creates a new plot.
Parameters: dataset - the dataset (null permitted). Parameters: domainAxis - the domain axis (null permitted). Parameters: rangeAxis - the range axis (null permitted). Parameters: renderer - the item renderer (null permitted). |
addDomainMarker | public void addDomainMarker(CategoryMarker marker)(Code) | | Adds a marker for display (in the foreground) against the domain axis and
sends a
PlotChangeEvent to all registered listeners. Typically a
marker will be drawn by the renderer as a line perpendicular to the
domain axis, however this is entirely up to the renderer.
Parameters: marker - the marker (null not permitted). |
addDomainMarker | public void addDomainMarker(CategoryMarker marker, Layer layer)(Code) | | Adds a marker for display against the domain axis and sends a
PlotChangeEvent to all registered listeners. Typically a marker
will be drawn by the renderer as a line perpendicular to the domain axis,
however this is entirely up to the renderer.
Parameters: marker - the marker (null not permitted). Parameters: layer - the layer (foreground or background) (null not permitted). |
addDomainMarker | public void addDomainMarker(int index, CategoryMarker marker, Layer layer)(Code) | | Adds a marker for display by a particular renderer.
Typically a marker will be drawn by the renderer as a line perpendicular
to a domain axis, however this is entirely up to the renderer.
Parameters: index - the renderer index. Parameters: marker - the marker (null not permitted). Parameters: layer - the layer (null not permitted). |
addRangeMarker | public void addRangeMarker(Marker marker)(Code) | | Adds a marker for display (in the foreground) against the range axis and
sends a
PlotChangeEvent to all registered listeners. 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.
Parameters: marker - the marker (null not permitted). |
addRangeMarker | public void addRangeMarker(Marker marker, Layer layer)(Code) | | Adds a marker for display against the range axis and sends a
PlotChangeEvent to all registered listeners. 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.
Parameters: marker - the marker (null not permitted). Parameters: layer - the layer (foreground or background) (null not permitted). |
addRangeMarker | public void addRangeMarker(int index, Marker marker, Layer layer)(Code) | | Adds a marker for display by a particular renderer.
Typically a marker will be drawn by the renderer as a line perpendicular
to a range axis, however this is entirely up to the renderer.
Parameters: index - the renderer index. Parameters: marker - the marker. Parameters: layer - the layer. |
calculateAxisSpace | protected AxisSpace calculateAxisSpace(Graphics2D g2, Rectangle2D plotArea)(Code) | | Calculates the space required for the axes.
Parameters: g2 - the graphics device. Parameters: plotArea - the plot area. The space required for the axes. |
calculateDomainAxisSpace | protected AxisSpace calculateDomainAxisSpace(Graphics2D g2, Rectangle2D plotArea, AxisSpace space)(Code) | | Calculates the space required for the domain axis/axes.
Parameters: g2 - the graphics device. Parameters: plotArea - the plot area. Parameters: space - a carrier for the result (null permitted). The required space. |
calculateRangeAxisSpace | protected AxisSpace calculateRangeAxisSpace(Graphics2D g2, Rectangle2D plotArea, AxisSpace space)(Code) | | Calculates the space required for the range axis/axes.
Parameters: g2 - the graphics device. Parameters: plotArea - the plot area. Parameters: space - a carrier for the result (null permitted). The required space. |
clearAnnotations | public void clearAnnotations()(Code) | | Clears all the annotations and sends a
PlotChangeEvent to all
registered listeners.
|
clearDomainAxes | public void clearDomainAxes()(Code) | | Clears the domain axes from the plot and sends a
PlotChangeEvent to all registered listeners.
|
clearDomainMarkers | public void clearDomainMarkers(int index)(Code) | | Clears all the domain markers for the specified renderer.
Parameters: index - the renderer index. See Also: CategoryPlot.clearRangeMarkers(int) |
clearRangeAxes | public void clearRangeAxes()(Code) | | Clears the range axes from the plot and sends a
PlotChangeEvent
to all registered listeners.
|
configureDomainAxes | public void configureDomainAxes()(Code) | | Configures the domain axes.
|
configureRangeAxes | public void configureRangeAxes()(Code) | | Configures the range axes.
|
datasetChanged | public void datasetChanged(DatasetChangeEvent event)(Code) | | Receives notification of a change to the plot's dataset.
The range axis bounds will be recalculated if necessary.
Parameters: event - information about the event (not used here). |
draw | public void draw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo state)(Code) | | Draws the plot on a Java 2D graphics device (such as the screen or a
printer).
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.
Parameters: g2 - the graphics device. Parameters: area - the area within which the plot (including axes) should be drawn. Parameters: anchor - the anchor point (null permitted). Parameters: parentState - the state from the parent plot, if there is one. Parameters: state - collects info as the chart is drawn (possibly null ). |
drawAnnotations | protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea)(Code) | | Draws the annotations...
Parameters: g2 - the graphics device. Parameters: dataArea - the data area. |
drawAxes | protected Map drawAxes(Graphics2D g2, Rectangle2D plotArea, Rectangle2D dataArea, PlotRenderingInfo plotState)(Code) | | A utility method for drawing the plot's axes.
Parameters: g2 - the graphics device. Parameters: plotArea - the plot area. Parameters: dataArea - the data area. Parameters: plotState - collects information about the plot (null permitted). A map containing the axis states. |
drawBackground | public void drawBackground(Graphics2D g2, Rectangle2D area)(Code) | | Draws the plot background (the background color and/or image).
This method will be called during the chart drawing process and is
declared public so that it can be accessed by the renderers used by
certain subclasses. You shouldn't need to call this method directly.
Parameters: g2 - the graphics device. Parameters: area - the area within which the plot should be drawn. |
drawDomainMarkers | protected void drawDomainMarkers(Graphics2D g2, Rectangle2D dataArea, int index, Layer layer)(Code) | | Draws the domain markers (if any) for an axis and layer. This method is
typically called from within the draw() method.
Parameters: g2 - the graphics device. Parameters: dataArea - the data area. Parameters: index - the renderer index. Parameters: layer - the layer (foreground or background). See Also: CategoryPlot.drawRangeMarkers(Graphics2D,Rectangle2D,int,Layer) |
drawRangeCrosshair | protected void drawRangeCrosshair(Graphics2D g2, Rectangle2D dataArea, PlotOrientation orientation, double value, ValueAxis axis, Stroke stroke, Paint paint)(Code) | | Draws a range crosshair.
Parameters: g2 - the graphics target. Parameters: dataArea - the data area. Parameters: orientation - the plot orientation. Parameters: value - the crosshair value. Parameters: axis - the axis against which the value is measured. Parameters: stroke - the stroke used to draw the crosshair line. Parameters: paint - the paint used to draw the crosshair line. since: 1.0.5 |
drawRangeLine | protected void drawRangeLine(Graphics2D g2, Rectangle2D dataArea, double value, Stroke stroke, Paint paint)(Code) | | Utility method for drawing a line perpendicular to the range axis (used
for crosshairs).
Parameters: g2 - the graphics device. Parameters: dataArea - the area defined by the axes. Parameters: value - the data value. Parameters: stroke - the line stroke (null not permitted). Parameters: paint - the line paint (null not permitted). |
drawRangeMarkers | protected void drawRangeMarkers(Graphics2D g2, Rectangle2D dataArea, int index, Layer layer)(Code) | | Draws the range markers (if any) for an axis and layer. This method is
typically called from within the draw() method.
Parameters: g2 - the graphics device. Parameters: dataArea - the data area. Parameters: index - the renderer index. Parameters: layer - the layer (foreground or background). See Also: CategoryPlot.drawDomainMarkers(Graphics2D,Rectangle2D,int,Layer) |
equals | public boolean equals(Object obj)(Code) | | Tests the plot for equality with an arbitrary object.
Parameters: obj - the object to test against (null permitted). A boolean. |
getAnnotations | public List getAnnotations()(Code) | | Returns the list of annotations.
The list of annotations. |
getCategoriesForAxis | public List getCategoriesForAxis(CategoryAxis axis)(Code) | | Returns a list of the categories that should be displayed for the
specified axis.
Parameters: axis - the axis (null not permitted) The categories. since: 1.0.3 |
getDataRange | public Range getDataRange(ValueAxis axis)(Code) | | Returns the range of data values that will be plotted against the range
axis. If the dataset is null , this method returns
null .
Parameters: axis - the axis. The data range. |
getDatasetCount | public int getDatasetCount()(Code) | | Returns the number of datasets.
The number of datasets. since: 1.0.2 |
getDomainAxis | public CategoryAxis getDomainAxis()(Code) | | Returns the domain axis for the plot. If the domain axis for this plot
is null , then the method will return the parent plot's
domain axis (if there is a parent plot).
The domain axis (null permitted). See Also: CategoryPlot.setDomainAxis(CategoryAxis) |
getDomainAxisCount | public int getDomainAxisCount()(Code) | | Returns the number of domain axes.
The axis count. |
getDomainAxisEdge | public RectangleEdge getDomainAxisEdge()(Code) | | Returns the domain axis edge. This is derived from the axis location
and the plot orientation.
The edge (never null ). |
getDomainAxisEdge | public RectangleEdge getDomainAxisEdge(int index)(Code) | | Returns the edge for a domain axis.
Parameters: index - the axis index. The edge (never null ). |
getDomainAxisIndex | public int getDomainAxisIndex(CategoryAxis axis)(Code) | | Returns the index of the specified axis, or -1 if the axis
is not assigned to the plot.
Parameters: axis - the axis. The axis index. since: 1.0.3 |
getDomainMarkers | public Collection getDomainMarkers(Layer layer)(Code) | | Returns the list of domain markers (read only) for the specified layer.
Parameters: layer - the layer (foreground or background). The list of domain markers. |
getDomainMarkers | public Collection getDomainMarkers(int index, Layer layer)(Code) | | Returns a collection of domain markers for a particular renderer and
layer.
Parameters: index - the renderer index. Parameters: layer - the layer. A collection of markers (possibly null ). |
getIndexOf | public int getIndexOf(CategoryItemRenderer renderer)(Code) | | Returns the index of the specified renderer, or -1 if the
renderer is not assigned to this plot.
Parameters: renderer - the renderer (null permitted). The renderer index. |
getLegendItems | public LegendItemCollection getLegendItems()(Code) | | Returns the legend items for the plot. By default, this method creates
a legend item for each series in each of the datasets. You can change
this behaviour by overriding this method.
The legend items. |
getPlotType | public String getPlotType()(Code) | | Returns a string describing the type of plot.
The type. |
getRangeAxis | public ValueAxis getRangeAxis()(Code) | | Returns the range axis for the plot. If the range axis for this plot is
null, then the method will return the parent plot's range axis (if there
is a parent plot).
The range axis (possibly null ). |
getRangeAxis | public ValueAxis getRangeAxis(int index)(Code) | | Returns a range axis.
Parameters: index - the axis index. The axis (null possible). |
getRangeAxisCount | public int getRangeAxisCount()(Code) | | Returns the number of range axes.
The axis count. |
getRangeAxisEdge | public RectangleEdge getRangeAxisEdge()(Code) | | Returns the edge where the primary range axis is located.
The edge (never null ). |
getRangeAxisEdge | public RectangleEdge getRangeAxisEdge(int index)(Code) | | Returns the edge for a range axis.
Parameters: index - the axis index. The edge. |
getRangeAxisLocation | public AxisLocation getRangeAxisLocation()(Code) | | Returns the range axis location.
The location (never null ). |
getRangeMarkers | public Collection getRangeMarkers(int index, Layer layer)(Code) | | Returns a collection of range markers for a particular renderer and
layer.
Parameters: index - the renderer index. Parameters: layer - the layer. A collection of markers (possibly null ). |
getRendererForDataset | public CategoryItemRenderer getRendererForDataset(CategoryDataset dataset)(Code) | | Returns the renderer for the specified dataset. If the dataset doesn't
belong to the plot, this method will return null .
Parameters: dataset - the dataset (null permitted). The renderer (possibly null ). |
getWeight | public int getWeight()(Code) | | Returns the weight for this plot when it is used as a subplot within a
combined plot.
The weight. See Also: CategoryPlot.setWeight(int) |
handleClick | public void handleClick(int x, int y, PlotRenderingInfo info)(Code) | | Handles a 'click' on the plot by updating the anchor value.
Parameters: x - x-coordinate of the click (in Java2D space). Parameters: y - y-coordinate of the click (in Java2D space). Parameters: info - information about the plot's dimensions. |
mapDatasetToDomainAxis | public void mapDatasetToDomainAxis(int index, int axisIndex)(Code) | | Maps a dataset to a particular domain axis.
Parameters: index - the dataset index (zero-based). Parameters: axisIndex - the axis index (zero-based). See Also: CategoryPlot.getDomainAxisForDataset(int) |
mapDatasetToRangeAxis | public void mapDatasetToRangeAxis(int index, int axisIndex)(Code) | | Maps a dataset to a particular range axis.
Parameters: index - the dataset index (zero-based). Parameters: axisIndex - the axis index (zero-based). See Also: CategoryPlot.getRangeAxisForDataset(int) |
render | public boolean render(Graphics2D g2, Rectangle2D dataArea, int index, PlotRenderingInfo info)(Code) | | Draws a representation of a dataset within the dataArea region using the
appropriate renderer.
Parameters: g2 - the graphics device. Parameters: dataArea - the region in which the data is to be drawn. Parameters: index - the dataset and renderer index. Parameters: info - an optional object for collection dimension information. A boolean that indicates whether or not real data was found. |
rendererChanged | public void rendererChanged(RendererChangeEvent event)(Code) | | Receives notification of a renderer change event.
Parameters: event - the event. |
setAnchorValue | public void setAnchorValue(double value, boolean notify)(Code) | | Sets the anchor value and, if requested, sends a
PlotChangeEvent to all registered listeners.
Parameters: value - the value. Parameters: notify - notify listeners? See Also: CategoryPlot.getAnchorValue() |
setAxisOffset | public void setAxisOffset(RectangleInsets offset)(Code) | | Sets the axis offsets (gap between the data area and the axes) and
sends a
PlotChangeEvent to all registered listeners.
Parameters: offset - the offset (null not permitted). See Also: CategoryPlot.getAxisOffset() |
setDatasetRenderingOrder | public void setDatasetRenderingOrder(DatasetRenderingOrder order)(Code) | | Sets the rendering order and sends a
PlotChangeEvent to all
registered listeners. By default, the plot renders the primary dataset
last (so that the primary dataset overlays the secondary datasets). You
can reverse this if you want to.
Parameters: order - the rendering order (null not permitted). See Also: CategoryPlot.getDatasetRenderingOrder() |
setDomainAxis | public void setDomainAxis(int index, CategoryAxis axis, boolean notify)(Code) | | Sets a domain axis and, if requested, sends a
PlotChangeEvent to
all registered listeners.
Parameters: index - the axis index. Parameters: axis - the axis (null permitted). Parameters: notify - notify listeners? |
setDomainAxisLocation | public void setDomainAxisLocation(AxisLocation location, boolean notify)(Code) | | Sets the location of the domain axis and, if requested, sends a
PlotChangeEvent to all registered listeners.
Parameters: location - the axis location (null not permitted). Parameters: notify - a flag that controls whether listeners are notified. |
setDomainGridlinesVisible | public void setDomainGridlinesVisible(boolean visible)(Code) | | Sets the flag that controls whether or not grid-lines are drawn against
the domain axis.
If the flag value changes, a
PlotChangeEvent is sent to all
registered listeners.
Parameters: visible - the new value of the flag. See Also: CategoryPlot.isDomainGridlinesVisible() |
setDrawSharedDomainAxis | public void setDrawSharedDomainAxis(boolean draw)(Code) | | Sets the flag that controls whether the shared domain axis is drawn when
this plot is being used as a subplot.
Parameters: draw - a boolean. See Also: CategoryPlot.getDrawSharedDomainAxis() |
setFixedLegendItems | public void setFixedLegendItems(LegendItemCollection items)(Code) | | Sets the fixed legend items for the plot. Leave this set to
null if you prefer the legend items to be created
automatically.
Parameters: items - the legend items (null permitted). See Also: CategoryPlot.getFixedLegendItems() |
setRangeAxis | public void setRangeAxis(ValueAxis axis)(Code) | | Sets the range axis for the plot and sends a
PlotChangeEvent to
all registered listeners.
Parameters: axis - the axis (null permitted). |
setRangeAxis | public void setRangeAxis(int index, ValueAxis axis)(Code) | | Sets a range axis and sends a
PlotChangeEvent to all registered
listeners.
Parameters: index - the axis index. Parameters: axis - the axis. |
setRangeAxis | public void setRangeAxis(int index, ValueAxis axis, boolean notify)(Code) | | Sets a range axis and, if requested, sends a
PlotChangeEvent to
all registered listeners.
Parameters: index - the axis index. Parameters: axis - the axis. Parameters: notify - notify listeners? |
setRangeCrosshairLockedOnData | public void setRangeCrosshairLockedOnData(boolean flag)(Code) | | Sets the flag indicating whether or not the range crosshair should
"lock-on" to actual data values.
Parameters: flag - the flag. See Also: CategoryPlot.isRangeCrosshairLockedOnData() |
setRangeCrosshairStroke | public void setRangeCrosshairStroke(Stroke stroke)(Code) | | Sets the pen-style (Stroke ) used to draw the range
crosshair (if visible), and sends a
PlotChangeEvent to all
registered listeners.
Parameters: stroke - the new crosshair stroke (null not permitted). See Also: CategoryPlot.getRangeCrosshairStroke() |
setRangeCrosshairValue | public void setRangeCrosshairValue(double value)(Code) | | Sets the domain crosshair value.
Registered listeners are notified that the plot has been modified, but
only if the crosshair is visible.
Parameters: value - the new value. See Also: CategoryPlot.getRangeCrosshairValue() |
setRangeCrosshairValue | public void setRangeCrosshairValue(double value, boolean notify)(Code) | | Sets the range crosshair value and, if requested, sends a
PlotChangeEvent to all registered listeners (but only if the
crosshair is visible).
Parameters: value - the new value. Parameters: notify - a flag that controls whether or not listeners are notified. See Also: CategoryPlot.getRangeCrosshairValue() |
setRangeCrosshairVisible | public void setRangeCrosshairVisible(boolean flag)(Code) | | Sets the flag indicating whether or not the range crosshair is visible.
Parameters: flag - the new value of the flag. See Also: CategoryPlot.isRangeCrosshairVisible() |
setRangeGridlinesVisible | public void setRangeGridlinesVisible(boolean visible)(Code) | | Sets the flag that controls whether or not grid-lines are drawn against
the range axis. If the flag changes value, a
PlotChangeEvent is
sent to all registered listeners.
Parameters: visible - the new value of the flag. See Also: CategoryPlot.isRangeGridlinesVisible() |
setRenderer | public void setRenderer(CategoryItemRenderer renderer, boolean notify)(Code) | | Sets the renderer at index 0 (sometimes referred to as the "primary"
renderer) and, if requested, sends a
PlotChangeEvent to all
registered listeners.
You can set the renderer to null , but this is not
recommended because:
- no data will be displayed;
- the plot background will not be painted;
Parameters: renderer - the renderer (null permitted). Parameters: notify - notify listeners? See Also: CategoryPlot.getRenderer() |
setRenderers | public void setRenderers(CategoryItemRenderer[] renderers)(Code) | | Sets the renderers for this plot and sends a
PlotChangeEvent to all registered listeners.
Parameters: renderers - the renderers. |
zoom | public void zoom(double percent)(Code) | | Zooms (in or out) on the plot's value axis.
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).
Parameters: percent - the zoom amount. |
zoomDomainAxes | public void zoomDomainAxes(double factor, PlotRenderingInfo state, Point2D source)(Code) | | This method does nothing, because CategoryPlot doesn't
support zooming on the domain.
Parameters: factor - the zoom factor. Parameters: state - the plot state. Parameters: source - the source point (in Java2D space) for the zoom. |
zoomDomainAxes | public void zoomDomainAxes(double lowerPercent, double upperPercent, PlotRenderingInfo state, Point2D source)(Code) | | This method does nothing, because CategoryPlot doesn't
support zooming on the domain.
Parameters: lowerPercent - the lower bound. Parameters: upperPercent - the upper bound. Parameters: state - the plot state. Parameters: source - the source point (in Java2D space) for the zoom. |
zoomRangeAxes | public void zoomRangeAxes(double factor, PlotRenderingInfo state, Point2D source)(Code) | | Multiplies the range on the range axis/axes by the specified factor.
Parameters: factor - the zoom factor. Parameters: state - the plot state. Parameters: source - the source point (in Java2D space) for the zoom. |
zoomRangeAxes | public void zoomRangeAxes(double lowerPercent, double upperPercent, PlotRenderingInfo state, Point2D source)(Code) | | Zooms in on the range axes.
Parameters: lowerPercent - the lower bound. Parameters: upperPercent - the upper bound. Parameters: state - the plot state. Parameters: source - the source point (in Java2D space) for the zoom. |
Methods inherited from org.jfree.chart.plot.Plot | public void addChangeListener(PlotChangeListener listener)(Code)(Java Doc) public void axisChanged(AxisChangeEvent event)(Code)(Java Doc) public Object clone() throws CloneNotSupportedException(Code)(Java Doc) public void datasetChanged(DatasetChangeEvent event)(Code)(Java Doc) abstract public void draw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info)(Code)(Java Doc) public void drawBackground(Graphics2D g2, Rectangle2D area)(Code)(Java Doc) public void drawBackgroundImage(Graphics2D g2, Rectangle2D area)(Code)(Java Doc) protected void drawNoDataMessage(Graphics2D g2, Rectangle2D area)(Code)(Java Doc) public void drawOutline(Graphics2D g2, Rectangle2D area)(Code)(Java Doc) public boolean equals(Object obj)(Code)(Java Doc) protected void fillBackground(Graphics2D g2, Rectangle2D area)(Code)(Java Doc) protected void fillBackground(Graphics2D g2, Rectangle2D area, PlotOrientation orientation)(Code)(Java Doc) public float getBackgroundAlpha()(Code)(Java Doc) public Image getBackgroundImage()(Code)(Java Doc) public int getBackgroundImageAlignment()(Code)(Java Doc) public float getBackgroundImageAlpha()(Code)(Java Doc) public Paint getBackgroundPaint()(Code)(Java Doc) public DatasetGroup getDatasetGroup()(Code)(Java Doc) public DrawingSupplier getDrawingSupplier()(Code)(Java Doc) public float getForegroundAlpha()(Code)(Java Doc) public RectangleInsets getInsets()(Code)(Java Doc) public LegendItemCollection getLegendItems()(Code)(Java Doc) public String getNoDataMessage()(Code)(Java Doc) public Font getNoDataMessageFont()(Code)(Java Doc) public Paint getNoDataMessagePaint()(Code)(Java Doc) public Paint getOutlinePaint()(Code)(Java Doc) public Stroke getOutlineStroke()(Code)(Java Doc) public Plot getParent()(Code)(Java Doc) abstract public String getPlotType()(Code)(Java Doc) protected double getRectX(double x, double w1, double w2, RectangleEdge edge)(Code)(Java Doc) protected double getRectY(double y, double h1, double h2, RectangleEdge edge)(Code)(Java Doc) public Plot getRootPlot()(Code)(Java Doc) public void handleClick(int x, int y, PlotRenderingInfo info)(Code)(Java Doc) public boolean isOutlineVisible()(Code)(Java Doc) public boolean isSubplot()(Code)(Java Doc) public void markerChanged(MarkerChangeEvent event)(Code)(Java Doc) public void notifyListeners(PlotChangeEvent event)(Code)(Java Doc) public void removeChangeListener(PlotChangeListener listener)(Code)(Java Doc) public static RectangleEdge resolveDomainAxisLocation(AxisLocation location, PlotOrientation orientation)(Code)(Java Doc) public static RectangleEdge resolveRangeAxisLocation(AxisLocation location, PlotOrientation orientation)(Code)(Java Doc) public void setBackgroundAlpha(float alpha)(Code)(Java Doc) public void setBackgroundImage(Image image)(Code)(Java Doc) public void setBackgroundImageAlignment(int alignment)(Code)(Java Doc) public void setBackgroundImageAlpha(float alpha)(Code)(Java Doc) public void setBackgroundPaint(Paint paint)(Code)(Java Doc) protected void setDatasetGroup(DatasetGroup group)(Code)(Java Doc) public void setDrawingSupplier(DrawingSupplier supplier)(Code)(Java Doc) public void setForegroundAlpha(float alpha)(Code)(Java Doc) public void setInsets(RectangleInsets insets)(Code)(Java Doc) public void setInsets(RectangleInsets insets, boolean notify)(Code)(Java Doc) public void setNoDataMessage(String message)(Code)(Java Doc) public void setNoDataMessageFont(Font font)(Code)(Java Doc) public void setNoDataMessagePaint(Paint paint)(Code)(Java Doc) public void setOutlinePaint(Paint paint)(Code)(Java Doc) public void setOutlineStroke(Stroke stroke)(Code)(Java Doc) public void setOutlineVisible(boolean visible)(Code)(Java Doc) public void setParent(Plot parent)(Code)(Java Doc) public void zoom(double percent)(Code)(Java Doc)
|
|
|