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 theDataSelector
DataControlDialog
(IntegratedDataViewer idv, DataChoice dataChoice, int x, int y) Constructor for configuring aDataChoice
-
Method Summary
Modifier and TypeMethodDescriptionvoid
actionPerformed
(ActionEvent event) Handle OK, APPLY and CANCEL eventsvoid
We keep track of the "Create" buttons so we can enable/disable themvoid
dataSourceChanged
(DataSource dataSource) Called by the DataSelector to handle when the data source has changedvoid
Be notified of a change to the display templatesvoid
dispose()
Dispose of the dialog window (if it is created) and remove this object from the IDV's list of DataControlDialog-svoid
doClose()
Calls dispose, nulls out references (for leaks), etc.doMakeDataChoiceDialog
(DataChoice dataChoice) Make the GUI for configuring aDataChoice
protected void
doMakeWindow
(JComponent contents, int x, int y) Make a new window with the given GUI contents and position it at the given screen locationvoid
doOk()
Call doApply and close the windowReturn the gui contentsGet theDataChoice
we are representingGet the data selection widgetReturn theDataSource
we are configuringprotected ControlDescriptor
Return theControlDescriptor
that is currently selectedObject[]
Find and return the array of selectedControlDescriptor
-svoid
Utility to set the cursor on the gui contentsvoid
Set theDataChoice
we are representingvoid
Set 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
- TheDataChoice
we 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 theControlDescriptor
that 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 theDataChoice
we are representing- Parameters:
dc
- The currentDataChoice
-
getDataSource
Return theDataSource
we are configuring- Returns:
- The
DataSource
-
getDataChoice
Get theDataChoice
we 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:
actionPerformed
in interfaceActionListener
- Parameters:
event
- The event
-