ucar.unidata.idv.ui
Class ContourInfoDialog

java.lang.Object
  extended by ucar.unidata.idv.ui.ContourInfoDialog
All Implemented Interfaces:
ActionListener, EventListener
Direct Known Subclasses:
ContLevelDialog

public class ContourInfoDialog
extends Object
implements ActionListener

A JFrame widget to get contouring info from the user. The code to handle button events and actions is in the event Listeners appearing in the constructor.

Version:
$Revision: 1.21 $
Author:
Unidata Development Team

Constructor Summary
ContourInfoDialog(String title, boolean showApplyBtn)
          Construct the widget.
ContourInfoDialog(String title, boolean showApplyBtn, Unit unit)
          Construct the widget.
ContourInfoDialog(String title, boolean showApplyBtn, Unit unit, boolean doDialog)
          ctor
 
Method Summary
 void actionPerformed(ActionEvent evt)
          Show the dialog box and wait for results and deal with them (ok or cancel).
protected  boolean doApply()
          Apply the state to the display
 JComponent getContents()
          get the gui contents
 ContourInfo getInfo()
          Get the info
 void setState(ContourInfo transfer)
          Show the dialog box and wait for results and deal with them.
 boolean showDialog(ContourInfo transfer)
          Show the dialog box and wait for results and deal with them.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContourInfoDialog

public ContourInfoDialog(String title,
                         boolean showApplyBtn)
Construct the widget. with interval, min, max entry boxes and ok and cancel buttons.

Parameters:
title - title for frame
showApplyBtn - Should we show the apply button

ContourInfoDialog

public ContourInfoDialog(String title,
                         boolean showApplyBtn,
                         Unit unit)
Construct the widget. with interval, min, max entry boxes and ok and cancel buttons.

Parameters:
title - title for frame
showApplyBtn - Should we show the apply button
unit - Unit to show. May be null.

ContourInfoDialog

public ContourInfoDialog(String title,
                         boolean showApplyBtn,
                         Unit unit,
                         boolean doDialog)
ctor

Parameters:
title - title for frame
showApplyBtn - Should we show the apply button
unit - Unit to show. May be null.
doDialog - show as dialog
Method Detail

getContents

public JComponent getContents()
get the gui contents

Returns:
gui contents

doApply

protected boolean doApply()
Apply the state to the display

Returns:
Was this successful

actionPerformed

public void actionPerformed(ActionEvent evt)
Show the dialog box and wait for results and deal with them (ok or cancel).

Specified by:
actionPerformed in interface ActionListener
Parameters:
evt - ActionEvent

showDialog

public boolean showDialog(ContourInfo transfer)
Show the dialog box and wait for results and deal with them.

Parameters:
transfer - a ContourInfo data object to transfer all values
Returns:
boolean if the user enterd data ok.

setState

public void setState(ContourInfo transfer)
Show the dialog box and wait for results and deal with them.

Parameters:
transfer - a ContourInfo data object to transfer all values

getInfo

public ContourInfo getInfo()
Get the info

Returns:
The info