ucar.unidata.idv.control
Class RangeDialog

java.lang.Object
  extended by ucar.unidata.idv.control.RangeDialog
All Implemented Interfaces:
RangeWidget

public class RangeDialog
extends Object
implements RangeWidget

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

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

Constructor Summary
RangeDialog(DisplayControlImpl displayControl, Range r, String title, String setRangeMethod)
          Construct the widget.
RangeDialog(DisplayControlImpl displayControl, Range r, String title, String setRangeMethod, Component launcher)
          Construct the widget.
 
Method Summary
protected  void dispose()
          Dispose of the dialog
 void doMakeDialog()
          Change the range
 void logException(String message, Exception exc)
          Utility method to log an exception.
 void rangePopup()
          Show the change range dialog
 void setRangeDialog(Range r)
          Set the value in the min max fields in the range dialog
 void setRangeFromPopup(String cmd)
          Set the range in the dialog
 void showDialog()
          Show the dialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RangeDialog

public RangeDialog(DisplayControlImpl displayControl,
                   Range r,
                   String title,
                   String setRangeMethod)
Construct the widget.

Parameters:
displayControl - The display
r - the initial range
title - title for frame
setRangeMethod - the method to call on the displaycontrol for change

RangeDialog

public RangeDialog(DisplayControlImpl displayControl,
                   Range r,
                   String title,
                   String setRangeMethod,
                   Component launcher)
Construct the widget.

Parameters:
displayControl - The display
r - the initial range
title - title for frame
setRangeMethod - the method to call on the displaycontrol for change
launcher - a component to place this near (can be null);
Method Detail

doMakeDialog

public void doMakeDialog()
Change the range


showDialog

public void showDialog()
Show the dialog


setRangeFromPopup

public void setRangeFromPopup(String cmd)
Set the range in the dialog

Parameters:
cmd - Which one

setRangeDialog

public void setRangeDialog(Range r)
Set the value in the min max fields in the range dialog

Specified by:
setRangeDialog in interface RangeWidget
Parameters:
r - The range

rangePopup

public void rangePopup()
Show the change range dialog


logException

public void logException(String message,
                         Exception exc)
Utility method to log an exception.

Parameters:
message - The message
exc - The exception

dispose

protected void dispose()
Dispose of the dialog