Change in the ColorMapWidget API

I recently had to rewrite several of the color-related widgets
in order to make them behave better in the collaborative world.

As part of that rewrite, SimpleColorMapWidget and the widgets
derived from it (ColorMapWidget and LabeledColorWidget), while
they behave the same, no longer use a ColorWidget internally.

Therefore, the getColorWidget() method has been removed from
these classes.

I *hate* to remove methods, but in this case I didn't really
have a choice.  I couldn't think of any way to return something
sensible, and returning 'null' meant that programs would compile
and run until they ran into code that called getColorWidget(),
at which point they'd most likely get an unexpected
NullPointerException.

I therefore chose to remove the methods, hoping that a compile
error would make it obvious that a code change was necessary.

Feel free to mail me any questions you might have about this
or about workarounds for problems this might have created in
your code.


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