Interface DisplayControl

All Superinterfaces:
Sharable
All Known Implementing Classes:
ADTControl, AerologicalSoundingControl, AnimationTextControl, AudioControl, BaseImageControl, CappiControl, ChatLogControl, ColorCrossSectionControl, ColorPlanViewControl, ColorRadarVolumeControl, ColorRhiControl, ContourCrossSectionControl, ContourCrossSectionControl.MyContourCrossSectionControl, ContourPlanViewControl, CrossSectionControl, DataTransectControl, DisplayControlImpl, DrawingControl, FlowCrossSectionControl, FlowCrossSectionControl.MyFlowCrossSectionControl, FlowPlanViewControl, FlowTimeHeightControl, FrontDrawingControl, Grid2DReadoutProbe, GriddedSkewTControl, GriddedSoundingControl, GridDisplayControl, GridTableControl, GridTrajectoryControl, GridTrajectoryControl.MyTrackControl, GridTrajectoryControlNew, GridTrajectoryControlNew.MyTrajectoryControl, HovmollerControl, HydraControl, ImageControl, ImageMovieControl, ImagePlanViewControl, ImageSequenceControl, JythonControl, Level2ColorCrossSectionControl, Level2TimeHeightControl, LineProbeControl, LocationIndicatorControl, MapDisplayControl, MovieDisplayControl, MultiDisplayHolder, NoteControl, ObsDisplayControl, ObsListControl, OmniControl, PlanViewControl, PointCloudControl, ProbeControl, ProfileControl, ProfilerControl, ProfilerMultiStationControl, ProfilerTimeHeightControl, RadarCrossSectionControl, RadarEditor, RadarEditor.MyRadarSweepControl, RadarGridControl, RadarRhiControl, RadarSweepControl, RadarVWPControl, RangeAndBearingControl, RaobSkewTControl, RaobSoundingControl, RGBCompositeControl, ScatterDisplay, ShapefileControl, SkewTControl, StationLocationControl, StationModelControl, TemplateControl, TextDisplayControl, TextProductControl, ThreeDSurfaceControl, TimeHeightControl, TimeHeightControl.MyTimeHeightControl, TimeSeriesControl, TopographyControl, TrackControl, TrackSkewTControl, TrackSoundingControl, TrajectoryFeatureTypeSoundingControl, TransectDrawingControl, ValuePlanViewControl, VerticalProfileControl, VolumeRenderControl, VolumeVectorControl, WindTimeHeightControl, WMSControl, WorldWindControl, YahooLocationControl

public interface DisplayControl extends Sharable
A class to support controling the aspects of a display.
Author:
IDV Development Team
  • Field Details

    • PREF_PREFIX

      static final String PREF_PREFIX
      Preference prefix for preferences of this class.
      See Also:
    • PROP_LEGENDICON

      static final String PROP_LEGENDICON
      The property name of the String path or url of the icon this display control should show in its legend.
      See Also:
    • PREF_SAMPLING_MODE

      static final String PREF_SAMPLING_MODE
      Preference for sampling mode
      See Also:
    • PREF_PROBEFORMAT

      static final String PREF_PROBEFORMAT
      Preference for probe format
      See Also:
    • DEFAULT_PROBEFORMAT

      static final String DEFAULT_PROBEFORMAT
      Default format for probe format
      See Also:
    • PREF_REMOVEONWINDOWCLOSE

      static final String PREF_REMOVEONWINDOWCLOSE
      Preference for whether the control should be removed when the window is closed
      See Also:
    • PREF_STANDALONE_REMOVEONCLOSE

      static final String PREF_STANDALONE_REMOVEONCLOSE
      Should we remove stand alone display controls when their window is closed
      See Also:
    • PREF_STANDALONE_REMOVEONCLOSE_ASK

      static final String PREF_STANDALONE_REMOVEONCLOSE_ASK
      Should we ask the user if they want to remove stand alone display controls
      See Also:
    • BOTTOM_LEGEND

      static final int BOTTOM_LEGEND
      Bottom type legend
      See Also:
    • SIDE_LEGEND

      static final int SIDE_LEGEND
      Side type legend
      See Also:
    • RASTERMODE_SHOWRASTER

      static final int RASTERMODE_SHOWRASTER
      Show raster flag
      See Also:
    • RASTERMODE_SHOWNONRASTER

      static final int RASTERMODE_SHOWNONRASTER
      Show no raster flag
      See Also:
    • RASTERMODE_SHOWALL

      static final int RASTERMODE_SHOWALL
      Show all flag
      See Also:
  • Method Details

    • init

      void init(String displayId, List dataCategories, List choices, ControlContext viewer, String properties, DataSelection dataSelection) throws VisADException, RemoteException
      Initialize the DisplayControl.
      Parameters:
      displayId - the display id
      dataCategories - the DisplayControl's data categories
      choices - a list of DataChoices
      viewer - the control context in which this is viewed
      properties - properties
      dataSelection - specific data selection properties deprecated Use init that that takes a properties Hashtable
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD error
    • init

      void init(String displayId, List dataCategories, List choices, ControlContext viewer, Hashtable properties, DataSelection dataSelection) throws VisADException, RemoteException
      Initialize the DisplayControl.
      Parameters:
      displayId - the display id
      dataCategories - the DisplayControl's data categories
      choices - a list of DataChoices
      viewer - the control context in which this is viewed
      properties - extra properties
      dataSelection - specific data selection properties
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD error
    • isInitDone

      boolean isInitDone()
      Are we fully initialized
      Returns:
      is init done
    • getWindow

      JFrame getWindow()
      Get the control window for this DisplayControl.
      Returns:
      The window that this display control is shown in
    • getLockVisibilityToggle

      boolean getLockVisibilityToggle()
      Get whether the visibility of this display control is locked (could be on or off)
      Returns:
      true if locked.
    • getShowInDisplayList

      boolean getShowInDisplayList()
      Should this display be shown in the display list
      Returns:
      Show in the display list
    • getDisplayListDisplayable

      DisplayableData getDisplayListDisplayable(ViewManager view)
      Get the displayable for the display list for the particular view
      Parameters:
      view - The view manager
      Returns:
      Displayable to show
    • getDataForDisplayList

      Data getDataForDisplayList()
      Get the data for the display list
      Returns:
      the data
    • setLockVisibilityToggle

      void setLockVisibilityToggle(boolean value)
      Set whether the visibility of this display control is locked (could be on or off)
      Parameters:
      value - true to lock to current state
    • getLegendComponent

      JComponent getLegendComponent(int legendType)
      Get the legend component for the type of legend
      Parameters:
      legendType - type of legend (BOTTOM, SIDE)
      Returns:
      component for that legend
    • getLegendButtons

      JComponent getLegendButtons(int legendType)
      Get the legend component for the type of legend
      Parameters:
      legendType - type of legend (BOTTOM, SIDE)
      Returns:
      component for that legend
    • setCollapseLegend

      void setCollapseLegend(boolean collapse)
      Set the collapsed state of the legend.
      Parameters:
      collapse - true to collapse the legend.
    • getCollapseLegend

      boolean getCollapseLegend()
      Get the collapsed state of the legend.
      Returns:
      true if legend collapsed
    • getLegendLabel

      JComponent getLegendLabel(int legendType)
      Get the legend lable for the type of legend
      Parameters:
      legendType - type of legend (BOTTOM, SIDE)
      Returns:
      the legend label
    • doRemove

      void doRemove() throws VisADException, RemoteException
      Called when the DisplayControl is removed from the display
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD error
    • viewManagerDestroyed

      void viewManagerDestroyed(ViewManager viewManager) throws VisADException, RemoteException
      Called when a ViewManager which holds the display is destoryed
      Parameters:
      viewManager - The view manager that has been destroyed
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD error
    • getCanDoRemoveAll

      boolean getCanDoRemoveAll()
      See if this DisplayControl can remove all controls.
      Returns:
      true if it can remove all
    • getActive

      boolean getActive()
      Is this control active or has it been removed
      Returns:
      is active
    • getDataChoice

      DataChoice getDataChoice()
      Get the DataChoice associated with this control.
      Returns:
      the DataChoice (can be null)
    • getDataChoices

      List getDataChoices()
      Get the list of DataChoices associated with this control.
      Returns:
      the list of DataChoice-s
    • getDisplayId

      String getDisplayId()
      Get the display id for this control.
      Returns:
      the display id
    • getMenuLabel

      String getMenuLabel()
      Get the text that should show up in a menu listing this control.
      Returns:
      text for menu
    • getControlMenus

      List getControlMenus(JComponent comp)
      Get the menus for this control.
      Parameters:
      comp - component for placement of window (can be null)
      Returns:
      list of menus
    • getLabel

      String getLabel()
      Get a label describing control
      Returns:
      a descriptive label
    • moveTo

      void moveTo(ViewManager viewManager)
      Move this control to a different ViewManager.
      Parameters:
      viewManager - ViewManager to move to.
    • getViewManager

      ViewManager getViewManager()
      Get the view manager for this control
      Returns:
      the ViewManager
    • getDefaultViewManager

      ViewManager getDefaultViewManager()
      Get the default view manager for this control
      Returns:
      the default view manager for this control
    • saveImage

      void saveImage(String filename)
      Save an image of this control to a file.
      Parameters:
      filename - filename to save to
    • toFront

      void toFront()
      Bring this control's component to the front
    • makeLegendLabel

      JLabel makeLegendLabel()
      Make a label like the one in the legend
      Returns:
      label
    • show

      void show()
      Show this control's component
    • toggleWindow

      void toggleWindow()
      Hide or show the main window
    • setDisplayVisibility

      void setDisplayVisibility(boolean b)
      Set the display's visibility.
      Parameters:
      b - true to set it visible
    • getDisplayVisibility

      boolean getDisplayVisibility()
      Get the display's visibility.
      Returns:
      true if visible
    • toggleVisibilityForVectorGraphicsRendering

      void toggleVisibilityForVectorGraphicsRendering(int rasterMode) throws Exception
      Toggle the visibility for vector graphics rendering based on mode
      Parameters:
      rasterMode - mode to use
      Throws:
      Exception - problem toggling
    • doMakeVisibilityControl

      JCheckBox doMakeVisibilityControl(String label)
      Make a visibility control as a JCheckbox.
      Parameters:
      label - label for the visibility checkbox
      Returns:
      checkbox for toggling visibility
    • setLegendForeground

      void setLegendForeground(Color fg)
      Set the foreground color on the legend component
      Parameters:
      fg - foreground color
    • setLegendBackground

      void setLegendBackground(Color bg)
      Set the background color on the legend component
      Parameters:
      bg - background color
    • initAfterUnPersistence

      void initAfterUnPersistence(ControlContext vc, Hashtable properties)
      Method to call after unpersisting from XML.
      Parameters:
      vc - control context for this DisplayControl.
      properties - A place to put properties
    • initAfterUnPersistence

      void initAfterUnPersistence(ControlContext vc, Hashtable properties, List dataChoices)
      Initialize after unpersistance
      Parameters:
      vc - the control context
      properties - the properties
      dataChoices - the list of data choices
    • initAsTemplate

      void initAsTemplate()
      Intialize the display control when it is created from a template
    • initBasic

      void initBasic(String displayId, List categories, Hashtable properties)
      Do basic initialization. This is for display controls that server as prototype objects
      Parameters:
      displayId - id
      categories - display categories
      properties - properties
    • firstFrameDone

      void firstFrameDone()
      Method to call when the first frame has been rendered.
    • writeTestArchive

      void writeTestArchive(String archivePath)
      This is called when we are generating a test archive of images from all components
      Parameters:
      archivePath - Where to write the images
    • getDataProjection

      MapProjection getDataProjection()
      Get the MapProjection associated with the data in this DisplayControl.
      Returns:
      data projection
    • projectionChanged

      void projectionChanged()
      Method called when a map projection changes.
    • transectChanged

      void transectChanged()
      Method called when a transect changes.
    • viewManagerChanged

      void viewManagerChanged(String property)
      Method called when a view manager changes.
      Parameters:
      property - the property that changed
    • getDisplayCategory

      String getDisplayCategory()
      Get the display category for this DisplayControl.
      Returns:
      category for this control.
    • setDisplayCategory

      void setDisplayCategory(String category)
      Set the display category
      Parameters:
      category - the display category
    • getCategories

      List getCategories()
      Get the list of DataCategorys
      Returns:
      List of data categories
    • getTransientProperty

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

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

      void applyPreferences()
      Apply preferences to this control.
    • getShowInLegend

      boolean getShowInLegend()
      Should the display control be shown in a legend
      Returns:
      Should this display control be shown in a legend
    • showHelp

      void showHelp()
      Show help
    • getExpandedInTabs

      boolean getExpandedInTabs()
      Is this control expanded when it is shown in the main tabs
      Returns:
      expanded in tabs
    • setExpandedInTabs

      void setExpandedInTabs(boolean value)
      Set whether this control expanded when it is shown in the main tabs
      Parameters:
      value - value
    • getShowInTabs

      boolean getShowInTabs()
      Should we show this control in the main tabs
      Returns:
      show in main tabs
    • shouldBeDocked

      boolean shouldBeDocked()
      Should this be docked?
      Returns:
      true if docked
    • canBeDocked

      boolean canBeDocked()
      Can this be docked
      Returns:
      true if can be docked
    • setShowInTabs

      void setShowInTabs(boolean value)
      Set whether to show this control in the main tabs
      Parameters:
      value - value
    • getTimeSet

      Set getTimeSet() throws RemoteException, VisADException
      get the time set of the data
      Returns:
      date times
      Throws:
      RemoteException - on badness
      VisADException - on badness
    • getCursorReadout

      List getCursorReadout(EarthLocation el, Real animationValue, int animationStep, List<ReadoutInfo> samples) throws Exception
      Get the cursor readout
      Parameters:
      el - position
      animationValue - animation value
      animationStep - animation index
      samples - the list of samples to add to
      Returns:
      List of values
      Throws:
      Exception - problem getting the cursor readout
    • getTmpProperty

      Object getTmpProperty(Object key)
      Get the tmp property.
      Parameters:
      key - key
      Returns:
      property
    • putTmpProperty

      void putTmpProperty(Object key, Object value)
      put the tmp property. These are not persisted off
      Parameters:
      key - key
      value - value
    • removeTmpProperty

      Object removeTmpProperty(Object key)
      remove the tmp property
      Parameters:
      key - key
      Returns:
      the value or null if not found
    • getVisbilityAnimationPause

      int getVisbilityAnimationPause()
      How long should this display be shown when in visibility animation mode
      Returns:
      -1 if it is undefined. 0 if this one should not be used. else treat the value as seconds
    • getIsTimeDriver

      boolean getIsTimeDriver()
      is this display the one that drives time selection for other displays
      Returns:
      true if this is the time driver