Class DisplayComponent

All Implemented Interfaces:
PropertyChangeListener, EventListener, Sharable
Direct Known Subclasses:
ChartWrapper, DisplayControlWrapper, DisplayGroup, FieldSelectorWrapper, ViewWrapper

public abstract class DisplayComponent extends PropertiedThing implements PropertyChangeListener
Base class of things that are shown in the MultiDisplayHolder
Version:
$Revision: 1.11 $
Author:
IDV Development Team
  • Field Details

    • PROP_REMOVED

      public static final String PROP_REMOVED
      Property change id
      See Also:
    • isRemoved

      public boolean isRemoved
      Has this component been removed
    • hasBeenInitialized

      protected boolean hasBeenInitialized
      Has this component been initialized
    • CMD_SAVEIMAGE

      public static final String CMD_SAVEIMAGE
      Action command to save an image_
      See Also:
    • CMD_SAVEMOVIE

      public static final String CMD_SAVEMOVIE
      Action command to save an moveie
      See Also:
    • displayLabel

      protected JLabel displayLabel
      The label
    • displayControl

      protected MultiDisplayHolder displayControl
      The displaycontrol I'm in
  • Constructor Details

    • DisplayComponent

      public DisplayComponent()
      default ctor
    • DisplayComponent

      public DisplayComponent(String name)
      ctor
      Parameters:
      name - name
  • Method Details

    • initDone

      public void initDone()
      Finish with initialization
    • initAfterUnPersistence

      public void initAfterUnPersistence(MultiDisplayHolder displayControl, ControlContext vc, Hashtable properties)
      Called by the IntegratedDataViewer to initialize after this control has been unpersisted
      Parameters:
      displayControl - The display control I am part of
      vc - The context in which this control exists
      properties - Properties that may hold things
    • doMakeContents

      protected abstract JComponent doMakeContents()
      Make the gui
      Returns:
      The gui
    • getContents

      public JComponent getContents()
      Create, if needed, and return the gui contents
      Returns:
      gui contents
    • setDisplayControl

      public void setDisplayControl(MultiDisplayHolder displayControl)
      Set the display control I'm in
      Parameters:
      displayControl - The display control
    • getDisplayControl

      protected MultiDisplayHolder getDisplayControl()
      Get the display control I'm in
      Returns:
      The display control
    • animationTimeChanged

      public void animationTimeChanged(Real time)
      Set animation time on components
      Parameters:
      time - time
    • loadData

      public void loadData() throws RemoteException, VisADException
      Tell components to load
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • doSaveMovie

      public void doSaveMovie()
      Create a movie
    • doSaveImage

      public void doSaveImage()
      Write the image
    • addGroupMenuItems

      protected List addGroupMenuItems(List items)
      Add the parent group's menu items
      Parameters:
      items - menu items
      Returns:
      the items
    • getDisplayables

      public List getDisplayables()
      Get the list of displayables
      Returns:
      empty list
    • removeDisplayComponent

      public boolean removeDisplayComponent()
      Remove me
      Returns:
      was removed
    • doApplyProperties

      protected boolean doApplyProperties()
      Apply the properties
      Overrides:
      doApplyProperties in class PropertiedThing
      Returns:
      Success
    • doRemove

      public void doRemove()
      Been removed, do any cleanup
    • setName

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

      public String getName()
      Get the Name property.
      Returns:
      The Name
    • setDisplayGroup

      public void setDisplayGroup(DisplayGroup value)
      Set the DisplayGroup property.
      Parameters:
      value - The new value for DisplayGroup
    • getDisplayGroup

      public DisplayGroup getDisplayGroup()
      Get the DisplayGroup property.
      Returns:
      The DisplayGroup
    • toString

      public String toString()
      to string
      Overrides:
      toString in class Object
      Returns:
      string
    • setBackgroundColor

      public void setBackgroundColor(Color value)
      Set the BackgroundColor property.
      Parameters:
      value - The new value for BackgroundColor
    • getBackgroundColor

      public Color getBackgroundColor()
      Get the BackgroundColor property.
      Returns:
      The BackgroundColor
    • getTypeName

      public String getTypeName()
      Return the human readable name of this component
      Returns:
      component type name
    • getPropertiesComponents

      protected void getPropertiesComponents(List comps, int tabIdx)
      Create the properties contents
      Overrides:
      getPropertiesComponents in class PropertiedThing
      Parameters:
      comps - List of components
      tabIdx - Which tab
    • applyProperties

      protected boolean applyProperties()
      Apply properties
      Overrides:
      applyProperties in class PropertiedThing
      Returns:
      Was successful
    • getPopupMenuItems

      protected List getPopupMenuItems(List items)
      Get the menu items for the popup menu
      Parameters:
      items - List of items to add to
      Returns:
      The items list
    • showProperties

      public boolean showProperties()
      Show the properties dialog
      Overrides:
      showProperties in class PropertiedThing
      Returns:
      Was it ok
    • showPopup

      public void showPopup(JComponent where, int x, int y)
      SHow the popup menu
      Parameters:
      where - component to show near to
      x - x
      y - y
    • getDisplayLabel

      protected JLabel getDisplayLabel()
      Create, if needed, and return the component label
      Returns:
      component label
    • doMakeDisplayLabel

      protected JLabel doMakeDisplayLabel()
      Create, if needed, and return the component label
      Returns:
      component label
    • setLabelShown

      public void setLabelShown(boolean value)
      Set the LabelShown property.
      Parameters:
      value - The new value for LabelShown
    • getLabelShown

      public boolean getLabelShown()
      Get the LabelShown property.
      Returns:
      The LabelShown
    • setIsRemoved

      public void setIsRemoved(boolean value)
      Set the IsRemoved property.
      Parameters:
      value - The new value for IsRemoved
    • getIsRemoved

      public boolean getIsRemoved()
      Get the IsRemoved property.
      Returns:
      The IsRemoved