Package ucar.unidata.idv.ui
Class DataControlDialog
java.lang.Object
ucar.unidata.idv.ui.DataControlDialog
- All Implemented Interfaces:
ActionListener,EventListener
This class provides a list of the display controls and the data selection dialog
- Version:
- $Revision: 1.98 $
- Author:
- Jeff McWhirter
-
Constructor Summary
ConstructorsConstructorDescriptionDataControlDialog(IntegratedDataViewer idv, boolean inOwnWindow, boolean horizontalOrientation) Constructor for when we are a part of theDataSelectorDataControlDialog(IntegratedDataViewer idv, DataChoice dataChoice, int x, int y) Constructor for configuring aDataChoice -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) Handle OK, APPLY and CANCEL eventsvoidWe keep track of the "Create" buttons so we can enable/disable themvoiddataSourceChanged(DataSource dataSource) Called by the DataSelector to handle when the data source has changedvoidBe notified of a change to the display templatesvoiddispose()Dispose of the dialog window (if it is created) and remove this object from the IDV's list of DataControlDialog-svoiddoClose()Calls dispose, nulls out references (for leaks), etc.doMakeDataChoiceDialog(DataChoice dataChoice) Make the GUI for configuring aDataChoiceprotected voiddoMakeWindow(JComponent contents, int x, int y) Make a new window with the given GUI contents and position it at the given screen locationvoiddoOk()Call doApply and close the windowReturn the gui contentsGet theDataChoicewe are representingGet the data selection widgetReturn theDataSourcewe are configuringprotected ControlDescriptorReturn theControlDescriptorthat is currently selectedObject[]Find and return the array of selectedControlDescriptor-svoidUtility to set the cursor on the gui contentsvoidSet theDataChoicewe are representingvoidSet the data source
-
Constructor Details
-
DataControlDialog
public DataControlDialog(IntegratedDataViewer idv, boolean inOwnWindow, boolean horizontalOrientation) Constructor for when we are a part of theDataSelector- Parameters:
idv- Reference to the IDVinOwnWindow- Should this object be in its own windowhorizontalOrientation- Show display/times hor?
-
DataControlDialog
Constructor for configuring aDataChoice- Parameters:
idv- Reference to the IDVdataChoice- TheDataChoicewe are configuringx- X position on the screen to show windowy- Y position on the screen to show window
-
-
Method Details
-
addCreateButton
We keep track of the "Create" buttons so we can enable/disable them- Parameters:
b- The create button to add into the list
-
getContents
Return the gui contents- Returns:
- The gui contents
-
setCursor
Utility to set the cursor on the gui contents- Parameters:
cursor- The cursor to set
-
setDataSource
Set the data source- Parameters:
ds- The new data source
-
dataSourceChanged
Called by the DataSelector to handle when the data source has changed- Parameters:
dataSource- The data source that changed
-
getSelectedControl
Return theControlDescriptorthat is currently selected- Returns:
- Selected ControlDescriptor
-
getSelectedControls
Find and return the array of selectedControlDescriptor-s- Returns:
- Select control descriptors
-
displayTemplatesChanged
public void displayTemplatesChanged()Be notified of a change to the display templates -
setDataChoice
Set theDataChoicewe are representing- Parameters:
dc- The currentDataChoice
-
getDataSource
Return theDataSourcewe are configuring- Returns:
- The
DataSource
-
getDataChoice
Get theDataChoicewe are representing- Returns:
- The current
DataChoice
-
doMakeDataChoiceDialog
Make the GUI for configuring aDataChoice- Parameters:
dataChoice- The DataChoice- Returns:
- The GUI
-
getDataSelectionWidget
Get the data selection widget- Returns:
- data selection widget
-
doMakeWindow
Make a new window with the given GUI contents and position it at the given screen location- Parameters:
contents- Gui contentsx- Screen xy- Screen y
-
dispose
public void dispose()Dispose of the dialog window (if it is created) and remove this object from the IDV's list of DataControlDialog-s -
doClose
public void doClose()Calls dispose, nulls out references (for leaks), etc. -
doOk
public void doOk()Call doApply and close the window -
actionPerformed
Handle OK, APPLY and CANCEL events- Specified by:
actionPerformedin interfaceActionListener- Parameters:
event- The event
-