public class ColorWidget extends Applet implements ColorChangeListener
Applet.AccessibleAppletPanel.AccessibleAWTPanelContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategyBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
ColorWidget()
Construct a color widget with a ColorPreview and the default ColorMap
|
ColorWidget(boolean preview)
Construct a color widget with the default ColorMap
|
ColorWidget(ColorMap map)
Construct a color widget with a ColorPreview and the specified ColorMap
|
ColorWidget(ColorMap map,
boolean preview)
Construct a color widget with the desired ColorMap and ColorPreview visibility
|
| Modifier and Type | Method and Description |
|---|---|
void |
addColorChangeListener(ColorChangeListener c)
Add a ColorChangeListener to the listeners list
|
void |
colorChanged(ColorChangeEvent e)
Listen to the ColorMap and re-dispatch the ColorChangeEvents to
the ColorChangeListeners listening to the widget
|
ColorMap |
getColorMap()
Returns the ColorMap that the color wdget is curently pointing to
|
Dimension |
getPreferredSize()
Analyses the visible components and determines the preferred size
|
void |
hidePreview()
Hide the preview bar at the bottom of the widget
|
static void |
main(String[] argv)
main method for standalone testing
|
protected void |
notifyListeners(ColorChangeEvent e)
Notify the ColorChangeListerers that the color widget has changed
|
void |
removeColorChangeListener(ColorChangeListener c)
Remove a ColorChangeListener from the listeners list
|
void |
setColorMap(ColorMap map)
Set the ColorWidget to listen to a specific ColorMap
|
void |
showPreview()
Make the preview bar at the bottom of the widget visible
|
destroy, getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, init, isActive, isValidateRoot, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stopadd, 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, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, 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, 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, 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, transferFocusUpCyclepublic ColorWidget()
throws RemoteException,
VisADException
RemoteExceptionVisADExceptionpublic ColorWidget(boolean preview)
throws RemoteException,
VisADException
preview - indicates wether or not the preview bar at the
bottom of the widget should be presentRemoteExceptionVisADExceptionpublic ColorWidget(ColorMap map)
map - the ColorMap for the widget to usepublic ColorWidget(ColorMap map, boolean preview)
map - the ColorMap for the widget to usepreview - indicates wether or not the preview bar at the
bottom of the widget should be presentpublic static void main(String[] argv) throws RemoteException, VisADException
RemoteExceptionVisADExceptionpublic void addColorChangeListener(ColorChangeListener c)
public void removeColorChangeListener(ColorChangeListener c)
protected void notifyListeners(ColorChangeEvent e)
public void colorChanged(ColorChangeEvent e)
colorChanged in interface ColorChangeListenerpublic void setColorMap(ColorMap map)
public void showPreview()
public void hidePreview()
public ColorMap getColorMap()
public Dimension getPreferredSize()
getPreferredSize in class ContainerCopyright © 1996–2023 The SSEC Visualization Project. All rights reserved.