org.autoplot.dom.DomOps

Many operations are defined within the DOM object controllers that needn't be. This class is a place for operations that are performed on the DOM independent of the controllers. For example, the operation to swap the position of two plots is easily implemented by changing the rowid and columnid properties of the two plots.

DomOps( )


OPTION_FIX_LAYOUT_HIDE_TITLES

See https://sourceforge.net/p/autoplot/feature-requests/811/


OPTION_FIX_LAYOUT_HIDE_TIME_AXES


OPTION_FIX_LAYOUT_HIDE_Y_AXES


OPTION_FIX_LAYOUT_MOVE_LEGENDS_TO_OUTSIDE_NE


OPTION_FIX_LAYOUT_VERTICAL_SPACING


OPTION_FIX_LAYOUT_HORIZONTAL_SPACING


aggregateAll

aggregateAll( org.autoplot.dom.Application dom ) → void

aggregate all the URIs within the dom.

Parameters

dom - an Application

Returns:

void (returns nothing)

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


bottomAndTopMostPlot

bottomAndTopMostPlot( org.autoplot.dom.Application dom, java.util.List plots ) → Plot

return the bottom-most and top-most plot of a list of plots. This does use controllers.

Parameters

dom - an Application
plots - a java.util.List

Returns:

an org.autoplot.dom.Plot[]

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

bottomAndTopMostPlot( org.autoplot.dom.Application dom, org.autoplot.dom.Plot[] plots ) → Plot

copyPlot

copyPlot( org.autoplot.dom.Plot srcPlot, boolean bindx, boolean bindy, Object direction ) → Plot

Copy the plot and its axis settings, optionally binding the axes. Whether the axes are bound or not, the duplicate plot is initially synchronized to the source plot. See {@link org.autoplot.dom.ApplicationController#copyPlot(org.autoplot.dom.Plot, boolean, boolean, boolean) copyPlot}

Parameters

srcPlot - a Plot
bindx - a boolean
bindy - a boolean
direction - an Object

Returns:

the new plot

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


copyPlotAndPlotElements

copyPlotAndPlotElements( org.autoplot.dom.Plot srcPlot, boolean copyPlotElements, boolean bindx, boolean bindy, Object direction ) → Plot

copyPlotAndPlotElements. This does not appear to be used. See {@link org.autoplot.dom.ApplicationController#copyPlotAndPlotElements(org.autoplot.dom.Plot, org.autoplot.dom.DataSourceFilter, boolean, boolean) copyPlotAndPlotElements}

Parameters

srcPlot - a Plot
copyPlotElements - a boolean
bindx - a boolean
bindy - a boolean
direction - an Object

Returns:

an org.autoplot.dom.Plot

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


copyPlotElements

copyPlotElements( org.autoplot.dom.Plot srcPlot, org.autoplot.dom.Plot dstPlot ) → List

copy the plot elements from srcPlot to dstPlot. This does not appear to be used. See {@link org.autoplot.dom.ApplicationController#copyPlotElement(org.autoplot.dom.PlotElement, org.autoplot.dom.Plot, org.autoplot.dom.DataSourceFilter) copyPlotElement}

Parameters

srcPlot - plot containing zero or more plotElements.
dstPlot - destination for the plotElements.

Returns:

a java.util.List

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


fixHorizontalLayout

fixHorizontalLayout( org.autoplot.dom.Application dom ) → void

This is the new layout mechanism (fixLayout), but changed from vertical layout to horizontal. This one:

This should also be idempotent, where calling this a second time should have no effect.

Parameters

dom - an application state, with controller nodes.

Returns:

void (returns nothing)

See Also:

fixLayout(org.autoplot.dom.Application)


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

fixHorizontalLayout( org.autoplot.dom.Application dom, java.util.Map options ) → void

fixLayout

fixLayout( org.autoplot.dom.Application dom ) → void

New layout mechanism which fixes a number of shortcomings of the old layout mechanism, newCanvasLayout. This one:

This should also be idempotent, where calling this a second time should have no effect.

Parameters

dom - an application state.

Returns:

void (returns nothing)

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

fixLayout( org.autoplot.dom.Application dom, java.util.Map options ) → void

fixVerticalLayout

fixVerticalLayout( org.autoplot.dom.Application dom ) → void

This is the new layout mechanism (fixLayout), correcting the layout in the vertical direction. This one:

This should also be idempotent, where calling this a second time should have no effect.

Parameters

dom - an application state, with controller nodes.

Returns:

void (returns nothing)

See Also:

fixLayout(org.autoplot.dom.Application)


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

fixVerticalLayout( org.autoplot.dom.Application dom, java.util.Map options ) → void

getOrCreateSelectedColumn

getOrCreateSelectedColumn( org.autoplot.dom.Application dom, java.util.List selectedPlots, boolean create ) → Column

Used in the LayoutPanel's add hidden plot, get the column of the selected plot or create a new column if several plots are selected.

Parameters

dom - the application.
selectedPlots - the selected plots.
create - allow a new column to be created.

Returns:

an org.autoplot.dom.Column

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


getOrCreateSelectedRow

getOrCreateSelectedRow( org.autoplot.dom.Application dom, java.util.List selectedPlots, boolean create ) → Row

Used in the LayoutPanel's add hidden plot, get the row of the selected plot or create a new row if several plots are selected.

Parameters

dom - the application.
selectedPlots - the selected plots.
create - allow a new column to be created.

Returns:

an org.autoplot.dom.Row

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


getPlotsFor

getPlotsFor( org.autoplot.dom.Application dom, org.autoplot.dom.Row row, boolean visible ) → List

return a list of the plots using the given row. This does not use controllers.

Parameters

dom - a dom
row - the row to search for.
visible - if true, then the plot must also be visible. (Note its colorbar visible is ignored.)

Returns:

a list of plots.

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

getPlotsFor( org.autoplot.dom.Application dom, org.autoplot.dom.Column column, boolean visible ) → List

leftAndRightMostPlot

leftAndRightMostPlot( org.autoplot.dom.Application dom, java.util.List plots ) → Plot

return the left-most and right-most plot of a list of plots. This does use controllers.

Parameters

dom - an Application
plots - a java.util.List

Returns:

two-element array of leftmost and rightmost plot.

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

leftAndRightMostPlot( org.autoplot.dom.Application dom, org.autoplot.dom.Plot[] plots ) → Plot

newCanvasLayout

newCanvasLayout( org.autoplot.dom.Application dom ) → void

play with new canvas layout. This started as a Jython Script, but it's faster to implement here. See http://autoplot.org/developer.autolayout#Algorithm

Parameters

dom - an Application

Returns:

void (returns nothing)

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


swapPosition

swapPosition( org.autoplot.dom.Plot a, org.autoplot.dom.Plot b ) → void

swap the position of the two plots. If one plot has its tick labels hidden, then this is swapped as well.

Parameters

a - a Plot
b - a Plot

Returns:

void (returns nothing)

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