org.das2.graph
Class ContoursRenderer

java.lang.Object
  extended by org.das2.graph.Renderer
      extended by org.das2.graph.ContoursRenderer
All Implemented Interfaces:
Displayable, Editable, DataSetConsumer

public class ContoursRenderer
extends Renderer
implements Displayable

Renderer for making contour plots


Field Summary
static java.lang.String PROP_LINETHICK
           
static java.lang.String PROP_SIMPLIFYPATHS
           
 
Fields inherited from class org.das2.graph.Renderer
ds, lastException, logger, propertyChangeSupport, renderException
 
Constructor Summary
ContoursRenderer()
          Creates a new instance of ContoursRenderer
 
Method Summary
 boolean acceptContext(int x, int y)
          Returns true if the render thinks it can provide the context for a point.
 java.awt.Color getColor()
          Getter for property color.
 java.lang.String getContours()
          Getter for property contours.
protected  org.w3c.dom.Element getDOMElement(org.w3c.dom.Document document)
           
 double getLabelCadence()
          Getter for property labelCadence.
 double getLineThick()
           
 javax.swing.Icon getListIcon()
          An icon can be provided that will be shown in a list along with the textual description of the element.
 java.lang.String getListLabel()
          return a String that will help the user identify this item when choosing from a list.
protected  void installRenderer()
           
 boolean isDrawLabels()
          Getter for property drawLabels.
 boolean isSimplifyPaths()
           
 void render(java.awt.Graphics g1, DasAxis xAxis, DasAxis yAxis, ProgressMonitor mon)
          Render is called whenever the image needs to be refreshed or the content has changed.
 void setColor(java.awt.Color color)
          Setter for property color.
 void setContours(java.lang.String contours)
          Setter for property contours.
 void setDrawLabels(boolean drawLabels)
          Setter for property drawLabels.
 void setLabelCadence(double labelCadence)
          Setter for property labelCadence.
 void setLineThick(double newlineThick)
           
 void setSimplifyPaths(boolean newsimplifyPaths)
           
protected  void uninstallRenderer()
           
 void updatePlotImage(DasAxis xAxis, DasAxis yAxis, ProgressMonitor monitor)
          updatePlotImage is called once the expensive operation of loading the data is completed.
 
Methods inherited from class org.das2.graph.Renderer
addPropertyChangeListener, addPropertyChangeListener, getAffineTransform, getConsumedDataSet, getDataLoader, getDataSet, getDataSetDescriptor, getDataSetID, getLastException, getParent, invalidateParentCacheImage, isActive, isDumpDataSet, isOverloading, refresh, refreshImage, removePropertyChangeListener, removePropertyChangeListener, renderException, setActive, setDataSet, setDataSetDescriptor, setDataSetID, setDataSetLoader, setDumpDataSet, setException, setLastException, setOverloading, update, updateImmediately
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_SIMPLIFYPATHS

public static final java.lang.String PROP_SIMPLIFYPATHS
See Also:
Constant Field Values

PROP_LINETHICK

public static final java.lang.String PROP_LINETHICK
See Also:
Constant Field Values
Constructor Detail

ContoursRenderer

public ContoursRenderer()
Creates a new instance of ContoursRenderer

Method Detail

render

public void render(java.awt.Graphics g1,
                   DasAxis xAxis,
                   DasAxis yAxis,
                   ProgressMonitor mon)
Description copied from class: Renderer
Render is called whenever the image needs to be refreshed or the content has changed. This operation should occur with an animation-interactive time scale, and an image should be cached when this is not possible. The graphics object will have its origin at the upper-left corner of the screen.

Specified by:
render in class Renderer

installRenderer

protected void installRenderer()
Overrides:
installRenderer in class Renderer

uninstallRenderer

protected void uninstallRenderer()
Overrides:
uninstallRenderer in class Renderer

getDOMElement

protected org.w3c.dom.Element getDOMElement(org.w3c.dom.Document document)
Overrides:
getDOMElement in class Renderer

getListIcon

public javax.swing.Icon getListIcon()
Description copied from interface: Displayable
An icon can be provided that will be shown in a list along with the textual description of the element. This method should return null if there is no icon available.

Specified by:
getListIcon in interface Displayable

updatePlotImage

public void updatePlotImage(DasAxis xAxis,
                            DasAxis yAxis,
                            ProgressMonitor monitor)
                     throws DasException
Description copied from class: Renderer
updatePlotImage is called once the expensive operation of loading the data is completed. This operation should occur on an interactive time scale. This is an opportunity to create a cache image of the data with the current axis state, when the render operation cannot operate on an animation interactive time scale. Codes can no longer assume that the xAxis sent to render will be in the same state as it was when updatePlotImage was called, so use the getAffineTransform method. Only Renderer should call this method!

Overrides:
updatePlotImage in class Renderer
Throws:
DasException

getContours

public java.lang.String getContours()
Getter for property contours.

Returns:
Value of property contours.

setContours

public void setContours(java.lang.String contours)
Setter for property contours.

Parameters:
contours - New value of property contours.

getLabelCadence

public double getLabelCadence()
Getter for property labelCadence.

Returns:
Value of property labelCadence.

setLabelCadence

public void setLabelCadence(double labelCadence)
Setter for property labelCadence.

Parameters:
labelCadence - New value of property labelCadence.

acceptContext

public boolean acceptContext(int x,
                             int y)
Description copied from class: Renderer
Returns true if the render thinks it can provide the context for a point. That is, the renderer affected that point, or nearby points. For example, this is used currently to provide a way for the operator to click on a plot and directly edit the renderer who drew the pixel.

Overrides:
acceptContext in class Renderer
Parameters:
x - the x coordinate in the canvas coordinate system.
y - the y coordinate in the canvas coordinate system.

isDrawLabels

public boolean isDrawLabels()
Getter for property drawLabels.

Returns:
Value of property drawLabels.

setDrawLabels

public void setDrawLabels(boolean drawLabels)
Setter for property drawLabels.

Parameters:
drawLabels - New value of property drawLabels.

getColor

public java.awt.Color getColor()
Getter for property color.

Returns:
Value of property color.

setColor

public void setColor(java.awt.Color color)
Setter for property color.

Parameters:
color - New value of property color.

getListLabel

public java.lang.String getListLabel()
Description copied from interface: Displayable
return a String that will help the user identify this item when choosing from a list.

Specified by:
getListLabel in interface Displayable

isSimplifyPaths

public boolean isSimplifyPaths()

setSimplifyPaths

public void setSimplifyPaths(boolean newsimplifyPaths)

getLineThick

public double getLineThick()

setLineThick

public void setLineThick(double newlineThick)