org.das2.graph
Class SymbolLineRenderer

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

public class SymbolLineRenderer
extends Renderer
implements Displayable


Field Summary
 
Fields inherited from class org.das2.graph.Renderer
ds, lastException, logger, propertyChangeSupport, renderException
 
Constructor Summary
SymbolLineRenderer()
           
SymbolLineRenderer(DataSet ds)
          Deprecated. use SymbolLineRenderer() and setDataSet() instead. Note that behavior may be slightly different since a DataLoader is created.
SymbolLineRenderer(DataSetDescriptor dsd)
          Deprecated. use SymbolLineRenderer() and setDataSetDescriptor() instead.
 
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.
 org.w3c.dom.Element getDOMElement(org.w3c.dom.Document document)
           
 float getLineWidth()
           
 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.
 Psym getPsym()
          Getter for property psym.
 PsymConnector getPsymConnector()
           
 double getSymSize()
          Getter for property symsize.
protected  void installRenderer()
           
 boolean isAntiAliased()
          Getter for property antiAliased.
 boolean isHistogram()
           
static SymbolLineRenderer processLinePlotElement(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 setAntiAliased(boolean antiAliased)
          Setter for property antiAliased.
 void setColor(java.awt.Color color)
          Setter for property color.
 void setHistogram(boolean b)
           
 void setLineWidth(float f)
           
 void setPsym(Psym psym)
          Setter for property psym.
 void setPsymConnector(PsymConnector p)
           
 void setSymSize(double symSize)
          Setter for property symsize.
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
 

Constructor Detail

SymbolLineRenderer

public SymbolLineRenderer()

SymbolLineRenderer

public SymbolLineRenderer(DataSet ds)
Deprecated. use SymbolLineRenderer() and setDataSet() instead. Note that behavior may be slightly different since a DataLoader is created.


SymbolLineRenderer

public SymbolLineRenderer(DataSetDescriptor dsd)
Deprecated. use SymbolLineRenderer() and setDataSetDescriptor() instead.

Method Detail

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)
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

getPsymConnector

public PsymConnector getPsymConnector()

setPsymConnector

public void setPsymConnector(PsymConnector p)

getPsym

public Psym getPsym()
Getter for property psym.

Returns:
Value of property psym.

setPsym

public void setPsym(Psym psym)
Setter for property psym.

Parameters:
psym - New value of property psym.

getSymSize

public double getSymSize()
Getter for property symsize.

Returns:
Value of property symsize.

setSymSize

public void setSymSize(double symSize)
Setter for property symsize.

Parameters:
symSize - New value of property symsize.

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.

getLineWidth

public float getLineWidth()

setLineWidth

public void setLineWidth(float f)

installRenderer

protected void installRenderer()
Overrides:
installRenderer in class Renderer

uninstallRenderer

protected void uninstallRenderer()
Overrides:
uninstallRenderer in class Renderer

processLinePlotElement

public static SymbolLineRenderer processLinePlotElement(org.w3c.dom.Element element,
                                                        DasPlot parent,
                                                        FormBase form)

getDOMElement

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

isAntiAliased

public boolean isAntiAliased()
Getter for property antiAliased.

Returns:
Value of property antiAliased.

setAntiAliased

public void setAntiAliased(boolean antiAliased)
Setter for property antiAliased.

Parameters:
antiAliased - New value of property antiAliased.

isHistogram

public boolean isHistogram()

setHistogram

public void setHistogram(boolean b)

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

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.