Package ucar.unidata.idv.ui
Class DataSelectionWidget
java.lang.Object
ucar.unidata.idv.ui.DataSelectionWidget
This class is a sortof polymorphic dialog/window that manages selection
of times for a datasource, displays/times for a datachoice and (sometime)
a window showing a DataTree, list of displays and times.
- Version:
- $Revision: 1.98 $
- Author:
- Jeff McWhirter
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for when we are a part of theDataSelectorDataSelectionWidget(IntegratedDataViewer idv, boolean doSettings) Constructor for when we are a part of theDataSelectorDataSelectionWidget(IntegratedDataViewer idv, boolean doSettings, boolean doUseDisplay) Constructor for when we are a part of theDataSelector -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanCheck the current active view window and make sure it does has a time driver, otherwise, reset the active view windowcreateDataSelection(boolean addLevels) Create the data selection from everything selected by the uservoiddataSourceChanged(DataSource dataSource) Called by the DataSelector to handle when the data source has changedGet the list of all dttmsget the gui contentsbooleanGet the DefaultLevelToFirst property.booleanGet the DefaultMemberToAll property.Any geo selectionbooleanReturn a list of Integer indices of the selected times.protected Object[]Get the min/max level rangeReturn a list of Integer indices of the selected members.protected ListGet list of selected DisplaySettingsGet the time option typeCreate the GUI for the times list.getTimesList(String cbxLabel) Create the GUI for the times list.booleanDid user choose "Use all times"booleanokToCreateTheDisplay(boolean addLevels) Check if everything is OK so we can create a display.voidsetDefaultLevelToFirst(boolean value) Set the DefaultLevelToFirst property.voidsetDefaultMemberToAll(boolean value) Get the DefaultMemberToAll property.voidsetLevelsFromDisplay(List levels) Set levels from the displayvoidsetTimeOptions(String selectedObject) Set the time option from the selected objectvoidSelect the times in the times listvoidsetUseAllTimes(boolean useAllTimes) Set the use all times flagprotected voidupdateSelectionTab(DataChoice dataChoice) Update the tabbed paneprotected booleanupdateSelectionTab(DataSource dataSource, DataChoice dc) Update selection panel for data sourceprotected voidUpdate the display settings
-
Field Details
-
USE_DEFAULTTIMES
use default times identifier- See Also:
-
USE_SELECTEDTIMES
use selected times identifier- See Also:
-
USE_DRIVERTIMES
use time driver times- See Also:
-
AS_DRIVERTIMES
as time driver- See Also:
-
USE_DEFAULTREGION
_more_
-
-
Constructor Details
-
DataSelectionWidget
Constructor for when we are a part of theDataSelector- Parameters:
idv- Reference to the IDV
-
DataSelectionWidget
Constructor for when we are a part of theDataSelector- Parameters:
idv- Reference to the IDVdoSettings- include the display settings in the tab
-
DataSelectionWidget
Constructor for when we are a part of theDataSelector- Parameters:
idv- Reference to the IDVdoSettings- include the display settings in the tabdoUseDisplay- true to use display times
-
-
Method Details
-
getContents
get the gui contents- Returns:
- gui contents
-
dataSourceChanged
Called by the DataSelector to handle when the data source has changed- Parameters:
dataSource- The data source that changed
-
getGeoSelection
Any geo selection- Returns:
- the geoselection or null if none
-
getSelectedLevelRange
Get the min/max level range- Returns:
- min max levels
-
updateSettings
Update the display settings- Parameters:
cd- new control descriptor
-
updateSelectionTab
Update the tabbed pane- Parameters:
dataChoice- new data choice
-
updateSelectionTab
Update selection panel for data source- Parameters:
dataSource- data sourcedc- The data choice- Returns:
- true if successful
-
createDataSelection
Create the data selection from everything selected by the user- Parameters:
addLevels- include the levels- Returns:
- new data selection
-
getIsProgressiveResolution
public boolean getIsProgressiveResolution() -
okToCreateTheDisplay
public boolean okToCreateTheDisplay(boolean addLevels) Check if everything is OK so we can create a display. This just checks if the current data choice requires a volume and that the user has selected Either "All Levels" or a range of levels- Parameters:
addLevels- Does the display need levels- Returns:
- Is it ok to create the display
-
getSelectedSettings
Get list of selected DisplaySettings- Returns:
- list of selected DisplaySettings
-
getAllDateTimes
Get the list of all dttms- Returns:
- List of times
-
getSelectedDateTimes
Return a list of Integer indices of the selected times.- Returns:
- List of indices.
-
getSelectedMembers
Return a list of Integer indices of the selected members.- Returns:
- List of indices.
-
getUseAllTimes
public boolean getUseAllTimes()Did user choose "Use all times"- Returns:
- Is the allTimes checkbox selected or true if checkbox not created
-
setTimes
Select the times in the times list- Parameters:
all- All timesselected- The selected times
-
setUseAllTimes
public void setUseAllTimes(boolean useAllTimes) Set the use all times flag- Parameters:
useAllTimes- true to use all times
-
getTimesList
Create the GUI for the times list. (i.e., all times button and the times JList)- Returns:
- The GUI for times
-
getTimesList
Create the GUI for the times list. (i.e., all times button and the times JList)- Parameters:
cbxLabel- Label for times checkbox- Returns:
- The GUI for times
-
setTimeOptions
Set the time option from the selected object- Parameters:
selectedObject- the selected time mode
-
checkActiveViewWithDriver
protected boolean checkActiveViewWithDriver()Check the current active view window and make sure it does has a time driver, otherwise, reset the active view window- Returns:
- true if active view has time driver
-
getTimeOption
Get the time option type- Returns:
- time s
-
setLevelsFromDisplay
Set levels from the display- Parameters:
levels- the list of levels
-
setDefaultLevelToFirst
public void setDefaultLevelToFirst(boolean value) Set the DefaultLevelToFirst property.- Parameters:
value- The new value for DefaultLevelToFirst
-
getDefaultLevelToFirst
public boolean getDefaultLevelToFirst()Get the DefaultLevelToFirst property.- Returns:
- The DefaultLevelToFirst
-
setDefaultMemberToAll
public void setDefaultMemberToAll(boolean value) Get the DefaultMemberToAll property. The DefaultMemberToAll- Parameters:
value- tru to set the default member to all
-
getDefaultMemberToAll
public boolean getDefaultMemberToAll()Get the DefaultMemberToAll property.- Returns:
- The DefaultMemberToAll
-