org.virbo.autoplot
Class ApplicationModel

java.lang.Object
  extended by org.virbo.autoplot.ApplicationModel

public class ApplicationModel
extends java.lang.Object

Internal model of the application to separate model from view.


Field Summary
protected  boolean autolabelling
           
protected  boolean autolayout
           
protected  java.util.List<Bookmark> bookmarks
           
static java.lang.String PROP_AUTOLABELLING
           
static java.lang.String PROP_AUTOOVERVIEW
           
static java.lang.String PROP_AUTORANGING
           
static java.lang.String PROP_DEPNAMES
           
static java.lang.String PROP_SLICEDIMENSION
           
static java.lang.String PROP_SLICEINDEX
           
static java.lang.String PROP_TRANSPOSE
           
static java.lang.String PROPERTY_BOOKMARKS
           
static java.lang.String PROPERTY_DATASOURCE
          data source has been requested
static java.lang.String PROPERTY_FILE
           
static java.lang.String PROPERTY_FILL
          dataset with fill data has been recalculated
static java.lang.String PROPERTY_RECENT
           
static java.lang.String PROPERTY_STATUS
          status message updates
protected  java.util.List<Bookmark> recent
           
static int SYMSIZE_DATAPOINT_COUNT
           
 
Constructor Summary
ApplicationModel()
           
 
Method Summary
 void addBookmark(java.lang.String surl)
           
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void addRecent(java.lang.String surl)
           
 ApplicationState createState(boolean deep)
          creates an ApplicationState object representing the current state.
 org.virbo.datasource.DataSource dataSource()
           
 void exit()
           
 java.util.List<Bookmark> getBookmarks()
           
 edu.uiowa.physics.pw.das.graph.DasCanvas getCanvas()
           
 java.util.List getDataSources()
           
 java.lang.String getDataSourceURL()
           
 java.util.List<java.lang.String> getDepnames()
           
 java.lang.String getEmbeddedDataSet()
           
 java.lang.String getFill()
          Getter for property fill.
 edu.uiowa.physics.pw.das.graph.DasPlot getOverviewPlot()
           
 edu.uiowa.physics.pw.das.graph.DasPlot getPlot()
           
 java.util.List<Bookmark> getRecent()
           
 int getSliceDimension()
           
 int getSliceIndex()
          Get the value of sliceIndex
 java.lang.String getStatus()
          Getter for property status.
 java.lang.String getValidRange()
          Getter for property validRange.
 boolean isAutolabelling()
           
 boolean isAutolayout()
           
 boolean isAutoOverview()
           
 boolean isAutoRangeSuppress()
          Getter for property autoRangeSuppress.
 boolean isAutoranging()
           
 boolean isInterpretMetadata()
          Getter for property interpretMetadata.
 boolean isIsotropic()
          Getter for property isotropic.
 boolean isShowContextOverview()
           
 boolean isTranspose()
           
 boolean isUseEmbeddedDataSet()
           
 org.virbo.dataset.QDataSet loadDataSet(int i)
          load the data set from the DataSource.
 void parseFillValidRange(java.lang.String validRange, java.lang.String sfill)
          calculate units object that implements validRange and sfill
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
protected  void resetDataSetSourceURL(java.lang.String surl, org.das2.util.monitor.ProgressMonitor mon)
          TODO: document me
 void restoreState(ApplicationState state, boolean deep, boolean forceFill)
          set the application state.
 void setAutolabelling(boolean autolabelling)
           
 void setAutolayout(boolean autolayout)
           
 void setAutoOverview(boolean newautoOverview)
           
 void setAutoRangeSuppress(boolean autoRangeSuppress)
          Setter for property autoRangeSuppress.
 void setAutoranging(boolean newautoranging)
           
 void setBookmarks(java.util.List<Bookmark> list)
           
 void setDataSource(org.virbo.datasource.DataSource ds)
           
 void setDataSourceURL(java.lang.String surl)
           
 void setDepnames(java.util.List<java.lang.String> newdepnames)
           
 void setEmbeddedDataSet(java.lang.String dataset)
           
 void setFill(java.lang.String fill)
          Setter for property fill.
 void setInterpretMetadata(boolean interpretMetadata)
          Setter for property interpretMetadata.
 void setIsotropic(boolean isotropic)
          Setter for property isotropic.
protected  void setRenderer(edu.uiowa.physics.pw.das.graph.Renderer rend, edu.uiowa.physics.pw.das.graph.Renderer overRend)
           
 void setShowContextOverview(boolean showContextOverview)
           
 void setSliceDimension(int newsliceDimension)
           
 void setSliceIndex(int newsliceIndex)
          Set the value of sliceIndex
 void setTranspose(boolean val)
           
 void setUseEmbeddedDataSet(boolean use)
           
 void setValidRange(java.lang.String validRange)
          Setter for property validRange.
 void update(boolean autorange)
          update the model and view using the new DataSource to create a new dataset, then inspecting the dataset to decide on axis settings.
protected  void updateFill(boolean autorange)
          the fill parameters have changed, so update the auto range stats.
 void waitUntilIdle(boolean runtimeException)
          wait for autoplot to settle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_DATASOURCE

public static java.lang.String PROPERTY_DATASOURCE
data source has been requested


PROPERTY_FILL

public static java.lang.String PROPERTY_FILL
dataset with fill data has been recalculated


PROPERTY_FILE

public static java.lang.String PROPERTY_FILE

PROPERTY_RECENT

public static java.lang.String PROPERTY_RECENT

PROPERTY_BOOKMARKS

public static java.lang.String PROPERTY_BOOKMARKS

PROPERTY_STATUS

public static java.lang.String PROPERTY_STATUS
status message updates


SYMSIZE_DATAPOINT_COUNT

public static int SYMSIZE_DATAPOINT_COUNT

recent

protected java.util.List<Bookmark> recent

bookmarks

protected java.util.List<Bookmark> bookmarks

PROP_AUTOOVERVIEW

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

PROP_AUTORANGING

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

autolabelling

protected boolean autolabelling

PROP_AUTOLABELLING

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

autolayout

protected boolean autolayout

PROP_SLICEDIMENSION

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

PROP_SLICEINDEX

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

PROP_TRANSPOSE

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

PROP_DEPNAMES

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

ApplicationModel

public ApplicationModel()
Method Detail

setRenderer

protected void setRenderer(edu.uiowa.physics.pw.das.graph.Renderer rend,
                           edu.uiowa.physics.pw.das.graph.Renderer overRend)

getCanvas

public edu.uiowa.physics.pw.das.graph.DasCanvas getCanvas()

setDataSource

public void setDataSource(org.virbo.datasource.DataSource ds)

dataSource

public org.virbo.datasource.DataSource dataSource()

getDataSources

public java.util.List getDataSources()

updateFill

protected void updateFill(boolean autorange)
the fill parameters have changed, so update the auto range stats. This should not be run on the AWT event thread!

Parameters:
autorange - if false, then no autoranging is done.

update

public void update(boolean autorange)
update the model and view using the new DataSource to create a new dataset, then inspecting the dataset to decide on axis settings.

Parameters:
autorange - if false, then no autoranging is done, just the fill part.

loadDataSet

public org.virbo.dataset.QDataSet loadDataSet(int i)
load the data set from the DataSource.


addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

resetDataSetSourceURL

protected void resetDataSetSourceURL(java.lang.String surl,
                                     org.das2.util.monitor.ProgressMonitor mon)
TODO: document me


setDataSourceURL

public void setDataSourceURL(java.lang.String surl)
Throws:
java.lang.RuntimeException - when getDataSource throws Exception

getDataSourceURL

public java.lang.String getDataSourceURL()

parseFillValidRange

public void parseFillValidRange(java.lang.String validRange,
                                java.lang.String sfill)
                         throws java.text.ParseException
calculate units object that implements validRange and sfill

Throws:
java.text.ParseException

getRecent

public java.util.List<Bookmark> getRecent()

getBookmarks

public java.util.List<Bookmark> getBookmarks()

setBookmarks

public void setBookmarks(java.util.List<Bookmark> list)

addRecent

public void addRecent(java.lang.String surl)

addBookmark

public void addBookmark(java.lang.String surl)

exit

public void exit()

createState

public ApplicationState createState(boolean deep)
creates an ApplicationState object representing the current state.

Parameters:
deep - if true, do a deeper, more expensive gathering of state. In the initial implementation, this calculates the embededded dataset.
Returns:
ApplicationState object

restoreState

public void restoreState(ApplicationState state,
                         boolean deep,
                         boolean forceFill)
set the application state.

Parameters:
state -
deep - if true, then unpack the dataset as well.
forceFill, - force a data load

getValidRange

public java.lang.String getValidRange()
Getter for property validRange.

Returns:
Value of property validRange.

setValidRange

public void setValidRange(java.lang.String validRange)
Setter for property validRange.

Parameters:
validRange - New value of property validRange.

getFill

public java.lang.String getFill()
Getter for property fill.

Returns:
Value of property fill.

setFill

public void setFill(java.lang.String fill)
Setter for property fill.

Parameters:
fill - New value of property fill.

isAutoRangeSuppress

public boolean isAutoRangeSuppress()
Getter for property autoRangeSuppress.

Returns:
Value of property autoRangeSuppress.

setAutoRangeSuppress

public void setAutoRangeSuppress(boolean autoRangeSuppress)
Setter for property autoRangeSuppress.

Parameters:
autoRangeSuppress - New value of property autoRangeSuppress.

getEmbeddedDataSet

public java.lang.String getEmbeddedDataSet()

setEmbeddedDataSet

public void setEmbeddedDataSet(java.lang.String dataset)

isUseEmbeddedDataSet

public boolean isUseEmbeddedDataSet()

setUseEmbeddedDataSet

public void setUseEmbeddedDataSet(boolean use)

isShowContextOverview

public boolean isShowContextOverview()

setShowContextOverview

public void setShowContextOverview(boolean showContextOverview)

isAutoOverview

public boolean isAutoOverview()

setAutoOverview

public void setAutoOverview(boolean newautoOverview)

isAutoranging

public boolean isAutoranging()

setAutoranging

public void setAutoranging(boolean newautoranging)

isAutolabelling

public boolean isAutolabelling()

setAutolabelling

public void setAutolabelling(boolean autolabelling)

isAutolayout

public boolean isAutolayout()

setAutolayout

public void setAutolayout(boolean autolayout)

isInterpretMetadata

public boolean isInterpretMetadata()
Getter for property interpretMetadata.

Returns:
Value of property interpretMetadata.

setInterpretMetadata

public void setInterpretMetadata(boolean interpretMetadata)
Setter for property interpretMetadata.

Parameters:
interpretMetadata - New value of property interpretMetadata.

getStatus

public java.lang.String getStatus()
Getter for property status.

Returns:
Value of property status.

isIsotropic

public boolean isIsotropic()
Getter for property isotropic.

Returns:
Value of property isotropic.

setIsotropic

public void setIsotropic(boolean isotropic)
Setter for property isotropic.

Parameters:
isotropic - New value of property isotropic.

getSliceDimension

public int getSliceDimension()

setSliceDimension

public void setSliceDimension(int newsliceDimension)

getSliceIndex

public int getSliceIndex()
Get the value of sliceIndex

Returns:
the value of sliceIndex

setSliceIndex

public void setSliceIndex(int newsliceIndex)
Set the value of sliceIndex

Parameters:
newsliceIndex - new value of sliceIndex

setTranspose

public void setTranspose(boolean val)

isTranspose

public boolean isTranspose()

getDepnames

public java.util.List<java.lang.String> getDepnames()

setDepnames

public void setDepnames(java.util.List<java.lang.String> newdepnames)

getPlot

public edu.uiowa.physics.pw.das.graph.DasPlot getPlot()

getOverviewPlot

public edu.uiowa.physics.pw.das.graph.DasPlot getOverviewPlot()

waitUntilIdle

public void waitUntilIdle(boolean runtimeException)
                   throws java.lang.InterruptedException
wait for autoplot to settle.

Throws:
java.lang.InterruptedException