org.autoplot.dom.PlotElementController

PlotElementController manages the PlotElement, for example resolving the datasource and loading the dataset. Once the data is loaded, the listening PlotElementController receives the update and does the following:

  1. resolve the plot type: spectrogram, lineplot, stack of lineplot, etc, using AutoplotUtil.guessRenderType(fillDs);
  2. reset the plot element, setting the plot type and creating children if needed. For example, a B-GSM (demo 5) is resolved by creating three children, and handing the components off to them.
  3. if the component property is not empty, then we implement the component and display that.
  4. adjusting the component slice index will not affect ranging when the index is changed.

PlotElementController( org.autoplot.ApplicationModel model, org.autoplot.dom.Application dom, org.autoplot.dom.PlotElement plotElement )


SYMSIZE_DATAPOINT_COUNT

switch over between fine and course points.


LARGE_DATASET_COUNT


PROP_DATASET

the current dataset plotted, after operations (component property) has been applied.


PROP_RESETRANGES

true indicates the controller should autorange next time the fillDataSet is changed.


PROP_RESETPLOTELEMENT

true indicates the controller should install a new renderer to implement the renderType selection. This may mean that we introduce or remove child plotElements. This implies resetRenderType.


PROP_RESETCOMPONENT

true indicates that the component should be reset when the dataset arrives. This is added as a controller property so that clients can clear this setting if they do not want the component to be reset. This is only considered if resetPlotElement is set.


PROP_RESETRENDERTYPE

true indicates the peer should be reset to the current renderType.


PROP_DSFRESET

when true, a change in the DataSourceFilter should reset the plotElement.


PROP_SLICEAUTORANGES


axisDimensionsChange

axisDimensionsChange( org.autoplot.RenderType oldRenderType, org.autoplot.RenderType newRenderType ) → boolean

true indicates that the new renderType makes the axis dimensions change. For example, switching from spectrogram to series (to get a stack of components) causes the z axis to become the yaxis.

Parameters

oldRenderType - a RenderType
newRenderType - a RenderType

Returns:

true if the dimensions change.

[search for examples] [view on GitHub] [view on old javadoc] [view source]

bindToContoursRenderer( org.das2.graph.Renderer renderer ) → void [view source]
bindToDigitalRenderer( org.das2.graph.DigitalRenderer renderer ) → void [view source]
bindToEventsRenderer( org.das2.graph.EventsRenderer renderer ) → void [view source]
bindToImageVectorDataSetRenderer( org.das2.graph.HugeScatterRenderer renderer ) → void [view source]
bindToPolarPlotRenderer( org.das2.graph.PolarPlotRenderer renderer ) → void [view source]
bindToSeriesRenderer( org.das2.graph.SeriesRenderer seriesRenderer ) → void [view source]
bindToSpectrogramRenderer( org.das2.graph.SpectrogramRenderer spectrogramRenderer ) → void [view source]
bindToTickCurveRenderer( org.das2.graph.TickCurveRenderer renderer ) → void [view source]

doAutoranging

doAutoranging( org.autoplot.dom.PlotElement peleCopy, java.util.Map props, QDataSet fillDs ) → void

This is the old updateFillSeries and updateFillSpectrogram code. This calculates ranges and preferred symbol settings, and puts the values in peleCopy.plotDefaults. The dom Plot containing this plotElement should be listening for changes in plotElement.plotDefaults, and can then decide if it wants to use the autorange settings. This also sets the style node of the plotElement copy, so its values should be sync'ed as well.

Parameters

peleCopy - the plot element.
props - metadata provided by the data source, converted to uniform QDataSet scheme (e.g. get(DEPEND_0).get(TYPICAL_MIN) )
fillDs - the dataset

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


doAutoranging

doAutoranging( org.autoplot.dom.PlotElement peleCopy, java.util.Map props, QDataSet fillDs, boolean ignoreDsProps ) → void

This is the old updateFillSeries and updateFillSpectrogram code. This calculates ranges and preferred symbol settings, and puts the values in peleCopy.plotDefaults. The dom Plot containing this plotElement should be listening for changes in plotElement.plotDefaults, and can then decide if it wants to use the autorange settings. This also sets the style node of the plotElement copy, so its values should be sync'ed as well. This routine can be found by searching for "liver," since it is not the heart but pretty close to it. (2024-01-19: I forgot about liver, was thinking autorange9)

Parameters

peleCopy - the plot element.
props - metadata provided by the data source, converted to uniform QDataSet scheme (e.g. get(DEPEND_0).get(TYPICAL_MIN) )
fillDs - the dataset
ignoreDsProps - a boolean

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


doResetRenderType

doResetRenderType( org.autoplot.RenderType renderType ) → void

used to explicitly set the rendering type. This installs a das2 renderer into the plot to implement the render type. preconditions: renderer type has been identified. postconditions: das2 renderer peer is created and bindings made.

Parameters

renderType - a RenderType

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getApplication

getApplication( ) → org.autoplot.dom.Application

return the application that the plotElement belongs to.

Returns:

an org.autoplot.dom.Application

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getChildPlotElements

getChildPlotElements( ) → java.util.List

return child plotElements, which are plotElements that share a datasource but pull out a component of the data.

Returns:

a java.util.List

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getDasPlot

getDasPlot( ) → org.das2.graph.DasPlot

return the plot containing this plotElement's renderer, or null.

Returns:

the plot containing this plotElement's renderer, or null.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getDataSet

getDataSet( ) → QDataSet

the current dataset plotted, after operations (component property) has been applied.

Returns:

a QDataSet

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getDataSourceFilter

getDataSourceFilter( ) → org.autoplot.dom.DataSourceFilter

return the data source and filter for this plotElement.

Returns:

an org.autoplot.dom.DataSourceFilter

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getParentPlotElement

getParentPlotElement( ) → org.autoplot.dom.PlotElement

return the parent plotElement, or null if the plotElement doesn't have a parent.

Returns:

an org.autoplot.dom.PlotElement

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getPlotElement

getPlotElement( ) → org.autoplot.dom.PlotElement

return the plot element.

Returns:

the plot element.

[search for examples] [view on GitHub] [view on old javadoc] [view source]

getRenderer( ) → org.das2.graph.Renderer [view source]
isDsfReset( ) → boolean [view source]
isPendingChanges( ) → boolean [view source]
isResetComponent( ) → boolean [view source]
isResetPlotElement( ) → boolean [view source]
isResetRanges( ) → boolean [view source]
isResetRenderType( ) → boolean [view source]
isSliceAutoranges( ) → boolean [view source]
pendingChanges( java.util.Map changes ) → void [view source]

resolveRenderType

resolveRenderType( QDataSet fillds ) → String

Resolve the renderType and renderControl for the dataset. This may be set explicitly by the dataset, in its RENDER_TYPE property, or resolved using the dataset scheme.

Parameters

fillds - a QDataSet

Returns:

the render string with canonical types. The result will always contain a greater than (>).

[search for examples] [view on GitHub] [view on old javadoc] [view source]

setDsfReset( boolean dsfReset ) → void [view source]

setRenderer

setRenderer( org.das2.graph.Renderer renderer ) → void

set the renderer controlled by this PlotElement controller. This should be used with caution.

Parameters

renderer - a Renderer

Returns:

void (returns nothing)

See Also:

external.PlotCommand


[search for examples] [view on GitHub] [view on old javadoc] [view source]

setResetComponent( boolean resetComponent ) → void [view source]
setResetPlotElement( boolean resetPlotElement ) → void [view source]
setResetRanges( boolean resetRanges ) → void [view source]
setResetRenderType( boolean resetRenderType ) → void [view source]
setSliceAutoranges( boolean sliceAutoranges ) → void [view source]
toString( ) → String [view source]