Package ucar.unidata.idv.chooser
Class IdvChooser
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
ucar.unidata.ui.ChooserPanel
ucar.unidata.idv.chooser.IdvChooser
- All Implemented Interfaces:
ActionListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
,IdvConstants
- Direct Known Subclasses:
BundleChooser
,FileChooser
,McidasImageChooser
,MesoWestChooser
,RaobChooser
,SkeletonChooser
,SoundingSelector
,TimesChooser
,UrlChooser
,XmlChooser
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:
-
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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Name of the id attribute in the choosers.xmlstatic final String
Name of the details attribute in the choosers.xmlprotected JComboBox
For the dir historyprotected boolean
For the dir historystatic final Hashtable
Can pass in null properties.static final String
Like above, a handy way to pass in a null stringstatic final String
Used by derived classes to save the list of adde serversstatic final String
Used by derived classes to save the list of catalogsstatic final String
Used by derived classes to save the last directory the user was instatic final String
Used by derived classes to save the list of image descriptorsstatic final String
Saves off the pollinginfo_static final String
Used by derived classes to save the list of radar descriptorsstatic final String
Used by derived classes to save the list of tds point ob serversstatic final String
Used by derived classes to save the list of tds radar serversstatic final String
Where we get the mapsstatic final String
Where we get the projection boundsstatic final String
_more_static final String
status background colorstatic final String
status foreground colorstatic final String
status templateprotected StationLocationMap
station location mapFields inherited from class ucar.unidata.ui.ChooserPanel
cancelButton, CMD_LOAD, contents, GRID_INSETS, GRID_SPACING, GRID_SPACING_H, GRID_SPACING_V, haveData, helpPath, loadButton, MAP_COLOR, simpleMode, statusLabel
Fields inherited from class javax.swing.JComponent
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
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface ucar.unidata.idv.IdvConstants
ARG_B64BUNDLE, ARG_B64ISL, 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_NOERRORSINGUI, 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, 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_NCIDV_VERSION, ID_VERSION, ID_VIEWMANAGERS, ID_WINDOWS, INITIAL_PROBE_EARTHLOCATION, NULL_DATA_SELECTION, PREF_APPEARANCEMODE, 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_GEOMETRY_BY_REF, PREF_HISTORY, PREF_IMAGE_BY_REF, PREF_LARGE_REMOTE_DATA_WARN, PREF_LASTVERSION, PREF_LATLON_FORMAT, PREF_LEGEND_SHOWICONS, PREF_LOCALE, PREF_LOOKANDFEEL, PREF_MAXIMAGESIZE, PREF_MEMORY, PREF_NPOT_IMAGE, 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_THREADS_DATA, PREF_THREADS_RENDER, PREF_TIMEZONE, PREF_VERTICALCS, PREF_VERTICALUNIT, PREF_WINDOW_SHOWTOOLBAR, 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_DISPLAYLIST_GROUP, PROP_FIXFILELOCKUP, PROP_JNLPCODEBASE, PROP_JNLPTEMPLATE, PROP_JNLPTITLE, PROP_LOADINGXML, PROP_MAP_GLOBE_LEVEL, PROP_MAP_MAP_LEVEL, PROP_MINIMUMFRAMECYCLETIME, PROP_MONITORPORT, PROP_OLDCONTROLDESCRIPTORS, PROP_ONEINSTANCEPORT, PROP_PREFERENCES, PROP_PROJ_NAME, PROP_RESOURCEFILES, PROP_SHOWCLOCK_DASH, PROP_SHOWCLOCK_VIEW, PROP_SHOWDASHBOARD, PROP_SHOWDATATREE, PROP_SHOWFORMULAS, PROP_SHOWSPLASH, PROP_SPLASHICON, PROP_UI_DESKTOP, PROP_USE_DISPLAYAREA, PROP_USE_TIMEDRIVER, 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
ConstructorsConstructorDescriptionIdvChooser
(IdvChooserManager chooserManager, Element chooserNode) Create the chooserIdvChooser
(IntegratedDataViewer idv, Element chooserNode) Create the chooserIdvChooser
(IntegratedDataViewer idv, IdvChooserManager chooserManager, Element chooserNode) Create the chooser -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Clear any selected stations.protected void
Clear all stations in the station map.protected void
Close the chooser windowprotected StationLocationMap
Create the station mapdecorateButtons
(JComponent buttons) Add extra components to "decorate" the button panelvoid
doCancel()
Handle a cancelvoid
doClose()
Close the chooser windowstatic void
errorMessage
(String msg) Helper method to show a user error messageprotected String
getAttribute
(String name, String dflt) Utility to get the attribute from the chooser xml node.final JComponent
Create and return the GUI contents.Return theDataManager
Get the DataSource property.protected String
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 boxprotected void
Get the properties from the datasourceprotected JComboBox
Return the component that holds the dataSources combo boxprotected JComboBox
getDataSourcesComponent
(boolean justFileSources) Return the component that holds the dataSources combo boxstatic JComboBox
getDataSourcesComponent
(boolean justFileSources, DataManager dataManager) Return the component that holds the dataSources combo boxstatic JComboBox
getDataSourcesComponent
(boolean justFileSources, DataManager dataManager, boolean addLucky) Get the component for listing data source typesgetDefaultButtons
(ActionListener listener) Get the default buttonsprotected String
Get the default display typeprotected String
Get the default map to be used.protected List
Get the default map to be used.protected ucar.unidata.geoloc.ProjectionImpl
Create and return the default projection used for the station map.protected ucar.unidata.geoloc.ProjectionRect
Create and return the default projection rect used for the station map.protected boolean
Do we have stationsgetId()
Return the idgetIdv()
Getter method to return the IDVGet the title to use for menu entries.getPreferenceList
(String listProp) Find thePreferenceList
associated with the given property.getPreferenceList
(String listProp, boolean mergeTheIdvProperty) Find thePreferenceList
associated with the given property.getPreferenceList
(String listProp, boolean mergeTheIdvProperty, String butNotThisOne) Find thePreferenceList
associated with the given listProp.getPreferenceList
(String listProp, boolean mergeTheIdvProperty, List butNotThese) Find thePreferenceList
associated with the given listProp.boolean
getProperty
(String name, boolean dflt) Utility to get a boolean propertygetProperty
(String name, String dflt) Utility to get a String propertygetPropList
(String property, boolean mergeTheIdvProperty) Find the list (of Strings) defined by the property nameprotected String
Get the first seleted station or null if none selected.Get list of selected stations, objects of ucar/unidata/metdata/NamedStationImpl classboolean
Should this chooser entry be shown in the file menuprotected StationLocationMap
Create (if needed) and return the station mapprotected JLabel
Create (if needed) and return the JLabel that shows the status messages.get the status label background colorGet the status label foreground colorgetTitle()
Get the titleGet the xml node that defined this chooserprotected boolean
If there is a station map created then return whether there are any stations selected.protected void
init()
Initialize after creationprotected void
initChooserPanel
(ChooserPanel chooserPanel) Initialize the given panel.protected void
initStationMap
(StationLocationMap stationMap) Initialize the stationsboolean
_more_void
logException
(String msg, Exception exc) Helper method that calls LogUtil.printExceptionprotected 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).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.makeTimeMenus
(ActionListener listener) Make time menusprotected void
newSelectedStations
(List stations) Notify of new selected stations.protected void
Clear the dataSources combo boxvoid
setDataSource
(DataSource value) Set the DataSource property.void
setDataSourceListener
(ActionListener listener) Set the data source listenerprotected boolean
As the name implies should this chooser do call doUpdate the first time it is painted.void
show regular cursorvoid
show wait cursorprotected Object
Start the taskprotected void
Stop the taskprotected boolean
stopTaskAndIsOk
(Object taskId) See if we can stop the task and it's okayprotected boolean
Is the task ok?protected void
Update the statusstatic void
userMessage
(String msg) Helper method to show a user messageprotected boolean
Is this chooser using the station mapMethods inherited from class ucar.unidata.ui.ChooserPanel
actionPerformed, addPropertyChangeListener, canDoUpdate, clearWaitCursor, doHelp, doLoad, doLoadInThread, doMakeContents, doUpdate, firePropertyChange, getButtonLabels, getDefaultButtons, getHaveData, getLoadCommandName, getLoadToolTip, getMessageTemplate, getSimpleMode, getStatusComponent, getUpdateToolTip, padLabel, registerStatusComp, revalidate, setHaveData, setHelpPath, setMessageTemplate, setStatus, setStatus, showNormalCursor, showWaitCursor
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, getBaseline, getBaselineResizeBehavior, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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, 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
PROP_CHOOSER_MAPS
Where we get the maps- See Also:
-
PROP_STATUS_FOREGROUND
status foreground color- See Also:
-
PROP_STATUS_BACKGROUND
status background color- See Also:
-
PROP_STATUS_TEMPLATE
status template- See Also:
-
PROP_CHOOSER_PROJECTION_BOUNDS
Where we get the projection bounds- See Also:
-
PROP_CHOOSERCLASSNAME
_more_- See Also:
-
NULL_PROPERTIES
Can pass in null properties. So instead of a null or casting null as a Hashtable we just define one here -
NULL_STRING
Like above, a handy way to pass in a null string -
PREF_DEFAULTDIR
Used by derived classes to save the last directory the user was in- See Also:
-
PREF_POLLINGINFO
Saves off the pollinginfo_- See Also:
-
PREF_CATALOGLIST
Used by derived classes to save the list of catalogs- See Also:
-
PREF_ADDESERVERS
Used by derived classes to save the list of adde servers- See Also:
-
PREF_IMAGEDESCLIST
Used by derived classes to save the list of image descriptors- See Also:
-
PREF_RADARDESCLIST
Used by derived classes to save the list of radar descriptors- See Also:
-
PREF_TDSRADARSERVER
Used by derived classes to save the list of tds radar servers- See Also:
-
PREF_TDSPOINTOBSERVER
Used by derived classes to save the list of tds point ob servers- See Also:
-
ATTR_ID
Name of the id attribute in the choosers.xml- See Also:
-
ATTR_SHOWDETAILS
Name of the details attribute in the choosers.xml- See Also:
-
ignoreDirHistory
protected boolean ignoreDirHistoryFor the dir history -
dirHistoryCbx
For the dir history -
stationMap
station location map
-
-
Constructor Details
-
IdvChooser
Create the chooser- Parameters:
idv
- The IDVchooserNode
- The Xml
-
IdvChooser
Create the chooser- Parameters:
chooserManager
- The manager of all of the chooserschooserNode
- The Xml
-
IdvChooser
Create the chooser- Parameters:
idv
- The IDVchooserManager
- The manager of all of the chooserschooserNode
- The Xml
-
-
Method Details
-
getStatusLabel
Create (if needed) and return the JLabel that shows the status messages.- Overrides:
getStatusLabel
in classChooserPanel
- Returns:
- The status label
-
decorateButtons
Add extra components to "decorate" the button panel- Parameters:
buttons
- button panel- Returns:
- decorated buttons
-
getDefaultButtons
Get the default buttons- Overrides:
getDefaultButtons
in classChooserPanel
- Parameters:
listener
- the listener- Returns:
- the button component
-
getDefaultDisplayType
Get the default display type- Returns:
- the name of the default display
-
getDataSourceProperties
Get the properties from the datasource- Parameters:
ht
- a Hashtable of properties
-
getDefaultMap
Get the default map to be used. For now needs to be a mcidas map.- Returns:
- Default map.
-
getDefaultMaps
Get the default map to be used. For now needs to be a mcidas map.- Returns:
- Default map.
-
initStationMap
Initialize the stations- Parameters:
stationMap
- The station map
-
createStationMap
Create the station map- Returns:
- The new station map.
-
usingStations
protected boolean usingStations()Is this chooser using the station map- Returns:
- Using stations.
-
haveStationSelected
protected boolean haveStationSelected()If there is a station map created then return whether there are any stations selected.- Returns:
- Any stations selected.
-
newSelectedStations
Notify of new selected stations.- Parameters:
stations
- Selected stations.
-
getStationMap
Create (if needed) and return the station map- Returns:
- The station map
-
getSelectedStations
Get list of selected stations, objects of ucar/unidata/metdata/NamedStationImpl class- Returns:
- list of selected stations
-
getSelectedStation
Get the first seleted station or null if none selected.- Returns:
- Get a selected station.
-
clearSelectedStations
protected void clearSelectedStations()Clear any selected stations. -
clearStations
protected void clearStations()Clear all stations in the station map. -
getHaveStations
protected boolean getHaveStations()Do we have stations- Returns:
- true if there is a station map and there are stations set
-
getDefaultProjection
protected ucar.unidata.geoloc.ProjectionImpl getDefaultProjection()Create and return the default projection used for the station map.- Returns:
- _Default map projection
-
getDefaultProjectionRect
protected ucar.unidata.geoloc.ProjectionRect getDefaultProjectionRect()Create and return the default projection rect used for the station map.- Returns:
- Default map projection rectangle
-
makeTimeMenus
Make time menus- Parameters:
listener
- the listener for this- Returns:
- a list of options for times from each display
-
getXmlNode
Get the xml node that defined this chooser- Returns:
- The chooser node
-
getAttribute
Utility to get the attribute from the chooser xml node. If there is one we'll also apply the global macros- Parameters:
name
- attr namedflt
- default value- Returns:
- attribute
-
getProperty
Utility to get a String property- Parameters:
name
- property namedflt
- default value- Returns:
- property or default
-
getProperty
Utility to get a boolean property- Parameters:
name
- property namedflt
- default value- Returns:
- property or default
-
getShowInMenu
public boolean getShowInMenu()Should this chooser entry be shown in the file menu- Returns:
- Show this chooser in the file menu?
-
getMenuTitle
Get the title to use for menu entries.- Returns:
- Menu title
-
getTitle
Get the title- Returns:
- The title
-
initChooserPanel
Initialize the given panel. Set the help path on it.- Parameters:
chooserPanel
- The panel to initialize.
-
getDataSourcesComponent
Return the component that holds the dataSources combo box- Returns:
- The GUI for the data sources selector
-
getDataSourcesComponent
Return the component that holds the dataSources combo box- Parameters:
justFileSources
- If true then just use data sources that access files- Returns:
- The GUI for the data sources selector
-
getDataSourcesComponent
Return the component that holds the dataSources combo box- Parameters:
justFileSources
- If true then just use data sources that access filesdataManager
- The data manager- Returns:
- The GUI for the data sources selector
-
getDataSourcesComponent
public static JComboBox getDataSourcesComponent(boolean justFileSources, DataManager dataManager, boolean addLucky) Get the component for listing data source types- Parameters:
justFileSources
- true for just filesdataManager
- the data manageraddLucky
- true to add the "I'm Feeiling Lucky" option- Returns:
- the component
-
getDataSourceId
If the dataSources combo box is non-null then return the data source id the user selected. Else, return null- Returns:
- Data source id
-
getDataSourceId
Get the data source ID for the particular item selected in the box- Parameters:
dataSourcesCbx
- the list of source descriptions- Returns:
- the id of the selected data source type
-
resetDataSourceId
protected void resetDataSourceId()Clear the dataSources combo box -
makeDataSource
Create the data source defined by the given definingObject (e.g., a string filename, a list of images, etc.- Parameters:
definingObject
- What defines the data sourceproperties
- extra properties- Returns:
- Was this creation successful
-
setDataSourceListener
Set the data source listener- Parameters:
listener
- the listener
-
isReloadable
public boolean isReloadable()_more_- Returns:
- _more_
-
makeDataSource
Create the data source defined by the given definingObject (ex: a string filename, a list of images). If dataType is non-null then it defines a data source id (defined in idv/resources/datasources.xml)Else the creation is done by looking at the string value of the defining object and seeing if it matches any of the patterns that are defined in datasources.xml
One more way to define what data source to create is to add the id into the properties Hashable using
DataManager.DATATYPE_ID
- Parameters:
definingObject
- What defines the data sourcedataType
- Define the data type to createproperties
- extra properties- Returns:
- Was this creation successful
-
startTask
Start the task- Returns:
- the task id
-
stopTask
Stop the task- Parameters:
taskId
- the task id
-
stopTaskAndIsOk
See if we can stop the task and it's okay- Parameters:
taskId
- the task id- Returns:
- true if ok
-
taskOk
Is the task ok?- Parameters:
taskId
- the task id- Returns:
- true if ok
-
showWaitCursor
public void showWaitCursor()show wait cursor- Overrides:
showWaitCursor
in classChooserPanel
-
showNormalCursor
public void showNormalCursor()show regular cursor- Overrides:
showNormalCursor
in classChooserPanel
-
doClose
public void doClose()Close the chooser window- Overrides:
doClose
in classChooserPanel
-
doCancel
public void doCancel()Handle a cancel- Overrides:
doCancel
in classChooserPanel
-
closeChooser
protected void closeChooser()Close the chooser window -
init
protected void init()Initialize after creation -
shouldDoUpdateOnFirstDisplay
protected boolean shouldDoUpdateOnFirstDisplay()As the name implies should this chooser do call doUpdate the first time it is painted. This is a hook for derived classes to specify this behavior.- Returns:
- Should update
-
getContents
Create and return the GUI contents.- Overrides:
getContents
in classChooserPanel
- Returns:
- The GUI
-
updateStatus
protected void updateStatus()Update the status- Overrides:
updateStatus
in classChooserPanel
-
getDataManager
Return theDataManager
- Returns:
- The data manager
-
getId
Return the id- Returns:
- The id
-
getIdv
Getter method to return the IDV- Returns:
- The idv
-
logException
Helper method that calls LogUtil.printException- Overrides:
logException
in classChooserPanel
- Parameters:
msg
- The messageexc
- The exception
-
errorMessage
Helper method to show a user error message- Parameters:
msg
- The message
-
userMessage
Helper method to show a user message- Parameters:
msg
- The message
-
getPreferenceList
Find thePreferenceList
associated with the given property.- Parameters:
listProp
- The property name- Returns:
- The PreferenceList
-
getPreferenceList
Find thePreferenceList
associated with the given property.- Parameters:
listProp
- The property namemergeTheIdvProperty
- If true, then we also lookup the String property from the IDV and merge it into the list.- Returns:
- The PreferenceList
-
getPreferenceList
public PreferenceList getPreferenceList(String listProp, boolean mergeTheIdvProperty, String butNotThisOne) Find thePreferenceList
associated with the given listProp.- Parameters:
listProp
- The property keymergeTheIdvProperty
- If true, then we also lookup the String property from the IDV and merge it into the list.butNotThisOne
- If non-null then we don't include this property. This is used to remove old catalogs from the XmlChooser's list- Returns:
- The PreferenceList
-
getPreferenceList
public PreferenceList getPreferenceList(String listProp, boolean mergeTheIdvProperty, List butNotThese) Find thePreferenceList
associated with the given listProp.- Parameters:
listProp
- The property keymergeTheIdvProperty
- If true, then we also lookup the String property from the IDV and merge it into the list.butNotThese
- If non-null or empty then we don't include these properties. This is used to remove old values from the list- Returns:
- The PreferenceList
-
getPropList
Find the list (of Strings) defined by the property name- Parameters:
property
- The property namemergeTheIdvProperty
- If true, then we also lookup the String property from the IDV and merge it into the list.- Returns:
- Property list
-
getStatusLabelBackground
get the status label background color- Overrides:
getStatusLabelBackground
in classChooserPanel
- Returns:
- the status label background color
-
getStatusLabelForeground
Get the status label foreground color- Overrides:
getStatusLabelForeground
in classChooserPanel
- Returns:
- the status label foreground color
-
setDataSource
Set the DataSource property.- Parameters:
value
- The new value for DataSource
-
getDataSource
Get the DataSource property.- Returns:
- The DataSource
-