Re: Displaying RGB Map

It sounds like you just want a visad.util.ColorPreview (which extends
JPanel). Have a look at the SimpleColorMapWidget source for clues on
using it. Something like:

BaseColorControl ctl = (BaseColorControl) scalar_map.getControl();
BaseRGBMap baseMap = new BaseRGBMap(ctl);
ColorPreview preview = new ColorPreview(baseMap);

Good Luck,
Doug

David Nguyen wrote:
> 
> Hey all,
> 
> Is there something that simply displays the color mapping of a ScalarMap
> to Display.RGB. The tutorial has examples of the LabeledColorWidget, but
> that seems to be slightly more than necessary. I do not need the ability
> to edit the color map like the LabeledColorWidget allows.
> 
> Thanks,
> -Dave
> 
> --------------------
> David Nguyen
> Computer Engineering
> Northwestern University
> dave@xxxxxxxxxxxxxx

-- 
*----------------------------------------------------------------------*
| Doug Lindholm, Software Engineer          |  E-mail: lind@xxxxxxxx   |
| Research Applications Program             |   Phone: 303-497-8374    |
| National Center for Atmospheric Research  |                          |
| P.O. Box 3000                             |     There's no place     |
| Boulder, Colorado 80307-3000              |        like $HOME        |
*----------------------------------------------------------------------*


  • 2002 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: