ucar.unidata.idv
Class TransectViewManager

java.lang.Object
  extended by ucar.unidata.collab.SharableImpl
      extended by ucar.unidata.idv.ViewManager
          extended by ucar.unidata.idv.NavigatedViewManager
              extended by ucar.unidata.idv.TransectViewManager
All Implemented Interfaces:
ActionListener, ItemListener, EventListener, Sharable, ControlListener, DisplayListener

public class TransectViewManager
extends NavigatedViewManager

A wrapper around a TransectDisplay display master. Provides an interface for managing user interactions, gui creation, etc.

Author:
IDV development team

Nested Class Summary
 
Nested classes/interfaces inherited from class ucar.unidata.idv.ViewManager
ViewManager.MatrixCommand
 
Field Summary
static String PREF_GRIDLINES
          Preference for grid lines or 2d _
 
Fields inherited from class ucar.unidata.idv.NavigatedViewManager
CMD_NAV_DOWN, CMD_NAV_HOME, CMD_NAV_LEFT, CMD_NAV_RIGHT, CMD_NAV_ROTATELEFT, CMD_NAV_ROTATERIGHT, CMD_NAV_SMALLDOWN, CMD_NAV_SMALLLEFT, CMD_NAV_SMALLRIGHT, CMD_NAV_SMALLROTATELEFT, CMD_NAV_SMALLROTATERIGHT, CMD_NAV_SMALLTILTDOWN, CMD_NAV_SMALLTILTUP, CMD_NAV_SMALLUP, CMD_NAV_SMALLZOOMIN, CMD_NAV_SMALLZOOMOUT, CMD_NAV_UP, CMD_NAV_ZOOMIN, CMD_NAV_ZOOMOUT, cursorReadoutWindow, PROP_VERTICALRANGE, SHARE_MATRIX, TRANSLATE_FACTOR, ZOOM_FACTOR
 
Fields inherited from class ucar.unidata.idv.ViewManager
animationHolder, animationMenu, borderHighlightColor, borderWidth, clickToFocus, displayBounds, fullScreenWindow, highlightBorder, innerContents, lastActive, lastTimeActivated, nameLabel, normalBorder, PREF_3DCLIP, PREF_ANIREADOUT, PREF_BGCOLOR, PREF_BORDERCOLOR, PREF_DIMENSION, PREF_DISPLAYLISTCOLOR, PREF_DISPLAYLISTFONT, PREF_FGCOLOR, PREF_PREFIX, PREF_SHAREVIEWS, PREF_SHOWANIMATIONBOXES, PREF_SHOWBOTTOMLEGEND, PREF_SHOWCURSOR, PREF_SHOWDISPLAYLIST, PREF_SHOWSCALES, PREF_SHOWSIDELEGEND, PREF_SHOWTOOLBAR, PREF_SHOWTRANSECTSCALES, PREF_TOOLBARSFLOATABLE, PREF_WAITMSG, PREF_WIREFRAME, showControlLegend, showControlMenu, TAG_COLORPAIR, TAG_COLORPAIRS, toolbarIds, toolbarNames, toolbars, windowBounds
 
Constructor Summary
TransectViewManager()
          Default constructor
TransectViewManager(ViewContext viewContext)
          Construct a TransectViewManager from an IDV
TransectViewManager(ViewContext viewContext, ViewDescriptor desc, String properties)
          Construct a TransectViewManager with the specified params
 
Method Summary
 boolean addDisplayInfo(DisplayInfo displayInfo)
          Override base class method to force setting fast rendering to true.
protected  void addPropertiesComponents(JTabbedPane tabbedPane)
          Add a properties component
 boolean applyProperties()
          Apply properties specific to this ViewManager
protected  Container doMakeContents()
          Make the GUI contents.
protected  DisplayMaster doMakeDisplayMaster()
          Factory method to create the display master
 ArrayList doMakeMenuList()
          Create and return the list of menus for the menu bar.
protected  void doneFirstFrame()
          When we have rendered the first frame tell any TransectDrawingControls to show the display transect
 void editTransects()
          Create, if needed, and show a TransectDrawingControl
 Transect getAxisTransect()
          Get the Transect that is implicitly defined by the x axis
protected  void getInitialBooleanProperties(List props)
          Add to the intial Boolean properties
 Real getMaxDataDistance()
          Get the MaxDataDistance property.
 boolean getShowGridLines()
          Get the show cursor readout flag
 Transect getTransect()
          Get the Transect property.
 Transect getTransect(boolean force)
          Return the transect
 TransectDisplay getTransectDisplay()
          Helper method
 String getTypeName()
          What type of view is this
 boolean getUseFastRendering(boolean b)
          This is called by display controls and allows us to force fast rendering
protected  void handleBooleanPropertyChange(String id, boolean value)
          The BooleanProperty identified byt he given id has changed.
protected  void initBooleanProperties()
          Set some properties
 void initializeTransectMenu(JMenu transectMenu)
          Add items to trasnect menu
 void initializeViewMenu(JMenu viewMenu)
          Initialize the view menu
protected  void initWithInner(ViewManager that, boolean ignoreWindow)
          Initialize this object's state with the state from that.
 void keyWasTyped(KeyEvent keyEvent)
          Process the key event
protected  JMenu makeShowMenu()
          Create and return the show menu.
protected  void matrixChanged()
          We've panned or zoomed.
 void setLastActive(boolean b)
          Set last active
 void setMaxDataDistance(Real value)
          Set the MaxDataDistance property.
 void setTransect(Transect value)
          Set the Transect property.
protected  void updateNameLabel()
          Update the name jlabel.
protected  void verticalRangeChanged()
          Show the display transect
 
Methods inherited from class ucar.unidata.idv.NavigatedViewManager
actionPerformed, animationTimeChanged, applyPreferences, checkHistoryMatrix, destroy, displayChanged, doMakeViewPointToolBar, doMakeZoomPanToolBar, getClipping, getLabelsVisible, getNavigatedDisplay, getShowCursor, getTransectLabelsVisible, getVerticalRange, getVerticalRangeUnit, getViewpointControl, handleControlChanged, hasViewpointControl, init, initToolBars, perspectiveViewChanged, receiveShareData, setClipping, setDisplayMaster, setLabelsVisible, setReadoutFormat, setShowCursor, setTransectLabelsVisible, setVerticalRange, setVerticalRangeUnit, setVerticalRangeUnitPreference, setWindow, verticalScaleChanged
 
Methods inherited from class ucar.unidata.idv.ViewManager
addBooleanProperty, addCommand, addContextMenuItems, addDisplayListener, addToolBar, addViewDescriptor, adjustSplitPane, animationOk, aspectSliderChanged, canBe, checkToolBarVisibility, clearDisplays, clearImageGrabber, controlChanged, createCBMI, displayControlChanged, displayControlVisibilityChanged, doClose, doDrop, doMakeMenuBar, doPrintImage, doPublishImage, doPublishImage, doSaveImage, doSaveImage, doSaveImageInThread, doSaveState, fillLegends, fillLegendsInner, fillLegendsLater, firstInitializeViewMenu, getAliases, getAnimation, getAnimationInfo, getAnimationStringVisible, getAnimationTimes, getAnimationWidget, getAniReadout, getAspectPropertiesComponent, getAspectRatio, getBackground, getBooleanPropertiesForPersistence, getBooleanProperty, getBp, getClickToFocus, getCommandManager, getComponent, getContents, getContentsBorder, getControls, getControlsForLegend, getDefaultBackground, getDefaultForeground, getDisplayBounds, getDisplayConventions, getDisplayInfos, getDisplayListColor, getDisplayListFont, getDisplayMatrix, getDisplayRenderer, getDisplayWindow, getExternalAnimation, getExternalAnimationWidget, getForeground, getFullScreenHeight, getFullScreenWidth, getHasWindow, getHaveInitialized, getHighlightBorder, getIdv, getIdvUIManager, getInitDone, getInnerContents, getIsActive, getIsDestroyed, getIsShared, getLastFrameDoneTime, getLastTimeActivated, getLegendOnLeft, getLegendState, getMainPropertiesComponent, getMaster, getMySize, getName, getNormalBorder, getPerspectiveView, getProjectionControl, getProjectionList, getProperties, getPropertiesComponent, getProperty, getPublishManager, getReallyHasWindow, getResourceManager, getShareViews, getShowAnimationBoxes, getShowBottomLegend, getShowControlLegend, getShowDisplayList, getShowSideLegend, getSideComponent, getSideDividerLocation, getSideLegend, getSideLegendContainer, getSkinProperties, getSkinProperty, getStateManager, getStore, getTimelineComponent, getToolbarsFloatable, getUniqueId, getViewDescriptor, getViewManager, getVisibleGeoBounds, getVMManager, getWaitMessageVisible, getWireframe, guiInitializationDone, hasBooleanProperty, hasDisplayMaster, initAfterUnPersistence, initColorMenu, initDisplayMenu, initFromSkin, initPreferences, initUI, initViewStateMenu, initWith, initWith, insertSideLegend, isClassOk, isDefinedBy, isFullScreen, isInteractive, itemStateChanged, logException, makeColorMenu, makeDropPanel, makeFrames, makeSavedViewsMenu, makeViewMenu, makeViewStateMenu, notifyDisplayControls, okToImportDisplay, parseProperties, putProperty, reallyFillLegends, removeColorPair, removeDisplayInfo, resetAspectSliders, resetFullScreen, resetProjectionControl, setAliases, setAnimatedVisibility, setAnimationInfo, setAnimationStringVisible, setAniReadout, setAspectRatio, setBackground, setBooleanProperties, setBooleanPropertiesForPersistence, setBp, setClickToFocus, setColors, setContentsBorder, setCursorInDisplay, setDisplayBounds, setDisplayListColor, setDisplayListFont, setDisplayMatrix, setExternalAnimation, setForeground, setFullScreen, setFullScreenHeight, setFullScreenWidth, setHasWindow, setHighlightBorder, setIdv, setInitialSplitPaneLocation, setIsShared, setLegendOnLeft, setLegendState, setLegendState, setMasterActive, setMasterActive, setMasterInactive, setName, setProperties, setShareViews, setShowControlLegend, setShowDisplayList, setShowToolBars, setSideDividerLocation, setSideLegend, setSideLegendPosition, setSize, setSkinProperties, setViewDescriptor, setWaitMessageVisible, setWindowBounds, setWireframe, showColorPairDialog, showHighlight, showLegend, showPropertiesDialog, showTimeline, showWindow, startImageCapture, toFront, toggleFullScreen, toString, turnOnOffAllDisplays, updateDisplayIfNeeded, updateDisplayList, useDisplay, useImages, useImages, writeImage, writeImage, writeImage, writeImage, writeImage, writeImage, writeImage, writeTestArchive
 
Methods inherited from class ucar.unidata.collab.SharableImpl
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getSharablePropertiesComponent, getShareGroup, getSharing, initSharable, removeSharable, setShareGroup, setSharing, setUniqueId, showSharableDialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PREF_GRIDLINES

public static final String PREF_GRIDLINES
Preference for grid lines or 2d _

See Also:
Constant Field Values
Constructor Detail

TransectViewManager

public TransectViewManager()
Default constructor


TransectViewManager

public TransectViewManager(ViewContext viewContext)
Construct a TransectViewManager from an IDV

Parameters:
viewContext - Really the IDV

TransectViewManager

public TransectViewManager(ViewContext viewContext,
                           ViewDescriptor desc,
                           String properties)
                    throws VisADException,
                           RemoteException
Construct a TransectViewManager with the specified params

Parameters:
viewContext - context in which this MVM exists
desc - ViewDescriptor
properties - semicolon separated list of properties (can be null)
Throws:
RemoteException
VisADException
Method Detail

getTransectDisplay

public TransectDisplay getTransectDisplay()
Helper method

Returns:
The transect display_

doMakeDisplayMaster

protected DisplayMaster doMakeDisplayMaster()
                                     throws VisADException,
                                            RemoteException
Factory method to create the display master

Overrides:
doMakeDisplayMaster in class ViewManager
Returns:
The TransectDisplay
Throws:
RemoteException - On badness
VisADException - On badness

getUseFastRendering

public boolean getUseFastRendering(boolean b)
This is called by display controls and allows us to force fast rendering

Overrides:
getUseFastRendering in class ViewManager
Parameters:
b - The displays fast rendering flag
Returns:
true

addDisplayInfo

public boolean addDisplayInfo(DisplayInfo displayInfo)
                       throws RemoteException,
                              VisADException
Override base class method to force setting fast rendering to true.

Overrides:
addDisplayInfo in class ViewManager
Parameters:
displayInfo - The display info to add.
Returns:
Was the addition successful
Throws:
RemoteException
VisADException

initWithInner

protected void initWithInner(ViewManager that,
                             boolean ignoreWindow)
                      throws VisADException,
                             RemoteException
Initialize this object's state with the state from that.

Overrides:
initWithInner in class NavigatedViewManager
Parameters:
that - The other obejct to get state from
ignoreWindow - If true then don't set the window size and location
Throws:
RemoteException - On badness
VisADException - On badness

updateNameLabel

protected void updateNameLabel()
Update the name jlabel. Override base class method to add the transect name

Overrides:
updateNameLabel in class ViewManager

handleBooleanPropertyChange

protected void handleBooleanPropertyChange(String id,
                                           boolean value)
                                    throws Exception
The BooleanProperty identified byt he given id has changed. Apply the change to the display.

Overrides:
handleBooleanPropertyChange in class NavigatedViewManager
Parameters:
id - Id of the changed BooleanProperty
value - Its new value
Throws:
Exception - problem handeling the change

applyProperties

public boolean applyProperties()
Apply properties specific to this ViewManager

Overrides:
applyProperties in class NavigatedViewManager
Returns:
true if successfule

addPropertiesComponents

protected void addPropertiesComponents(JTabbedPane tabbedPane)
Add a properties component

Overrides:
addPropertiesComponents in class NavigatedViewManager
Parameters:
tabbedPane - the tabbed pane

makeShowMenu

protected JMenu makeShowMenu()
Create and return the show menu.

Overrides:
makeShowMenu in class NavigatedViewManager
Returns:
The Show menu

getInitialBooleanProperties

protected void getInitialBooleanProperties(List props)
Add to the intial Boolean properties

Overrides:
getInitialBooleanProperties in class NavigatedViewManager
Parameters:
props - list to add to

doMakeContents

protected Container doMakeContents()
Make the GUI contents.

Overrides:
doMakeContents in class ViewManager
Returns:
The GUI contents

doneFirstFrame

protected void doneFirstFrame()
When we have rendered the first frame tell any TransectDrawingControls to show the display transect

Overrides:
doneFirstFrame in class ViewManager

matrixChanged

protected void matrixChanged()
We've panned or zoomed. Show the display transect

Overrides:
matrixChanged in class NavigatedViewManager

verticalRangeChanged

protected void verticalRangeChanged()
Show the display transect

Overrides:
verticalRangeChanged in class NavigatedViewManager

initBooleanProperties

protected void initBooleanProperties()
Set some properties

Overrides:
initBooleanProperties in class ViewManager

initializeViewMenu

public void initializeViewMenu(JMenu viewMenu)
Initialize the view menu

Overrides:
initializeViewMenu in class ViewManager
Parameters:
viewMenu - The view menu

doMakeMenuList

public ArrayList doMakeMenuList()
Create and return the list of menus for the menu bar. Just the map and view menu.

Overrides:
doMakeMenuList in class ViewManager
Returns:
List of menus.

initializeTransectMenu

public void initializeTransectMenu(JMenu transectMenu)
Add items to trasnect menu

Parameters:
transectMenu - menu

setLastActive

public void setLastActive(boolean b)
Set last active

Overrides:
setLastActive in class ViewManager
Parameters:
b - true to show last active

editTransects

public void editTransects()
Create, if needed, and show a TransectDrawingControl


setTransect

public void setTransect(Transect value)
Set the Transect property.

Parameters:
value - The new value for Transect

getTransect

public Transect getTransect()
Get the Transect property.

Returns:
The Transect

getAxisTransect

public Transect getAxisTransect()
Get the Transect that is implicitly defined by the x axis

Returns:
The Transect

getTransect

public Transect getTransect(boolean force)
Return the transect

Parameters:
force - If true then create one
Returns:
The transect

getShowGridLines

public boolean getShowGridLines()
Get the show cursor readout flag

Returns:
The flag value

keyWasTyped

public void keyWasTyped(KeyEvent keyEvent)
Process the key event

Overrides:
keyWasTyped in class ViewManager
Parameters:
keyEvent - The key event

setMaxDataDistance

public void setMaxDataDistance(Real value)
Set the MaxDataDistance property.

Parameters:
value - The new value for MaxDataDistance

getMaxDataDistance

public Real getMaxDataDistance()
Get the MaxDataDistance property.

Returns:
The MaxDataDistance

getTypeName

public String getTypeName()
What type of view is this

Overrides:
getTypeName in class ViewManager
Returns:
The type of view