## visad.browser
Class Widget

    java.lang.Object
      java.awt.Component
          java.awt.Container
              java.awt.Panel
                  visad.browser.Widget

All Implemented Interfaces:
  Accessible, ImageObserver, MenuContainer, Serializable

Direct Known Subclasses:
  ContourWidget, GMCWidget

public abstract class Widget
extends Panel

Abstract superclass for all browser widgets.

See Also:
  Serialized Form

Nested Class Summary

Nested classes inherited from class java.awt.Panel
`Panel.AccessibleAWTPanel`

Nested classes inherited from class java.awt.Container
`Container.AccessibleAWTContainer`

Nested classes inherited from class java.awt.Component
`Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy`

Field Summary
`protected static boolean` `DEBUG` Debugging flag.
`protected static String` `FALSE` Coded string value for false.
`protected static Color` `PALE_GRAY`
`protected static String` `TRUE` Coded string value for true.

Fields inherited from class java.awt.Container
``

Fields inherited from class java.awt.Component
`BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

Fields inherited from interface java.awt.image.ImageObserver
`ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

Constructor Summary
`Widget()` Performs GUI setup common to all widgets.

Method Summary
`protected void` `addComponent(Component c, GridBagLayout layout, int x, int y, int w, int h, double wx, double wy)` Adds a component to the applet with the specified constraints.
`void` `addWidgetListener(WidgetListener l)` Adds a widget listener.
`static boolean` `containedIn(int px, int py, int x, int y, int w, int h)` Returns true if (px, py) is inside (x, y, w, h)
`abstract String` `getSaveString()` Gets a string representing this widget's current state.
`void` `notifyListeners(WidgetEvent e)` Notifies all widget listeners of the given widget event.
`void` `removeWidgetListener(WidgetListener l)` Removes a widget listener.
`abstract void` `setSaveString(String save)` Reconstructs this widget's state using the specified save string.
`protected void` `testWidget()` Pops up a frame to test this widget.

Methods inherited from class java.awt.Panel
`addNotify, getAccessibleContext`

Methods inherited from class java.awt.Container

`add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree`

Methods inherited from class java.awt.Component

`action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### DEBUG

    protected static final boolean DEBUG

  Debugging flag.

  See Also:
    Constant Field Values

### TRUE

    protected static final String TRUE

  Coded string value for true.

  See Also:
    Constant Field Values

### FALSE

    protected static final String FALSE

  Coded string value for false.

  See Also:
    Constant Field Values

### PALE_GRAY

    protected static final Color PALE_GRAY

Constructor Detail

### Widget

    public Widget()

  Performs GUI setup common to all widgets.

Method Detail

### containedIn

    public static boolean containedIn(int px,
                                      int py,
                                      int x,
                                      int y,
                                      int w,
                                      int h)

  Returns true if (px, py) is inside (x, y, w, h)

### addComponent

    protected void addComponent(Component c,
                                GridBagLayout layout,
                                int x,
                                int y,
                                int w,
                                int h,
                                double wx,
                                double wy)

  Adds a component to the applet with the specified constraints.

### testWidget

    protected void testWidget()

  Pops up a frame to test this widget.

### addWidgetListener

    public void addWidgetListener(WidgetListener l)

  Adds a widget listener.

### removeWidgetListener

    public void removeWidgetListener(WidgetListener l)

  Removes a widget listener.

### notifyListeners

    public void notifyListeners(WidgetEvent e)

  Notifies all widget listeners of the given widget event.

### getSaveString

    public abstract String getSaveString()

  Gets a string representing this widget's current state.

### setSaveString

    public abstract void setSaveString(String save)

  Reconstructs this widget's state using the specified save string.