Re: Color Bar

Hi Kevin-

Kevin Manross wrote:

Hi All,

I have a quick question regarding placing a static colorbar in the VisAD Display. A great example of this is in the example provided by Geoff Freeman in the email archives:

(go here to directly see the example.  Caution, large file)

Once you start the demo, you see he has a colorbar that has a constant position within the display. I would like to add this functionality to my display. Is this something that can be set in the VisAD Display, or is it a more general Java behavior.

You can use a to add a display
that is screen locked.  See the main method for examples.

We use this in the IDV to add in a color bar.  I took some code
that the BoM had for drawing the color bar.  The hardest part
has been positioning the bar when you are zoomed in or rotated
because the inverse transforms did not give me the expected results.

If you download the IDV source code, you can take a look at:     - code for drawing color bars                 - method getVWorldCoords to get
                                       screen coords


ucar.unidata.idv.ViewManager         - methods to position the display
                                       label which also uses the

Don Murray                               UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8628                              Boulder, CO 80307

To unsubscribe visad, visit:

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