org.das2.graph
Class SpectrogramRenderer

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

public class SpectrogramRenderer
extends Renderer
implements TableDataSetConsumer, Displayable


Nested Class Summary
protected  class SpectrogramRenderer.RebinListener
           
static class SpectrogramRenderer.RebinnerEnum
           
 
Field Summary
 
Fields inherited from class org.das2.graph.Renderer
ds, lastException, propertyChangeSupport, renderException
 
Constructor Summary
SpectrogramRenderer(DasPlot parent, DataSetDescriptor dsd, DasColorBar colorBar)
          Deprecated. use {link #SpectrogramRenderer(org.das2.dataset.DataSetDescriptor, org.das2.graph.DasColorBar)}
SpectrogramRenderer(DataSetDescriptor dsd, DasColorBar colorBar)
           
 
Method Summary
 boolean acceptContext(int x, int y)
          Returns true if the render thinks it can provide the context for a point.
 DasColorBar getColorBar()
           
 DataSet getConsumedDataSet()
          return the data for DataSetConsumer, which might be rebinned.
 org.w3c.dom.Element getDOMElement(org.w3c.dom.Document document)
           
 java.awt.Color getFillColor()
          Getter for property fillColor.
 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.
 SpectrogramRenderer.RebinnerEnum getRebinner()
          Getter for property rebinner.
 DasAxis getZAxis()
           
protected  void installRenderer()
           
 boolean isPrint300dpi()
          Getter for property draw300dpi.
 boolean isSliceRebinnedData()
          Getter for property sliceRebinnedData.
static SpectrogramRenderer processSpectrogramElement(org.w3c.dom.Element element, DasPlot parent, FormBase form)
           
 void render(java.awt.Graphics g, DasAxis xAxis, DasAxis yAxis, ProgressMonitor mon)
          Render is called whenever the image needs to be refreshed or the content has changed.
 void setColorBar(DasColorBar cb)
           
 void setDataSet(DataSet ds)
           
 void setFillColor(java.awt.Color fillColor)
          Setter for property fillColor.
 void setPrint300dpi(boolean print300dpi)
          Setter for property draw300dpi.
 void setRebinner(SpectrogramRenderer.RebinnerEnum rebinnerEnum)
          Setter for property rebinner.
 void setSliceRebinnedData(boolean sliceRebinnedData)
          Setter for property sliceRebinnedData.
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, getDataLoader, getDataSet, getDataSetDescriptor, getDataSetID, getLastException, getParent, invalidateParentCacheImage, isActive, isDumpDataSet, isOverloading, refresh, refreshImage, removePropertyChangeListener, removePropertyChangeListener, renderException, setActive, 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
 

Constructor Detail

SpectrogramRenderer

public SpectrogramRenderer(DataSetDescriptor dsd,
                           DasColorBar colorBar)

SpectrogramRenderer

public SpectrogramRenderer(DasPlot parent,
                           DataSetDescriptor dsd,
                           DasColorBar colorBar)
Deprecated. use {link #SpectrogramRenderer(org.das2.dataset.DataSetDescriptor, org.das2.graph.DasColorBar)}

Creates a new instance of SpectrogramRenderer

Method Detail

getZAxis

public DasAxis getZAxis()
Specified by:
getZAxis in interface TableDataSetConsumer

getColorBar

public DasColorBar getColorBar()

setColorBar

public void setColorBar(DasColorBar cb)

render

public void render(java.awt.Graphics g,
                   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

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

installRenderer

protected void installRenderer()
Overrides:
installRenderer in class Renderer

uninstallRenderer

protected void uninstallRenderer()
Overrides:
uninstallRenderer in class Renderer

processSpectrogramElement

public static SpectrogramRenderer processSpectrogramElement(org.w3c.dom.Element element,
                                                            DasPlot parent,
                                                            FormBase form)
                                                     throws DasPropertyException,
                                                            DasNameException,
                                                            java.text.ParseException
Throws:
DasPropertyException
DasNameException
java.text.ParseException

getDOMElement

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

getRebinner

public SpectrogramRenderer.RebinnerEnum getRebinner()
Getter for property rebinner.

Returns:
Value of property rebinner.

setRebinner

public void setRebinner(SpectrogramRenderer.RebinnerEnum rebinnerEnum)
Setter for property rebinner.

Parameters:
rebinnerEnum - New value of property rebinner.

isSliceRebinnedData

public boolean isSliceRebinnedData()
Getter for property sliceRebinnedData.

Returns:
Value of property sliceRebinnedData.

setSliceRebinnedData

public void setSliceRebinnedData(boolean sliceRebinnedData)
Setter for property sliceRebinnedData.

Parameters:
sliceRebinnedData - New value of property sliceRebinnedData.

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

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

getConsumedDataSet

public DataSet getConsumedDataSet()
Description copied from class: Renderer
return the data for DataSetConsumer, which might be rebinned.

Specified by:
getConsumedDataSet in interface DataSetConsumer
Overrides:
getConsumedDataSet in class Renderer

setDataSet

public void setDataSet(DataSet ds)
Overrides:
setDataSet in class Renderer

isPrint300dpi

public boolean isPrint300dpi()
Getter for property draw300dpi.

Returns:
Value of property draw300dpi.

setPrint300dpi

public void setPrint300dpi(boolean print300dpi)
Setter for property draw300dpi.

Parameters:
print300dpi - New value of property draw300dpi.

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.

getFillColor

public java.awt.Color getFillColor()
Getter for property fillColor.

Returns:
Value of property fillColor.

setFillColor

public void setFillColor(java.awt.Color fillColor)
Setter for property fillColor.

Parameters:
fillColor - New value of property fillColor.