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 James, In my VisBio application, I accomplished what you want by using DataRenderer's addException and clearExceptions methods. It is sort of a hack, since the original intent was to use those methods to display any exception messages that occur, but I just build some VisADExceptions with the range value information, and set them that way, and they display in the lower left corner. Here's the file with the relevant code: https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/loci/visbio/view/TransformLink.java#L520 See the computeCursor and doMessages methods. Also important is my DisplayUtil.redrawMessages method, which forces a quick redraw of the exception messages: https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/loci/visbio/util/DisplayUtil.java#L339 Feel free to steal code from these three methods and use it for whatever you like. As for controlling the font size, I believe there is a way to control the font used to plot the cursor probe and exception messages, but do not know what it is off the top of my head. Perhaps one of the other VisAD developers does. Controlling the location of the messages would be a lot harder. I briefly looked into adding a way to set your own messages somewhere other than the bottom left corner, but it would be a mess. Probably easier would be to use VisAD's TextType functionality to create a text data object in the display with the information you want somewhere, and then update it dynamically when the cursor probe happens. See Test45 for a start on that. -Curtis On Jan 10, 2008 8:23 PM, James Fishbaugh <jfishbaugh@xxxxxxxxx> wrote: > Hello yet again, > > When the mouse wheel is clicked on a 2D plot, the user will be > presented with a display of the value of the x and y axis in the upper > left hand corner. I would also like it to display the value data > being plotted. Also, do I have any control of the size and location > of that information. Thanks. > > James > _______________________________________________ > visad mailing list > visad@xxxxxxxxxxxxxxxx > For list information, to unsubscribe, visit: > http://www.unidata.ucar.edu/mailing_lists/ >
visad
archives: