edu.swri.swiftvis.plot.styles
Class RectangleGridSurface

java.lang.Object
  extended by edu.swri.swiftvis.plot.styles.RectangleGridSurface
All Implemented Interfaces:
Bounded, DataPlotStyle, java.io.Serializable

public final class RectangleGridSurface
extends java.lang.Object
implements DataPlotStyle

This class is a faster method of doing surface plots when the plot points are on a rectangular grid. It also has an advantage over the AveragedSurface that it will plot all of the data points as values and center them at the point locations. This is because each data point gets its own rectangle and doesn't serve as the corner for a region.

Author:
Mark Lewis
See Also:
Serialized Form

Constructor Summary
RectangleGridSurface(PlotArea2D pa)
           
RectangleGridSurface(RectangleGridSurface c, PlotArea2D pa)
           
 
Method Summary
 RectangleGridSurface copy(PlotArea2D pa)
           
 void drawToGraphics(java.awt.Graphics2D g, PlotTransform trans)
          This draws the plot into the specified Graphics object.
 double[][] getBounds()
          Returns the min and max values for each dimension that this style supports.
 PlotLegend getLegendInformation()
          This method should return the legend information for this plot style.
 javax.swing.JComponent getPropertiesPanel()
           
static java.lang.String getTypeDescription()
           
 void redoBounds()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RectangleGridSurface

public RectangleGridSurface(PlotArea2D pa)

RectangleGridSurface

public RectangleGridSurface(RectangleGridSurface c,
                            PlotArea2D pa)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getTypeDescription

public static java.lang.String getTypeDescription()

redoBounds

public void redoBounds()
Specified by:
redoBounds in interface DataPlotStyle

drawToGraphics

public void drawToGraphics(java.awt.Graphics2D g,
                           PlotTransform trans)
This draws the plot into the specified Graphics object. It assumes that the transform and clipping for that Graphics object have all been set up so that the markers can be drawn at their normal locations. The xSize and ySize are passed in so that it can figure out how large to make the markers if needed.

Specified by:
drawToGraphics in interface DataPlotStyle

getBounds

public double[][] getBounds()
Returns the min and max values for each dimension that this style supports. The first index tells which dimension we are looking at and the second index is 0 for min and 1 for max.

Specified by:
getBounds in interface Bounded
Returns:
The bounds for this data.

getLegendInformation

public PlotLegend getLegendInformation()
Description copied from interface: DataPlotStyle
This method should return the legend information for this plot style. If there is no legend information for this type of plot, then it should return null.

Specified by:
getLegendInformation in interface DataPlotStyle
Returns:
The legend information or null if none.

getPropertiesPanel

public javax.swing.JComponent getPropertiesPanel()
Specified by:
getPropertiesPanel in interface DataPlotStyle

copy

public RectangleGridSurface copy(PlotArea2D pa)
Specified by:
copy in interface DataPlotStyle