|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.splat.iface.ModelLine
public class ModelLine
ModelLine defines a class for creating and interacting (in a
DivaPlot
sense) with an interpolated curve that displays a model
spectral line of some kind. The interpolated line is created on a
DivaPlot
's DivaPlotGraphicsPane
. Provision to convert
between the graphics coordinates of the DivaPlot
and the
natural (in this case the spectral line position, width and scale)
physical units of a spectrum are provided.
Field Summary | |
---|---|
protected Color |
colour
Colour of the rendered model line. |
protected uk.ac.starlink.diva.DrawActions |
drawActions
DivaPlot DrawActions. |
protected uk.ac.starlink.diva.InterpolatedCurveFigure |
figure
Reference to the InterpolatedCurveFigure (used to access it via DivaPlotGraphicsPane). |
protected uk.ac.starlink.diva.FigureListener |
figureListener
Listener for changes to the figure. |
protected diva.canvas.event.LayerListener |
listener
Listener for creation events. |
protected ModelLineTableModel |
model
The JTable model that stores references to figures used by this object. |
protected DivaPlotGraphicsPane |
pane
The DivaPlotGraphicsPane. |
protected DivaPlot |
plot
The DivaPlot on which the model line is drawn. |
Constructor Summary | |
---|---|
ModelLine(DivaPlot plot,
ModelLineTableModel model,
Color colour,
uk.ac.starlink.diva.interp.Interpolator interpolator,
boolean interactive)
Create a range. |
|
ModelLine(DivaPlot plot,
ModelLineTableModel model,
Color colour,
uk.ac.starlink.diva.interp.Interpolator interpolator,
double[] props)
Create a range non-interactively. |
Method Summary | |
---|---|
protected void |
createFigure(uk.ac.starlink.diva.interp.Interpolator interp)
Create the figure with the given Interpolator. |
void |
delete()
Delete the associated figure. |
void |
figureChanged(uk.ac.starlink.diva.FigureChangedEvent e)
Sent when the figure is changed (i.e. |
void |
figureCreated(uk.ac.starlink.diva.FigureChangedEvent e)
Sent when the figure is created. |
void |
figureRemoved(uk.ac.starlink.diva.FigureChangedEvent e)
Sent when the figure is removed elsewhere. |
double[] |
getProps()
Return the physical properties of the figure. |
boolean |
isFigure(uk.ac.starlink.diva.InterpolatedCurveFigure extFigure)
Report if a InterpolatedCurveFigure is the one being used here. |
protected void |
registerFigure(uk.ac.starlink.diva.InterpolatedCurveFigure figure)
Register the Figure after it has been created. |
protected void |
setPlot(DivaPlot plot)
Set the DivaPlot used for drawing and interactions. |
void |
setProps(double[] props)
Set the physical properties of the figure. |
protected void |
startInteraction(uk.ac.starlink.diva.interp.Interpolator interpolator)
Configure the DivaPlot DrawActions instance to create an InterpolatedCurveFigure with the correct Interpolator. |
String |
toString()
Return a description of the figure. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected DivaPlot plot
protected DivaPlotGraphicsPane pane
protected uk.ac.starlink.diva.DrawActions drawActions
protected uk.ac.starlink.diva.InterpolatedCurveFigure figure
protected diva.canvas.event.LayerListener listener
protected uk.ac.starlink.diva.FigureListener figureListener
protected ModelLineTableModel model
protected Color colour
Constructor Detail |
---|
public ModelLine(DivaPlot plot, ModelLineTableModel model, Color colour, uk.ac.starlink.diva.interp.Interpolator interpolator, boolean interactive)
plot
- DivaPlot that is to display the range.model
- model that arranges to have the properties of the figure
displayed (may be null).colour
- the colour of any figures.interpolator
- an Interpolator to use for creating the
figure.interactive
- whether to create figure interactively,
otherwise it just uses the properties of the
interpolator.public ModelLine(DivaPlot plot, ModelLineTableModel model, Color colour, uk.ac.starlink.diva.interp.Interpolator interpolator, double[] props)
plot
- DivaPlot that is to display the range.model
- model that arranges to have the properties of the figure
displayed (may be null).colour
- the colour of any figures.interpolator
- an Interpolator to use for creating thge figure.Method Detail |
---|
protected void setPlot(DivaPlot plot)
DivaPlot
used for drawing and interactions.
plot
- The new plot valuepublic String toString()
toString
in class Object
public boolean isFigure(uk.ac.starlink.diva.InterpolatedCurveFigure extFigure)
extFigure
- figure to checkpublic double[] getProps()
LineInterpolator
class.
public void setProps(double[] props)
LineInterpolator
class.
protected void startInteraction(uk.ac.starlink.diva.interp.Interpolator interpolator)
protected void createFigure(uk.ac.starlink.diva.interp.Interpolator interp)
limits
- Description of the Parameterprotected void registerFigure(uk.ac.starlink.diva.InterpolatedCurveFigure figure)
public void delete()
public void figureCreated(uk.ac.starlink.diva.FigureChangedEvent e)
figureCreated
in interface uk.ac.starlink.diva.FigureListener
public void figureRemoved(uk.ac.starlink.diva.FigureChangedEvent e)
figureRemoved
in interface uk.ac.starlink.diva.FigureListener
e
- Description of the Parameterpublic void figureChanged(uk.ac.starlink.diva.FigureChangedEvent e)
figureChanged
in interface uk.ac.starlink.diva.FigureListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |