Re: ColorWidget updates

Hi Gunnar,

> In my app. I'm using the ColorWidget to allow the user to modify the color
> table. However, when the I drag the mouse to update the colorvalues it
> continously sends updates to the display. One pr mouseDragged event. Is
> there any way to let it respond only to mouse released??

Yeah, you can construct your color widget using:

  new LabeledColorWidget(new ColorMapWidget(colorMap, false));

Note the false says don't propagate changes to the
ColorControl until the user clicks on "Apply". You
can demo this via 'java Test12' in visad/examples.

> Another thing. If I modify a colortable and then activate the contour
> mapping, the color table is reset.. This is probably because I have to
> remove all references and maps before I can set a new map while the
> display is active, but is there a way to bypass this. I would like to be
> able to maintain the colortable if I switch to contouring and back

You should be able to take a snapshot of a table using
ColorControl.getTable() and then restore it to a new
ColorControl using setTable().

Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738

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