ucar.unidata.idv.control
Class ControlWidget

java.lang.Object
  extended by ucar.unidata.idv.control.ControlWidget
All Implemented Interfaces:
ActionListener, EventListener
Direct Known Subclasses:
ColorTableWidget, ContourWidget, SelectRangeWidget, WrapperWidget

public class ControlWidget
extends Object
implements ActionListener

A widget for a control.

Version:
$Revision: 1.15 $
Author:
Jeff McWhirter

Constructor Summary
ControlWidget(DisplayControlImpl displayControl)
          Construct a new ControlWidget
 
Method Summary
 void actionPerformed(ActionEvent ae)
          Public as a result of implementing ActionListener
 void doRemove()
          Remove the reference to the displayControl
static List fillList(List widgets)
          Fill a list of widgets.
 void fillList(List l, int columns)
          Fill a list of widgets.
static List fillList(List components, List widgets)
          Fill a list of widgets.
 DisplayControlImpl getDisplayControl()
          Get the DisplayControl that this widget is associated with.
 DisplayConventions getDisplayConventions()
          Get the display conventions from the contol
 void logException(String message, Exception exc)
          Utility method to log an exception.
 void userMessage(String message)
          Utility method to notify the user with a message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControlWidget

public ControlWidget(DisplayControlImpl displayControl)
Construct a new ControlWidget

Parameters:
displayControl - associated DisplayContol
Method Detail

doRemove

public void doRemove()
Remove the reference to the displayControl


actionPerformed

public void actionPerformed(ActionEvent ae)
Public as a result of implementing ActionListener

Specified by:
actionPerformed in interface ActionListener
Parameters:
ae - ActionEvent to act on

fillList

public void fillList(List l,
                     int columns)
Fill a list of widgets.

Parameters:
l - list to fill
columns - number of columns for layout

fillList

public static List fillList(List components,
                            List widgets)
Fill a list of widgets.

Parameters:
components - components
widgets - widgets for components
Returns:
filled list

fillList

public static List fillList(List widgets)
Fill a list of widgets.

Parameters:
widgets - widgets to add to
Returns:
filled list

getDisplayConventions

public DisplayConventions getDisplayConventions()
Get the display conventions from the contol

Returns:
The DisplayConventions to use.

logException

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

Parameters:
message - The message
exc - The exception

userMessage

public void userMessage(String message)
Utility method to notify the user with a message

Parameters:
message - The message

getDisplayControl

public DisplayControlImpl getDisplayControl()
Get the DisplayControl that this widget is associated with.

Returns:
the DisplayControl