Documentation of 'visad.util.ColorWidget' Java class
ColorWidget
visad.util

Class ColorWidget

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, ColorChangeListener


    public class ColorWidget
    extends java.applet.Applet
    implements ColorChangeListener
    A color widget that allows users to interactively map numeric data to RGBA tuples based on the Vis5D color widget
    Since:
    Visad Utility Library, 0.5
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.BaselineResizeBehavior
    • Field Summary

      • 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

      Constructors 
      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
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      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
      java.awt.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(java.lang.String[] argv)
      main method for standalone testing
      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
      • Methods inherited from class java.applet.Applet

        destroy, getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, init, isActive, isValidateRoot, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
      • Methods inherited from class java.awt.Panel

        addNotify
      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, 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, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, update, validate
      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, 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, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ColorWidget

        public ColorWidget()
                    throws java.rmi.RemoteException,
                           VisADException
        Construct a color widget with a ColorPreview and the default ColorMap
        Throws:
        java.rmi.RemoteException
        VisADException
      • ColorWidget

        public ColorWidget(boolean preview)
                    throws java.rmi.RemoteException,
                           VisADException
        Construct a color widget with the default ColorMap
        Parameters:
        preview - indicates wether or not the preview bar at the bottom of the widget should be present
        Throws:
        java.rmi.RemoteException
        VisADException
      • ColorWidget

        public ColorWidget(ColorMap map)
        Construct a color widget with a ColorPreview and the specified ColorMap
        Parameters:
        map - the ColorMap for the widget to use
      • ColorWidget

        public ColorWidget(ColorMap map,
                           boolean preview)
        Construct a color widget with the desired ColorMap and ColorPreview visibility
        Parameters:
        map - the ColorMap for the widget to use
        preview - indicates wether or not the preview bar at the bottom of the widget should be present
    • Method Detail

      • main

        public static void main(java.lang.String[] argv)
                         throws java.rmi.RemoteException,
                                VisADException
        main method for standalone testing
        Throws:
        java.rmi.RemoteException
        VisADException
      • addColorChangeListener

        public void addColorChangeListener(ColorChangeListener c)
        Add a ColorChangeListener to the listeners list
      • removeColorChangeListener

        public void removeColorChangeListener(ColorChangeListener c)
        Remove a ColorChangeListener from the listeners list
      • colorChanged

        public void colorChanged(ColorChangeEvent e)
        Listen to the ColorMap and re-dispatch the ColorChangeEvents to the ColorChangeListeners listening to the widget
        Specified by:
        colorChanged in interface ColorChangeListener
      • setColorMap

        public void setColorMap(ColorMap map)
        Set the ColorWidget to listen to a specific ColorMap
      • showPreview

        public void showPreview()
        Make the preview bar at the bottom of the widget visible
      • hidePreview

        public void hidePreview()
        Hide the preview bar at the bottom of the widget
      • getColorMap

        public ColorMap getColorMap()
        Returns the ColorMap that the color wdget is curently pointing to
      • getPreferredSize

        public java.awt.Dimension getPreferredSize()
        Analyses the visible components and determines the preferred size
        Overrides:
        getPreferredSize in class java.awt.Container

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.