ucar.unidata.idv.control
Class WMSControl

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.GridDisplayControl
                  extended by ucar.unidata.idv.control.BaseImageControl
                      extended by ucar.unidata.idv.control.ImageControl
                          extended by ucar.unidata.idv.control.WMSControl
All Implemented Interfaces:
ActionListener, ItemListener, ImageObserver, PropertyChangeListener, EventListener, HyperlinkListener, Sharable, DataChangeListener, DisplayControl, Prototypable, ControlListener, DisplayListener

public class WMSControl
extends ImageControl
implements ImageObserver

Class for controlling the display of color images.

Author:
Jeff McWhirter

Nested Class Summary
static class WMSControl.ColorExclude
          Class ColorExclude Holds information to exclude certain colors
 
Nested classes/interfaces inherited from class ucar.unidata.idv.control.DisplayControlImpl
DisplayControlImpl.SideLegendLabel
 
Field Summary
 
Fields inherited from class ucar.unidata.idv.control.BaseImageControl
EMPTY_IMAGE, EMPTY_RGB_IMAGE, emptyImage, emptyRGBImage
 
Fields inherited from class ucar.unidata.idv.control.GridDisplayControl
CMD_CONTOURDIALOG, CMD_SETLEVELS, gridDataInstance, INITIAL_PROBE_EARTHLOCATION, log_, settingLevel
 
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_GRIDTRAJECTORY, 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, 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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
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
WMSControl()
          Default constructor.
WMSControl(List wmsSelections, String title)
          Constructor.
 
Method Summary
protected  boolean canSaveDataInCache()
          See if this can save data in cache.
protected  Container doMakeContents()
          Make the gui
protected  DataInstance doMakeDataInstance(DataChoice dataChoice)
          make the data instance
 GeoLocationInfo getCurrentBounds()
          Get the CurrentBounds property.
 MapProjection getDataProjection()
          Even though we do have data that holds a MapProjection we don't want to provide it so we return null.
 MapProjection getDataProjectionForMenu()
          This gets called when the user selects the View menu item "Use Native Image Projection"
protected  String getDetailsContents()
          Get the contents of the details html
 boolean getEnableAutoFetch()
          Get the EnableAutoFetch property.
protected  JComponent getExtraLegendComponent(int legendType)
          Assume that any display controls that have a color table widget will want the color table to show up in the legend.
 int getImageHeight()
          Get the ImageHeight property.
 int getImageWidth()
          Get the ImageWidth property.
protected  boolean getInitialFastRendering()
          Get initial fast rendering option
protected  double getInitialZPosition()
          Get default z position to use
protected  void getLegendLabels(List labels, int legendType)
          Get the legend labesl
 double getResolution()
          Get the Resolution property.
protected  void getSaveMenuItems(List items, boolean forMenuBar)
          Add the relevant file menu items into the list
 double getScale()
          Get the Scale property.
 String getSelectedTime()
          Get the SelectedTime property.
 Object getTheLayer()
          Get the TheLayer property.
protected  String getTitle()
          Get the window title
protected  void getViewMenuItems(List items, boolean forMenuBar)
          Add to view menu
 WmsSelection getWmsInfo()
          Get the WmsInfo property.
 List getWmsInfos()
          Get the WmsInfos property.
 void goToAddress()
          Go the a street address
 void handleDisplayChanged(DisplayEvent event)
          Listen for DisplayEvents
 boolean imageUpdate(Image img, int flags, int x, int y, int width, int height)
          Handle the image update
 boolean init(DataChoice dataChoice)
          Called to make this kind of Display Control; This method is called from inside DisplayControlImpl init(several args).
 void initDone()
          initdone
 boolean isInitDone()
          have we fully initialized
 void loadImageFromScreen()
          Load the iamge from screen bounds
 void projectionChanged()
          Method to call if projection changes.
 void reloadDataSource()
          Overwrite base class method to do our own style of reload
 void reproject()
          Reproject the image
 void resolutionChanged(TwoFacedObject tfo)
          User changed resolution
 void saveDataChoiceInCache()
          Save the data choice into the cache data source
 void scaleSliderChanged(int value)
          Handle the slider changing
 void selectLayer(Object layer)
          Set the wmsinfo
 void setCurrentBounds(GeoLocationInfo value)
          Set the CurrentBounds property.
protected  boolean setData(DataChoice dataChoice)
          set the data
 void setEnableAutoFetch(boolean value)
          Set the EnableImageFetch property.
 void setEnableClick(boolean value)
          Deprecated. use setEnableAutoFetch
 void setImageHeight(int value)
          Set the ImageHeight property.
 void setImageWidth(int value)
          Set the ImageWidth property.
 void setResolution(double value)
          Set the Resolution property.
 void setScale(double value)
          Set the Scale property.
 void setSelectedTime(String value)
          Set the SelectedTime property.
 void setTheLayer(Object value)
          Set the TheLayer property.
 void setWmsInfo(WmsSelection value)
          Set the WmsInfo property.
 void setWmsInfos(List value)
          Set the WmsInfos property.
protected  boolean shouldAddControlListener()
          Signal base class to add this as a projection control listener
protected  boolean shouldAddDisplayListener()
          Signal base class to add this as a display listener
 void viewpointChanged()
          Noop for the ControlListener interface
 void writeImageXml()
          Ask the user for an image xml file name and write the image to it
 
Methods inherited from class ucar.unidata.idv.control.ImageControl
getControlWidgets, getImageFlags, getInitialColorTable, getMultipleIsTopography, getUseTexture, haveMultipleFields, setAlphaFromSlider, setMultipleIsTopography, setUseTexture
 
Methods inherited from class ucar.unidata.idv.control.BaseImageControl
doMakeAlphaSlider, getAlpha, getDataProjectionLabel, getIsRaster, getSkipWidgetLabel, getWorkingImage, setAlpha, setInverseAlphaFromSlider, showSkipFactorSlider
 
Methods inherited from class ucar.unidata.idv.control.GridDisplayControl
actionPerformed, addTopographyMap, convertColorRange, doMakeContourLevelControl, doMakeLevelControl, doMakeLevelControl, exportDisplayedData, getColorParamName, getColorRangeFromData, getColorRangeIndex, getColorUnit, getContourInfo, getCursorReadoutData, getCursorReadoutInner, getDataRangeInColorUnits, getDefaultContourInfo, getDisplayUnit, getGridDataInstance, getInitialRange, getRawDataUnit, initializeDefaultContourInfo, isDisplayUnitAlsoColorUnit, setLevel, setLevel, setLevelFromUser
 
Methods inherited from class ucar.unidata.idv.control.DisplayControlImpl
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, captureWindow, centerOnDisplay, changeColorUnit, changeDisplayUnit, checkFlag, checkIfDataOk, checkImageSize, clearDataInstance, clearPrototype, clearViewManagers, close, colorUnitChanged, controlChanged, convertColorRange, convertRange, createDisplayListDisplayable, createIdvWindow, dataChanged, deactivateDisplays, debug, displayableToFront, displayChanged, displayControlFailed, displayUnitChanged, doApplyProperties, doExport, doInitialUpdateLegendAndList, doMakeBottomLegendComponent, doMakeChangeColorMenu, doMakeChangeColorMenu, doMakeChangeParameterMenuItem, doMakeColorControl, doMakeColorControl, doMakeColorScales, doMakeMenuBar, doMakeMenuBarMenus, doMakePointSizeWidget, doMakeRemoveControl, doMakeSideLegendComponent, doMakeSkipFactorSlider, doMakeTextureSlider, doMakeVisibilityControl, doMakeWidgetComponent, doMakeWindow, doMakeZPositionSlider, doRemove, 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, getColorUnitName, getColorWidgetLabel, getComponentHolder, getContents, getControlChangeSleepTime, getControlContext, getControlMenus, getCursorReadout, getCursorReadoutInner, getData, getDataChoice, getDataChoices, getDataForDisplayList, getDataInstance, getDataInstance, getDataSelection, getDataSources, getDataTimeRange, getDataTimeRange, getDataTimeSet, getDebugDetails, getDefaultColorScaleInfo, getDefaultDisplayListTemplate, getDefaultDistanceUnit, getDefaultFastRendering, getDefaultSamplingMode, getDefaultSamplingModeValue, getDefaultView, getDefaultViewDescriptor, getDefaultViewManager, getDisplayAltitudeType, getDisplayCategory, getDisplayCenter, getDisplayConventions, getDisplayedData, getDisplayId, getDisplayInfos, getDisplayListColor, getDisplayListData, getDisplayListDisplayable, getDisplayListTemplate, getDisplayMaster, getDisplayName, getDisplayScale, getDisplayUnit, getDisplayUnitName, getDisplayVisibility, getDoCursorReadout, getEditMenuItems, getEditMenuItems, getExpandedInTabs, getExtraLabelTemplate, getExtraMenus, getFileMenuItems, getFileMenuItems, getGraphicsConfiguration, getGrid, getGrid, getHadDataChoices, getHaveInitialized, getHelpIds, getHelpMenuItems, getId, getIdv, getImage, getImage, getInitDataChoices, getInternalAnimation, getInternalAnimation, 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, getRequestProperties, getSamplingModeName, getSamplingModeValue, getSamplingModeValue, getSelectRange, getSelectRangeEnabled, getSelectRangeWidget, getSettingsPanel, getShortParamName, getShowInDisplayList, getShowInLegend, getShowInTabs, getShowNoteText, getSkipValue, getSmoothingFactor, getSmoothingType, getSomeAnimation, getStore, getTemplateName, getTextureQuality, getTextureQualityLabel, getTimeSet, 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, handleWindowClosing, hasMapProjection, hasTimeMacro, haveDataTimes, haveParameterDefaults, hide, hyperlinkUpdate, inGlobeDisplay, init, init, init, initAfterUnPersistence, initAfterUnPersistence, initAsPrototype, initAsTemplate, initBasic, initializeWithNewData, initWindow, isDisplay3D, isGuiShown, isInTransectView, isInViewManager, itemStateChanged, makeChangeColorMenuItems, makeLegendLabel, makeLockButton, makeRemoveButton, moveTo, notifyViewManagersOfChange, parseProperties, popup, popupDataDialog, popupDataDialog, popupDataDialog, processRequestProperties, propertyChange, putTransientProperty, reallySetAttributeFlags, receiveShareData, redoGuiLayout, reloadDataSourceInThread, removeDataChoice, removeDisplayable, removeDisplayables, removeDisplayables, removeOnWindowClose, removePropertyChangeListener, resetData, resetDimness, resetViewManager, revertToDefaultColorTable, revertToDefaultColorTable, revertToDefaultRange, revertToDefaultRange, saveAsFavorite, saveAsParameterDefaults, saveAsPrototype, saveAsTemplate, 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, 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, setTitle, setUnitForColor, setUseFastRendering, setUsesTimeDriver, setUseTimesInAnimation, setVersion, setViewer, setViewManagerClassNames, setVisbilityAnimationPause, setWindowSize, setWindowVisible, setWindowX, setWindowY, setZPosition, setZPosition, shouldAddAnimationListener, shouldApplyFastRendering, shouldBeDocked, shouldWindowBeVisible, show, showColorControlWidget, showColorDialog, showColorDialog, showColorScaleDialog, showColorScales, showColorSwatches, showContourPropertiesDialog, showDetails, showDisplaySettingsDialog, showHelp, showLegendMenu, showNormalCursor, showProperties, showTimeRangeDialog, showWaitCursor, timeChanged, toFront, toggleNoteTextArea, toggleVisibilityForVectorGraphicsRendering, toggleWindow, toString, transectChanged, updateAnimation, updateDataInstance, updateDataSelection, updateDisplayList, updateGridDataInstance, updateLegendAndList, updateLegendLabel, updateLockButton, useSmoothingFactor, useZPosition, viewManagerChanged, viewManagerDestroyed, 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

WMSControl

public WMSControl()
Default constructor.


WMSControl

public WMSControl(List wmsSelections,
                  String title)
Constructor.

Parameters:
wmsSelections - The list of wms infos
title - The title
Method Detail

init

public boolean init(DataChoice dataChoice)
             throws VisADException,
                    RemoteException
Called to make this kind of Display Control; This method is called from inside DisplayControlImpl init(several args).

Overrides:
init in class ImageControl
Parameters:
dataChoice - the DataChoice of the moment.
Returns:
true if successful
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

initDone

public void initDone()
initdone

Overrides:
initDone in class DisplayControlImpl

isInitDone

public boolean isInitDone()
have we fully initialized

Specified by:
isInitDone in interface DisplayControl
Overrides:
isInitDone in class DisplayControlImpl
Returns:
have we fully initialized

doMakeDataInstance

protected DataInstance doMakeDataInstance(DataChoice dataChoice)
                                   throws RemoteException,
                                          VisADException
make the data instance

Overrides:
doMakeDataInstance in class GridDisplayControl
Parameters:
dataChoice - the data choice
Returns:
The data instance
Throws:
RemoteException - On badness
VisADException - On badness

shouldAddDisplayListener

protected boolean shouldAddDisplayListener()
Signal base class to add this as a display listener

Overrides:
shouldAddDisplayListener in class DisplayControlImpl
Returns:
Add as display listener

shouldAddControlListener

protected boolean shouldAddControlListener()
Signal base class to add this as a projection control listener

Overrides:
shouldAddControlListener in class DisplayControlImpl
Returns:
Add as display listener

getInitialFastRendering

protected boolean getInitialFastRendering()
Get initial fast rendering option

Overrides:
getInitialFastRendering in class DisplayControlImpl
Returns:
false

projectionChanged

public void projectionChanged()
Method to call if projection changes. Subclasses that are worried about such events should implement this.

Specified by:
projectionChanged in interface DisplayControl
Overrides:
projectionChanged in class DisplayControlImpl

viewpointChanged

public void viewpointChanged()
Noop for the ControlListener interface

Overrides:
viewpointChanged in class DisplayControlImpl

getDetailsContents

protected String getDetailsContents()
Get the contents of the details html

Overrides:
getDetailsContents in class DisplayControlImpl
Returns:
The contents of the details

handleDisplayChanged

public void handleDisplayChanged(DisplayEvent event)
Listen for DisplayEvents

Overrides:
handleDisplayChanged in class DisplayControlImpl
Parameters:
event - The event

goToAddress

public void goToAddress()
Go the a street address


reloadDataSource

public void reloadDataSource()
                      throws RemoteException,
                             VisADException
Overwrite base class method to do our own style of reload

Overrides:
reloadDataSource in class DisplayControlImpl
Throws:
RemoteException - On badness
VisADException - On badness

getViewMenuItems

protected void getViewMenuItems(List items,
                                boolean forMenuBar)
Add to view menu

Overrides:
getViewMenuItems in class DisplayControlImpl
Parameters:
items - List of ites
forMenuBar - for the menu bar

getSaveMenuItems

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

Overrides:
getSaveMenuItems 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

canSaveDataInCache

protected boolean canSaveDataInCache()
See if this can save data in cache.

Overrides:
canSaveDataInCache in class DisplayControlImpl
Returns:
true if allowable

writeImageXml

public void writeImageXml()
Ask the user for an image xml file name and write the image to it


saveDataChoiceInCache

public void saveDataChoiceInCache()
Save the data choice into the cache data source

Overrides:
saveDataChoiceInCache in class DisplayControlImpl

doMakeContents

protected Container doMakeContents()
                            throws VisADException,
                                   RemoteException
Make the gui

Overrides:
doMakeContents in class ImageControl
Returns:
The gui
Throws:
RemoteException - On badness
VisADException - On badness

scaleSliderChanged

public void scaleSliderChanged(int value)
Handle the slider changing

Parameters:
value - new slider value

loadImageFromScreen

public void loadImageFromScreen()
Load the iamge from screen bounds


getDataProjection

public MapProjection getDataProjection()
Even though we do have data that holds a MapProjection we don't want to provide it so we return null.

Specified by:
getDataProjection in interface DisplayControl
Overrides:
getDataProjection in class GridDisplayControl
Returns:
null

getDataProjectionForMenu

public MapProjection getDataProjectionForMenu()
This gets called when the user selects the View menu item "Use Native Image Projection"

Overrides:
getDataProjectionForMenu in class DisplayControlImpl
Returns:
MapProjection for the data

reproject

public void reproject()
Reproject the image


setData

protected boolean setData(DataChoice dataChoice)
                   throws VisADException,
                          RemoteException
set the data

Overrides:
setData in class ImageControl
Parameters:
dataChoice - The data
Returns:
ok
Throws:
RemoteException - On badness
VisADException - On badness

selectLayer

public void selectLayer(Object layer)
Set the wmsinfo

Parameters:
layer - The new layer

setImageWidth

public void setImageWidth(int value)
Set the ImageWidth property.

Parameters:
value - The new value for ImageWidth

getImageWidth

public int getImageWidth()
Get the ImageWidth property.

Returns:
The ImageWidth

setImageHeight

public void setImageHeight(int value)
Set the ImageHeight property.

Parameters:
value - The new value for ImageHeight

getImageHeight

public int getImageHeight()
Get the ImageHeight property.

Returns:
The ImageHeight

resolutionChanged

public void resolutionChanged(TwoFacedObject tfo)
User changed resolution

Parameters:
tfo - New resolution

setResolution

public void setResolution(double value)
Set the Resolution property.

Parameters:
value - The new value for Resolution

getResolution

public double getResolution()
Get the Resolution property.

Returns:
The Resolution

setCurrentBounds

public void setCurrentBounds(GeoLocationInfo value)
Set the CurrentBounds property.

Parameters:
value - The new value for CurrentBounds

getCurrentBounds

public GeoLocationInfo getCurrentBounds()
Get the CurrentBounds property.

Returns:
The CurrentBounds

setWmsInfo

public void setWmsInfo(WmsSelection value)
Set the WmsInfo property.

Parameters:
value - The new value for WmsInfo

getWmsInfo

public WmsSelection getWmsInfo()
Get the WmsInfo property.

Returns:
The WmsInfo

getTitle

protected String getTitle()
Get the window title

Overrides:
getTitle in class DisplayControlImpl
Returns:
Window title

getLegendLabels

protected void getLegendLabels(List labels,
                               int legendType)
Get the legend labesl

Overrides:
getLegendLabels in class DisplayControlImpl
Parameters:
labels - List of (String) labels
legendType - For side or bottom

imageUpdate

public boolean imageUpdate(Image img,
                           int flags,
                           int x,
                           int y,
                           int width,
                           int height)
Handle the image update

Specified by:
imageUpdate in interface ImageObserver
Parameters:
img - The image
flags - flags
x - x
y - y
width - width
height - height
Returns:
Continue loading

getExtraLegendComponent

protected JComponent getExtraLegendComponent(int legendType)
Assume that any display controls that have a color table widget will want the color table to show up in the legend.

Overrides:
getExtraLegendComponent in class DisplayControlImpl
Parameters:
legendType - type of legend
Returns:
The extra JComponent to use in legend

setWmsInfos

public void setWmsInfos(List value)
Set the WmsInfos property.

Parameters:
value - The new value for WmsInfos

getWmsInfos

public List getWmsInfos()
Get the WmsInfos property.

Returns:
The WmsInfos

setEnableClick

public void setEnableClick(boolean value)
Deprecated. use setEnableAutoFetch

Set the EnableClick property.

Parameters:
value - The new value for EnableClick

getEnableAutoFetch

public boolean getEnableAutoFetch()
Get the EnableAutoFetch property.

Returns:
The EnableAutoFetch property

setEnableAutoFetch

public void setEnableAutoFetch(boolean value)
Set the EnableImageFetch property.

Parameters:
value - The new value for EnableAutoFetch

setSelectedTime

public void setSelectedTime(String value)
Set the SelectedTime property.

Parameters:
value - The new value for SelectedTime

getSelectedTime

public String getSelectedTime()
Get the SelectedTime property.

Returns:
The SelectedTime

setTheLayer

public void setTheLayer(Object value)
Set the TheLayer property.

Parameters:
value - The new value for TheLayer

getTheLayer

public Object getTheLayer()
Get the TheLayer property.

Returns:
The TheLayer

setScale

public void setScale(double value)
Set the Scale property.

Parameters:
value - The new value for Scale

getScale

public double getScale()
Get the Scale property.

Returns:
The Scale

getInitialZPosition

protected double getInitialZPosition()
Get default z position to use

Overrides:
getInitialZPosition in class DisplayControlImpl
Returns:
Default z position