## visad.util
Class SimpleColorMapWidget

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  javax.swing.JPanel
                      visad.util.SimpleColorMapWidget

All Implemented Interfaces:
  Accessible, ImageObserver, MenuContainer, Serializable

Direct Known Subclasses:
  ColorMapWidget

public class SimpleColorMapWidget
extends JPanel

A "simple" color widget that allows users to interactively map numeric data to RGB/RGBA color maps.

See Also:
  Serialized Form

Nested Class Summary

Nested classes inherited from class javax.swing.JPanel
`JPanel.AccessibleJPanel`

Nested classes inherited from class javax.swing.JComponent
`JComponent.AccessibleJComponent`

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
`(package private) BaseRGBMap` `baseMap`
`(package private) ColorPreview` `preview`
`(package private) ArrowSlider` `slider`

Fields inherited from class javax.swing.JComponent
`accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW`

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
`SimpleColorMapWidget(String name, Control ctl, float min, float max)` Construct a `SimpleColorMapWidget`.
`SimpleColorMapWidget(String name, float[][] in_table, float min, float max)` Deprecated. Use SimpleColorMapWidget(String, BaseColorControl, float, float)

Method Summary
`(package private) static float[][]` `copy_table(float[][] table)` Utility routine used to make a copy of a 2D `float` array.
`BaseRGBMap` `getBaseMap()`
`ColorPreview` `getPreview()`
`ArrowSlider` `getSlider()`
`static void` `main(String[] args)`
`(package private) void` `rebuildGUI()`
`void` `setTable(float[][] table)` Use a new table of color values.
`(package private) static float[][]` `table_reorg(float[][] table)` Utility routine used convert a table with dimensions `[X][Y]` to a table with dimensions `[Y][X]`.
`(package private) void` `updateSlider(float min, float max)` Internal convenience routine used to update the slider.

Methods inherited from class javax.swing.JPanel
`getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI`

Methods inherited from class javax.swing.JComponent

`addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update`

Methods inherited from class java.awt.Container

`add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, 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

### baseMap

    BaseRGBMap baseMap

### preview

    ColorPreview preview

### slider

    ArrowSlider slider

Constructor Detail

### SimpleColorMapWidget

    public SimpleColorMapWidget(String name,
                                float[][] in_table,
                                float min,
                                float max)
                         throws RemoteException,
                                VisADException

  Deprecated. Use SimpleColorMapWidget(String, BaseColorControl, float, float)

  Construct a `SimpleColorMapWidget`. The initial color table (if non-null) should be a `float[resolution][dimension]`, where `dimension` is either `3` for `Display.RGB` or `4` for `Display.RGB`) with values between `0.0f` and `1.0f`.

Parameters:
  `name` - Name used for slider label.
  `in_table` - Initial table of color values.
  `min` - Minimum value for slider.
  `max` - Maximum value for slider.

### SimpleColorMapWidget

    public SimpleColorMapWidget(String name,
                                Control ctl,
                                float min,
                                float max)
                         throws RemoteException,
                                VisADException

  Construct a `SimpleColorMapWidget`. The initial color table (if non-null) should be a `float[resolution][dimension]`, where `dimension` is either `3` for `Display.RGB` or `4` for `Display.RGB`) with values between `0.0f` and `1.0f`.

Parameters:
  `name` - Name used for slider label.
  `ctl` - Control to which this widget is attached.
  `min` - Minimum value for slider.
  `max` - Maximum value for slider.

Method Detail

### rebuildGUI

    void rebuildGUI()

### updateSlider

    void updateSlider(float min,
                      float max)

  Internal convenience routine used to update the slider.

  Parameters:
    `min` - Minimum value for slider.
    `max` - Maximum value for slider.

### getBaseMap

    public BaseRGBMap getBaseMap()

### getPreview

    public ColorPreview getPreview()

### getSlider

    public ArrowSlider getSlider()

### setTable

    public void setTable(float[][] table)
                  throws RemoteException,
                         VisADException

  Use a new table of color values.

  Parameters:
    `table` - New color values.
  Throws:
    `RemoteException`
    `VisADException`

### copy_table

    static float[][] copy_table(float[][] table)

  Utility routine used to make a copy of a 2D `float` array.

  Parameters:
    `table` - Table to copy.
  Returns:
    The new copy.

### table_reorg

    static float[][] table_reorg(float[][] table)

  Utility routine used convert a table with dimensions `[X][Y]` to a table with dimensions `[Y][X]`.

  Parameters:
    `table` - Table to reorganize.
  Returns:
    The reorganized table.

### main

    public static void main(String[] args)
                     throws RemoteException,
                            VisADException

  Throws:
    `RemoteException`
    `VisADException`