ucar.unidata.idv.control
Class ColorScaleDialog

java.lang.Object
  extended by ucar.unidata.idv.control.ColorScaleDialog
All Implemented Interfaces:
ActionListener, EventListener

public class ColorScaleDialog
extends Object
implements ActionListener

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

Author:
Unidata Development Team

Constructor Summary
ColorScaleDialog(DisplayControlImpl displayControl, String title, ColorScaleInfo info, boolean showDialog)
          Construct the widget.
 
Method Summary
 void actionPerformed(ActionEvent evt)
          Show the dialog box and wait for results and deal with them (ok or cancel).
protected  void dispose()
          Dispose of the dialog
protected  boolean doApply()
          Apply the state to the display
 JComponent getContents()
          Get the main contents of the dialog
 ColorScaleInfo getInfo()
          Get the info
 boolean getOk()
          Was ok pressed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorScaleDialog

public ColorScaleDialog(DisplayControlImpl displayControl,
                        String title,
                        ColorScaleInfo info,
                        boolean showDialog)
Construct the widget. with interval, min, max entry boxes and ok and cancel buttons.

Parameters:
displayControl - The display
title - title for frame
info - the color scale info
showDialog - true to show the dialog
Method Detail

getContents

public JComponent getContents()
Get the main contents of the dialog

Returns:
the contents

dispose

protected void dispose()
Dispose of the dialog


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

getInfo

public ColorScaleInfo getInfo()
Get the info

Returns:
The info

getOk

public boolean getOk()
Was ok pressed

Returns:
was ok pressed