ucar.unidata.idv
Interface DisplayControl

All Superinterfaces:
Sharable
All Known Implementing Classes:
AerologicalSoundingControl, AnimationTextControl, AudioControl, BaseImageControl, CappiControl, ChatLogControl, ColorCrossSectionControl, ColorPlanViewControl, ColorRadarVolumeControl, ColorRhiControl, ContourCrossSectionControl, ContourPlanViewControl, CrossSectionControl, DataTransectControl, DisplayControlImpl, DrawingControl, FlowCrossSectionControl, FlowPlanViewControl, FlowTimeHeightControl, GriddedSkewTControl, GriddedSoundingControl, GridDisplayControl, ImageControl, ImageMovieControl, ImagePlanViewControl, ImageSequenceControl, JythonControl, Level2ColorCrossSectionControl, Level2TimeHeightControl, LineProbeControl, LocationIndicatorControl, MapDisplayControl, MovieDisplayControl, MultiDisplayHolder, NoteControl, ObsDisplayControl, ObsListControl, OmniControl, PlanViewControl, ProbeControl, ProfileControl, ProfilerControl, ProfilerMultiStationControl, ProfilerTimeHeightControl, RadarGridControl, RadarSweepControl, RadarVWPControl, RangeAndBearingControl, RaobSkewTControl, RaobSoundingControl, ShapefileControl, SkewTControl, StationLocationControl, StationModelControl, StormTrackControl, TemplateControl, TextDisplayControl, ThreeDSurfaceControl, TimeHeightControl, TimeSeriesControl, TopographyControl, TrackControl, TrackSkewTControl, TrackSoundingControl, TransectDrawingControl, ValuePlanViewControl, VerticalProfileControl, VolumeRenderControl, WindTimeHeightControl, WMSControl, WorldWindControl, YahooLocationControl

public interface DisplayControl
extends Sharable

A class to support controling the aspects of a display.

Version:
$Revision: 1.98 $
Author:
Jeff McWhirter

Field Summary
static int BOTTOM_LEGEND
          Bottom type legend
static String DEFAULT_PROBEFORMAT
          Default format for probe format
static String PREF_PREFIX
          Preference prefix for preferences of this class.
static String PREF_PROBEFORMAT
          Preference for probe format
static String PREF_REMOVEONWINDOWCLOSE
          Preference for whether the control should be removed when the window is closed
static String PREF_SAMPLING_MODE
          Preference for sampling mode
static String PREF_STANDALONE_REMOVEONCLOSE
          Should we remove stand alone display controls when their window is closed
static String PREF_STANDALONE_REMOVEONCLOSE_ASK
          Should we ask the user if they want to remove stand alone display controls
static String PROP_LEGENDICON
          The property name of the String path or url of the icon this display control should show in its legend.
static int SIDE_LEGEND
          Side type legend
 
Method Summary
 void applyPreferences()
          Apply preferences to this control.
 boolean canBeDocked()
          _more_
 JCheckBox doMakeVisibilityControl(String label)
          Make a visibility control as a JCheckbox.
 void doRemove()
          Called when the DisplayControl is removed from the display
 void firstFrameDone()
          Method to call when the first frame has been rendered.
 boolean getCanDoRemoveAll()
          See if this DisplayControl can remove all controls.
 List getCategories()
          Get the list of DataCategorys
 boolean getCollapseLegend()
          Get the collapsed state of the legend.
 List getCursorReadout(EarthLocation el, Real animationValue, int animationStep)
          _more_
 DataChoice getDataChoice()
          Get the DataChoice associated with this control.
 List getDataChoices()
          Get the list of DataChoices associated with this control.
 MapProjection getDataProjection()
          Get the MapProjection associated with the data in this DisplayControl.
 ViewManager getDefaultViewManager()
          Get the default view manager for this control
 String getDisplayCategory()
          Get the display category for this DisplayControl.
 String getDisplayId()
          Get the display id for this control.
 DisplayableData getDisplayListDisplayable(ViewManager view)
          Get the displayable for the display list for the particular view
 boolean getDisplayVisibility()
          Get the display's visibility.
 boolean getExpandedInTabs()
          Is this control expanded when it is shown in the main tabs
 String getLabel()
          Get a label describing control
 JComponent getLegendButtons(int legendType)
          Get the legend component for the type of legend
 JComponent getLegendComponent(int legendType)
          Get the legend component for the type of legend
 JComponent getLegendLabel(int legendType)
          Get the legend lable for the type of legend
 boolean getLockVisibilityToggle()
          Get whether the visibility of this display control is locked (could be on or off)
 String getMenuLabel()
          Get the text that should show up in a menu listing this control.
 boolean getShowInDisplayList()
          Should this display be shown in the display list
 boolean getShowInLegend()
          Should the display control be shown in a legend
 boolean getShowInTabs()
          Should we show this control in the main tabs
 Set getTimeSet()
          get the time set of the data
 Object getTransientProperty(Object key)
          Find a property on the display control.
 ViewManager getViewManager()
          Get the view manager for this control
 JFrame getWindow()
          Get the control window for this DisplayControl.
 void init(String displayId, List dataCategories, List choices, ControlContext viewer, Hashtable properties, DataSelection dataSelection)
          Initialize the DisplayControl.
 void init(String displayId, List dataCategories, List choices, ControlContext viewer, String properties, DataSelection dataSelection)
          Deprecated. Use init that that takes a properties Hashtable
 void initAfterUnPersistence(ControlContext vc, Hashtable properties)
          Method to call after unpersisting from XML.
 void initAfterUnPersistence(ControlContext vc, Hashtable properties, List dataChoices)
          Initialize after unpersistance
 void initAsTemplate()
          Intialize the display control when it is created from a template
 void initBasic(String displayId, List categories, Hashtable properties)
          Do basic initialization.
 JLabel makeLegendLabel()
          Make a label like the one in the legend
 void moveTo(ViewManager viewManager)
          Move this control to a different ViewManager.
 void projectionChanged()
          Method called when a map projection changes.
 void putTransientProperty(Object key, Object value)
          Put a property on the display control.
 void saveImage(String filename)
          Save an image of this control to a file.
 void setCollapseLegend(boolean collapse)
          Set the collapsed state of the legend.
 void setDisplayCategory(String category)
          _more_
 void setDisplayVisibility(boolean b)
          Set the display's visibility.
 void setExpandedInTabs(boolean value)
          Set whether this control expanded when it is shown in the main tabs
 void setLegendBackground(Color bg)
          Set the background color on the legend component
 void setLegendForeground(Color fg)
          Set the foreground color on the legend component
 void setLockVisibilityToggle(boolean value)
          Set whether the visibility of this display control is locked (could be on or off)
 void setShowInTabs(boolean value)
          Set whether to show this control in the main tabs
 boolean shouldBeDocked()
          _more_
 void show()
          Show this control's component
 void showHelp()
          Show help
 void toFront()
          Bring this control's component to the front
 void toggleWindow()
          Hide or show the main window
 void transectChanged()
          Method called when a transect changes.
 void viewManagerChanged(String property)
          Method called when a view manager changes.
 void viewManagerDestroyed(ViewManager viewManager)
          Called when a ViewManager which holds the display is destoryed
 void writeTestArchive(String archivePath)
          This is called when we are generating a test archive of images from all components
 
Methods inherited from interface ucar.unidata.collab.Sharable
getShareGroup, getSharing, getUniqueId, receiveShareData
 

Field Detail

PREF_PREFIX

static final String PREF_PREFIX
Preference prefix for preferences of this class.

See Also:
Constant Field Values

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:
Constant Field Values

PREF_SAMPLING_MODE

static final String PREF_SAMPLING_MODE
Preference for sampling mode

See Also:
Constant Field Values

PREF_PROBEFORMAT

static final String PREF_PROBEFORMAT
Preference for probe format

See Also:
Constant Field Values

DEFAULT_PROBEFORMAT

static final String DEFAULT_PROBEFORMAT
Default format for probe format

See Also:
Constant Field Values

PREF_REMOVEONWINDOWCLOSE

static final String PREF_REMOVEONWINDOWCLOSE
Preference for whether the control should be removed when the window is closed

See Also:
Constant Field Values

PREF_STANDALONE_REMOVEONCLOSE

static final String PREF_STANDALONE_REMOVEONCLOSE
Should we remove stand alone display controls when their window is closed

See Also:
Constant Field Values

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:
Constant Field Values

BOTTOM_LEGEND

static final int BOTTOM_LEGEND
Bottom type legend

See Also:
Constant Field Values

SIDE_LEGEND

static final int SIDE_LEGEND
Side type legend

See Also:
Constant Field Values
Method Detail

init

void init(String displayId,
          List dataCategories,
          List choices,
          ControlContext viewer,
          String properties,
          DataSelection dataSelection)
          throws VisADException,
                 RemoteException
Deprecated. Use init that that takes a properties Hashtable

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
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

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

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

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

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

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)
_more_

Parameters:
category - _more_

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()
_more_

Returns:
_more_

canBeDocked

boolean canBeDocked()
_more_

Returns:
_more_

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)
                      throws Exception
_more_

Parameters:
el - _more_
animationValue - _more_
animationStep - _more_
Returns:
_more_
Throws:
Exception - _more_