ucar.unidata.idv.control.multi
Class MultiDisplayHolder

java.lang.Object
  extended by ucar.unidata.collab.SharableImpl
      extended by ucar.unidata.idv.control.DisplayControlBase
          extended by ucar.unidata.idv.control.DisplayControlImpl
              extended by ucar.unidata.idv.control.multi.MultiDisplayHolder
All Implemented Interfaces:
ActionListener, ItemListener, PropertyChangeListener, EventListener, HyperlinkListener, Sharable, DataChangeListener, DisplayControl, Prototypable, ControlListener, DisplayListener

public class MultiDisplayHolder
extends DisplayControlImpl

A DisplayControl for station models

Version:
$Revision: 1.19 $
Author:
MetApps Development Team

Nested Class Summary
 
Nested classes/interfaces inherited from class ucar.unidata.idv.control.DisplayControlImpl
DisplayControlImpl.SideLegendLabel
 
Field Summary
 
Fields inherited from class ucar.unidata.idv.control.DisplayControlImpl
categories, colorScaleInfo, colorScales, contourInfo, contourInfoParams, contourWidget, controlContext, ctw, dataSelection, defaultView, defaultViewManager, DISPLAY_LIST_NAME, displayListTable, displayListUsesColor, displayMasters, displayUnit, helpUrl, initNoteText, instantiatedWithNoData, noteTextArea, noteWrapper, paramName, requestProperties, selectRangeWidget, settingVisibility, sharables, showNoteText, skipSlider, version, viewManagers, ZFUDGE
 
Fields inherited from class ucar.unidata.idv.control.DisplayControlBase
CMD_BARBSIZE, CMD_COLORS, CMD_COLORTABLE, CMD_INTERVAL, CMD_LEVEL, CMD_LINEWIDTH, CMD_POPUP, CMD_REMOVE, DEFAULT_POINT_SIZE, DEFAULT_SAMPLING_MODE, FIND_ALL, FIND_CATEGORY, FIND_CLASS, FIND_SPECIAL, FIND_THIS, FIND_WITHDATA, FIND_WITHTHISDATA, FIND_WITHTHISFIELD, FIND_WITHTHISVIEW, FLAG_COLOR, FLAG_COLORTABLE, FLAG_COLORUNIT, FLAG_CONTOUR, FLAG_DATACONTROL, FLAG_DISPLAYUNIT, FLAG_LINEWIDTH, FLAG_NONE, FLAG_SELECTRANGE, FLAG_SKIPFACTOR, FLAG_SMOOTHING, FLAG_TEXTUREQUALITY, FLAG_TIMERANGE, FLAG_ZPOSITION, GRID_INSETS, ICON_LOCK, ICON_REMOVE, ICON_UNLOCK, LABEL_NONE, log_, MACRO_DATASOURCENAME, MACRO_DISPLAYNAME, MACRO_DISPLAYUNIT, MACRO_FHOUR, MACRO_LONGNAME, MACRO_POSITION, MACRO_SHORTNAME, MACRO_STATION, MACRO_TIMESTAMP, MACRO_VALUE, NEAREST_NEIGHBOR, PREF_DISPLAYLIST_TEMPLATE, PREF_EXTRALABEL_TEMPLATE, PREF_LEGENDLABEL_TEMPLATE, PROP_REMOVED, SETTINGS_GROUP_DISPLAY, SETTINGS_GROUP_FLAGS, SHARE_CHOICES, SHARE_COLOR, SHARE_COLORSCALE, SHARE_COLORTABLE, SHARE_DISPLAYUNIT, SHARE_POSITION, SHARE_SELECTRANGE, SHARE_SKIPVALUE, SHARE_TRANSECT, SHARE_VISIBILITY, WEIGHTED_AVERAGE
 
Fields inherited from interface ucar.unidata.idv.DisplayControl
BOTTOM_LEGEND, DEFAULT_PROBEFORMAT, PREF_PREFIX, PREF_PROBEFORMAT, PREF_REMOVEONWINDOWCLOSE, PREF_SAMPLING_MODE, PREF_STANDALONE_REMOVEONCLOSE, PREF_STANDALONE_REMOVEONCLOSE_ASK, PROP_LEGENDICON, RASTERMODE_SHOWALL, RASTERMODE_SHOWNONRASTER, RASTERMODE_SHOWRASTER, SIDE_LEGEND
 
Constructor Summary
MultiDisplayHolder()
          Default ctor
 
Method Summary
protected  void addControlsToMenu(JMenu newMenu, DisplayGroup displayGroup)
          Add the display control entries to the menu
 void addFieldToChartWrapper(ChartWrapper chartWrapper)
          Add field
 void addGroup(DisplayGroup displayGroup)
          Add the group
 void addGroupNewMenu(DisplayGroup displayGroup, JMenu newMenu)
          Add the new menu items for the given group.
 void addStationDisplay(NamedStationTable stationTable, ControlDescriptor cd, DisplayGroup displayGroup)
          Add the new station location display control
 void componentChanged()
          Some component changed.
protected  void createComponent(String type, DisplayGroup displayGroup)
          Create the component
 void createComponentIn(Object[] args)
          Utility to create a component.
 void createComponentInCurrentTab(String type)
          Create the component.
 void createComponentInNewTab(String type)
          Create the component.
 DisplayComponent createDisplayComponent(String addType, List dataChoices, DisplayGroup displayGroup)
          Create the display component
 void createDisplayGroup()
          Create the display group.
 DisplayGroup createDisplayGroup(String groupName)
          Find or creaate the group
protected  IdvWindow createIdvWindow()
          Override base class method to create a new window.
protected  Container doMakeContents()
          Make the UI contents for this control.
protected  JMenuBar doMakeMenuBar()
          Make the menu bar.
 void doRemove()
          Remove the display control
protected  JInternalFrame findFrameForGroup(DisplayGroup displayGroup)
          Find the internal frame for the given group
protected  int findIdxForGroup(DisplayGroup displayGroup)
          Find the tab index for the group
 String formatValue(double v)
          A utility to format a value using the display conventions
 DisplayGroup getCurrentDisplayGroup()
          Get te display group in the current tab
 DisplayGroup getDisplayGroup(String groupName)
          Find the display group by name
 List getDisplayGroups()
          Get the DisplayGroups property.
protected  DisplayTree getDisplayTree()
          Return the display tree
protected  void getEditMenuItems(List items, boolean forMenuBar)
          Add the relevant edit menu items into the list
protected  void getFileMenuItems(List items, boolean forMenuBar)
          Add the relevant file menu items into the list
 String getInitialComponentClass()
          Get the AddType property.
 void getLegendLabels(List labels, int legendType)
          Get the extra label used for the legend.
protected  String getLowerComponentName()
          Get the component name.
 List getPrototypes()
          Instantiate the list of prototype charts
protected  String getUpperComponentName()
          Get the component name.
 boolean getUseDesktop()
          Get the UseDesktop property.
protected  void getViewMenuItems(List items, boolean forMenuBar)
          Add the relevant edit menu items into the list
protected  void handleWindowClosing()
          Don't close the window
 void importDisplayControl(DisplayControlImpl displayControl)
          Import the given display control into me
 boolean init(List choices)
          Call to help make this kind of Display Control; also calls code to made the Displayable (empty of data thus far).
 void initAfterUnPersistence(ControlContext vc, Hashtable properties)
          Called by the IntegratedDataViewer to initialize after this control has been unpersisted
 void initDone()
          Gets called when all initialization is complete
 void initWindow(IdvWindow window)
          Initialize the window.
protected  void loadData()
          Load data into the Displayable.
 void makeControlsMenu(JMenu controlsMenu, DisplayGroup displayGroup)
          Populate the menu
 void makeLocationsMenu(JMenu locationsMenu, DisplayGroup displayGroup)
          Make the menu for adding new location displays
 void newName(DisplayGroup displayGroup, String oldName)
          The group has a new name
 void removeDisplayables(List displayables)
          Remove the list of displayables
 void removeDisplayComponent(DisplayComponent displayComponent)
          Remove the component.
 void removeDisplayGroup(DisplayGroup displayGroup)
          Remove the display group
 void setDisplayGroups(List value)
          Set the DisplayGroups property.
 void setInitialComponentClass(String value)
          Set the AddType property.
 void setTimeInMainDisplay(double timeValue)
          User clicked on a chart
 void setTitle(String title)
          Set the title of the window if it has been created.
 void setUseDesktop(boolean value)
          Set the UseDesktop property.
protected  boolean shouldAddAnimationListener()
          A hook to allow derived classes to tell us to add this as an animation listener
protected  boolean shouldShowInDisplayList()
          Should this show up in the list of displays
 void showDisplayComponent(DisplayComponent displayComponent)
          Show the tab the group is in
 void showDisplayTree()
          Show the manage dialog
protected  void timeChanged(Real time)
          Respond to a timeChange event
 void toggleUI()
          Switch between tabbed pane and internal frame
 void viewManagerDestroyed(ViewManager viewManager)
          Called when a ViewManager which holds the display is destoryed We don't remove ourselves here because this DisplayControl can stand alone.
 
Methods inherited from class ucar.unidata.idv.control.DisplayControlImpl
actionPerformed, activateDisplays, addAttributedDisplayable, addAttributedDisplayable, addAttributedDisplayable, addAttributeFlags, addCheckBoxSettings, addDataChoice, addDisplayable, addDisplayable, addDisplayable, addDisplayable, addDisplayable, addDisplayable, addDisplayMaster, addDisplaySettings, addLabelMacros, addNewData, addNoteText, addPropertiesComponents, addPropertyChangeListener, addRemovable, addSharable, addTimeModeWidget, addToControlContext, addToRangeMenu, addToRangeMenu, addToRangeMenu, addViewManager, appendDataChoices, applyAttributesToDisplayables, applyColor, applyColorScaleInfo, applyColorTable, applyColorUnit, applyContourInfo, applyDisplaySetting, applyDisplayUnit, applyLineWidth, applyPreferences, applyProperties, applyProperties, applyPropertyValues, applyRange, applySelectRange, applySkipFactor, applySmoothing, applyTextureQuality, applyTimeRange, applyZPosition, boundsClose, canBeDocked, canExportData, canSaveDataInCache, captureWindow, centerOnDisplay, changeColorUnit, changeDisplayUnit, checkFlag, checkIfDataOk, checkImageSize, clearDataInstance, clearPrototype, clearViewManagers, close, colorUnitChanged, controlChanged, convertColorRange, convertRange, createDisplayListDisplayable, dataChanged, deactivateDisplays, debug, displayableToFront, displayChanged, displayControlFailed, displayUnitChanged, doApplyProperties, doExport, doInitialUpdateLegendAndList, doMakeBottomLegendComponent, doMakeChangeColorMenu, doMakeChangeColorMenu, doMakeChangeParameterMenuItem, doMakeColorControl, doMakeColorControl, doMakeColorScales, doMakeDataInstance, doMakeMenuBarMenus, doMakePointSizeWidget, doMakeRemoveControl, doMakeSideLegendComponent, doMakeSkipFactorSlider, doMakeTextureSlider, doMakeVisibilityControl, doMakeWidgetComponent, doMakeWindow, doMakeZPositionSlider, exportDisplayedData, findDisplayInfo, findDisplays, findDisplays, firePropertyChangeEvent, firstFrameDone, formatForCursorReadout, getActive, getAnimation, getAnimation, getAnimation, getAnimation, getAnimationInfo, getAnimationWidget, getAttributeFlags, getCachedData, getCanDoRemoveAll, getCategories, getChangeParameterLabel, getCollapseLegend, getColor, getColorDimness, getColorScaleInfo, getColorTable, getColorTableForDisplayable, getColorTableToApply, getColorTableWidget, getColorUnit, getColorUnitName, getColorWidgetLabel, getComponentHolder, getContents, getContourInfo, getControlChangeSleepTime, getControlContext, getControlMenus, getControlWidgets, getCursorReadout, getCursorReadoutInner, getCursorReadoutInner, getData, getDataChoice, getDataChoices, getDataForDisplayList, getDataInstance, getDataInstance, getDataProjection, getDataProjectionForMenu, getDataProjectionLabel, getDataSelection, getDataSources, getDataTimeRange, getDataTimeRange, getDataTimeSet, getDebugDetails, getDefaultColorScaleInfo, getDefaultDisplayListTemplate, getDefaultDistanceUnit, getDefaultFastRendering, getDefaultSamplingMode, getDefaultSamplingModeValue, getDefaultView, getDefaultViewDescriptor, getDefaultViewManager, getDetailsContents, getDisplayAltitudeType, getDisplayCategory, getDisplayCenter, getDisplayConventions, getDisplayedData, getDisplayId, getDisplayInfos, getDisplayListColor, getDisplayListData, getDisplayListDisplayable, getDisplayListTemplate, getDisplayMaster, getDisplayName, getDisplayScale, getDisplayUnit, getDisplayUnit, getDisplayUnitName, getDisplayVisibility, getDoCursorReadout, getEditMenuItems, getExpandedInTabs, getExtraLabelTemplate, getExtraLegendComponent, getExtraMenus, getFileMenuItems, getGraphicsConfiguration, getGrid, getGrid, getHadDataChoices, getHaveInitialized, getHelpIds, getHelpMenuItems, getId, getIdv, getImage, getImage, getInitDataChoices, getInitialColorTable, getInitialFastRendering, getInitialRange, getInitialZPosition, getInternalAnimation, getInternalAnimation, getIsRaster, getIsTimeDriver, getLabel, getLastFileMenuItems, getLegendButtons, getLegendComponent, getLegendLabel, getLegendLabelTemplate, getLegendToolTip, getLineWidth, getLineWidthWidget, getLineWidthWidgetLabel, getLockVisibilityToggle, getLongParamName, getMacroNames, getMainPanel, getMainPanelSize, getMakeWindow, getMapDisplay, getMapViewManager, getMapViewProjection, getMenuLabel, getMyDataChoices, getNavigatedDisplay, getNoteText, getObjectStore, getOkToFireEvents, getOldColorTableOrInitialColorTable, getOriginalDataChoicesLabel, getOuterContents, getPointSize, getProperty, getProperty, getPropertyDisplayName, getRange, getRangeForColorTable, getRangeToApply, getRawDataUnit, getRequestProperties, getSamplingModeName, getSamplingModeValue, getSamplingModeValue, getSaveMenuItems, getSelectRange, getSelectRangeEnabled, getSelectRangeWidget, getSettingsPanel, getShortParamName, getShowInDisplayList, getShowInLegend, getShowInTabs, getShowNoteText, getSkipValue, getSkipWidgetLabel, getSmoothingFactor, getSmoothingType, getSomeAnimation, getStore, getTemplateName, getTextureQuality, getTextureQualityLabel, getTimeSet, getTitle, getTransientProperty, getUnitForColor, getUseFastRendering, getUsesTimeDriver, getUseTimesInAnimation, getVersion, getVerticalValue, getViewAnimation, getViewContext, getViewer, getViewManager, getViewManager, getViewManager, getViewManagerClassNames, getViewManagerForCapture, getViewManagers, getViewMenuItems, getVisbilityAnimationPause, getWasUnPersisted, getWindow, getWindowSize, getWindowVisible, getWindowX, getWindowY, getZPosition, getZPositionSliderLabel, guiExported, guiImported, handleDisplayChanged, hasMapProjection, hasTimeMacro, haveDataTimes, haveParameterDefaults, hide, hyperlinkUpdate, inGlobeDisplay, init, init, init, initAfterUnPersistence, initAsPrototype, initAsTemplate, initBasic, initializeWithNewData, isDisplay3D, isDisplayUnitAlsoColorUnit, isGuiShown, isInitDone, isInTransectView, isInViewManager, itemStateChanged, makeChangeColorMenuItems, makeLegendLabel, makeLockButton, makeRemoveButton, moveTo, notifyViewManagersOfChange, parseProperties, popup, popupDataDialog, popupDataDialog, popupDataDialog, processRequestProperties, projectionChanged, propertyChange, putTransientProperty, reallySetAttributeFlags, receiveShareData, redoGuiLayout, reloadDataSource, reloadDataSourceInThread, removeDataChoice, removeDisplayable, removeDisplayables, removeDisplayables, removeOnWindowClose, removePropertyChangeListener, resetData, resetDimness, resetViewManager, revertToDefaultColorTable, revertToDefaultColorTable, revertToDefaultRange, revertToDefaultRange, saveAsFavorite, saveAsParameterDefaults, saveAsPrototype, saveAsTemplate, saveDataChoiceInCache, saveImage, selectDataChoices, setAnimationInfo, setAnimationSet, setAttributeFlags, setCachedData, setCanDoRemoveAll, setCategories, setCollapseLegend, setColor, setColorBrighter, setColorDimmer, setColorDimness, setColorScaleInfo, setColorScaleVisible, setColorTable, setColorTable, setColorTableName, setColorUnit, setColorUnitName, setComponentHolder, setContents, setContourInfo, setContourInfoParams, setData, setData, setDataChoices, setDataInstance, setDataInstances, setDataSelection, setDataTimeRange, setDefaultSamplingMode, setDefaultView, setDisplayableVisibility, setDisplayableVisiblity, setDisplayActive, setDisplayCategory, setDisplayId, setDisplayInactive, setDisplayListColor, setDisplayListColor, setDisplayListProperties, setDisplayListTemplate, setDisplayName, setDisplayUnit, setDisplayUnitName, setDisplayVisibility, setDoCursorReadout, setExpandedInTabs, setExtraLabelTemplate, setHadDataChoices, setHelpUrl, setId, setInitDataChoices, setInitialSettings, setInitialViewManager, setIsRaster, setIsTimeDriver, setLabelAsPreference, setLegendBackground, setLegendForeground, setLegendLabel, setLegendLabelTemplate, setLineWidth, setLockVisibilityToggle, setMainPanelDimensions, setMainPanelSize, setMakeWindow, setName, setNameFromUser, setNewColorUnit, setNewDisplayUnit, setNoteText, setOkToFireEvents, setOriginalDataChoicesLabel, setParamName, setPersistedVisadData, setPointSize, setProjectionInView, setProjectionInView, setProperty, setRange, setRange, setSelectRange, setSelectRangeEnabled, setSettingsDisplayUnit, setSharedColorScaleInfo, setShowInDisplayList, setShowInLegend, setShowInTabs, setShowNoteText, setSkipValue, setSmoothingFactor, setSmoothingType, setTemplateName, setTextureQuality, setUnitForColor, setUseFastRendering, setUsesTimeDriver, setUseTimesInAnimation, setVersion, setViewer, setViewManagerClassNames, setVisbilityAnimationPause, setWindowSize, setWindowVisible, setWindowX, setWindowY, setZPosition, setZPosition, shouldAddControlListener, shouldAddDisplayListener, shouldApplyFastRendering, shouldBeDocked, shouldWindowBeVisible, show, showColorControlWidget, showColorDialog, showColorDialog, showColorScaleDialog, showColorScales, showColorSwatches, showContourPropertiesDialog, showDetails, showDisplaySettingsDialog, showHelp, showLegendMenu, showNormalCursor, showProperties, showTimeRangeDialog, showWaitCursor, toFront, toggleNoteTextArea, toggleVisibilityForVectorGraphicsRendering, toggleWindow, toString, transectChanged, updateAnimation, updateDataInstance, updateDataSelection, updateDisplayList, updateGridDataInstance, updateLegendAndList, updateLegendLabel, updateLockButton, useSmoothingFactor, useZPosition, viewManagerChanged, viewpointChanged, writeTestArchive, xxxsetDisplayActive, zSliderChanged
 
Methods inherited from class ucar.unidata.idv.control.DisplayControlBase
boxToEarth, boxToEarth, boxToEarth, boxToEarth, boxToEarth, boxToScreen, calculateRectangle, createStationTfo, earthToBox, earthToBox, earthToBoxTuple, earthToScreen, formatLevels, getLabeledReal, getLevelReal, getScreenCenter, getSelectedStation, getTmpProperty, isLeftButtonDown, logException, logException, makeEarthLocation, putTmpProperty, removeTmpProperty, screenToBox, screenToBox, screenToEarth, setStations, setStations, toBox, toEarth, userErrorMessage, userMessage
 
Methods inherited from class ucar.unidata.collab.SharableImpl
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ucar.unidata.idv.DisplayControl
getTmpProperty, putTmpProperty, removeTmpProperty
 
Methods inherited from interface ucar.unidata.collab.Sharable
getReceiveShareTime, getShareGroup, getSharing, getUniqueId, setReceiveShareTime
 

Constructor Detail

MultiDisplayHolder

public MultiDisplayHolder()
Default ctor

Method Detail

initDone

public void initDone()
Gets called when all initialization is complete

Overrides:
initDone in class DisplayControlImpl

init

public boolean init(List choices)
             throws VisADException,
                    RemoteException
Call to help make this kind of Display Control; also calls code to made the Displayable (empty of data thus far). This method is called from inside DisplayControlImpl.init(several args).

Overrides:
init in class DisplayControlImpl
Parameters:
choices - the DataChoice of the moment.
Returns:
true if successful
Throws:
VisADException - some problem creating a VisAD object
RemoteException - some problem creating a remote VisAD object

initAfterUnPersistence

public void initAfterUnPersistence(ControlContext vc,
                                   Hashtable properties)
Called by the IntegratedDataViewer to initialize after this control has been unpersisted

Specified by:
initAfterUnPersistence in interface DisplayControl
Overrides:
initAfterUnPersistence in class DisplayControlImpl
Parameters:
vc - The context in which this control exists
properties - Properties that may hold things

componentChanged

public void componentChanged()
Some component changed. Update the manage tree.


showDisplayTree

public void showDisplayTree()
Show the manage dialog


getDisplayTree

protected DisplayTree getDisplayTree()
Return the display tree

Returns:
the display tree

getLegendLabels

public void getLegendLabels(List labels,
                            int legendType)
Get the extra label used for the legend.

Overrides:
getLegendLabels in class DisplayControlImpl
Parameters:
labels - labels to append to
legendType - The type of legend, BOTTOM_LEGEND or SIDE_LEGEND

findFrameForGroup

protected JInternalFrame findFrameForGroup(DisplayGroup displayGroup)
Find the internal frame for the given group

Parameters:
displayGroup - The group
Returns:
The frame or null if none found

findIdxForGroup

protected int findIdxForGroup(DisplayGroup displayGroup)
Find the tab index for the group

Parameters:
displayGroup - The group
Returns:
The tab index or -1

formatValue

public String formatValue(double v)
A utility to format a value using the display conventions

Parameters:
v - The value
Returns:
The formatted value

newName

public void newName(DisplayGroup displayGroup,
                    String oldName)
The group has a new name

Parameters:
displayGroup - group
oldName - the old name

toggleUI

public void toggleUI()
Switch between tabbed pane and internal frame


getViewMenuItems

protected void getViewMenuItems(List items,
                                boolean forMenuBar)
Add the relevant edit menu items into the list

Overrides:
getViewMenuItems in class DisplayControlImpl
Parameters:
items - List of menu items
forMenuBar - Is this for the menu in the window's menu bar or for a popup menu in the legend

getEditMenuItems

protected void getEditMenuItems(List items,
                                boolean forMenuBar)
Add the relevant edit menu items into the list

Overrides:
getEditMenuItems in class DisplayControlImpl
Parameters:
items - List of menu items
forMenuBar - Is this for the menu in the window's menu bar or for a popup menu in the legend

createComponentIn

public void createComponentIn(Object[] args)
Utility to create a component. The args holds the component type and the display group

Parameters:
args - args

getLowerComponentName

protected String getLowerComponentName()
Get the component name.

Returns:
tab or frame

getUpperComponentName

protected String getUpperComponentName()
Get the component name.

Returns:
Tab or Frame

createComponentInNewTab

public void createComponentInNewTab(String type)
Create the component.

Parameters:
type - type of component

createDisplayGroup

public void createDisplayGroup()
Create the display group.


createComponentInCurrentTab

public void createComponentInCurrentTab(String type)
Create the component.

Parameters:
type - type of component

createComponent

protected void createComponent(String type,
                               DisplayGroup displayGroup)
Create the component

Parameters:
type - type of component
displayGroup - The display group

addFieldToChartWrapper

public void addFieldToChartWrapper(ChartWrapper chartWrapper)
Add field

Parameters:
chartWrapper - chart

getPrototypes

public List getPrototypes()
Instantiate the list of prototype charts

Returns:
List of ChartWrapper objects that serves as prototypes.

addControlsToMenu

protected void addControlsToMenu(JMenu newMenu,
                                 DisplayGroup displayGroup)
Add the display control entries to the menu

Parameters:
newMenu - Menu to add to
displayGroup - The group to add the display control to

makeControlsMenu

public void makeControlsMenu(JMenu controlsMenu,
                             DisplayGroup displayGroup)
Populate the menu

Parameters:
controlsMenu - menu to populate
displayGroup - Group to add the new display to

makeLocationsMenu

public void makeLocationsMenu(JMenu locationsMenu,
                              DisplayGroup displayGroup)
Make the menu for adding new location displays

Parameters:
locationsMenu - menu to add to
displayGroup - group to add new display to

createIdvWindow

protected IdvWindow createIdvWindow()
Override base class method to create a new window. We make the new IdvWindow as a main window.

Overrides:
createIdvWindow in class DisplayControlImpl
Returns:
The new window

initWindow

public void initWindow(IdvWindow window)
Initialize the window. We add the status bar to it.

Overrides:
initWindow in class DisplayControlImpl
Parameters:
window - The window to init

handleWindowClosing

protected void handleWindowClosing()
Don't close the window

Overrides:
handleWindowClosing in class DisplayControlImpl

addStationDisplay

public void addStationDisplay(NamedStationTable stationTable,
                              ControlDescriptor cd,
                              DisplayGroup displayGroup)
Add the new station location display control

Parameters:
stationTable - The locations
cd - The control descriptor
displayGroup - The group to add the new display to

getFileMenuItems

protected void getFileMenuItems(List items,
                                boolean forMenuBar)
Add the relevant file menu items into the list

Overrides:
getFileMenuItems in class DisplayControlImpl
Parameters:
items - List of menu items
forMenuBar - Is this for the menu in the window's menu bar or for a popup menu in the legend

importDisplayControl

public void importDisplayControl(DisplayControlImpl displayControl)
Import the given display control into me

Parameters:
displayControl - The control to import

getCurrentDisplayGroup

public DisplayGroup getCurrentDisplayGroup()
Get te display group in the current tab

Returns:
chaart group in the current tab

showDisplayComponent

public void showDisplayComponent(DisplayComponent displayComponent)
Show the tab the group is in

Parameters:
displayComponent - The component to show

addGroupNewMenu

public void addGroupNewMenu(DisplayGroup displayGroup,
                            JMenu newMenu)
Add the new menu items for the given group.

Parameters:
displayGroup - The group to add the display to
newMenu - The menu

doMakeMenuBar

protected JMenuBar doMakeMenuBar()
Make the menu bar. Add in the system menu bar and make the DisplayControl menus as a sub-menu.

Overrides:
doMakeMenuBar in class DisplayControlImpl
Returns:
menu bar

createDisplayComponent

public DisplayComponent createDisplayComponent(String addType,
                                               List dataChoices,
                                               DisplayGroup displayGroup)
Create the display component

Parameters:
addType - The thing to add
dataChoices - data
displayGroup - group for display component
Returns:
new display component

addGroup

public void addGroup(DisplayGroup displayGroup)
Add the group

Parameters:
displayGroup - The display group

createDisplayGroup

public DisplayGroup createDisplayGroup(String groupName)
Find or creaate the group

Parameters:
groupName - group name
Returns:
group

getDisplayGroup

public DisplayGroup getDisplayGroup(String groupName)
Find the display group by name

Parameters:
groupName - name
Returns:
display group or null

shouldAddAnimationListener

protected boolean shouldAddAnimationListener()
A hook to allow derived classes to tell us to add this as an animation listener

Overrides:
shouldAddAnimationListener in class DisplayControlImpl
Returns:
Add as animation listener

timeChanged

protected void timeChanged(Real time)
Respond to a timeChange event

Overrides:
timeChanged in class DisplayControlImpl
Parameters:
time - new time

setTimeInMainDisplay

public void setTimeInMainDisplay(double timeValue)
User clicked on a chart

Parameters:
timeValue - The time

doMakeContents

protected Container doMakeContents()
                            throws VisADException,
                                   RemoteException
Make the UI contents for this control.

Overrides:
doMakeContents in class DisplayControlImpl
Returns:
UI container
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

viewManagerDestroyed

public void viewManagerDestroyed(ViewManager viewManager)
                          throws VisADException,
                                 RemoteException
Called when a ViewManager which holds the display is destoryed We don't remove ourselves here because this DisplayControl can stand alone.

Specified by:
viewManagerDestroyed in interface DisplayControl
Overrides:
viewManagerDestroyed in class DisplayControlImpl
Parameters:
viewManager - The view manager that was destroyed
Throws:
RemoteException - Java RMI error
VisADException - VisAD error

doRemove

public void doRemove()
              throws RemoteException,
                     VisADException
Remove the display control

Specified by:
doRemove in interface DisplayControl
Overrides:
doRemove in class DisplayControlImpl
Throws:
RemoteException - On badness
VisADException - On badness

removeDisplayComponent

public void removeDisplayComponent(DisplayComponent displayComponent)
Remove the component.

Parameters:
displayComponent - The component

removeDisplayables

public void removeDisplayables(List displayables)
Remove the list of displayables

Parameters:
displayables - List of displayables to remove from the main display

removeDisplayGroup

public void removeDisplayGroup(DisplayGroup displayGroup)
Remove the display group

Parameters:
displayGroup - The display group

loadData

protected void loadData()
Load data into the Displayable. This is called from DisplayControlImpl.setData(DataChoice) and whenever the projection changes. Subclasses should override this to do whatever they need to. This implementation uses a PointDataInstance to manager the data.

See Also:
DisplayControlImpl.doMakeDataInstance(DataChoice)

setDisplayGroups

public void setDisplayGroups(List value)
Set the DisplayGroups property.

Parameters:
value - The new value for DisplayGroups

getDisplayGroups

public List getDisplayGroups()
Get the DisplayGroups property.

Returns:
The DisplayGroups

setTitle

public void setTitle(String title)
Set the title of the window if it has been created.

Overrides:
setTitle in class DisplayControlImpl
Parameters:
title - The title

setInitialComponentClass

public void setInitialComponentClass(String value)
Set the AddType property.

Parameters:
value - The new value for AddType

getInitialComponentClass

public String getInitialComponentClass()
Get the AddType property.

Returns:
The AddType

setUseDesktop

public void setUseDesktop(boolean value)
Set the UseDesktop property.

Parameters:
value - The new value for UseDesktop

getUseDesktop

public boolean getUseDesktop()
Get the UseDesktop property.

Returns:
The UseDesktop

shouldShowInDisplayList

protected boolean shouldShowInDisplayList()
Should this show up in the list of displays

Returns:
Should this be added to the menu list