org.opensha.commons.gui
Class GriddedSubsetXYItemRenderer

java.lang.Object
  extended by org.jfree.chart.renderer.AbstractRenderer
      extended by org.jfree.chart.renderer.xy.AbstractXYItemRenderer
          extended by org.jfree.chart.renderer.xy.StandardXYItemRenderer
              extended by org.opensha.commons.gui.AdjustableScaleXYItemRenderer
                  extended by org.opensha.commons.gui.GriddedSubsetXYItemRenderer
All Implemented Interfaces:
Serializable, Cloneable, EventListener, org.jfree.chart.event.AnnotationChangeListener, org.jfree.chart.LegendItemSource, org.jfree.chart.renderer.xy.XYItemRenderer, org.jfree.util.PublicCloneable

public class GriddedSubsetXYItemRenderer
extends AdjustableScaleXYItemRenderer

Title: GriddedSubsetXYItemRenderer

Description: JFreeChart subclass - used in FaultDemo Applet.

Version:
1.0
Author:
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jfree.chart.renderer.xy.StandardXYItemRenderer
org.jfree.chart.renderer.xy.StandardXYItemRenderer.State
 
Field Summary
 
Fields inherited from class org.jfree.chart.renderer.xy.StandardXYItemRenderer
DISCONTINUOUS, DISCONTINUOUS_LINES, IMAGES, LINES, SHAPES, SHAPES_AND_LINES
 
Fields inherited from class org.jfree.chart.renderer.AbstractRenderer
DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, DEFAULT_PAINT, DEFAULT_SHAPE, DEFAULT_STROKE, DEFAULT_VALUE_LABEL_FONT, DEFAULT_VALUE_LABEL_PAINT, ZERO
 
Constructor Summary
GriddedSubsetXYItemRenderer()
          Constructs a new renderer.
GriddedSubsetXYItemRenderer(int type, org.jfree.chart.labels.XYToolTipGenerator toolTipGenerator)
          Constructs a new renderer.
 
Method Summary
 void drawItem(Graphics2D g2, Rectangle2D dataArea, org.jfree.chart.ChartRenderingInfo info, org.jfree.chart.plot.XYPlot plot, org.jfree.chart.axis.ValueAxis horizontalAxis, org.jfree.chart.axis.ValueAxis verticalAxis, org.jfree.data.xy.XYDataset data, int datasetIndex, int series, int item, org.jfree.chart.plot.CrosshairState crosshairInfo)
          Draws the visual representation of a single data item.
 Color getFillColor()
           
protected  boolean isShapeFilled(org.jfree.chart.plot.Plot plot, int series, int item, double x, double y)
          Is used to determine if a shape is filled when drawn or not
 void setFillColor(Color fillColor)
           
 
Methods inherited from class org.opensha.commons.gui.AdjustableScaleXYItemRenderer
getShapeScale
 
Methods inherited from class org.jfree.chart.renderer.xy.StandardXYItemRenderer
clone, drawItem, equals, getBaseShapesFilled, getBaseShapesVisible, getDrawSeriesLineAsPath, getGapThreshold, getGapThresholdType, getImage, getImageHotspot, getItemShapeFilled, getLegendItem, getLegendLine, getPlotDiscontinuous, getPlotImages, getPlotLines, getSeriesShapesFilled, getShapesFilled, initialise, setBaseShapesFilled, setBaseShapesVisible, setDrawSeriesLineAsPath, setGapThreshold, setGapThresholdType, setLegendLine, setPlotDiscontinuous, setPlotImages, setPlotLines, setSeriesShapesFilled, setShapesFilled, setShapesFilled
 
Methods inherited from class org.jfree.chart.renderer.xy.AbstractXYItemRenderer
addAnnotation, addAnnotation, addEntity, annotationChanged, calculateDomainMarkerTextAnchorPoint, drawAnnotations, drawDomainGridLine, drawDomainLine, drawDomainMarker, drawItemLabel, drawRangeLine, drawRangeMarker, fillDomainGridBand, fillRangeGridBand, findDomainBounds, findDomainBounds, findRangeBounds, findRangeBounds, getAnnotations, getBaseItemLabelGenerator, getBaseToolTipGenerator, getDrawingSupplier, getItemLabelGenerator, getItemLabelGenerator, getLegendItemLabelGenerator, getLegendItems, getLegendItemToolTipGenerator, getLegendItemURLGenerator, getPassCount, getPlot, getSeriesItemLabelGenerator, getSeriesToolTipGenerator, getToolTipGenerator, getToolTipGenerator, getURLGenerator, isPointInRect, lineTo, moveTo, removeAnnotation, removeAnnotations, setBaseItemLabelGenerator, setBaseToolTipGenerator, setItemLabelGenerator, setLegendItemLabelGenerator, setLegendItemToolTipGenerator, setLegendItemURLGenerator, setPlot, setSeriesItemLabelGenerator, setSeriesToolTipGenerator, setToolTipGenerator, setURLGenerator, updateCrosshairValues, updateCrosshairValues
 
Methods inherited from class org.jfree.chart.renderer.AbstractRenderer
addChangeListener, calculateLabelAnchorPoint, clearSeriesPaints, clearSeriesStrokes, fireChangeEvent, getAutoPopulateSeriesFillPaint, getAutoPopulateSeriesOutlinePaint, getAutoPopulateSeriesOutlineStroke, getAutoPopulateSeriesPaint, getAutoPopulateSeriesShape, getAutoPopulateSeriesStroke, getBaseCreateEntities, getBaseFillPaint, getBaseItemLabelFont, getBaseItemLabelPaint, getBaseItemLabelsVisible, getBaseLegendShape, getBaseLegendTextFont, getBaseLegendTextPaint, getBaseNegativeItemLabelPosition, getBaseOutlinePaint, getBaseOutlineStroke, getBasePaint, getBasePositiveItemLabelPosition, getBaseSeriesVisible, getBaseSeriesVisibleInLegend, getBaseShape, getBaseStroke, getCreateEntities, getDataBoundsIncludesVisibleSeriesOnly, getDefaultEntityRadius, getItemCreateEntity, getItemFillPaint, getItemLabelAnchorOffset, getItemLabelFont, getItemLabelFont, getItemLabelPaint, getItemLabelPaint, getItemOutlinePaint, getItemOutlineStroke, getItemPaint, getItemShape, getItemStroke, getItemVisible, getLegendShape, getLegendTextFont, getLegendTextPaint, getNegativeItemLabelPosition, getNegativeItemLabelPosition, getPositiveItemLabelPosition, getPositiveItemLabelPosition, getSeriesCreateEntities, getSeriesFillPaint, getSeriesItemLabelFont, getSeriesItemLabelPaint, getSeriesNegativeItemLabelPosition, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesPositiveItemLabelPosition, getSeriesShape, getSeriesStroke, getSeriesVisible, getSeriesVisible, getSeriesVisibleInLegend, getSeriesVisibleInLegend, getTreatLegendShapeAsLine, hashCode, hasListener, isItemLabelVisible, isSeriesItemLabelsVisible, isSeriesVisible, isSeriesVisibleInLegend, lookupLegendShape, lookupLegendTextFont, lookupLegendTextPaint, lookupSeriesFillPaint, lookupSeriesOutlinePaint, lookupSeriesOutlineStroke, lookupSeriesPaint, lookupSeriesShape, lookupSeriesStroke, notifyListeners, removeChangeListener, setAutoPopulateSeriesFillPaint, setAutoPopulateSeriesOutlinePaint, setAutoPopulateSeriesOutlineStroke, setAutoPopulateSeriesPaint, setAutoPopulateSeriesShape, setAutoPopulateSeriesStroke, setBaseCreateEntities, setBaseCreateEntities, setBaseFillPaint, setBaseFillPaint, setBaseItemLabelFont, setBaseItemLabelFont, setBaseItemLabelPaint, setBaseItemLabelPaint, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseLegendShape, setBaseLegendTextFont, setBaseLegendTextPaint, setBaseNegativeItemLabelPosition, setBaseNegativeItemLabelPosition, setBaseOutlinePaint, setBaseOutlinePaint, setBaseOutlineStroke, setBaseOutlineStroke, setBasePaint, setBasePaint, setBasePositiveItemLabelPosition, setBasePositiveItemLabelPosition, setBaseSeriesVisible, setBaseSeriesVisible, setBaseSeriesVisibleInLegend, setBaseSeriesVisibleInLegend, setBaseShape, setBaseShape, setBaseStroke, setBaseStroke, setCreateEntities, setCreateEntities, setDataBoundsIncludesVisibleSeriesOnly, setDefaultEntityRadius, setFillPaint, setFillPaint, setItemLabelAnchorOffset, setItemLabelFont, setItemLabelFont, setItemLabelPaint, setItemLabelPaint, setItemLabelsVisible, setItemLabelsVisible, setItemLabelsVisible, setLegendShape, setLegendTextFont, setLegendTextPaint, setNegativeItemLabelPosition, setNegativeItemLabelPosition, setOutlinePaint, setOutlinePaint, setOutlineStroke, setOutlineStroke, setPaint, setPaint, setPositiveItemLabelPosition, setPositiveItemLabelPosition, setSeriesCreateEntities, setSeriesCreateEntities, setSeriesFillPaint, setSeriesFillPaint, setSeriesItemLabelFont, setSeriesItemLabelFont, setSeriesItemLabelPaint, setSeriesItemLabelPaint, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesNegativeItemLabelPosition, setSeriesNegativeItemLabelPosition, setSeriesOutlinePaint, setSeriesOutlinePaint, setSeriesOutlineStroke, setSeriesOutlineStroke, setSeriesPaint, setSeriesPaint, setSeriesPositiveItemLabelPosition, setSeriesPositiveItemLabelPosition, setSeriesShape, setSeriesShape, setSeriesStroke, setSeriesStroke, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setShape, setShape, setStroke, setStroke, setTreatLegendShapeAsLine
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jfree.chart.renderer.xy.XYItemRenderer
addAnnotation, addAnnotation, addChangeListener, drawAnnotations, drawDomainGridLine, drawDomainMarker, drawRangeLine, drawRangeMarker, fillDomainGridBand, fillRangeGridBand, findDomainBounds, findRangeBounds, getBaseItemLabelFont, getBaseItemLabelGenerator, getBaseItemLabelPaint, getBaseItemLabelsVisible, getBaseNegativeItemLabelPosition, getBaseOutlinePaint, getBaseOutlineStroke, getBasePaint, getBasePositiveItemLabelPosition, getBaseSeriesVisible, getBaseSeriesVisibleInLegend, getBaseShape, getBaseStroke, getBaseToolTipGenerator, getItemLabelFont, getItemLabelFont, getItemLabelGenerator, getItemLabelPaint, getItemLabelPaint, getItemOutlinePaint, getItemOutlineStroke, getItemPaint, getItemShape, getItemStroke, getItemVisible, getLegendItemLabelGenerator, getNegativeItemLabelPosition, getNegativeItemLabelPosition, getPassCount, getPlot, getPositiveItemLabelPosition, getPositiveItemLabelPosition, getSeriesItemLabelFont, getSeriesItemLabelGenerator, getSeriesItemLabelPaint, getSeriesNegativeItemLabelPosition, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesPositiveItemLabelPosition, getSeriesShape, getSeriesStroke, getSeriesToolTipGenerator, getSeriesVisible, getSeriesVisible, getSeriesVisibleInLegend, getSeriesVisibleInLegend, getToolTipGenerator, getURLGenerator, isItemLabelVisible, isSeriesItemLabelsVisible, isSeriesVisible, isSeriesVisibleInLegend, removeAnnotation, removeAnnotations, removeChangeListener, setBaseItemLabelFont, setBaseItemLabelGenerator, setBaseItemLabelPaint, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseNegativeItemLabelPosition, setBaseNegativeItemLabelPosition, setBaseOutlinePaint, setBaseOutlineStroke, setBasePaint, setBasePositiveItemLabelPosition, setBasePositiveItemLabelPosition, setBaseSeriesVisible, setBaseSeriesVisible, setBaseSeriesVisibleInLegend, setBaseSeriesVisibleInLegend, setBaseShape, setBaseStroke, setBaseToolTipGenerator, setItemLabelFont, setItemLabelGenerator, setItemLabelPaint, setItemLabelsVisible, setItemLabelsVisible, setItemLabelsVisible, setLegendItemLabelGenerator, setNegativeItemLabelPosition, setNegativeItemLabelPosition, setOutlinePaint, setOutlineStroke, setPaint, setPlot, setPositiveItemLabelPosition, setPositiveItemLabelPosition, setSeriesItemLabelFont, setSeriesItemLabelGenerator, setSeriesItemLabelPaint, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesNegativeItemLabelPosition, setSeriesNegativeItemLabelPosition, setSeriesOutlinePaint, setSeriesOutlineStroke, setSeriesPaint, setSeriesPositiveItemLabelPosition, setSeriesPositiveItemLabelPosition, setSeriesShape, setSeriesStroke, setSeriesToolTipGenerator, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setShape, setStroke, setToolTipGenerator, setURLGenerator
 
Methods inherited from interface org.jfree.chart.LegendItemSource
getLegendItems
 

Constructor Detail

GriddedSubsetXYItemRenderer

public GriddedSubsetXYItemRenderer()
Constructs a new renderer.


GriddedSubsetXYItemRenderer

public GriddedSubsetXYItemRenderer(int type,
                                   org.jfree.chart.labels.XYToolTipGenerator toolTipGenerator)
Constructs a new renderer.

To specify the type of renderer, use one of the constants: SHAPES, LINES or SHAPES_AND_LINES.

Parameters:
type - The type of renderer.
toolTipGenerator - The tooltip generator.
Method Detail

isShapeFilled

protected boolean isShapeFilled(org.jfree.chart.plot.Plot plot,
                                int series,
                                int item,
                                double x,
                                double y)
Is used to determine if a shape is filled when drawn or not

Overrides:
isShapeFilled in class AdjustableScaleXYItemRenderer
Parameters:
plot - The plot (can be used to obtain standard color information etc).
series - The series index
item - The item index
x - The x value of the item
y - The y value of the item
Returns:
True if the shape used to draw the data item should be filled, false otherwise.

drawItem

public void drawItem(Graphics2D g2,
                     Rectangle2D dataArea,
                     org.jfree.chart.ChartRenderingInfo info,
                     org.jfree.chart.plot.XYPlot plot,
                     org.jfree.chart.axis.ValueAxis horizontalAxis,
                     org.jfree.chart.axis.ValueAxis verticalAxis,
                     org.jfree.data.xy.XYDataset data,
                     int datasetIndex,
                     int series,
                     int item,
                     org.jfree.chart.plot.CrosshairState crosshairInfo)
Draws the visual representation of a single data item.

Parameters:
g2 - The graphics device.
dataArea - The area within which the data is being drawn.
info - Collects information about the drawing.
plot - The plot (can be used to obtain standard color information etc).
horizontalAxis - The horizontal axis.
verticalAxis - The vertical axis.
data - The dataset.
series - The series index.
item - The item index.

setFillColor

public void setFillColor(Color fillColor)

getFillColor

public Color getFillColor()