public abstract class Widget
extends java.awt.Panel
| Modifier and Type | Field and Description |
|---|---|
protected static boolean |
DEBUG
Debugging flag.
|
protected static java.lang.String |
FALSE
Coded string value for false.
|
protected static java.awt.Color |
PALE_GRAY |
protected static java.lang.String |
TRUE
Coded string value for true.
|
| Constructor and Description |
|---|
Widget()
Performs GUI setup common to all widgets.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addComponent(java.awt.Component c,
java.awt.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 java.lang.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(java.lang.String save)
Reconstructs this widget's state using the specified save string.
|
protected void |
testWidget()
Pops up a frame to test this widget.
|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, isValidateRoot, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, update, validate, validateTreeaction, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, 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, getMousePosition, 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, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected static final boolean DEBUG
protected static final java.lang.String TRUE
protected static final java.lang.String FALSE
protected static final java.awt.Color PALE_GRAY
public static boolean containedIn(int px,
int py,
int x,
int y,
int w,
int h)
protected void addComponent(java.awt.Component c,
java.awt.GridBagLayout layout,
int x,
int y,
int w,
int h,
double wx,
double wy)
protected void testWidget()
public void addWidgetListener(WidgetListener l)
public void removeWidgetListener(WidgetListener l)
public void notifyListeners(WidgetEvent e)
public abstract java.lang.String getSaveString()
public abstract void setSaveString(java.lang.String save)