## org.autoplot.dom.CanvasController

Controller for canvases.

## CanvasController( org.autoplot.dom.Application dom, org.autoplot.dom.Canvas canvas )

## addColumn

addColumn( ) → org.autoplot.dom.Column

add a column to the application to the right of the other columns.

### Returns:

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

## addColumns

addColumns( int count ) → java.util.List

add columns to the current plot.

### Parameters

count - number of columns to add, must be > 1.

### Returns:

a list of the new Columns.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## addRow

addRow( ) → org.autoplot.dom.Row

add a row to the application, below.

### Returns:

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

## addRows

addRows( int count ) → java.util.List

add rows below the current plot.

### Parameters

count - an int

### Returns:

a java.util.List
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## addRows

addRows( int count, Object dir ) → java.util.List

add rows below the current plot.

### Parameters

count - an int
dir - an Object

### Returns:

a java.util.List
[search for examples] [view on GitHub] [view on old javadoc] [view source]
getDasCanvas( ) → org.das2.graph.DasCanvas [view source]
getDropTargetListener( ) → java.awt.dnd.DropTargetListener [view source]
getRowFor( org.autoplot.dom.Plot domPlot ) → org.autoplot.dom.Row [view source]

## indicateSelection

indicateSelection( java.util.List selectedItems ) → void

flash the selected plots and plotElements, by temporarily adding a painter to the canvas.

### Parameters

selectedItems - the items to flash.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## maybeAddColumn

maybeAddColumn( String spec ) → org.autoplot.dom.Column

add a column with the spec (e.g. "30%+1em,60%-4em"). If another column with the same spec is found, then just return that column.

### Parameters

spec - spec like "30%+1em,60%-4em"

### Returns:

a column that implements.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## maybeAddRow

maybeAddRow( String spec ) → org.autoplot.dom.Row

add a row with the spec (e.g. "30%+1em,60%-4em"). If another row with the same spec is found, then just return that row.

### Parameters

spec - spec like "30%+1em,60%-4em"

### Returns:

a row that implements.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## removeGapsAndOverlaps

removeGapsAndOverlaps( org.autoplot.dom.Application dom, java.util.List rows, org.autoplot.dom.Row newRow, boolean preserveOverlaps ) → void

reset this stack of rows, trying to preserve weights. TODO: why--it would be nice if the dom and controller, and the DasRows is uses wasn't necessary.

### Parameters

dom - the application, which must have a controller.
rows - the rows.
newRow - used with preserveOverlaps
preserveOverlaps - if true, then leave overlapping plots overlapping

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setColumn

setColumn( String column ) → void

support legacy column property of canvas

### Parameters

column - a String

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setDimensions

setDimensions( int width, int height ) → void

set the height and width in one atomic operation.

### Parameters

width - an int
height - an int

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]
setDropTargetListener( java.awt.dnd.DropTargetListener list ) → void [view source]

## setRow

setRow( String row ) → void

support legacy row property of canvas

### Parameters

row - a String

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]
toString( ) → String [view source]