NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi Eugene, Display.Shape is now implemented. See cases 46 and 47 of examples/DisplayTest.java for simple examples of how to use it. Note that case 47 includes a box, as in your original request, that has different colors, locations and sizes according to values of RealTypes mapped to color DisplayRealTypes, spatial DisplayRealTypes, and Display.ShapeScale. Here are some words from Section 4.7 of the Developers Guide about Shape. The DisplayRealType Display.Shape can be a very powerful tool for building complex displays. When RealTypes are mapped to Display.Shape, their values are quantized according to the Set argument to ShapeControl.setShapeSet and the resulting indices are used to look up VisADGeometryArray shapes. These are located according to any RealTypes mapped to spatial DisplayRealTypes, scaled according to any RealType mapped to Display.ShapeScale, and for those VisADGeometryArrays that do not include colors values, colored according to any RealTypes mapped to color DisplayRealTypes. Multiple RealTypes may be mapped to Display.Shape, allowing the creation of composite shapes with different sub-shapes determined by values of different RealTypes. The PlotText.render_label method, documented in Section 4.7.2 of the Developers Guide, is useful for generating shapes from text Strings. The ShapeControl.setShapeSet method can be used to define a quantization of real values, and shapes can be generated from numerical strings of quantization values. The start argument to PlotText.render_label method can be used to generate different offsets for text plots of values of different RealTypes. This could be used to generate traditional station plots from meteorological data. If the Set argument to setShapeSet has length = 1 (i.e., just one member) then all RealType values map to the VisADGeometryArray shape at index = 0. Let us know if you have any problems with this. Cheers, Bill ---------------------------------------------------------- Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI 53706 whibbard@xxxxxxxxxxxxx 608-263-4427 fax: 608-263-6738 http://www.ssec.wisc.edu/~billh/vis.html "kill cross-platform Java by growing the polluted Java market" - from an internal Microsoft planning document
visad
archives: