Class DisplayControlImpl

All Implemented Interfaces:
ActionListener, ItemListener, PropertyChangeListener, EventListener, HyperlinkListener, Sharable, DataChangeListener, DisplayControl, Prototypable, ControlListener, DisplayListener
Direct Known Subclasses:
ADTControl, AerologicalSoundingControl, AnimationTextControl, AudioControl, ChatLogControl, DrawingControl, GridDisplayControl, HydraControl, ImageMovieControl, LocationIndicatorControl, MapDisplayControl, MovieDisplayControl, MultiDisplayHolder, NoteControl, ObsDisplayControl, OmniControl, ProbeControl, ProfilerControl, RadarGridControl, RangeAndBearingControl, RGBCompositeControl, ScatterDisplay, ShapefileControl, TextDisplayControl

This is the main base class for all DisplayControls.
Author:
IDV development team
  • Field Details

    • version

      protected double version
      version
    • ZFUDGE

      protected static final double ZFUDGE
      fudge factor for the Z position
      See Also:
    • settingVisibility

      protected boolean settingVisibility
      A flag to check if this control is in the middle of toggling its visibility checkboxes. Used to keep us from having an infinite event loop. Infinity is a pretty cool concept but it doesn't work well in practice.
    • DISPLAY_LIST_NAME

      protected final String DISPLAY_LIST_NAME
      The name for the text type for the display list.
      See Also:
    • displayUnit

      protected Unit displayUnit
      The Unit (may be null) that is used to display data. We keep it at this level because this class handles the widget that is used to change the unit, etc.
    • initNoteText

      protected String initNoteText
      This is the initial text note text. We have this here so when this control is instantiated via persistence this value gets set. We then use it when we create the note TextArea
    • noteTextArea

      protected JTextArea noteTextArea
      The text area widget used for the control text notes
    • noteWrapper

      protected JComponent noteWrapper
      The Container that holds the noteTextArea. We keep this around so we can add/remove the TextArea
    • showNoteText

      protected boolean showNoteText
      Do we show the note text?
    • resolutionReadout

      protected String resolutionReadout
      The label to show the resolution readout in the side legend
    • dataSelection

      protected DataSelection dataSelection
      The DataSelection that holds any data subsetting specifications (e.g., time). This is typically created by the IDV and passed into this DisplayControl.
    • requestProperties

      protected Hashtable requestProperties
      A hashtable that is used to hold extra properties that are passed to the DataChoice through the getData called.
    • sharables

      protected List sharables
      Contains a list of all Sharable objects (e.g., AnimationWidget) that are created by this control. We keep this around so when the display is removed we can tell each Sharable to remove itself.
    • displayMasters

      protected List displayMasters
      Holds the DisplayMaster-s that this control wholly owns (e.g., profile display master).
    • defaultViewManager

      protected ViewManager defaultViewManager
      This can be used to temporarily set a ViewManager that is to be used. TBD.
    • viewManagers

      protected List viewManagers
      Holds the ViewManager-s that this control has created.
    • defaultView

      protected String defaultView
      The name of the ViewManager that any displays should be added to
    • contourInfo

      protected ContourInfo contourInfo
      Used to hold contour information if this control is enabled for it.
    • contourInfoParams

      protected String contourInfoParams
      Used by the isl to override selective parameters in the default contourInfo
    • displayListUsesColor

      protected boolean displayListUsesColor
      A boolean to see if the display list got it's color from the display.
    • ctw

      protected ColorTableWidget ctw
      This is the color table gui widget for controls enabled for color tables
    • colorScales

      protected List colorScales
      This is the color scale widget for a display
    • displayListTable

      protected Hashtable displayListTable
      This is the table of the view manager display list displayables
    • contourWidget

      protected ContourWidget contourWidget
      This is the contour info gui widget for controls enabled for contours
    • selectRangeWidget

      protected SelectRangeWidget selectRangeWidget
      This is the contour info gui widget for controls enabled for contours
    • helpUrl

      protected String helpUrl
      The url to show help for this control. Typically set through controls.xml
    • paramName

      protected String paramName
      The name of the parameter (if there is one)
    • instantiatedWithNoData

      protected boolean instantiatedWithNoData
      This gets set to track when we have been re-instantiated from a bundle without any data.
    • categories

      protected List categories
      This is the list of DataCategory-s that were defined for this DisplayControl by the idv/controls.properties and ControlDescriptor code.
    • colorScaleInfo

      protected ColorScaleInfo colorScaleInfo
      Holds the color scale information
    • controlContext

      protected ControlContext controlContext
      This is the context in whcih this display control exists (typically an instance of the IntegratedDataViewer but we use the ControlContext interface to keep us honest and not sloppy).
    • skipSlider

      protected JSlider skipSlider
      slider for setting skip values
    • isProgressiveResolution

      public boolean isProgressiveResolution
      Flag for progressive resolution.
    • reloadFromBounds

      public boolean reloadFromBounds
      Flag for reloading from bounds
    • matchDisplayRegion

      public boolean matchDisplayRegion
      Flag for matching the display region
  • Constructor Details

    • DisplayControlImpl

      public DisplayControlImpl()
      Default constructor. This is called when the control is unpersisted through the XmlEncoder mechanism.
    • DisplayControlImpl

      public DisplayControlImpl(ControlContext controlContext)
      Create a DisplayControlImple from a ControlContext
      Parameters:
      controlContext - context to use
  • Method Details

    • initBasic

      public final void initBasic(String displayId, List categories, Hashtable properties)
      This init method is used to just initialize some basic properties of this display control. It is intended that this control has not been created for normal display purposes but has been created for other purposes (e.g., Testing valid help ids).
      Specified by:
      initBasic in interface DisplayControl
      Parameters:
      displayId - The identifier of this control. Taken from controls.xml
      categories - The list of DataCategoryies for this control
      properties - Any properties (usually defined in controls.xml)
    • init

      public final void init(String displayId, List categories, List choices, ControlContext controlContext, String properties, DataSelection dataSelection) throws VisADException, RemoteException
      This init method is the one actually called by the IDV. The default is to turn around and call init with the first element in the dataChoice array.
      Specified by:
      init in interface DisplayControl
      Parameters:
      displayId - The identifier of this control. Taken from controls.xml
      categories - The list of DataCategoryies for this control
      choices - The list of DataChoice-s (usually only one) for this control
      controlContext - The context in which this control is in (usually a reference to the IntegratedDataViewer
      properties - Any properties (usually defined in controls.xml)
      dataSelection - Holds any specifications of subsets of the data (e.g., times)
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception deprecated use init that takes a properties Hashtable
    • init

      public final void init(String displayId, List categories, List choices, ControlContext controlContext, Hashtable properties, DataSelection dataSelection) throws VisADException, RemoteException
      This init method is the one actually called by the IDV. The default is to turn around and call init with the first element in the dataChoice array.
      Specified by:
      init in interface DisplayControl
      Parameters:
      displayId - The identifier of this control. Taken from controls.xml
      categories - The list of DataCategoryies for this control
      choices - The list of DataChoice-s (usually only one) for this control
      controlContext - The context in which this control is in (usually a reference to the IntegratedDataViewer
      properties - Any properties (usually defined in controls.xml)
      dataSelection - Holds any specifications of subsets of the data (e.g., times)
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • doInitialUpdateLegendAndList

      protected void doInitialUpdateLegendAndList()
      Do the initial update legend and list
    • addToControlContext

      protected void addToControlContext()
      Add to the control context
    • initAsTemplate

      public void initAsTemplate()
      Initialize as a template
      Specified by:
      initAsTemplate in interface DisplayControl
    • initAsPrototype

      public void initAsPrototype()
      Initialize as a prototype
      Specified by:
      initAsPrototype in interface Prototypable
    • 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
      Parameters:
      vc - The context in which this control exists
      properties - Properties that may hold things
    • initAfterUnPersistence

      public void initAfterUnPersistence(ControlContext vc, Hashtable properties, List preSelectedDataChoices)
      Called by the IntegratedDataViewer to initialize after this control has been unpersisted
      Specified by:
      initAfterUnPersistence in interface DisplayControl
      Parameters:
      vc - The context in which this control exists
      properties - Properties that may hold things
      preSelectedDataChoices - set of preselected data choices
    • init

      public boolean init(List choices) throws VisADException, RemoteException
      Initialize this instance according to the first DataChoice in a List. This implementation invokes init(DataChoice) to perform the initialization. If the list is null or empty, then the argument to init(DataChoice) is null.
      Parameters:
      choices - A list of data choices or null.
      Returns:
      true if and only if this instance was correctly initialized by the data choice.
      Throws:
      VisADException - if a VisAD Failure occurs.
      RemoteException - if a Java RMI failure occurs.
    • init

      public boolean init(DataChoice choice) throws VisADException, RemoteException

      Initialize this instance according to a data choice. Subclasses should override this method. Overridding methods should probably invoke setData(DataChoice) as part of their initialization procedure -- although it is unclear when this is actually necessary.

      This implementation simply returns true.

      Parameters:
      choice - A data choice or null.
      Returns:
      true if and only if this instance was correctly initialized by the data choice.
      Throws:
      VisADException - if a VisAD Failure occurs.
      RemoteException - if a Java RMI failure occurs.
    • initDone

      public void initDone()
      Called after all initialization has been done. A hook that allows derived classes to do any further initialization.
    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener listener)
      Add a property change listener.
      Parameters:
      listener - the listener to add
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener listener)
      Remove property change listener.
      Parameters:
      listener - listener to remove
    • firePropertyChangeEvent

      protected void firePropertyChangeEvent(PropertyChangeEvent event)
      Fire a property change event.
      Parameters:
      event - event to propagate
    • hasTimeMacro

      protected boolean hasTimeMacro(String t)
      Does this have a time macro string?
      Parameters:
      t - the string to check
      Returns:
      true if there is a time macro
    • shouldAddAnimationListener

      protected boolean shouldAddAnimationListener()
      A hook to allow derived classes to tell us to add this as an animation listener
      Returns:
      Add as animation listener
    • shouldAddDisplayListener

      protected boolean shouldAddDisplayListener()
      A hook to allow derived classes to tell us to add this as a display listener
      Returns:
      Add as display listener
    • shouldAddControlListener

      protected boolean shouldAddControlListener()
      A hook to allow derived classes to tell us to add this as a control listener
      Returns:
      Add as control listener
    • getHaveInitialized

      public boolean getHaveInitialized()
      Has this control been initialized
      Returns:
      Is this control initialized
    • getGraphicsConfiguration

      protected GraphicsConfiguration getGraphicsConfiguration(boolean is3D, boolean useStereo)
      Get the graphics configuration
      Parameters:
      is3D - use Java 3D
      useStereo - use stereo (id3D must be true)
      Returns:
      the GraphicsConfiguration for DisplayImpl's
    • applyAttributesToDisplayables

      protected void applyAttributesToDisplayables() throws VisADException, RemoteException
      Used to apply all of the display attributes taht are active to the Displayable-s
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • addAttributeFlags

      protected void addAttributeFlags(int f)
      Add the given attribute flag (e.g., FLAG_COLORTABLE) to the attrbiute flag map.
      Parameters:
      f - The flag (e.g., FLAG_COLORTABLE)
    • setAttributeFlags

      protected void setAttributeFlags(int f)
      Set the attribute flag map to the given value. Note: this really should just set the flags but instead it OR's the attributeFlags with the given set of flags in the f parameter. Lets keep this logic because changing it now breaks lotsof things. If you want to actually set the flags call reallySetAttributeFlags
      Parameters:
      f - The value of the attribute flag map
    • reallySetAttributeFlags

      protected void reallySetAttributeFlags(int f)
      Set the attribute flag map to the given value.
      Parameters:
      f - THe value of the attribute flag map
    • checkFlag

      protected boolean checkFlag(int f)
      Test if the given flag is set in the attrbiuteFlags
      Parameters:
      f - The flag to check
      Returns:
      Is the given flag set
    • getAttributeFlags

      protected int getAttributeFlags()
      Return the attribute flag map
      Returns:
      The attributeFlags
    • addAttributedDisplayable

      protected void addAttributedDisplayable(Displayable d)
      Add the given Displayable to the list of attribute displayables. Use this object's attributeFlags data member as the attribute attributeFlags to use.
      Parameters:
      d - The Displayable to add
    • addAttributedDisplayable

      protected void addAttributedDisplayable(Displayable d, int attributeFlags)
      Add the given Displayable to the list of displayables. This is simply a wrapper that passes in notGlobalFlags="0"
      Parameters:
      d - The Displayable to add
      attributeFlags - The set of attributes for this displayable
    • addAttributedDisplayable

      protected void addAttributedDisplayable(Displayable d, int attributeFlags, int notGlobalFlags)
      Add the given Displayable into the list of attributed displayables managed by this DisplayControl. An "attributed displayable" is one which there is one (or more) gui widgets created for defining the graphic attributes of the displayable (e.g., color table, param range, color, etc) defined by the bitmask attributeFlags. The notGlobalFlags are used to define the attribute for this displayable but not used for creating the gui, etc.
      Parameters:
      d - The Displayable to add
      attributeFlags - The set of attributes for this displayable
      notGlobalFlags - Attribute flags for this displayable but don't let them effect the gui.
    • applyContourInfo

      protected void applyContourInfo() throws VisADException, RemoteException
      If the contourInfo is non-null then apply it to the Displayables in the displayables list that are flagged with the FLAG_CONTOUR
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • applyColorScaleInfo

      protected void applyColorScaleInfo() throws VisADException, RemoteException
      If the colorScaleInfo is non-null then apply it to the Displayables in the displayables list that are flagged with the FLAG_COLORTABLE
      Throws:
      RemoteException - problem with remote display
      VisADException - problem with local display
    • colorUnitChanged

      protected void colorUnitChanged(Unit oldUnit, Unit newUnit)
      A hook that is called when the color unit is changed. Allows derived classes to act accordingly.
      Parameters:
      oldUnit - The old color unit
      newUnit - The new color unit
    • applyColorUnit

      protected void applyColorUnit() throws VisADException, RemoteException
      If the color unit (gotten from a call to getUnitForColor) is non-null then apply it to the Displayables in the displayables list that are flagged with the FLAG_COLORUNIT
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • displayUnitChanged

      protected void displayUnitChanged(Unit oldUnit, Unit newUnit)
      A hook that is called when the display unit is changed. Allows derived classes to act accordingly.
      Parameters:
      oldUnit - The old color unit
      newUnit - The new color unit
    • getRawDataUnit

      public Unit getRawDataUnit()
      Get the raw data unit.
      Returns:
      null
    • applyDisplayUnit

      protected void applyDisplayUnit() throws VisADException, RemoteException
      If the color unit (gotten from a call to getUnitForColor) is non-null then apply it to the Displayables in the displayables list that are flagged with the FLAG_DISPLAYUNIT
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • getColorTableToApply

      protected ColorTable getColorTableToApply()
      Get the color table to use when applying to displayables
      Returns:
      The color table
    • applyColorTable

      protected void applyColorTable() throws VisADException, RemoteException
      If the color table is non-null then apply it to the Displayables in the displayables list that are flagged with the FLAG_COLORTABLE
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • resetDimness

      public void resetDimness()
      Set the color table dimness to the default
    • setColorDimmer

      public void setColorDimmer() throws VisADException, RemoteException
      Set the color dimmer
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • setColorBrighter

      public void setColorBrighter() throws VisADException, RemoteException
      Set the color brighter
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • applyColor

      protected void applyColor() throws VisADException, RemoteException
      If the color is non-null then apply it to the Displayables in the displayables list that are flagged with the FLAG_COLOR
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • applyRange

      protected void applyRange() throws VisADException, RemoteException
      Apply the range it to the Displayables in the displayables list that are flagged with the FLAG_COLORTABLE
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • applySelectRange

      protected void applySelectRange() throws VisADException, RemoteException
      Apply the range it to the Displayables in the displayables list that are flagged with the FLAG_SELECTRANGE
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • applyZPosition

      protected void applyZPosition() throws VisADException, RemoteException
      Apply the z position to the displayables with FLAG_ZPOSITION set
      Throws:
      RemoteException - When bad things happen
      VisADException - When bad things happen
    • applyLineWidth

      protected void applyLineWidth() throws VisADException, RemoteException
      Apply the line width to the displayables with FLAG_LINEWIDTH set
      Throws:
      RemoteException - When bad things happen
      VisADException - When bad things happen
    • getColorTableForDisplayable

      public float[][] getColorTableForDisplayable(ColorTable ct)
      The default is to use the alpha color table. We use this so derived classes can override it before applying the color table to the Displayable-s
      Parameters:
      ct - The original color table
      Returns:
      A 2D float array that is the actual color table
    • addToRangeMenu

      public void addToRangeMenu(RangeWidget rw, List items)
      A hook to add an entry into the range menu
      Parameters:
      rw - Range widget
      items - List of menu items
    • addToRangeMenu

      public void addToRangeMenu(ColorTableWidget cw, List items)
      A hook to add an entry into the range menu
      Parameters:
      cw - the color table widget
      items - List of menu items deprecated use #addToRangeMenu(RangeWidget)
    • addToRangeMenu

      public void addToRangeMenu(RangeDialog selectRangeWidget, List items)
      A hook to add an entry into the range menu
      Parameters:
      selectRangeWidget - the range dialog that has the items
      items - List of menu items deprecated use #addToRangeMenu(RangeWidget)
    • parseProperties

      protected void parseProperties(String properties)
      The given properties String is a ";" delimited list of name=value properties. This method processes this string, calling setProperty for each property.
      Parameters:
      properties - Specification of the name=value properties.
    • setInitialSettings

      public void setInitialSettings(List settings)
      Set the initial settings
      Parameters:
      settings - the display settings
    • applyProperties

      public void applyProperties(Hashtable properties)
      Parameters:
      properties - Specification of the name=value properties.
    • applyDisplaySetting

      public void applyDisplaySetting(DisplaySetting displaySetting) throws Exception
      Apply a display setting to this control
      Parameters:
      displaySetting - the settings to apply
      Throws:
      Exception - problem setting settings
    • applyPropertyValues

      public void applyPropertyValues(List props) throws Exception
      Apply the property values in the list
      Parameters:
      props - list of property values
      Throws:
      Exception - problem setting property values
    • getCanDoRemoveAll

      public boolean getCanDoRemoveAll()
      Used by the IDV to determine whether a control should be removed when the user does a remove all. This is overwritten by the TextDisplayControl to return false.
      Specified by:
      getCanDoRemoveAll in interface DisplayControl
      Returns:
      Should this control be removed
    • setCanDoRemoveAll

      public void setCanDoRemoveAll(boolean v)
      Used by the IDV to determine whether a control should be removed when the user does a remove all.
      Parameters:
      v - The value
    • getShowNoteText

      public boolean getShowNoteText()
      Is this control currently showing the embedded note text area.
      Returns:
      Is showing notes
    • setShowNoteText

      public void setShowNoteText(boolean n)
      Used by the presistence/unpersistence to record whether this control is showing its note text area
      Parameters:
      n - The value for the show note text flag
    • getNoteText

      public String getNoteText()
      This is the value (String) of the note text area.
      Returns:
      The note text
    • setNoteText

      public void setNoteText(String n)
      Set the value of the note text area.
      Parameters:
      n - The note text
    • toggleNoteTextArea

      public void toggleNoteTextArea()
      Toggle the visibility of the noteTextArea.
    • redoGuiLayout

      protected void redoGuiLayout()
      Used to relayout the gui mainPanel
    • isInTransectView

      public boolean isInTransectView()
      Are we displayed in a transect view manager
      Returns:
      Is in transect view
    • addNoteText

      protected void addNoteText(JPanel mainPanel, JComponent noteWrapper)
      Insert the given noteWrapper (which holds the note text TextArea) into the gui
      Parameters:
      mainPanel - Where to add the noteWrapper
      noteWrapper - Holds the note text TextArea
    • setProperty

      protected void setProperty(String name, Object value)
      Wrapper around Misc.propertySet
      Parameters:
      name - Property name
      value - Property value
    • addDisplayMaster

      protected void addDisplayMaster(DisplayMaster s)
      A sub-class can register any DisplayMaster-s created and managed by them. When this DisplayControl is removed it runs through all of the DisplayMaster-s and calls destroy on them.
      Parameters:
      s - The DisplayMaster to add
    • addViewManager

      protected void addViewManager(ViewManager s)
      A sub-class can register any ViewManager-s created and managed by them. When this DisplayControl is removed it runs through all of the ViewManager-s and calls destroy on them.
      Parameters:
      s - The ViewManager to add
    • clearViewManagers

      protected void clearViewManagers()
      Runs through the list of ViewManager-s and tells each to destroy. Creates a new viewManagers list.
    • addSharable

      public void addSharable(SharableImpl s)
      A sub-class can register any SharableImpl-s created and managed by them. When this DisplayControl is removed it runs through all of the SharableImpl-s and calls removeSharable on them.
      Parameters:
      s - The SharableImpl to add
    • initializeWithNewData

      protected void initializeWithNewData()
      This is called when this display is created from a template and does not have any data. It is meant as a hook for derived classes to clear out state that may not be in sync with the newly chosen data
    • displayChanged

      public final void displayChanged(DisplayEvent event)
      Noop for the DisplayListener interface
      Specified by:
      displayChanged in interface DisplayListener
      Parameters:
      event - The event
    • handleDisplayChanged

      public void handleDisplayChanged(DisplayEvent event)
      Allow sub-classes to get displayevents
      Parameters:
      event - The event
    • boundsClose

      protected boolean boundsClose(double a, double b)
      See if two values are close
      Parameters:
      a - first value
      b - second value
      Returns:
      true if they are close
    • controlChanged

      public void controlChanged(ControlEvent event)
      Noop for the ControlListener interface
      Specified by:
      controlChanged in interface ControlListener
      Parameters:
      event - The event
    • checkBoundsChange

      protected void checkBoundsChange()
      Check to see if the screen bounds have changed
    • getControlChangeSleepTime

      protected long getControlChangeSleepTime()
      This returns the time to sleep, in milliseconds, between checks for finally handling control changed events.
      Returns:
      milliseconds to sleep for control change events.
    • viewpointChanged

      public void viewpointChanged()
      This gets called when we have received a controlChanged event and have not received another one in some time delta
    • loadDataFromViewBounds

      protected void loadDataFromViewBounds()
      Method to calculate screen bounds to load new data
    • propertyChange

      public void propertyChange(PropertyChangeEvent evt)
      Handle animation change events
      Specified by:
      propertyChange in interface PropertyChangeListener
      Parameters:
      evt - The event
    • firstFrameDone

      public void firstFrameDone()
      This gets called by the view manager when it has rcvd its first frame_done event. We have this here for those displays (e.g., station model) that need state from the view manager that is only valid when there has been a display.
      Specified by:
      firstFrameDone in interface DisplayControl
    • getDataChoices

      public List getDataChoices()
      Return the list of current DataChoice-s
      Specified by:
      getDataChoices in interface DisplayControl
      Returns:
      List of data choices
    • getMyDataChoices

      public List getMyDataChoices()
      Return the list of current DataChoice-s deprecated Use getDataChoices
      Returns:
      List of data choices
    • getInitDataChoices

      public List getInitDataChoices()
      Used to publicize the list of data choices for the persitence mechanism. This is the list of DataChoice-s that this control was originally create with
      Returns:
      List of original data choices
    • setInitDataChoices

      public void setInitDataChoices(List l)
      Used to publicize the list of data choices for the persistence mechanism
      Parameters:
      l - List of original data choices
    • setPersistedVisadData

      public void setPersistedVisadData(List l)
      No-op for legacy bundles
      Parameters:
      l - List of data deprecated
    • addDataChoice

      public boolean addDataChoice(DataChoice c)
      Add the given DataChoice to the list of data choices and return true if this is a new DataChoice.
      Parameters:
      c - The data choice to add
      Returns:
      Was this data choice added. (It won't be added if it is already in the list).
    • removeDataChoice

      public void removeDataChoice(DataChoice dataChoice)
      Remove the given DataChoice from the myDataChoices list. Tell the DataChoice to remove this object as a DataChangeListener
      Parameters:
      dataChoice - The data choice to remove
    • setDataChoices

      public void setDataChoices(List newList)
      Set the list of data choices to be the given list
      Parameters:
      newList - New list of data choices.
    • appendDataChoices

      public void appendDataChoices(List newDataChoices)
      Append the given list of DataChoice-s to the myDataChoices list
      Parameters:
      newDataChoices - List to append
    • getDataChoice

      public DataChoice getDataChoice()
      Return the single DataChoice
      Specified by:
      getDataChoice in interface DisplayControl
      Returns:
      The data choice
    • dataChanged

      public void dataChanged()
      Implementation of DataChangeListener.
      Specified by:
      dataChanged in interface DataChangeListener
    • receiveShareData

      public void receiveShareData(Sharable from, Object dataId, Object[] data)
      Method called by other classes that share the the state.
      Specified by:
      receiveShareData in interface Sharable
      Overrides:
      receiveShareData in class SharableImpl
      Parameters:
      from - other class.
      dataId - type of sharing
      data - Array of data being shared. In this case, the first (and only?) object in the array is the level
    • resetData

      protected void resetData() throws VisADException, RemoteException
      This gets called when the control has received notification of a dataChange event. By default it turns around and calls setData with the current list of data choices.
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • addNewData

      protected void addNewData(List newChoices) throws VisADException, RemoteException
      Called when the user chooses new data for this display
      Parameters:
      newChoices - List of new DataChoice-s
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • setData

      protected boolean setData(List newChoices) throws VisADException, RemoteException
      Gets called when the user has selected a new DataChoice. By default this method extracts the first DataChoice from the list of choices and calls setData (DataChoice dataChoice) {return true;}

      This returns whether the data setting was successfull or not.

      Parameters:
      newChoices - List of new DataChoice-s
      Returns:
      Was this successful
      Throws:
      RemoteException - Java RMI problem
      VisADException - problem creating VisAD object
    • checkIfDataOk

      protected boolean checkIfDataOk(DataInstance di) throws VisADException, RemoteException
      Implements the default check if the new DataInstance/DataChoice pair holds valid data. The default DataInstance.dataOk method does a getData call (which may be expensive) and returns whether the Data object is non-null. Sub-classes can override this method. For example, the ImageSequence control overridess this to do nothing because it wants to display a progress bar.
      Parameters:
      di - The DataInstance to check
      Returns:
      Is the data held by this data instance ok (typically is it non-null)
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • setData

      protected boolean setData(DataChoice dataChoice) throws VisADException, RemoteException

      Sets the data associated with this instance. This method gets called at initialization or when the user has selected a new DataChoice through the data selector control.

      In order to implement subclasses of this class that behave correctly, you should know that this implementation uses overridable methods of this class in the following way:

      Parameters:
      dataChoice - The DataChoice to use.
      Returns:
      Was this setData call successful
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • getInitialRange

      protected Range getInitialRange() throws RemoteException, VisADException
      Hook method to allow derived classes to return a different initial Range
      Returns:
      The initial range to use
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • getInitialColorTable

      protected ColorTable getInitialColorTable()
      A hook so derived classes can return a colortable. This method uses the DisplayConventions to get the color table based on the paramName
      Returns:
      The color table to use
    • revertToDefaultColorTable

      protected void revertToDefaultColorTable()
      Reset the color table to the initial color table
    • revertToDefaultRange

      protected void revertToDefaultRange()
      Reset the range to the initial range
    • getOldColorTableOrInitialColorTable

      protected final ColorTable getOldColorTableOrInitialColorTable()
      Just a utility for bundles that were created with the old code that saved off the color table name, not the color table.
      Returns:
      The color table
    • setCategories

      public void setCategories(List c)
      A set method so the categories list will get persisted.
      Parameters:
      c - The list of DataCategorys
    • getCategories

      public List getCategories()
      Returns the list of data categories.
      Specified by:
      getCategories in interface DisplayControl
      Returns:
      The list of DataCategorys
    • showWaitCursor

      public void showWaitCursor()
      A helper method to show the wait cursor
    • showNormalCursor

      public void showNormalCursor()
      A helper method to show the normal cursor
    • setDisplayName

      public void setDisplayName(String displayName)
      What is the name of this control (e.g., "Plan view")
      Parameters:
      displayName - The name to use for display purposes
    • getPropertyDisplayName

      public String getPropertyDisplayName()
      I forgot why there was this getter (with the "Property") here
      Returns:
      The display name
    • getDisplayName

      public String getDisplayName()
      Returns the name of this display. Initially, the name of the display is "Display", but it can be set by the setDisplayName(String) method.
      Returns:
      The name of this display.
    • getDisplayId

      public String getDisplayId()
      The id of this control (from controls.xml) We have this here for xml persistence
      Specified by:
      getDisplayId in interface DisplayControl
      Returns:
      The id
    • setDisplayId

      public void setDisplayId(String theId)
      Set the id of this control (from controls.xml) We have this here for xml persistence
      Parameters:
      theId - The id
    • clearDataInstance

      protected void clearDataInstance()
      Clear the DataInstance
    • setDataInstance

      protected void setDataInstance(DataInstance dataInstance)
      Set the data instance. Protected so it does not get persisted.
      Parameters:
      dataInstance - The data instance used by this control
    • getDataInstance

      public DataInstance getDataInstance()
      We have this here (in part) for xml persistence
      Returns:
      The data instance used by this control
    • getDataInstance

      public DataInstance getDataInstance(boolean forceCreation)
      We have this here (in part) for xml persistence
      Parameters:
      forceCreation - if true, force it.
      Returns:
      The data instance used by this control
    • getData

      public Data getData(DataInstance dataInstance) throws VisADException, RemoteException
      A wrapper around dataInstance.getData but this calls updateDataInstance first
      Parameters:
      dataInstance - the dataInstance
      Returns:
      dataInstance.getData();
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • getGrid

      public FieldImpl getGrid(GridDataInstance dataInstance) throws VisADException, RemoteException
      A wrapper around dataInstance.getGrid but this calls updateDataInstance first
      Parameters:
      dataInstance - the dataInstance
      Returns:
      dataInstance.getGrid();
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • getGrid

      public FieldImpl getGrid(GridDataInstance dataInstance, boolean copy) throws VisADException, RemoteException
      A wrapper around dataInstance.getGrid but this calls updateDataInstance first
      Parameters:
      dataInstance - the dataInstance
      copy - make a copy of the field
      Returns:
      dataInstance.getGrid(copy);
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • updateGridDataInstance

      protected GridDataInstance updateGridDataInstance(GridDataInstance dataInstance) throws VisADException, RemoteException
      update the datainstance in preparation for a getData call
      Parameters:
      dataInstance - the grid data instance
      Returns:
      the new instance
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • updateDataInstance

      protected DataInstance updateDataInstance(DataInstance dataInstance) throws VisADException, RemoteException
      update the datainstance in preparation for a getData call. This will set the timeDriverTimes if enabled
      Parameters:
      dataInstance - the dataInstance to update
      Returns:
      the updated dataInstance
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • updateDataSelection

      protected DataSelection updateDataSelection(DataSelection dataSelection) throws VisADException, RemoteException
      update the dataselection in preparation for a getData call. This will set the timeDriverTimes if enabled
      Parameters:
      dataSelection - the dataSelection to update
      Returns:
      the new DataSelection
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • setDisplayAreaSubset

      public void setDisplayAreaSubset(String n)
      This api is called by ISL to set the spatial subset of the datasource to the Match Display Region, so the user doesn't need to save all data when saving the zidv bundle, if there is more than one view window it will do nothing since it will be too much book keeping to find out the region to subset
      Parameters:
      n - _more_
    • setParamName

      public void setParamName(String paramName)
      The name of the parameter (initially from the DataChoice) displayed by this control.
      Parameters:
      paramName - The parameter name
    • getViewer

      public ControlContext getViewer()
      We have this here (in part) for xml persistence This is usually the IntegratedDataViewer
      Returns:
      The context in which this control exists
    • setViewer

      public void setViewer(ControlContext controlContext)
      We have this here (in part) for xml persistence This is usually the IntegratedDataViewer
      Parameters:
      controlContext - The control context
    • getViewContext

      public ViewContext getViewContext()
      A hack for now. The controlContext is really the IDV which also serves as the ViewContext
      Returns:
      The context in which view managers exist
    • getControlContext

      public ControlContext getControlContext()
      Returns:
      The context in which this control exists
    • getIdv

      public IntegratedDataViewer getIdv()
      Get the integraed data viewer that this is part of
      Returns:
      the IntegratedDataViewer
    • getDisplayConventions

      public DisplayConventions getDisplayConventions()
      Get the DisplayConventions to use.
      Returns:
      The display conventions
    • getLabel

      public String getLabel()
      Used by the idv classes
      Specified by:
      getLabel in interface DisplayControl
      Returns:
      The label that describes this control
    • toString

      public String toString()
      The toString method.
      Overrides:
      toString in class Object
      Returns:
      The displayName
    • getWindow

      public JFrame getWindow()
      Return the control's JFrame
      Specified by:
      getWindow in interface DisplayControl
      Returns:
      The JFrame
    • getTitle

      protected String getTitle()
      Returns the window title. This implementation invokes the getDisplayName() method.
      Returns:
      The window title.
    • setTitle

      public void setTitle(String title)
      Set the title of the window if it has been created.
      Parameters:
      title - The title
    • updateLegendLabel

      protected void updateLegendLabel()
      This method is called to update the legend labels when some state has changed in this control that is reflected in the labels.
    • updateLegendAndList

      protected void updateLegendAndList()
      Update the legend labels and the display list
    • updateDisplayList

      protected void updateDisplayList()
      Update the display list data
    • getDataForDisplayList

      public Data getDataForDisplayList()
      Get the data for the display list
      Specified by:
      getDataForDisplayList in interface DisplayControl
      Returns:
      the dat for the display list
    • getDisplayListData

      protected Data getDisplayListData()
      Add the data to the in display legend
      Returns:
      the data for the display list displayable
    • getDisplayListDisplayable

      public DisplayableData getDisplayListDisplayable(ViewManager view)
      Get the displayable for the Display List
      Specified by:
      getDisplayListDisplayable in interface DisplayControl
      Parameters:
      view - the view that it will go into
      Returns:
      the appropriate displayable
    • setDisplayListProperties

      protected void setDisplayListProperties(DisplayableData d, ViewManager view) throws VisADException, RemoteException
      Set the display list properties on the displayable
      Parameters:
      d - the displayable
      view - the view manager
      Throws:
      RemoteException - a Java RMI Exception occured
      VisADException - unable to set properties
    • getLegendButtons

      public JComponent getLegendButtons(int legendType)
      Set the legend buttons
      Specified by:
      getLegendButtons in interface DisplayControl
      Parameters:
      legendType - type of legend
      Returns:
      component containing buttons
    • getShortParamName

      protected String getShortParamName()
      Get the short parameter name
      Returns:
      The String to be used for the short parameter name
    • getLongParamName

      protected String getLongParamName()
      Get the long parameter name
      Returns:
      The String to be used for the long parameter name
    • getDataSources

      public List getDataSources()
      Get the DataSources associated with this contol
      Returns:
      list of data sources
    • addLabelMacros

      protected void addLabelMacros(String template, List patterns, List values)
      Add any macro name/value pairs.
      Parameters:
      template - template for the label
      patterns - The macro names
      values - The macro values
    • getLegendLabels

      protected void getLegendLabels(List labels, int legendType)
      This method is used to get all of the labels (String) that are shown in the side legend.
      Parameters:
      labels - A list that the labels are inserted into
      legendType - The type of legend, BOTTOM_LEGEND or SIDE_LEGEND
    • applyForecastHourMacro

      protected String applyForecastHourMacro(String t, DateTime currentTime)
      Apply the forecast hour macro
      Parameters:
      t - label string
      currentTime - first time
      Returns:
      modified string
    • hasForecastHourMacro

      protected boolean hasForecastHourMacro(String t)
      Check if the label string has a forecast hour macro in it.
      Parameters:
      t - the string to check
      Returns:
      true if it does
    • getMenuLabel

      public String getMenuLabel()
      Return the label used for the menues in the IDV. Implements the method in the DisplayControl interface
      Specified by:
      getMenuLabel in interface DisplayControl
      Returns:
      The menu label
    • toFront

      public void toFront()
      Move the control's window to the front.
      Specified by:
      toFront in interface DisplayControl
    • removeOnWindowClose

      protected boolean removeOnWindowClose()
      Should the DisplayControl do a doRemove when the window closes.
      Returns:
      Whether to remove this control on a window close.
    • guiImported

      public void guiImported()
      This is called to inform this display control that its gui has been imported by some other idv component and it no longer is in a window.
    • guiExported

      public void guiExported()
      This is called to inform this display control that its gui has been exported out of some other component (ex: the MultiDisplayControl).
    • createIdvWindow

      protected IdvWindow createIdvWindow()
      Create an IDV window
      Returns:
      the window
    • createDisplayListDisplayable

      protected DisplayableData createDisplayListDisplayable(ViewManager view) throws VisADException, RemoteException
      Make the DisplayListDisplayable
      Parameters:
      view - the view that this will be in
      Returns:
      The displayable data object
      Throws:
      RemoteException - Java RMI Exception
      VisADException - VisAD problem
    • doMakeWindow

      protected void doMakeWindow() throws VisADException, RemoteException
      Called by the derived class init method to create the gui window.
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • isGuiShown

      protected boolean isGuiShown()
      Is the GUI being shown
      Returns:
      true if it is
    • doMakeMenuBar

      protected JMenuBar doMakeMenuBar()
      Make the menu bar
      Returns:
      The menu bar
    • captureWindow

      public void captureWindow()
      Screen snapshot of window
    • setMainPanelDimensions

      protected void setMainPanelDimensions() throws Exception
      Set the main panel dimenstions
      Throws:
      Exception - problem setting the dimensions
    • getImage

      public Image getImage() throws Exception
      Get the image
      Returns:
      the image
      Throws:
      Exception - problem getting image
    • getViewManagerForCapture

      public ViewManager getViewManagerForCapture(String what) throws Exception
      Allows a derived class to provide its own viewmanager wehn capturing an image of the display from isl
      Parameters:
      what - The specification of the viewmanager (from the isl)
      Returns:
      the viewmanager or null
      Throws:
      Exception - on badness
    • getImage

      public Image getImage(String what) throws Exception
      Get the image of "what"
      Parameters:
      what - description of what to get
      Returns:
      the image
      Throws:
      Exception - problem getting image
    • doMakeMenuBarMenus

      protected List doMakeMenuBarMenus(List menus)
      Make the menus to put in the menu bar
      Parameters:
      menus - List to add to
      Returns:
      The menus list
    • getStore

      public XmlObjectStore getStore()
      Get the object store
      Returns:
      the store
    • handleWindowClosing

      protected void handleWindowClosing()
      Handle the window closing.
    • getOuterContents

      public Component getOuterContents()
      The outer contents is the outermost component of the gui (i.e., it holds the menu bar and the mainPanel)
      Returns:
      Gui contents
    • getMainPanel

      public JComponent getMainPanel()
      Get the component for the main panel of this DisplayControlImpl's contents.
      Returns:
      GUI contents
    • setMakeWindow

      public void setMakeWindow(boolean value)
      Should this control make its own window. This method is here (mostly) for xml unpersistence
      Parameters:
      value - The make window flag
    • getMakeWindow

      public boolean getMakeWindow()
      Should this control make its own window. This method is here (mostly) for xml unpersistence
      Returns:
      The flag
    • setWindowSize

      public void setWindowSize(Dimension value)
      This method is here (mostly) for xml unpersistence
      Parameters:
      value - The size of the window
    • getWindowSize

      public Dimension getWindowSize()
      This method is here (mostly) for xml unpersistence
      Returns:
      The size of the window (if non-null) else null
    • getMainPanelSize

      public Dimension getMainPanelSize()
      Get the main panel size
      Returns:
      the main panel size
    • setMainPanelSize

      public void setMainPanelSize(Dimension s)
      Set the main panel size
      Parameters:
      s - the dimensions of the panel
    • setWindowX

      public void setWindowX(int x)
      This method is here (mostly) for xml unpersistence
      Parameters:
      x - The x location of the window
    • getWindowX

      public int getWindowX()
      This method is here (mostly) for xml unpersistence
      Returns:
      The x location of the window
    • setWindowY

      public void setWindowY(int y)
      This method is here (mostly) for xml unpersistence
      Parameters:
      y - The y location of the window
    • getWindowY

      public int getWindowY()
      This method is here (mostly) for xml unpersistence
      Returns:
      The y location of the window
    • show

      public void show()
      SHow the window
      Specified by:
      show in interface DisplayControl
    • toggleWindow

      public void toggleWindow()
      Hide or show the main window
      Specified by:
      toggleWindow in interface DisplayControl
    • hide

      public void hide()
      Hide the window
    • initWindow

      public void initWindow(IdvWindow window)
      A hook method to allow subclasses to initialize the dialog window, set the size of the dialog window, etc.
      Parameters:
      window - The control's window
    • getWindowVisible

      public boolean getWindowVisible()
      Is the window currently visible
      Returns:
      Window visibility
    • shouldWindowBeVisible

      public boolean shouldWindowBeVisible()
      Does this display control popup its window on creation
      Returns:
      Should the window be visible
    • setWindowVisible

      public void setWindowVisible(boolean v)
      Set the local data memeber myWindowVisible. If myWindow is non-null then set its visiblity as well. This method is mostly used in the XmlEncoder persistence mechanism.
      Parameters:
      v - Window visibility
    • getChangeParameterLabel

      protected String getChangeParameterLabel()
      A hook to allow derived classes to have their own label in the menu for the change data call.
      Returns:
      Menu label for the change data call.
    • hyperlinkUpdate

      public void hyperlinkUpdate(HyperlinkEvent e)
      Implement the HyperLinkListener method to pass any link clicks off to the ControlContext
      Specified by:
      hyperlinkUpdate in interface HyperlinkListener
      Parameters:
      e - The event
    • hasMapProjection

      public boolean hasMapProjection()
      Does this display have a map projection
      Returns:
      Has map projection
    • reloadDataSource

      public void reloadDataSource() throws RemoteException, VisADException
      Reload the data sources
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • reloadDataSourceInThread

      public void reloadDataSourceInThread() throws RemoteException, VisADException
      reload the data source in a thread.
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • getLastFileMenuItems

      protected void getLastFileMenuItems(List items)
      Get last file menu items.
      Parameters:
      items - the last items in the file menu.
    • getSaveMenuItems

      protected void getSaveMenuItems(List items, boolean forMenuBar)
      Add in the menu items for the save and export display template
      Parameters:
      items - List of menu items to add into
      forMenuBar - if this is for the menubar
    • getEditMenuItems

      public List getEditMenuItems(List items)
      Add the relevant edit menu items into the list
      Parameters:
      items - List of menu items
      Returns:
      the list with the new items
    • getFileMenuItems

      public List getFileMenuItems(List items)
      Add the relevant edit menu items into the list
      Parameters:
      items - List of menu items
      Returns:
      the list with the new items
    • getViewMenuItems

      public List getViewMenuItems(List items)
      Add the relevant view menu items into the list
      Parameters:
      items - List of menu items
      Returns:
      the list with the new items
    • getEditMenuItems

      protected void getEditMenuItems(List items, boolean forMenuBar)
      Add the relevant edit menu items into the list
      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
    • haveParameterDefaults

      protected boolean haveParameterDefaults()
      Check to see if we have any display properties.
      Returns:
      true if we have properties for parameter defaults.
    • getTimeSet

      public Set getTimeSet() throws RemoteException, VisADException
      Get the time set
      Specified by:
      getTimeSet in interface DisplayControl
      Returns:
      the Set for times
      Throws:
      RemoteException - RMI exception
      VisADException - Couldn't create time set
    • getDataTimeSet

      protected Set getDataTimeSet() throws RemoteException, VisADException
      Collect the time animation set from the displayables. If none found then return null.
      Returns:
      Animation set
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • haveDataTimes

      protected boolean haveDataTimes()
      Do any of our displayables have times
      Returns:
      Have times
    • findDisplays

      protected List findDisplays(String key)
      Find displays based on the key
      Parameters:
      key - the key
      Returns:
      List of appropriate display
    • findDisplays

      protected List findDisplays(String key, List displays)
      Find displays with the particular key in the list of displays
      Parameters:
      key - key to look for
      displays - list of displays
      Returns:
      the displays for that key
    • showProperties

      public void showProperties()
      Show the properties dialog
    • addPropertiesComponents

      protected void addPropertiesComponents(JTabbedPane jtp)
      Add tabs to the properties dialog.
      Parameters:
      jtp - the JTabbedPane to add to
    • setDisplayListTimeZone

      public void setDisplayListTimeZone(String timeZoneStr)
      Set the Time Zone
      Parameters:
      timeZoneStr - the new time zone name
    • addDisplaySettings

      protected void addDisplaySettings(DisplaySettingsDialog dsd)
      Add property values for this DisplaySettingsDialog
      Parameters:
      dsd - the display settings dialog
    • setLabelAsPreference

      public void setLabelAsPreference(Object[] obj)
      Set the label as a preference
      Parameters:
      obj - list of objects defining the label
    • showDisplaySettingsDialog

      public void showDisplaySettingsDialog()
      Show the DisplaySettingsDialog
    • getSettingsPanel

      protected JPanel getSettingsPanel()
      Get the settings panel
      Returns:
      the panel for settings
    • addCheckBoxSettings

      protected void addCheckBoxSettings(List comps, Hashtable methodNameToSettingsMap)
      Add checkbox type settings to the Properties panel
      Parameters:
      comps - list of checkbox components
      methodNameToSettingsMap - hashtable of methods to checkbox
    • applyProperties

      public final boolean applyProperties()
      Apply the properties from the dialog
      Returns:
      true if successful
    • doApplyProperties

      public boolean doApplyProperties()
      Apply the properties
      Returns:
      true if successful
    • showContourPropertiesDialog

      public void showContourPropertiesDialog()
      Popup the contour properties dialog
    • showColorScaleDialog

      public void showColorScaleDialog()
      Popup the color scale properties dialog
    • getMacroNames

      protected void getMacroNames(List names, List labels)
      Add any macro name/label pairs
      Parameters:
      names - List of macro names
      labels - List of macro labels
    • doExport

      public void doExport(String what, String filename) throws Exception
      Called by ISL. Write out some data defined by the what parameter to the given file. This method throws an UnimplementedException. Derived classes need to overwrite this to write out the appropriate data
      Parameters:
      what - What is to be written out
      filename - To what file
      Throws:
      Exception - problem exporting
    • saveAsParameterDefaults

      public void saveAsParameterDefaults()
      Save the state as parameter defaults
    • saveAsFavorite

      public void saveAsFavorite()
      Save this display control as a favorite display template.
    • saveAsTemplate

      public void saveAsTemplate()
      Save this display control as a display template.
    • saveAsPrototype

      public void saveAsPrototype()
      Save this display as a prototype (default)
    • clearPrototype

      public void clearPrototype()
      Clear the prototype (default) for this display control
    • displayableToFront

      public void displayableToFront()
      Move the displayable to the front
    • getViewMenuItems

      protected void getViewMenuItems(List items, boolean forMenuBar)
      Add the relevant view menu items into the list
      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
    • getDataProjectionLabel

      protected String getDataProjectionLabel()
      Get the data projection label
      Returns:
      the data projection label
    • getFileMenuItems

      protected void getFileMenuItems(List items, boolean forMenuBar)
      Add the relevant file menu items into the list
      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
    • saveDataChoiceInCache

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

      protected void getExtraMenus(List menus, boolean forMenuBar)
      Get any extra menus for this control. Subclasses should override to add more menus
      Parameters:
      menus - list of menus to populate
      forMenuBar - Is this for the menu in the window's menu bar or for a popup menu in the legend
    • getHelpMenuItems

      protected void getHelpMenuItems(List items, boolean forMenuBar)
      Add the help menu items
      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
    • showDetails

      public void showDetails()
      Popup the details window
    • getHelpIds

      public List getHelpIds()
      Return the list of (String) java help ids
      Returns:
      List of help ids
    • showHelp

      public void showHelp()
      This method will attempt to show the relevant javahelp for this display. It successively tries to show the helpUrl attribute, the "idv.controls.displayId" and then each "idv.controls.classname"

      If there is no help available it will popup a message to the user.

      Specified by:
      showHelp in interface DisplayControl
    • isInViewManager

      public boolean isInViewManager()
      Does this control have displays in a view manager
      Returns:
      Does this control have displays in a view manager
    • saveImage

      public void saveImage(String filename)
      Find the first ViewManager in the list of DisplayInfo-s and have the ViewManager write its image to to given filename.
      Specified by:
      saveImage in interface DisplayControl
      Parameters:
      filename - The file to write the image to
    • writeTestArchive

      public void writeTestArchive(String archiveName)
      Write out all screen images
      Specified by:
      writeTestArchive in interface DisplayControl
      Parameters:
      archiveName - The name of the archive we are writing to
    • 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
    • transectChanged

      public void transectChanged()
      Method called when a transect changes.
      Specified by:
      transectChanged in interface DisplayControl
    • viewManagerChanged

      public void viewManagerChanged(String property)
      Method called when a transect changes.
      Specified by:
      viewManagerChanged in interface DisplayControl
      Parameters:
      property - The property that changed
    • getDataProjectionForMenu

      public MapProjection getDataProjectionForMenu()
      Get the MapProjection for this data; if have a single point data object make synthetic map projection for location
      Returns:
      MapProjection for the data
    • getDataProjection

      public MapProjection getDataProjection()
      get MapProjection of data to display
      Specified by:
      getDataProjection in interface DisplayControl
      Returns:
      The native projection of the data
    • getDisplayCenter

      public LatLonPoint getDisplayCenter() throws RemoteException, VisADException
      Get the center of the display
      Returns:
      center point or null if not a navigated display
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • setProjectionInView

      protected void setProjectionInView(boolean useViewPreference)
      Set the projection in the map view manager.
      Parameters:
      useViewPreference - if true, will let the view decide if preference to reset data is used or not
    • setProjectionInView

      protected void setProjectionInView(boolean useViewPreference, boolean maintainViewpoint)
      Set the projection in the map view manager.
      Parameters:
      useViewPreference - if true, will let the view decide if preference to reset data is used or not
      maintainViewpoint - keep the same viewpoint
    • setProjectionInView

      protected void setProjectionInView(MapViewManager mvm, boolean useViewPreference, boolean maintainViewpoint)
      Set the projection in the map view manager.
      Parameters:
      useViewPreference - if true, will let the view decide if preference to reset data is used or not
      maintainViewpoint - keep the same viewpoint
    • centerOnDisplay

      protected void centerOnDisplay()
      If this display has a dataprojection then center the view to it
    • getMapViewProjection

      public MapProjection getMapViewProjection()
      Get the projection from the main display.
      Returns:
      map projection for this display's map view manager or null
    • activateDisplays

      protected void activateDisplays() throws RemoteException, VisADException
      Activate each DisplayInfo
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • deactivateDisplays

      protected void deactivateDisplays() throws RemoteException, VisADException
      DeActivate each DisplayInfo
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • findDisplayInfo

      protected DisplayInfo findDisplayInfo(Displayable displayable)
      Find the DisplayInfo for a displayable
      Parameters:
      displayable - the displayable to search for
      Returns:
      the associated DisplayInfo
    • removeDisplayable

      public void removeDisplayable(Displayable displayable) throws RemoteException, VisADException
      Remove a Displayable
      Parameters:
      displayable - displayable to remove
      Throws:
      RemoteException - Java RMI problem
      VisADException - Problem in VisAD
    • removeDisplayables

      protected void removeDisplayables() throws RemoteException, VisADException
      Iterates across the list of DisplayInfo-s, telling them to removeDisplayable.
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • removeDisplayables

      protected void removeDisplayables(boolean andDestroyThem) throws RemoteException, VisADException
      Iterates across the list of DisplayInfo-s, telling them to removeDisplayable.
      Parameters:
      andDestroyThem - true to destroy them
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • viewManagerDestroyed

      public void viewManagerDestroyed(ViewManager viewManager) throws VisADException, RemoteException
      Called when a ViewManager which holds the display is destoryed
      Specified by:
      viewManagerDestroyed in interface DisplayControl
      Parameters:
      viewManager - The view manager that was destroyed
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD error
    • addRemovable

      public void addRemovable(Removable removable)
      Add something to be removed on doRemove
      Parameters:
      removable - the removeable
    • doRemove

      public void doRemove() throws RemoteException, VisADException
      Remove this DisplayControl. Tells the ControlContext to removeDisplayControl. Removes all Displayable-s from their ViewManager-s, remove this object from its Sharable group, and sets the visibility of the dialog window to false.
      Specified by:
      doRemove in interface DisplayControl
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • getActive

      public boolean getActive()
      Is this control active, i.e., has this control not gotten removed yet
      Specified by:
      getActive in interface DisplayControl
      Returns:
      Is active
    • doMakeContents

      protected Container doMakeContents() throws VisADException, RemoteException
      Make Gui contents
      Returns:
      User interface contents
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • setContents

      protected void setContents(Container c)
      Set the gui contents
      Parameters:
      c - The user interface contents
    • getContents

      protected Container getContents()
      Get the GUI contents
      Returns:
      the contents
    • resetViewManager

      public void resetViewManager(String oldViewId, String newViewId)
      Reset the view manager
      Parameters:
      oldViewId - old view id
      newViewId - new view id
    • setDefaultView

      public void setDefaultView(String s)
      Set the name of the default view manager that displays are put into.
      Parameters:
      s - The default view
    • getCursorReadout

      public final List getCursorReadout(EarthLocation el, Real animationValue, int animationStep, List<ReadoutInfo> samples) throws Exception
      Get the list of items for the cursor readout
      Specified by:
      getCursorReadout in interface DisplayControl
      Parameters:
      el - location of cursor
      animationValue - animation value
      animationStep - animation step
      samples - The list of samples returned
      Returns:
      list of strings for readout
      Throws:
      Exception - problem getting at the data
    • getCursorReadoutInner

      protected List getCursorReadoutInner(EarthLocation el, Real animationValue, int animationStep, List<ReadoutInfo> samples) throws Exception
      Get the list of items, subclasses should override
      Parameters:
      el - location of cursor
      animationValue - animation value
      animationStep - animation step
      samples - The list of samples returned
      Returns:
      list of strings for readout
      Throws:
      Exception - problem getting at the data
    • getCursorReadoutInner

      protected final List getCursorReadoutInner(EarthLocation el, Real animationValue, int animationStep)
      The getCursorReadout method that really does the work
      Parameters:
      el - the location
      animationValue - the animation value
      animationStep - the animation step
      Returns:
      the list of readout strings
    • formatForCursorReadout

      protected String formatForCursorReadout(Real r) throws VisADException, RemoteException
      Format a real for the cursor readout
      Parameters:
      r - the real
      Returns:
      the formatted string
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD error
    • setInitialViewManager

      public void setInitialViewManager(ViewManager viewManager)
      Set the view manager for this control to use. Note: This is only for use when some code is directly creating a display control and wants to place it in a specific viewmanager. Use this after the control has been created but before the init method has been called
      Parameters:
      viewManager - The viewmanager to use
    • getDefaultView

      public String getDefaultView()
      Return the name of the first ViewManager found in the list of DisplayInfo-s.
      Returns:
      The name of the default view
    • getDefaultViewManager

      public ViewManager getDefaultViewManager()
      Return the name of the first ViewManager found in the list of DisplayInfo-s.
      Specified by:
      getDefaultViewManager in interface DisplayControl
      Returns:
      The name of the default view
    • getDefaultViewDescriptor

      public ViewDescriptor getDefaultViewDescriptor()
      Return the ViewDescriptor to use. This allows the IDV to find a ViewManager identified by this descriptor
      Returns:
      The view descriptor
    • addDisplayable

      public ViewManager addDisplayable(Displayable d)
      Add the given Displayable into a ViewManager
      Parameters:
      d - The displayable to add
      Returns:
      The ViewManager this Displayable is added into
    • addDisplayable

      public ViewManager addDisplayable(Displayable theDisplay, int attributeFlag)
      A wrapper around addDisplayable (Displayable theDisplay, ViewDescriptor viewDescriptor), passing in the default LASTACTIVE ViewDescriptor.
      Parameters:
      theDisplay - The Displayable to add
      attributeFlag - The attribute flag (e.g, FLAG_COLOR|FLAG_COLORTABLE)
      Returns:
      The ViewManager this Displayable is added into
    • addDisplayable

      public ViewManager addDisplayable(Displayable theDisplay, ViewManager viewManager, int flag)
      Add the given Displayable into the given ViewManager
      Parameters:
      theDisplay - The displayable to add
      viewManager - The ViewManager
      flag - The attribute flag (e.g., FLAG_COLORTABLE) for this Displayable
      Returns:
      The ViewManager this Displayable is added into
    • addDisplayable

      public ViewManager addDisplayable(Displayable theDisplay, ViewDescriptor viewDescriptor, int flag)
      Add the given Displayable into the ViewManager identified by the given ViewDescriptor
      Parameters:
      theDisplay - The displayable to add
      viewDescriptor - The descriptor
      flag - The attribute flag (e.g., FLAG_COLORTABLE) for this Displayable
      Returns:
      The ViewManager this Displayable is added into
    • addDisplayable

      public ViewManager addDisplayable(Displayable theDisplay, ViewDescriptor viewDescriptor)
      Find the ViewManager defined by the given ViewDescriptor. Create a new DisplayInfo that holds this DisplayControl, the given Displayable and the looked up ViewManager. Add the DisplayInfo to the list of DisplayInfo-s
      Parameters:
      theDisplay - The displayable to add
      viewDescriptor - Describes the ViewManager in which to add the Displayable
      Returns:
      The ViewManager
    • addDisplayable

      public DisplayInfo addDisplayable(Displayable theDisplay, ViewManager viewManager)
      Add the given Displayable into the given ViewManager
      Parameters:
      theDisplay - The Displayable to add
      viewManager - The ViewManager in which the display is added
      Returns:
      the DisplayInfo for the displayable.
    • getDisplayInfos

      public List getDisplayInfos()
      Return the list of DisplayInfo objects held by this control.
      Returns:
      List of display infos
    • doMakeWidgetComponent

      protected JComponent doMakeWidgetComponent()
      A helper method for constructing the ui. This fills up a list of ControlWidget (e.g., ColorTableWidget) and creates a gridded ui with them.
      Returns:
      The ui for the widgets
    • zSliderChanged

      public void zSliderChanged(double value)
      The z slider postion changed
      Parameters:
      value - slider value
    • doMakeTextureSlider

      protected JSlider doMakeTextureSlider()
      Make a slider for the texture quality
      Returns:
      the slider
    • doMakeZPositionSlider

      protected JComponent doMakeZPositionSlider()
      Create the z position slider panel
      Returns:
      The panel that shows the z position slider
    • getZPositionSliderLabel

      protected String getZPositionSliderLabel()
      Get the label for the Z position slider.
      Returns:
      label
    • getControlWidgets

      public void getControlWidgets(List<ControlWidget> controlWidgets) throws VisADException, RemoteException
      Add into the given the widgets for the different attributes
      Parameters:
      controlWidgets - List of ControlWidgets to add into
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • addTimeModeWidget

      protected void addTimeModeWidget(List controlWidgets)
      Add in the time mode widget to the list of control widgets
      Parameters:
      controlWidgets - List to add to
    • getColorWidgetLabel

      public String getColorWidgetLabel()
      Return the label that is to be used for the color widget This allows derived classes to override this and provide their own name,
      Returns:
      Label used for the color widget
    • getLineWidthWidgetLabel

      public String getLineWidthWidgetLabel()
      Return the label that is to be used for the line width widget This allows derived classes to override this and provide their own name,
      Returns:
      Label used for the line width widget
    • getSkipWidgetLabel

      public String getSkipWidgetLabel()
      Return the label that is to be used for the skip widget This allows derived classes to override this and provide their own name,
      Returns:
      Label used for the line width widget
    • isDisplayUnitAlsoColorUnit

      protected boolean isDisplayUnitAlsoColorUnit()
      Allows for derived classes to define that the display unit is different then the color unit. This is used when we are setting the display and color units.
      Returns:
      Color unit same as display unit?
    • setNewDisplayUnit

      protected boolean setNewDisplayUnit(Unit newUnit, boolean applyToDisplayable)
      The user has chosen a new unit for display.
      Parameters:
      newUnit - The new display unit
      applyToDisplayable - Should we call applyDisplayUnit();
      Returns:
      Did this succeed
    • setNewColorUnit

      protected boolean setNewColorUnit(Unit newUnit, boolean applyToDisplayable)
      The user has chosen a new unit for color.
      Parameters:
      newUnit - The new color unit
      applyToDisplayable - Apply this to the Displayables?
      Returns:
      Return true if there was no error, false if there was an error
    • getDisplayUnit

      protected Unit getDisplayUnit(Unit rawUnit)
      Returns the default display unit to be used. The DisplayConventions class is used to fidn out what unit to use.
      Parameters:
      rawUnit - The raw data unit
      Returns:
      The default Unit to use for displays
    • getDisplayUnit

      public Unit getDisplayUnit()
      Return the display unit
      Returns:
      The display unit
    • setSettingsDisplayUnit

      public void setSettingsDisplayUnit(Unit newUnit)
      Set the display unit from the settings
      Parameters:
      newUnit - the new unit
    • setDisplayUnit

      protected void setDisplayUnit(Unit newUnit)
      Set the display unit. This is protected so the display unit itself is not persisted.
      Parameters:
      newUnit - The new display unit
    • getDisplayUnitName

      public String getDisplayUnitName()
      Get the name of the display unit (if non-null) This is used for xml persistence.
      Returns:
      Name of display unit
    • setDisplayUnitName

      public void setDisplayUnitName(String name)
      Set the name of the display unit. Try to create the actual displayUnit based on this name This is used for xml persistence.
      Parameters:
      name - The name to use
    • getDefaultDistanceUnit

      protected Unit getDefaultDistanceUnit()
      Get the default distance unit
      Returns:
      the default distance unit from the IDV preferences
    • setUnitForColor

      protected void setUnitForColor(Unit newUnit)
      Set the unit to use for color. If the display unit is also the color unit (as determined by a call to isDisplayUnitAlsoColorUnit()) then also set the display unit.
      Parameters:
      newUnit - The new color unit
    • getUnitForColor

      protected Unit getUnitForColor()
      Get the unit used for coloring the displays. If the colorUnit member is null and the color unit is the same as the displayUnit then return the displayUnit.
      Returns:
      The color unit
    • getColorUnit

      protected Unit getColorUnit()
      Return the colorUnit The get and set methods here are protected so the XmlEncoder will not try to encode them.
      Returns:
      The color unit
    • setColorUnit

      protected void setColorUnit(Unit unit)
      Set the colorUnit
      Parameters:
      unit - The color unit
    • getColorUnitName

      public String getColorUnitName()
      This is used for xml persistence.
      Returns:
      Name of the colorUnit
    • setColorUnitName

      public void setColorUnitName(String name)
      This is used for xml persistence.
      Parameters:
      name - The name of the colorUnit. Try to create the unit.
    • showTimeRangeDialog

      public void showTimeRangeDialog()
      Popup the time range dialog
    • applyTimeRange

      public void applyTimeRange()
      Called when we have set the time range. Allows derived classes to do their thang.
    • popupDataDialog

      protected void popupDataDialog(String dialogMessage, Component from)
      Create and show the data choosing dialog
      Parameters:
      dialogMessage - The message to display
      from - What component clicked
    • popupDataDialog

      protected void popupDataDialog(String dialogMessage, Component from, boolean multiples)
      Popup a DataTreeDialog
      Parameters:
      dialogMessage - message for the dialog
      from - the component that it is on
      multiples - can handle multiple selections
    • popupDataDialog

      protected void popupDataDialog(String dialogMessage, Component from, boolean multiples, List categories)
      Popup a DataTreeDialog
      Parameters:
      dialogMessage - message for the dialog
      from - the component that it is on
      multiples - can handle multiple selections
      categories - List of data categories. If
    • selectDataChoices

      protected List<DataChoice> selectDataChoices(String dialogMessage, Component from, boolean multiples, List categories)
      Popup a DataTreeDialog
      Parameters:
      dialogMessage - message for the dialog
      from - the component that it is on
      multiples - can handle multiple selections
      categories - List of data categories. If
      Returns:
      List of selected data choices or null if none selected
    • getDataSelection

      public DataSelection getDataSelection()
      This is used for xml persistence.
      Returns:
      The dataSelection member
    • setDataSelection

      public void setDataSelection(DataSelection newDataSelection)
      This is used for xml persistence.
      Parameters:
      newDataSelection - The new dataSelection member
    • doMakeDataInstance

      protected DataInstance doMakeDataInstance(DataChoice dataChoice) throws RemoteException, VisADException

      Creates and returns the DataInstance corresponding to a DataChoice. Returns null if the DataInstance was somehow invalid.

      This method is invoked by the overridable method setData(DataChoice).

      Parameters:
      dataChoice - The DataChoice from which to create a DataInstance.
      Returns:
      The created DataInstance or null.
      Throws:
      VisADException - if a VisAD Failure occurs.
      RemoteException - if a Java RMI failure occurs.
    • getRequestProperties

      protected Hashtable getRequestProperties()
      Create (if null) and return the Hashtable that holds the extra request properties used in a getData call on the DataChoice
      Returns:
      Request properties
    • processRequestProperties

      protected void processRequestProperties()
      Process request properties from a DataChoice
    • timeChanged

      protected void timeChanged(Real time)
      Respond to a timeChange event
      Parameters:
      time - new time
    • getLegendLabel

      public JComponent getLegendLabel(int legendType)
      This is the main JLabel used in the legend.
      Specified by:
      getLegendLabel in interface DisplayControl
      Parameters:
      legendType - type of legend
      Returns:
      legend label
    • getLegendComponent

      public JComponent getLegendComponent(int legendType)
      Return the gui component used to display this DisplayControl within a ViewManager. Note: as of now we only have one legend component per DisplayControl. This will fail when we have a DisplayControl that displays into more than one ViewManagers.
      Specified by:
      getLegendComponent in interface DisplayControl
      Parameters:
      legendType - type of legend
      Returns:
      legend component
    • doMakeSideLegendComponent

      protected JComponent doMakeSideLegendComponent()
      Create and return the gui component which is used to display this DisplayControl in the "legend" area of its ViewManager. This creates a JButton to popup the DisplayControl's window and other elements.
      Returns:
      Side legend component
    • makeLegendLabel

      public JLabel makeLegendLabel()
      make the legend label
      Specified by:
      makeLegendLabel in interface DisplayControl
      Returns:
      legend label
    • makeChangeColorMenuItems

      protected List makeChangeColorMenuItems()
      Add the list of menu items for changing the color to the component (usually a menu or popup menu)
      Returns:
      component with the change color menu items
    • showLegendMenu

      protected void showLegendMenu(JComponent comp, MouseEvent event)
      Create and show the popup menu for the user's right click on the legend.
      Parameters:
      comp - The component the user clicked on
      event - The mouse event
    • getControlMenus

      public List getControlMenus(JComponent comp)
      Get the list of menus associated with this control.
      Specified by:
      getControlMenus in interface DisplayControl
      Parameters:
      comp - the component to place the menus near
      Returns:
      The menus
    • changeDisplayUnit

      public void changeDisplayUnit()
      Change the display unit.
    • changeColorUnit

      public void changeColorUnit()
      Change the color unit.
    • doMakeChangeColorMenu

      protected JMenu doMakeChangeColorMenu()
      Utility to make the menu item for changing the color.
      Returns:
      The menu item
    • doMakeChangeColorMenu

      protected JMenu doMakeChangeColorMenu(String name)
      Utility to make the menu item for changing the color.
      Parameters:
      name - name for the menu
      Returns:
      The menu item
    • doMakeChangeParameterMenuItem

      protected JMenuItem doMakeChangeParameterMenuItem()
      Utility to make the menu item for changing the data choice
      Returns:
      The menu item
    • getLegendToolTip

      protected String getLegendToolTip()
      Return the tooltip text that is to be shown in the legend This method constructs html that shows the display name, choices, link to help, etc.
      Returns:
      The tooltip
    • getDetailsContents

      protected String getDetailsContents()
      Get the contents of the details html
      Returns:
      The contents of the details
    • debug

      public void debug(String msg)
      Debug
      Parameters:
      msg - the message
    • getDebugDetails

      protected void getDebugDetails(StringBuffer sb)
      When we are iun debug mode this method gets called to add details html
      Parameters:
      sb - Buffer to append to.
    • doMakeBottomLegendComponent

      protected JComponent doMakeBottomLegendComponent()
      Create and return the gui component which is used to display this DisplayControl in the "legend" area of its ViewManager. This creates a JButton to popup the DisplayControl's window and other elements.
      Returns:
      Bottom legend component
    • showColorScales

      protected boolean showColorScales(boolean show)
      Method to show all ColorScales associated with this DisplayControl.
      Parameters:
      show - true to show.
      Returns:
      true if successful, false if it failed
    • doMakeColorScales

      protected void doMakeColorScales() throws VisADException, RemoteException
      Actually create the color scales
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • getDefaultColorScaleInfo

      protected ColorScaleInfo getDefaultColorScaleInfo()
      Get the default color scale info
      Returns:
      default ColorScaleInfo
    • moveTo

      public void moveTo(ViewManager newViewManager)
      An implementation of the DisplayControl interface moveTo method. This is called when the user has dragged-and-dropped the display control (well, really the legend component) from one ViewManager to another. This nulls out the legendComponent member and iterates through all of the DisplayInfo-s, telling them to set their ViewManager to the given viewManager.
      Specified by:
      moveTo in interface DisplayControl
      Parameters:
      newViewManager - new ViewManager to move to
    • setLegendForeground

      public void setLegendForeground(Color fg)
      Set the color to be used for the foreground in the bottom legend
      Specified by:
      setLegendForeground in interface DisplayControl
      Parameters:
      fg - The new color
    • setLegendBackground

      public void setLegendBackground(Color bg)
      Set the color to be used for the background in the bottom legend
      Specified by:
      setLegendBackground in interface DisplayControl
      Parameters:
      bg - The new color
    • showColorSwatches

      protected void showColorSwatches(boolean on)
      Change the visiblity of all color swatches
      Parameters:
      on - Visibility on or off
    • notifyViewManagersOfChange

      protected void notifyViewManagersOfChange()
      notify views of change
    • setShowInDisplayList

      public void setShowInDisplayList(boolean value)
      Set the ShowInDisplayList property.
      Parameters:
      value - The new value for ShowInDisplayList
    • getShowInDisplayList

      public boolean getShowInDisplayList()
      Get the ShowInDisplayList property.
      Specified by:
      getShowInDisplayList in interface DisplayControl
      Returns:
      The ShowInDisplayList
    • getLockVisibilityToggle

      public boolean getLockVisibilityToggle()
      Get the locking visibility of the display
      Specified by:
      getLockVisibilityToggle in interface DisplayControl
      Returns:
      true if locking visibility on
    • setLockVisibilityToggle

      public void setLockVisibilityToggle(boolean lockVisibilityToggle)
      Set the locking visibility of the display
      Specified by:
      setLockVisibilityToggle in interface DisplayControl
      Parameters:
      lockVisibilityToggle - true to set locking visibility on
    • getDisplayVisibility

      public boolean getDisplayVisibility()
      Get the visibility of the display
      Specified by:
      getDisplayVisibility in interface DisplayControl
      Returns:
      true if visibility on
    • toggleVisibilityForVectorGraphicsRendering

      public void toggleVisibilityForVectorGraphicsRendering(int rasterMode) throws Exception
      Toggle the visibility for vector graphics rendering
      Specified by:
      toggleVisibilityForVectorGraphicsRendering in interface DisplayControl
      Parameters:
      rasterMode - the toggle mode
      Throws:
      Exception - problem toggling
    • getIsRaster

      public boolean getIsRaster()
      Is this a raster display?
      Returns:
      true if raster
    • setIsRaster

      public void setIsRaster(boolean isRaster)
      Set IsRaster property
      Parameters:
      isRaster - the value
    • setDisplayVisibility

      public void setDisplayVisibility(boolean on)
      Set the visibility of the display and set the state of any visibility buttons we may have.
      Specified by:
      setDisplayVisibility in interface DisplayControl
      Parameters:
      on - true to set visibility on
    • setDisplayableVisiblity

      protected void setDisplayableVisiblity(Displayable d, boolean visible) throws RemoteException, VisADException
      Deprecated, misspelled version of setDisplayVisibility. deprecated
      Parameters:
      d - d
      visible - visible
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • canSaveDataInCache

      protected boolean canSaveDataInCache()
      See if this can save data in cache.
      Returns:
      true if allowable
    • setDisplayableVisibility

      protected void setDisplayableVisibility(Displayable d, boolean visible) throws RemoteException, VisADException
      Set the ultimate visibility of the particular Displayable. Used for maintaining the visibility of individual displayables if there are multiple.
      Parameters:
      d - Displayable in question
      visible - true if it should be visible when the visibility of the entire control is true.
      Throws:
      RemoteException - some RMI exception occured
      VisADException - error setting the visibility in VisAD
    • itemStateChanged

      public void itemStateChanged(ItemEvent event)
      A no-op method to implement the ItemListener interface.
      Specified by:
      itemStateChanged in interface ItemListener
      Parameters:
      event - The event
    • displayControlFailed

      public void displayControlFailed()
      Method to do what needs to be done when the display control failed.
    • close

      public void close()
      Close the window. If this display control is not shown in any ViewManager-s then call doRemove
    • popup

      public void popup(Component src)
      Show the dialog window for this control.
      Parameters:
      src - Component that we popup the window near. May be null.
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Process the actions of any of the controls created with the doMake...Control method calls.
      Specified by:
      actionPerformed in interface ActionListener
      Parameters:
      event - The action event
    • inGlobeDisplay

      public boolean inGlobeDisplay()
      Are we in a Globe display?
      Returns:
      true if we're in the globe
    • getMapDisplay

      public NavigatedDisplay getMapDisplay()
      Just calls getNavigatedDisplay
      Returns:
      The NavigatedDisplay that this control displays in.
    • isDisplay3D

      public boolean isDisplay3D()
      Utility method to determine if we are displaying in a 3d viewmanager
      Returns:
      Is the display 3d
    • getDisplayAltitudeType

      public DisplayRealType getDisplayAltitudeType()
      Utility method to get the altitude type of the display
      Returns:
      Altitude type of the display
    • getNavigatedDisplay

      public NavigatedDisplay getNavigatedDisplay()
      A helper method for finding the NavigatedDisplay of this control's MapViewManager. This iterates through the list of DisplayInfo-s, finding the first one that holds an instance of a MapViewManager. If not found this uses the default MapViewManager
      Specified by:
      getNavigatedDisplay in class DisplayControlBase
      Returns:
      The NavigatedDisplay that this control displays in.
    • setDisplayInactive

      public void setDisplayInactive()
      Set the display master to be inactive. Return whether it was active at first.
    • setDisplayActive

      public void setDisplayActive()
      If wasActive is true then set the display master to be active.
    • xxxsetDisplayActive

      public void xxxsetDisplayActive(boolean active) throws RemoteException, VisADException
      Set the display master to be active/inactive.
      Parameters:
      active - Active or inactive
      Throws:
      RemoteException - some RMI exception occured
      VisADException - error setting the visibility in VisAD
    • getMapViewManager

      public MapViewManager getMapViewManager()
      A helper method for finding the MapViewManager this control displays in. This method iterates through the list of DisplayInfo-s, finding the first one that holds an instance of a MapViewManager. If not found this returns the default MapViewManager
      Returns:
      A MapViewManager
    • getDisplayMaster

      public DisplayMaster getDisplayMaster(Displayable displayable)
      A helper method for finding the DisplayMaster that displays the given Displayable
      Parameters:
      displayable - The displayable to look for
      Returns:
      The DisplayMaster the displayable is in
    • getViewManager

      public ViewManager getViewManager(Displayable displayable)
      A helper method for finding the common ViewManager which is displaying the given displayable.
      Parameters:
      displayable - The displayable to look for
      Returns:
      The ViewManager the displayable is in
    • getViewManager

      public ViewManager getViewManager()
      Get, from the ControlContext, the ViewManager identified by the ViewDescriptor returned from getDefaultViewDescriptor()
      Specified by:
      getViewManager in interface DisplayControl
      Returns:
      The view manager
    • getViewManager

      public ViewManager getViewManager(ViewDescriptor viewDescriptor)
      Get, from the ControlContext, the ViewManager identified by the given ViewDescriptor
      Parameters:
      viewDescriptor - The view descriptor that identifies the view manager we want
      Returns:
      The view manager
    • doMakeVisibilityControl

      public JCheckBox doMakeVisibilityControl(String label)
      Get the toggle button JCheckBox that is source for item listener events to toggle visibility of the display.
      Specified by:
      doMakeVisibilityControl in interface DisplayControl
      Parameters:
      label - The label to use when creating the JCheckBox
      Returns:
      JCheckBox the toggle button
    • doMakeRemoveControl

      public JButton doMakeRemoveControl(String tooltip)
      Create the gui control (a JButton) that allows the user to remove this DisplayControl. This object is added as an ActionListener to the button with the action command CMD_REMOVE.
      Parameters:
      tooltip - tooltip for the button
      Returns:
      button
    • showColorDialog

      public void showColorDialog()
      Show the color dialog
    • showColorDialog

      public void showColorDialog(String methodName)
      Show the color dialog and invoke the named method
      Parameters:
      methodName - the method name to invoke
    • setColor

      public void setColor(Color c) throws RemoteException, VisADException
      Set the color for the selector. Used by persistence.
      Parameters:
      c - color to use
      Throws:
      RemoteException - some RMI exception occured
      VisADException - error setting the color in VisAD
    • getColor

      public Color getColor()
      Get the color for the selector. Used by persistence.
      Returns:
      color being used.
    • getRangeToApply

      public Range getRangeToApply() throws RemoteException, VisADException
      Get the range to use to apply to displayables
      Returns:
      the range for displayables
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • getRange

      public Range getRange() throws RemoteException, VisADException
      Get the range for the parameter
      Returns:
      range being used
      Throws:
      RemoteException - some RMI exception occured
      VisADException - error getting the range in VisAD
    • getSelectRange

      public Range getSelectRange() throws RemoteException, VisADException
      Get the range for the data
      Returns:
      range of data
      Throws:
      RemoteException - some RMI exception occured
      VisADException - error getting the range in VisAD
    • getRangeForColorTable

      public Range getRangeForColorTable() throws RemoteException, VisADException
      Get the range for the color table.
      Returns:
      range being used
      Throws:
      RemoteException - some RMI exception occured
      VisADException - error getting the range in VisAD
    • setRange

      public void setRange(String whichColortable, Range newRange) throws RemoteException, VisADException
      Set the range (from the colortablewidget)
      Parameters:
      whichColortable - Defines which color table to use. Default is the main one.
      newRange - The value
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • setColorTable

      public void setColorTable(String whichColorTable, ColorTable newColorTable) throws RemoteException, VisADException
      Set the color table from the colortablewidget
      Parameters:
      whichColorTable - Defines which color table to use. Default is the main one.
      newColorTable - The new colortable
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • revertToDefaultColorTable

      protected void revertToDefaultColorTable(String whichColorTable)
      Revert to the default
      Parameters:
      whichColorTable - Which one. Default is the main one.
    • revertToDefaultRange

      protected void revertToDefaultRange(String whichColorTable)
      Revert to the default
      Parameters:
      whichColorTable - Which one. Default is the main one.
    • setRange

      public void setRange(Range newRange) throws RemoteException, VisADException
      Set the range for the color table.
      Parameters:
      newRange - range to use
      Throws:
      RemoteException - some RMI exception occured
      VisADException - error setting the range in VisAD
    • setSelectRange

      public void setSelectRange(Range newRange) throws RemoteException, VisADException
      Set the range for the select data.
      Parameters:
      newRange - range to use
      Throws:
      RemoteException - some RMI exception occured
      VisADException - error setting the range in VisAD
    • setColorTableName

      public void setColorTableName(String n)
      This method is for legacy bundles that used to save off the color table name instead of the color table.
      Parameters:
      n - The name of the color table
    • setColorTable

      public void setColorTable(ColorTable newColorTable) throws RemoteException, VisADException
      Set the ColorTable property.
      Parameters:
      newColorTable - The new value for ColorTable
      Throws:
      RemoteException - some RMI exception occured
      VisADException - error setting the color table in VisAD
    • getColorTable

      public ColorTable getColorTable()
      Get the ColorTable property.
      Returns:
      The ColorTable
    • setDisplayListColor

      public void setDisplayListColor(Color newColor) throws RemoteException, VisADException
      Set the display list color property.
      Parameters:
      newColor - The new color
      Throws:
      RemoteException - some RMI exception occured
      VisADException - error setting the color in VisAD
    • setDisplayListColor

      protected void setDisplayListColor(Color newColor, boolean fromUser) throws RemoteException, VisADException
      Set the display list color property.
      Parameters:
      newColor - The new color
      fromUser - true if this is from the user
      Throws:
      RemoteException - some RMI exception occured
      VisADException - error setting the color in VisAD
    • getDisplayListColor

      public Color getDisplayListColor()
      Get the DisplayListColor property.
      Returns:
      The display list color
    • 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.
      Parameters:
      legendType - type of legend
      Returns:
      The extra JComponent to use in legend
    • getColorTableWidget

      public ColorTableWidget getColorTableWidget(Range r) throws VisADException, RemoteException
      Get the ColorTableWidget using the specified range.
      Parameters:
      r - range for the color table
      Returns:
      widget
      Throws:
      RemoteException - some RMI exception occured
      VisADException - error setting the color table range in VisAD
    • getSelectRangeWidget

      public SelectRangeWidget getSelectRangeWidget(Range r) throws VisADException, RemoteException
      Get the SelectRangeWidget using the specified range.
      Parameters:
      r - range for the color table
      Returns:
      widget
      Throws:
      RemoteException - some RMI exception occured
      VisADException - error setting the color table range in VisAD
    • getLineWidthWidget

      public ValueSliderWidget getLineWidthWidget() throws VisADException, RemoteException
      Get the LineWidthWidget
      Returns:
      widget
      Throws:
      RemoteException - some RMI exception occured
      VisADException - error setting the color table range in VisAD
    • doMakeColorControl

      public Component doMakeColorControl()
      A wrapper around doMakeColorControl (Color color), passing in null as the Color argument.
      Returns:
      color selector component
      See Also:
    • doMakeColorControl

      public Component doMakeColorControl(Color color)
      This creates a gui control for selecting a Color. It uses the list of Colors defined by the idv.DisplayConventions class. If the color argument is non-null then the corresponding String name of the color is retrieved from idv.DisplayConventions. If found the name is used to set the selected item on the JComboBox.
      Parameters:
      color - default
      Returns:
      color selector component
    • getVerticalValue

      public double getVerticalValue(double value)
      Get the vertical position for a constant map from a value in the range of -1.0 to 1.0.
      Parameters:
      value - value to scale to vertical coordinates
      Returns:
      scaled value in vertical coordinates
    • setHelpUrl

      public void setHelpUrl(String helpUrl)
      Set the help URL for this DisplayControl
      Parameters:
      helpUrl - URL for the help.
    • getProperty

      public boolean getProperty(String name, boolean dflt)
      Wrapper around ControlContext.getProperty method
      Parameters:
      name - property name
      dflt - default value
      Returns:
      The boolean value of the given property or the dflt if undefined
    • getProperty

      public String getProperty(String name, String dflt)
      Wrapper around ControlContext.getProperty method
      Parameters:
      name - property name
      dflt - default value
      Returns:
      The String value of the given property or the dflt if undefined
    • getObjectStore

      public XmlObjectStore getObjectStore()
      Return the object store from the getControlContext
      Returns:
      The object store to use.
    • setOkToFireEvents

      public void setOkToFireEvents(boolean v)
      Set whether it's okay to fire events to listeners.
      Parameters:
      v - true if okay.
    • getOkToFireEvents

      public boolean getOkToFireEvents()
      Get whether it's okay to fire events to listeners.
      Returns:
      true if okay.
    • setContourInfoParams

      public void setContourInfoParams(String s)
      Used by the isl to override selective parameters in the default contourInfo
      Parameters:
      s - The param string.
    • setContourInfo

      public void setContourInfo(ContourInfo newInfo) throws VisADException, RemoteException
      Set the contour parameters for any contours
      Parameters:
      newInfo - the new contour information
      Throws:
      RemoteException - some RMI exception occured
      VisADException - error setting the contour info in VisAD
    • getContourInfo

      public ContourInfo getContourInfo()
      Get the contour information for any contours
      Returns:
      the contour information
    • setSharedColorScaleInfo

      public void setSharedColorScaleInfo(ColorScaleInfo newInfo) throws VisADException, RemoteException
      Set the shared color scale info
      Parameters:
      newInfo - the new information
      Throws:
      RemoteException - remote problem
      VisADException - VisAD problem
    • setColorScaleInfo

      public void setColorScaleInfo(ColorScaleInfo newInfo) throws VisADException, RemoteException
      Set the color scale parameters for any color scale
      Parameters:
      newInfo - the new contour information
      Throws:
      RemoteException - some RMI exception occured
      VisADException - error setting the contour info in VisAD
    • getColorScaleInfo

      public ColorScaleInfo getColorScaleInfo()
      Get the contour information for any contours
      Returns:
      the contour information
    • getCachedData

      public Hashtable getCachedData()
      Get the cache of data. Not being used now.
      Returns:
      Data cache
    • setCachedData

      public void setCachedData(Hashtable cache)
      Set the data cache. Not being used now.
      Parameters:
      cache - Data cache
    • setDataInstances

      public void setDataInstances(List l)
      Sets the list of DataInstances for this DisplayControl. May be null.
      Parameters:
      l - List of DataInstances
    • getDisplayScale

      public float getDisplayScale() throws VisADException, RemoteException
      Get the scaling factor for probes and such. The scaling is the parameter that gets passed to TextControl.setSize() and ShapeControl.setScale().
      Returns:
      ratio of the current matrix scale factor to the saved matrix scale factor.
      Throws:
      VisADException - problem determining scale
      RemoteException - problem determining scale for remote display
    • getDefaultSamplingMode

      public String getDefaultSamplingMode()
      Get the perferred sampling mode.
      Returns:
      sampling mode (WEIGHTED_AVERAGE, NEAREST_NEIGHBOR)
    • setDefaultSamplingMode

      public void setDefaultSamplingMode(String newMode)
      Set sampling mode.
      Parameters:
      newMode - String name of sampling mode
    • getSamplingModeValue

      public int getSamplingModeValue()
      Get the sampling mode
      Returns:
      sampling mode
    • getSamplingModeValue

      public int getSamplingModeValue(String samplingMode)
      Get the integer value for the sampling mode supplied
      Parameters:
      samplingMode - String name of sampling mode
      Returns:
      value to use in resampling
    • getSamplingModeName

      public String getSamplingModeName(int mode)
      Get the name of the sampling mode
      Parameters:
      mode - String name of sampling mode
      Returns:
      value to use in resampling
    • getDefaultSamplingModeValue

      public int getDefaultSamplingModeValue()
      Get the integer value of the default sampling mode
      Returns:
      integer value of default sampling mode
    • setDisplayCategory

      public void setDisplayCategory(String value)
      This is the category that is defined for this control. It is mostly used by the legend guis to organise the presentation of the display controls.
      Specified by:
      setDisplayCategory in interface DisplayControl
      Parameters:
      value - The new value for the display category.
    • getDisplayCategory

      public String getDisplayCategory()
      This is the category that is defined for this control. It is mostly used by the legend guis to organise the presentation of the display controls.
      Specified by:
      getDisplayCategory in interface DisplayControl
      Returns:
      The display category.
    • getViewManagers

      public List getViewManagers()
      Method to get a list of ViewManagers that are applicable to this DisplayControl.
      Returns:
      List of view managers associated with this DisplayControl's Displayables.
    • setColorScaleVisible

      public void setColorScaleVisible(boolean viz) throws VisADException, RemoteException
      Set the visibility of the color scale.
      Parameters:
      viz - true for color scales to be visible
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • setHadDataChoices

      public void setHadDataChoices(boolean value)
      Set the HadDataChoices property.
      Parameters:
      value - The new value for HadDataChoices
    • getHadDataChoices

      public boolean getHadDataChoices()
      Get the HadDataChoices property.
      Returns:
      The HadDataChoices
    • setOriginalDataChoicesLabel

      public void setOriginalDataChoicesLabel(String s)
      Set the name of the data choice
      Parameters:
      s - the name
    • getOriginalDataChoicesLabel

      public String getOriginalDataChoicesLabel()
      Get the name of the data choice, if there is one, when we are saving off without data
      Returns:
      datachoice name
    • setTemplateName

      public void setTemplateName(String value)
      Set the TemplateName property.
      Parameters:
      value - The new value for TemplateName
    • getTemplateName

      public String getTemplateName()
      Get the TemplateName property.
      Returns:
      The TemplateName
    • setNameFromUser

      public void setNameFromUser(String value)
      Set the NameFromUser property. This is kept around for legacy bundles
      Parameters:
      value - The new value for NameFromUser
    • setName

      public void setName(String value)
      Set the Name property. Keep around for legacy bundles.
      Parameters:
      value - The new value for Name
    • setId

      public void setId(String value)
      Set the Name property.
      Parameters:
      value - The new value for Name
    • getId

      public String getId()
      Get the Id property.
      Returns:
      The Id
    • setCollapseLegend

      public void setCollapseLegend(boolean value)
      Set the collapsed legend property.
      Specified by:
      setCollapseLegend in interface DisplayControl
      Parameters:
      value - The new value for collapsedLegend
    • getCollapseLegend

      public boolean getCollapseLegend()
      Get the collapsed legend property.
      Specified by:
      getCollapseLegend in interface DisplayControl
      Returns:
      The collapsed legend property
    • getTransientProperty

      public Object getTransientProperty(Object key)
      Find a property on the display control. These properties are not saved.
      Specified by:
      getTransientProperty in interface DisplayControl
      Parameters:
      key - The key
      Returns:
      The value
    • putTransientProperty

      public void putTransientProperty(Object key, Object value)
      Put a property on the display control. These properties are not saved.
      Specified by:
      putTransientProperty in interface DisplayControl
      Parameters:
      key - The key
      value - The value
    • applyPreferences

      public void applyPreferences()
      Apply preferences to this control. Subclasses should override if needed.
      Specified by:
      applyPreferences in interface DisplayControl
    • setZPosition

      public void setZPosition(double value) throws RemoteException, VisADException
      Set the ZPosition property.
      Parameters:
      value - The new value for ZPosition
      Throws:
      RemoteException - When bad things happen
      VisADException - When bad things happen
    • setZPosition

      public void setZPosition(double value, boolean fromSlider) throws RemoteException, VisADException
      Set the Z position
      Parameters:
      value - the value
      fromSlider - true if from slider
      Throws:
      RemoteException - When bad things happen
      VisADException - When bad things happen
    • setLineWidth

      public void setLineWidth(int value) throws RemoteException, VisADException
      Set the line width property.
      Parameters:
      value - The new value for line width
      Throws:
      RemoteException - When bad things happen
      VisADException - When bad things happen
    • getLineWidth

      public int getLineWidth()
      Get the line width property.
      Returns:
      The line width
    • getInitialZPosition

      protected double getInitialZPosition()
      Get the initial Z position
      Returns:
      the position in Z space
    • getZPosition

      public double getZPosition()
      Get the ZPosition property.
      Returns:
      The ZPosition
    • updateAnimation

      protected void updateAnimation()
      Update the animation for the view manager
    • getSomeAnimation

      public Animation getSomeAnimation() throws VisADException, RemoteException
      Get some animation.
      Returns:
      The animation
      Throws:
      RemoteException - On Badness
      VisADException - On Badness
    • getAnimation

      public Animation getAnimation() throws VisADException, RemoteException
      Get the animation
      Returns:
      The animation
      Throws:
      RemoteException - On Badness
      VisADException - On Badness
    • getAnimation

      protected Animation getAnimation(boolean createOurOwn) throws VisADException, RemoteException
      Get the Animation for this display.
      Parameters:
      createOurOwn - If true then we create our own. Else we get it from the ViewManager we are displayed in.
      Returns:
      The Animation
      Throws:
      RemoteException - On Badness
      VisADException - On Badness
    • getAnimation

      protected Animation getAnimation(RealType timeType) throws VisADException, RemoteException
      Create, if needed, and return the Animation to use
      Parameters:
      timeType - The time type
      Returns:
      The Animation
      Throws:
      RemoteException - On Badness
      VisADException - On Badness
    • getAnimation

      protected Animation getAnimation(boolean createOurOwn, RealType timeType) throws VisADException, RemoteException
      Get the Animation for this display.
      Parameters:
      createOurOwn - If true then we create our own. Else we get it from the ViewManager we are displayed in.
      timeType - Time type
      Returns:
      The Animation
      Throws:
      RemoteException - On Badness
      VisADException - On Badness
    • getViewAnimation

      public Animation getViewAnimation() throws VisADException, RemoteException
      Get the Animation that is from the view manager for this control
      Returns:
      The Animation
      Throws:
      RemoteException - On Badness
      VisADException - On Badness
    • getInternalAnimation

      protected Animation getInternalAnimation() throws VisADException, RemoteException
      Create if needed and return an Animation
      Returns:
      The Animation
      Throws:
      RemoteException - On Badness
      VisADException - On Badness
    • getInternalAnimation

      protected Animation getInternalAnimation(RealType timeType) throws VisADException, RemoteException
      Create if needed and return an Animation
      Parameters:
      timeType - The realtype of the time set
      Returns:
      The Animation
      Throws:
      RemoteException - On Badness
      VisADException - On Badness
    • getAnimationWidget

      public AnimationWidget getAnimationWidget() throws VisADException, RemoteException
      Create, if needed, and return the AnimationWidget
      Returns:
      The animation widget
      Throws:
      RemoteException - On Badness
      VisADException - On Badness
    • isInitDone

      public boolean isInitDone()
      Check if initialization is done
      Specified by:
      isInitDone in interface DisplayControl
      Returns:
      true if done
    • setShowInLegend

      public void setShowInLegend(boolean value)
      Set the ShowInLegend property.
      Parameters:
      value - The new value for ShowInLegend
    • getShowInLegend

      public boolean getShowInLegend()
      Get the ShowInLegend property.
      Specified by:
      getShowInLegend in interface DisplayControl
      Returns:
      The ShowInLegend
    • shouldApplyFastRendering

      protected boolean shouldApplyFastRendering()
      This method can be overwritten by the derived classes that do not want the general application of the fast rendering flag.
      Returns:
      Should fast rendering logic be used.
    • getDefaultFastRendering

      protected boolean getDefaultFastRendering()
      Get the default for fast rendering
      Returns:
      true to use fast rendering
    • getInitialFastRendering

      protected boolean getInitialFastRendering()
      Get the initial fast rendering property
      Returns:
      the initial fast rendering property
    • setUseFastRendering

      public void setUseFastRendering(boolean value)
      Set the UseFastRendering property.
      Parameters:
      value - The new value for UseFastRendering
    • getUseFastRendering

      public boolean getUseFastRendering()
      Get the UseFastRendering property.
      Returns:
      The UseFastRendering
    • setAnimationSet

      protected void setAnimationSet(List dateTimes) throws VisADException, RemoteException
      A utility method to set the animation set from the given list of times of the animation
      Parameters:
      dateTimes - List of DateTime objects
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • setAnimationInfo

      public void setAnimationInfo(AnimationInfo value)
      Set the AnimationInfo property.
      Parameters:
      value - The new value for AnimationInfo
    • getAnimationInfo

      public AnimationInfo getAnimationInfo()
      Get the AnimationInfo property.
      Returns:
      The AnimationInfo
    • makeLockButton

      protected JButton makeLockButton()
      Create a lock button for the given display control.
      Returns:
      The button used to lock the toggling of visibility
    • updateLockButton

      protected void updateLockButton(JButton lockBtn)
      Change the icon in the lock button for the given display control.
      Parameters:
      lockBtn - The button.
    • makeRemoveButton

      protected JButton makeRemoveButton()
      Create an icon button for removing the given display control.
      Returns:
      The button used to lock the toggling of visibility
    • setViewManagerClassNames

      public void setViewManagerClassNames(String value)
      Set the ViewManagerClasses property.
      Parameters:
      value - The new value for ViewManagerClasses
    • getViewManagerClassNames

      public String getViewManagerClassNames()
      Get the ViewManagerClasses property.
      Returns:
      The ViewManagerClasses
    • setColorDimness

      public void setColorDimness(float value)
      Set the ColorDimness property.
      Parameters:
      value - The new value for ColorDimness
    • getColorDimness

      public float getColorDimness()
      Get the ColorDimness property.
      Returns:
      The ColorDimness
    • setDataTimeRange

      public void setDataTimeRange(DataTimeRange value)
      Set the DataTimeRange property.
      Parameters:
      value - The new value for DataTimeRange
    • getDataTimeRange

      public DataTimeRange getDataTimeRange()
      Get the DataTimeRange property.
      Returns:
      The DataTimeRange
    • getDataTimeRange

      public DataTimeRange getDataTimeRange(boolean createIfNeeded)
      Get the DataTimeRange property.
      Parameters:
      createIfNeeded - If true then create it
      Returns:
      The date time range
    • setUseTimesInAnimation

      public void setUseTimesInAnimation(boolean value)
      Set the UseTimesInAnimation property.
      Parameters:
      value - The new value for UseTimesInAnimation
    • getUseTimesInAnimation

      public boolean getUseTimesInAnimation()
      Get the UseTimesInAnimation property.
      Returns:
      The UseTimesInAnimation
    • convertColorRange

      public Range convertColorRange(Range rawRange, Unit rawUnit)
      Utility to convert the given raw data range into the display units
      Parameters:
      rawRange - Raw data range
      rawUnit - the raw unit for the range
      Returns:
      Converted range
    • convertRange

      public Range convertRange(Range rawRange, Unit rawUnit, Unit outUnit)
      Utility to convert the given raw data range into the display units
      Parameters:
      rawRange - Raw data range
      rawUnit - the raw unit for the range
      outUnit - the converted unit
      Returns:
      Converted range
    • setExpandedInTabs

      public void setExpandedInTabs(boolean value)
      Set the ExpandedInTabs property.
      Specified by:
      setExpandedInTabs in interface DisplayControl
      Parameters:
      value - The new value for ExpandedInTabs
    • getExpandedInTabs

      public boolean getExpandedInTabs()
      Get the ExpandedInTabs property.
      Specified by:
      getExpandedInTabs in interface DisplayControl
      Returns:
      The ExpandedInTabs
    • setShowInTabs

      public void setShowInTabs(boolean value)
      Set the ShowInTabs property.
      Specified by:
      setShowInTabs in interface DisplayControl
      Parameters:
      value - The new value for ShowInTabs
    • getShowInTabs

      public boolean getShowInTabs()
      Get the ShowInTabs property.
      Specified by:
      getShowInTabs in interface DisplayControl
      Returns:
      The ShowInTabs
    • shouldBeDocked

      public boolean shouldBeDocked()
      Should this be docked
      Specified by:
      shouldBeDocked in interface DisplayControl
      Returns:
      true if should be docked
    • canBeDocked

      public boolean canBeDocked()
      Can this be docked
      Specified by:
      canBeDocked in interface DisplayControl
      Returns:
      true if can be docked
    • setVersion

      public void setVersion(double value)
      Set the Version property.
      Parameters:
      value - The new value for Version
    • getVersion

      public double getVersion()
      Get the Version property.
      Returns:
      The Version
    • getWasUnPersisted

      protected boolean getWasUnPersisted()
      See if we were unpersisted
      Returns:
      true if we were
    • setDisplayListTemplate

      public void setDisplayListTemplate(String value)
      Set the DisplayListTemplate property.
      Parameters:
      value - The new value for DisplayListTemplate
    • getDisplayListTemplate

      public String getDisplayListTemplate()
      Get the DisplayListTemplate property.
      Returns:
      The DisplayListTemplate
    • getDefaultDisplayListTemplate

      protected String getDefaultDisplayListTemplate()
      Get the default display list template for this control. Subclasses can override
      Returns:
      the default template
    • setLegendLabelTemplate

      public void setLegendLabelTemplate(String value)
      Set the LegendLabel property.
      Parameters:
      value - The new value for LegendLabel
    • getLegendLabelTemplate

      public String getLegendLabelTemplate()
      Get the LegendLabel property.
      Returns:
      The LegendLabel
    • setLegendLabel

      public void setLegendLabel(String label)
      A no-op so unpersisting old bundles won't flag a warning.
      Parameters:
      label - The label
    • setExtraLabelTemplate

      public void setExtraLabelTemplate(String value)
      Set the ExtraLabelTemplate property.
      Parameters:
      value - The new value for ExtraLabelTemplate
    • getExtraLabelTemplate

      public String getExtraLabelTemplate()
      Get the ExtraLabelTemplate property.
      Returns:
      The ExtraLabelTemplate
    • setSelectRangeEnabled

      public void setSelectRangeEnabled(boolean value)
      Set the SelectRangeEnabled property.
      Parameters:
      value - The new value for SelectRangeEnabled
    • getSelectRangeEnabled

      public boolean getSelectRangeEnabled()
      Get the SelectRangeEnabled property.
      Returns:
      The SelectRangeEnabled
    • canExportData

      public boolean canExportData()
      Can this display control write out data.
      Returns:
      true if it can
    • getDisplayedData

      protected Data getDisplayedData() throws VisADException, RemoteException
      Get the DisplayedData
      Returns:
      the data or null
      Throws:
      RemoteException - problem getting remote data
      VisADException - problem getting local data
    • exportDisplayedData

      public void exportDisplayedData(String type)
      Export displayed data to file
      Parameters:
      type - type of data
    • useZPosition

      protected boolean useZPosition()
      See if the display supports Z positioning.
      Returns:
      true if z positioning is supported
    • applySkipFactor

      protected void applySkipFactor()
      Use the value of the skip factor to subset the data.
    • setSkipValue

      public void setSkipValue(int value)
      Set the skip value property
      Parameters:
      value - new skip value
    • getSkipValue

      public int getSkipValue()
      Get the skip value property
      Returns:
      the current skip value
    • doMakeSkipFactorSlider

      protected Component doMakeSkipFactorSlider()
      Make the skip factor slider.
      Returns:
      slider for setting skip factor
    • checkImageSize

      protected void checkImageSize(FieldImpl image)
      If image is bigger than threshold then set the skip value
      Parameters:
      image - The image
    • setComponentHolder

      public void setComponentHolder(IdvComponentHolder value)
      Set the ComponentHolder property.
      Parameters:
      value - The new value for ComponentHolder
    • getComponentHolder

      public IdvComponentHolder getComponentHolder()
      Get the ComponentHolder property.
      Returns:
      The ComponentHolder
    • showColorControlWidget

      public boolean showColorControlWidget()
      Show the color control widget in the widgets if FLAG_COLOR is set.
      Returns:
      false subclasses should override
    • setDoCursorReadout

      public void setDoCursorReadout(boolean value)
      Set the DoCursorReadout property.
      Parameters:
      value - The new value for DoCursorReadout
    • getDoCursorReadout

      public boolean getDoCursorReadout()
      Get the DoCursorReadout property.
      Returns:
      The DoCursorReadout
    • setTextureQuality

      public void setTextureQuality(int quality)
      Set the texture quality
      Parameters:
      quality - 1=high, > 1 lower
    • getTextureQuality

      public int getTextureQuality()
      Get the texture quality
      Returns:
      the texture quality
    • getTextureQualityLabel

      public String getTextureQualityLabel()
      Return the label that is to be used for the texture quality widget This allows derived classes to override this and provide their own name,
      Returns:
      Label used for the color widget
    • applyTextureQuality

      protected void applyTextureQuality() throws VisADException, RemoteException
      Use the value of the texture quality to set the value on the display
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD error
    • applySmoothing

      protected void applySmoothing() throws VisADException, RemoteException
      Use the value of the smoothing properties to set the value on the display. Subclasses need to implement.
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD error
    • doMakeSmoothingWidget

      protected JComponent doMakeSmoothingWidget()
      Make the smoothing widget
      Returns:
      the smoothing widget
    • useSmoothingFactor

      public boolean useSmoothingFactor()
      Should we use the smoothing factor?
      Returns:
      true if it's a smoothing type that uses a factor
    • getSmoothingFactor

      public int getSmoothingFactor()
      Get the smoothing factor
      Returns:
      the smoothing factor
    • getSmoothingType

      public String getSmoothingType()
      Get the smoothing type
      Returns:
      the smoothing factor
    • setSmoothingFactor

      public void setSmoothingFactor(int val)
      Set the smoothing factor
      Parameters:
      val - the new smoothing factor
    • setSmoothingType

      public void setSmoothingType(String type)
      Set the smoothing type
      Parameters:
      type - the new smoothing type
    • setPointSize

      public void setPointSize(float value)
      Set the PointSize property.
      Parameters:
      value - The new value for PointSize
    • getPointSize

      public float getPointSize()
      Get the PointSize property.
      Returns:
      The PointSize
    • doMakePointSizeWidget

      public JComponent doMakePointSizeWidget()
      Make the point size widget
      Returns:
      the point size widget
    • setVisbilityAnimationPause

      public void setVisbilityAnimationPause(int value)
      Set the VisbilityAnimationPause property.
      Parameters:
      value - The new value for VisbilityAnimationPause
    • getVisbilityAnimationPause

      public int getVisbilityAnimationPause()
      Get the VisbilityAnimationPause property.
      Specified by:
      getVisbilityAnimationPause in interface DisplayControl
      Returns:
      The VisbilityAnimationPause
    • setIsTimeDriver

      public void setIsTimeDriver(boolean value)
      Set the IsTimeDriver property.
      Parameters:
      value - The new value for IsTimeDriver
    • getIsTimeDriver

      public boolean getIsTimeDriver()
      Get the IsTimeDriver property.
      Specified by:
      getIsTimeDriver in interface DisplayControl
      Returns:
      The IsTimeDriver
    • setUsesTimeDriver

      public void setUsesTimeDriver(boolean value)
      Set the UsesTimeDriver property.
      Parameters:
      value - The new value for UsesTimeDriver
    • getUsesTimeDriver

      public boolean getUsesTimeDriver()
      Get the UsesTimeDriver property.
      Returns:
      The UsesTimeDriver
    • relocateDisplay

      public void relocateDisplay(ucar.unidata.geoloc.LatLonRect originalBounds, ucar.unidata.geoloc.LatLonRect newBounds)
      When we relocate a bundle this gets called to relocate the display This method gets overwritten by the probe and cross section displays so they can move their selection points to a new location
      Parameters:
      originalBounds - The original bounds of the datasource
      newBounds - The relocated bounds of the datasource
    • relocateDisplay

      public void relocateDisplay(ucar.unidata.geoloc.LatLonRect originalBounds, ucar.unidata.geoloc.LatLonRect newBounds, boolean useDataProjection)
      When we relocate a bundle this gets called to relocate the display This method gets overwritten by the probe and cross section displays so they can move their selection points to a new location
      Parameters:
      originalBounds - The original bounds of the datasource
      newBounds - The relocated bounds of the datasource
    • getLatLonPoints

      public ucar.unidata.geoloc.LatLonPoint[] getLatLonPoints(double[][] xyPoints)
      _more_
      Parameters:
      xyPoints - _more_
      Returns:
      _more_
    • getShoulDoProgressiveResolution

      public boolean getShoulDoProgressiveResolution()
      Can we do progresive resolution from this display
      Returns:
      true if display and view supports it
    • canDoProgressiveResolution

      protected boolean canDoProgressiveResolution()
      Does this control support progressive resolution? Subclasses should override.
      Returns:
      false
    • getIsProgressiveResolution

      public boolean getIsProgressiveResolution()
      _more_
      Returns:
      _more_
    • setIsProgressiveResolution

      public void setIsProgressiveResolution(boolean isPG)
      _more_
      Parameters:
      isPG - _more_
    • getMatchDisplayRegion

      public boolean getMatchDisplayRegion()
      Should we match the display region for spatial bounds
      Returns:
      true if match display region
    • setMatchDisplayRegion

      public void setMatchDisplayRegion(boolean useDR)
      Set whether we should match the display region for spatial bounds
      Parameters:
      useDR - true if match display region
    • saveProjection

      public void saveProjection()
      When relocate display through ISL or RBB it will be good to save the projection otherwise, the home button will bring the view back to original view