ucar.unidata.idv.chooser
Class IdvChooser

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by ucar.unidata.ui.ChooserPanel
                      extended by ucar.unidata.idv.chooser.IdvChooser
All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, IdvConstants
Direct Known Subclasses:
BundleChooser, FileChooser, McidasImageChooser, RaobChooser, SkeletonChooser, TimesChooser, UrlChooser, XmlChooser

public abstract class IdvChooser
extends ChooserPanel
implements IdvConstants

This is the base class of all Chooser classes.

Version:
$Revision: 1.91 $Date: 2007/07/27 20:59:03 $
Author:
IDV development team
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static String ATTR_ID
          Name of the id attribute in the choosers.xml
static String ATTR_SHOWDETAILS
          Name of the details attribute in the choosers.xml
protected  JComboBox dirHistoryCbx
          For the dir history
protected  boolean ignoreDirHistory
          For the dir history
static Hashtable NULL_PROPERTIES
          Can pass in null properties.
static String NULL_STRING
          Like above, a handy way to pass in a null string
static String PREF_ADDESERVERS
          Used by derived classes to save the list of adde servers
static String PREF_CATALOGLIST
          Used by derived classes to save the list of catalogs
static String PREF_DEFAULTDIR
          Used by derived classes to save the last directory the user was in
static String PREF_IMAGEDESCLIST
          Used by derived classes to save the list of image descriptors
static String PREF_POLLINGINFO
          Saves off the pollinginfo_
static String PREF_RADARDESCLIST
          Used by derived classes to save the list of radar descriptors
static String PREF_TDSRADARSERVER
          Used by derived classes to save the list of tds radar descriptors
static String PROP_CHOOSER_MAPS
          Where we get the maps
static String PROP_CHOOSER_PROJECTION_BOUNDS
          Where we get the projection bounds
protected  StationLocationMap stationMap
          station location map
 
Fields inherited from class ucar.unidata.ui.ChooserPanel
cancelButton, CMD_LOAD, contents, GRID_INSETS, GRID_SPACING, haveData, helpPath, loadButton, MAP_COLOR, simpleMode
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface ucar.unidata.idv.IdvConstants
ARG_B64BUNDLE, ARG_BUNDLE, ARG_CATALOG, ARG_CHOOSER, ARG_CLEARDEFAULT, ARG_CODE, ARG_CONNECT, ARG_CURRENTTIME, ARG_DATA, ARG_DEBUG, ARG_DEFAULT, ARG_DISPLAY, ARG_DXML, ARG_FIXEDTIME, ARG_HELP, ARG_IMAGE, ARG_IMAGESERVER, ARG_INSTALLPLUGIN, ARG_ISLFILE, ARG_ISLINTERACTIVE, ARG_LISTRESOURCES, ARG_MAINCLASS, ARG_MOVIE, ARG_MSG_DEBUG, ARG_MSG_RECORD, ARG_NODEFAULT, ARG_NOGUI, ARG_NOONEINSTANCE, ARG_NOPLUGINS, ARG_NOPREF, ARG_ONEINSTANCEPORT, ARG_PLUGIN, ARG_PORT, ARG_PRINTJNLP, ARG_PROPERTIES, ARG_SCRIPT, ARG_SERVER, ARG_SETFILES, ARG_SITEPATH, ARG_TEMPLATE, ARG_TEST, ARG_TESTEVAL, ARG_TRACE, ARG_TRACEONLY, ARG_USERPATH, DEFAULT_DATE_FORMAT, DEFAULT_DOCPATH, DEFAULT_TIMEZONE, FILE_VMSTATE, FILTER_CPT, FILTER_ISL, FILTER_JNLP, FILTER_XIDV, FILTER_XIDVZIDV, FILTER_XML, FILTER_ZIDV, ID_COMMANDSTORUN, ID_DATASOURCES, ID_DISPLAYCONTROLS, ID_IDV, ID_JYTHON, ID_MESSAGE, ID_MISCHASHTABLE, ID_VERSION, ID_VIEWMANAGERS, ID_WINDOWS, INITIAL_PROBE_EARTHLOCATION, NULL_DATA_SELECTION, PREF_ARCHIVEDIR, PREF_ARCHIVENAME, PREF_AUTODISPLAYS_ENABLE, PREF_AUTODISPLAYS_SHOWGUI, PREF_AUTOSELECTDATA, PREF_CACHESIZE, PREF_CONTROLSINTABS, PREF_DATAPREFIX, PREF_DATE_FORMAT, PREF_DISTANCEUNIT, PREF_DOCACHE, PREF_EMBEDDATACHOOSERINDASHBOARD, PREF_EMBEDFIELDSELECTORINDASHBOARD, PREF_EMBEDLEGENDINDASHBOARD, PREF_EMBEDQUICKLINKSINDASHBOARD, PREF_EVENT_KEYBOARDMAP, PREF_EVENT_MOUSEMAP, PREF_EVENT_WHEELMAP, PREF_FAST_RENDER, PREF_FIELD_CACHETHRESHOLD, PREF_FILEREADDIR, PREF_FILEWRITEDIR, PREF_HISTORY, PREF_LASTVERSION, PREF_LATLON_FORMAT, PREF_LOCALE, PREF_LOOKANDFEEL, PREF_MAXIMAGESIZE, PREF_OPEN_ASK, PREF_OPEN_MERGE, PREF_OPEN_REMOVE, PREF_PROJ_LIST, PREF_SAMPLINGMODE, PREF_SHOWCONTROLWINDOW, PREF_SHOWDASHBOARD, PREF_SHOWDECODEDIALOG, PREF_SHOWHIDDENFILES, PREF_SHOWQUITCONFIRM, PREF_SITEPATH, PREF_TIMEZONE, PREF_VERTICALCS, PREF_VERTICALUNIT, PREF_ZIDV_ASK, PREF_ZIDV_DIRECTORY, PREF_ZIDV_SAVETOTMP, PROP_3DMODE, PROP_ABOUTTEXT, PROP_APPRESOURCEPATH, PROP_CHOOSERS, PROP_CHOOSERS_ALL, PROP_CONTROLDESCRIPTORS, PROP_CONTROLDESCRIPTORS_ALL, PROP_DATAHOLDERBOUNDS, PROP_DEFAULTLOCATIONS, PROP_JNLPCODEBASE, PROP_JNLPTEMPLATE, PROP_JNLPTITLE, PROP_LOADINGXML, PROP_OLDCONTROLDESCRIPTORS, PROP_ONEINSTANCEPORT, PROP_PREFERENCES, PROP_PROJ_NAME, PROP_RESOURCEFILES, PROP_SHOWDASHBOARD, PROP_SHOWDATATREE, PROP_SHOWFORMULAS, PROP_SHOWSPLASH, PROP_SPLASHICON, PROP_UI_DESKTOP, PROP_VERSIONFILE, PROP_WINDOW_SCREENSIZEOFFSET, PROP_WINDOW_SIZEHEIGHT, PROP_WINDOW_SIZEWIDTH, PROP_WINDOW_USESCREENSIZE, SUFFIX_BAT, SUFFIX_CPT, SUFFIX_ISL, SUFFIX_JNLP, SUFFIX_RBI, SUFFIX_SH, SUFFIX_XIDV, SUFFIX_XML, SUFFIX_ZIDV
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
IdvChooser(IdvChooserManager chooserManager, Element chooserNode)
          Create the chooser
IdvChooser(IntegratedDataViewer idv, Element chooserNode)
          Create the chooser
IdvChooser(IntegratedDataViewer idv, IdvChooserManager chooserManager, Element chooserNode)
          Create the chooser
 
Method Summary
protected  void clearSelectedStations()
          Clear any selected stations.
protected  void clearStations()
          Clear all stations in the station map.
protected  void closeChooser()
          Close the chooser window
protected  StationLocationMap createStationMap()
          Create the station map
 JComponent decorateButtons(JComponent buttons)
          Add extra components to "decorate" the button panel
 void doCancel()
          Gets called when the user presses Cancel in multipleSelect mode This can get overwritten by a derived class to do something.
 void doClose()
          Close the chooser window
static void errorMessage(String msg)
          Helper method to show a user error message
protected  String getAttribute(String name, String dflt)
          Utility to get the attribute from the chooser xml node.
 JComponent getContents()
          Create and return the GUI contents.
 DataManager getDataManager()
          Return the DataManager
protected  String getDataSourceId()
          If the dataSources combo box is non-null then return the data source id the user selected.
protected  String getDataSourceId(JComboBox dataSourcesCbx)
          Get the data source ID for the particular item selected in the box
protected  void getDataSourceProperties(Hashtable ht)
          Get the properties from the datasource
protected  JComboBox getDataSourcesComponent()
          Return the component that holds the dataSources combo box
protected  JComboBox getDataSourcesComponent(boolean justFileSources)
          Return the component that holds the dataSources combo box
static JComboBox getDataSourcesComponent(boolean justFileSources, DataManager dataManager)
          Return the component that holds the dataSources combo box
static JComboBox getDataSourcesComponent(boolean justFileSources, DataManager dataManager, boolean addLucky)
          Get the component for listing data source types
 JComponent getDefaultButtons(ActionListener listener)
          Get the default buttons.
protected  String getDefaultDisplayType()
          Get the default display type
protected  String getDefaultMap()
          Get the default map to be used.
protected  List getDefaultMaps()
          Get the default map to be used.
protected  ucar.unidata.geoloc.ProjectionImpl getDefaultProjection()
          Create and return the default projection used for the station map.
protected  ucar.unidata.geoloc.ProjectionRect getDefaultProjectionRect()
          Create and return the default projection rect used for the station map.
 String getId()
          Return the id
 IntegratedDataViewer getIdv()
          Getter method to return the IDV
 String getMenuTitle()
          Get the title to use for menu entries.
 PreferenceList getPreferenceList(String listProp)
          Find the PreferenceList associated with the given property.
 PreferenceList getPreferenceList(String listProp, boolean mergeTheIdvProperty)
          Find the PreferenceList associated with the given property.
 PreferenceList getPreferenceList(String listProp, boolean mergeTheIdvProperty, List butNotThese)
          Find the PreferenceList associated with the given listProp.
 PreferenceList getPreferenceList(String listProp, boolean mergeTheIdvProperty, String butNotThisOne)
          Find the PreferenceList associated with the given listProp.
 boolean getProperty(String name, boolean dflt)
          Utility to get a boolean property
 String getProperty(String name, String dflt)
          Utility to get a String property
 List getPropList(String property, boolean mergeTheIdvProperty)
          Find the list (of Strings) defined by the property name
protected  String getSelectedStation()
          Get the first seleted station or null if none selected.
 List getSelectedStations()
          Get list of selected stations, objects of ucar/unidata/metdata/NamedStationImpl class
 boolean getShowInMenu()
          Should this chooser entry be shown in the file menu
protected  StationLocationMap getStationMap()
          Create (if needed) and return the station map
 String getTitle()
          Get the title
 Element getXmlNode()
          Get the xml node that defined this chooser
protected  boolean haveStationSelected()
          If there is a station map created then return whether there are any stations selected.
protected  void init()
          Initialize after creation
protected  void initChooserPanel(ChooserPanel chooserPanel)
          Initialize the given panel.
protected  void initStationMap(StationLocationMap stationMap)
          Initialize the stations
 void logException(String msg, Exception exc)
          Helper method that calls LogUtil.printException
protected  boolean makeDataSource(Object definingObject, Hashtable properties)
          Create the data source defined by the given definingObject (e.g., a string filename, a list of images, etc.
protected  boolean makeDataSource(Object definingObject, String dataType, Hashtable properties)
          Create the data source defined by the given definingObject (ex: a string filename, a list of images).
 List makeTimeMenus(ActionListener listener)
          Make time menus
protected  void newSelectedStations(List stations)
          Notify of new selected stations.
protected  void resetDataSourceId()
          Clear the dataSources combo box
 void setDataSourceListener(ActionListener listener)
           
protected  boolean shouldDoUpdateOnFirstDisplay()
          As the name implies should this chooser do call doUpdate the first time it is painted.
 void showNormalCursor()
          show regular cursor
 void showWaitCursor()
          show wait cursor
protected  Object startTask()
           
protected  void stopTask(Object taskId)
           
protected  boolean stopTaskAndIsOk(Object taskId)
           
protected  boolean taskOk(Object taskId)
           
protected  void updateStatus()
          _more_
static void userMessage(String msg)
          Helper method to show a user message
protected  boolean usingStations()
          Is this chooser using the station map
 
Methods inherited from class ucar.unidata.ui.ChooserPanel
actionPerformed, addPropertyChangeListener, clearWaitCursor, doHelp, doLoad, doLoadInThread, doMakeContents, doUpdate, firePropertyChange, getButtonLabels, getDefaultButtons, getHaveData, getLoadCommandName, getLoadToolTip, getSimpleMode, getStatusComponent, getStatusLabel, getUpdateToolTip, registerStatusComp, revalidate, setHaveData, setHelpPath, setStatus, setStatus
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll,