public final class PlotController extends DomNodeController
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
autoBinding |
java.util.List<PlotElement> |
pdListen
the plot elements we listen to for autoranging.
|
protected javax.swing.JMenuItem |
plotElementPropsMenuItem |
static java.lang.String |
PROP_AUTOBINDING
true indicates that the controller is allowed to automatically add
bindings to the plot axes.
|
static java.lang.String |
PROP_PLOTELEMENTPROPSMENUITEM |
java.beans.PropertyChangeListener |
rowColListener |
changesSupport, propertyChangeSupport| Constructor and Description |
|---|
PlotController(Application dom,
Plot plot) |
PlotController(Application dom,
Plot domPlot,
DasPlot dasPlot,
DasColorBar colorbar) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addPlotElement(PlotElement p,
boolean reset)
add the plot element to the plot, including the renderer and bindings.
|
Plot |
contextOverview()
add a context overview.
|
protected void |
createDasPeer(Canvas canvas,
Row domRow,
Column domColumn)
Create the das2 GUI components that implement the plot.
|
static void |
doHints(Axis axis,
java.lang.String hintsString)
implement hints like width=40&includeZero=T.
|
protected void |
doPlotElementDefaultsUnitsChange(PlotElement e)
See sourceforge ticket.
|
Application |
getApplication() |
BindingModel[] |
getBindings() |
BindingModel |
getBindings(int index) |
Column |
getColumn()
return the row for this plot.
|
DasColorBar |
getDasColorBar() |
DasPlot |
getDasPlot() |
javax.swing.JMenuItem[] |
getExpertMenuItems() |
Plot |
getPlot() |
PlotElement |
getPlotElement()
return the plotElement we are listening to.
|
javax.swing.JMenuItem |
getPlotElementPropsMenuItem() |
Row |
getRow()
return the row for this plot.
|
boolean |
isAutoBinding() |
void |
moveToJustAbove(PlotElement reference,
PlotElement p)
move the plot element to just above the reference element.
|
void |
moveToJustBelow(PlotElement reference,
PlotElement p)
move the plot element to just below the reference element.
|
protected void |
removeBindings()
remove the bindings created in bindTo.
|
protected void |
removePlotElement(PlotElement p)
remove the plot element from this plot: remove renderer, remove bindings, etc.
|
protected void |
removeReferences()
remove references this controller has so that they are more likely to be
garbage collected.
|
void |
resetZoom(boolean x,
boolean y,
boolean z)
set the zoom so that all of the plotElements' data is visible.
|
void |
setAutoBinding(boolean autoBinding) |
void |
setExpertMenuItems(javax.swing.JMenuItem[] items)
provide spot to locate the menu items that are hidden in basic mode.
|
void |
setExpertMode(boolean expert) |
void |
setPlotElementPropsMenuItem(javax.swing.JMenuItem pelePropsMenuItem) |
void |
setTitleAutomatically(java.lang.String title)
set the title, leaving autoLabel true.
|
void |
toBottom(PlotElement p)
move the plot element to the bottom.
|
java.lang.String |
toString() |
void |
toTop(PlotElement p)
move the plot element to the top.
|
addPropertyChangeListener, addPropertyChangeListener, changePerformed, containsString, getController, insertString, isPendingChanges, isValueAdjusting, mutatorLock, pendingChanges, performingChange, printStats, registerPendingChange, removePropertyChangeListener, removePropertyChangeListenerpublic java.util.List<PlotElement> pdListen
public java.beans.PropertyChangeListener rowColListener
public static final java.lang.String PROP_AUTOBINDING
protected boolean autoBinding
protected javax.swing.JMenuItem plotElementPropsMenuItem
public static final java.lang.String PROP_PLOTELEMENTPROPSMENUITEM
public PlotController(Application dom, Plot domPlot, DasPlot dasPlot, DasColorBar colorbar)
public PlotController(Application dom, Plot plot)
public Plot getPlot()
public boolean isAutoBinding()
public void setAutoBinding(boolean autoBinding)
protected void createDasPeer(Canvas canvas, Row domRow, Column domColumn)
canvas - the canvas containing the itemdomRow - the row indicating the vertical positiondomColumn - the column indicating the horizontal positionpublic DasColorBar getDasColorBar()
public DasPlot getDasPlot()
public static void doHints(Axis axis, java.lang.String hintsString)
includeZero T or F make sure that zero is within the result.
min 0 make zero be the minimum value.
max 100 make 100 be the maximum value
width 30nT use this width. This is a formatted datum which
is parsed with the units of the axis, or with the number of cycles for log.
log T or F force log or linear axis
widths 30nT,300nT,3000nT use one of these widths
center 0 constrain the center to be this location
extend 10 percent to extend the range beyond the min and the max, so the width is this percent more. This is done after other constraints.
0,10 percent the max by ten percent.
(not yet) reluctant T or F use the old range if it is acceptable.
Width or width imply that extend=0, but extend=10 may become the default.axis - the axis to which we are applying the hints.hintsString - the string, ampersand-delimited; or null when no hints should be applied.public void resetZoom(boolean x,
boolean y,
boolean z)
x - reset zoom in the x dimension.y - reset zoom in the y dimension.z - reset zoom in the z dimension.AutoplotUtil.resetZoomX(org.autoplot.dom.Application, org.autoplot.dom.Plot),
AutoplotUtil.resetZoomY(org.autoplot.dom.Application, org.autoplot.dom.Plot),
AutoplotUtil.resetZoomZ(org.autoplot.dom.Application, org.autoplot.dom.Plot)public PlotElement getPlotElement()
public void toBottom(PlotElement p)
p - public void toTop(PlotElement p)
p - the plot elementpublic void moveToJustAbove(PlotElement reference, PlotElement p)
reference - p - public void moveToJustBelow(PlotElement reference, PlotElement p)
reference - p - protected void addPlotElement(PlotElement p, boolean reset)
p - reset - if true then reset the render type.public Plot contextOverview()
protected void removePlotElement(PlotElement p)
p - protected void doPlotElementDefaultsUnitsChange(PlotElement e)
e - protected void removeBindings()
protected void removeReferences()
public BindingModel[] getBindings()
public BindingModel getBindings(int index)
public javax.swing.JMenuItem getPlotElementPropsMenuItem()
public void setPlotElementPropsMenuItem(javax.swing.JMenuItem pelePropsMenuItem)
public Application getApplication()
public java.lang.String toString()
toString in class java.lang.Objectpublic void setTitleAutomatically(java.lang.String title)
title - public void setExpertMenuItems(javax.swing.JMenuItem[] items)
items - public javax.swing.JMenuItem[] getExpertMenuItems()
public void setExpertMode(boolean expert)
public Row getRow()
public Column getColumn()