Hi Don, thanks for the prompt reply.
Hmm, I don't see any color scale, whether I comment out the contour Displayable or not. My contour data would not fill the
panel. I wonder why you see the scale widget and I don't. I have tried both 2D and 3D modes for the MapProjectionDisplay class.
So I guess you are saying that I am using the ColorScale class directly? I am on RHEL4, using the idv 2.2 jar, and the nc2.2
jar and visad jars from the idv zip. I have made local changes to MapProjectionDisplayJ2D and VisADCanvasJ2D classes, but only
for offscreen operation, so I can't imagine that these have affected my use of ColorScale.
Hmm, still confused
On a somewhat related note, how do I go about writing an adapter for my data (e.g dbdbv bathy data) so that I can view it
directly in the IDV application itself? As you can see from my code, I can get it my native data into a visad FlatField but
don't know of the next steps to take to make it 'IDV aware'. If we learned this technique at the IDV workshop I must have
forgotten it!
Any help appreciated
Stuart
Don Murray wrote:
Hi Stuart-
Stuart Maclean wrote:
I am using the idv jar for new application development. I have some
contour filled bathy data set up, using the Contour2DDisplayable class.
I want to add a legend, so that the user can tell the depth from the
color table I installed. In trying to use the ColorScale class, I
never see a scale/legend appear in my jframe. I have no idea what to
try next. Attached is the code (it will not compile but should give a
hint as to my intentions)
Any help appreciated
If I compile the code, but comment out the FlatField display
(since I don't have your data), I get a colorbar at the top of
the display.
Does your data completely fill the panel? If so, perhaps the
color scale is obscured by the data display. What happens if
you don't call addDisplayable with the contour display?
Also, what version of the code are you running against?
Don Murray
*************************************************************
Don Murray UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx P.O. Box 3000
(303) 497-8628 Boulder, CO 80307
http://www.unidata.ucar.edu/staff/donm
*************************************************************