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:
http://www.unidata.ucar.edu/support/help/MailArchives/visad-list/msg05554.html
(go here to directly see the example. Caution, large file)
http://www.bom.gov.au/general/development/visad/MapDemo.shtml
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 visad.bom.ScreenLockedRendererJ3D 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:
ucar.visad.display.ColorBar.java - code for drawing color bars
ucar.visad.Util.java - method getVWorldCoords to get
screen coords
also
ucar.unidata.idv.ViewManager - methods to position the display
label which also uses the
ScreenLockedRenderer.
Don
*************************************************************
Don Murray UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx P.O. Box 3000
(303) 497-8628 Boulder, CO 80307
http://www.unidata.ucar.edu/staff/donm
*************************************************************
==============================================================================
To unsubscribe visad, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
==============================================================================