org.autoplot.layout.LayoutUtil

utility methods for adjusting canvas layout.

LayoutUtil( )


autolayout

autolayout( org.das2.graph.DasCanvas canvas, org.das2.graph.DasRow marginRow, org.das2.graph.DasColumn marginColumn ) → void

resets the layout on the canvas so that labels are not clipped (somewhat). Child row and columns are inspected as well, and it's assumed that adjusting this row and column (Autoplot's margin row and column), that everyone will be correctly adjusted. We calculate bounds on each component dependent on the row and column, then the region outside the canvas determines how much the row and column should be brought in.

Parameters

canvas - a DasCanvas
marginRow - a DasRow
marginColumn - a DasColumn

Returns:

void (returns nothing)

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


getChildBounds

getChildBounds( org.das2.graph.DasColumn col ) → Rectangle

look for attached columns, get the bounds of all attachments. For example, this includes the bounds of a colorbar attached to the plot.

Parameters

col - a DasColumn

Returns:

the bounds of all children, or null.

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

getChildBounds( org.das2.graph.DasRow row ) → Rectangle

getChildColumns

getChildColumns( org.das2.graph.DasDevicePosition col ) → List

Return a list of DasColumns where the parent is the given column.

Parameters

col - the column

Returns:

list of columns.

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


normalizeRows

normalizeRows( org.autoplot.dom.Canvas canvas ) → void

preserve pixel locations of the rows, with corrections to the marginRow.

Parameters

canvas - a Canvas

Returns:

void (returns nothing)

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

normalizeRows( double em, org.das2.graph.DasRow marginRow, java.util.List rows ) → void