toggling data depictions on and off in displays

There have been a number of questions about toggling data
depictions on and off in displays.  We have added a method:

  public abstract void toggle(boolean on);

to the DataRenderer class.  This can be used as follows:

  DisplayImpl display = new DisplayImplJ3D("display");
  display.addMap(...);
  . . .
  DataReference ref = new DataReferenceImpl("ref");
  ref.setData(data);
  DataRenderer renderer = new DefaultRendererJ3D();
  display.addReferences(renderer, ref);
  . . .
  renderer.toggle(false); // turn off depiction of 'data'
  . . .
  renderer.toggle(true); // turn depiction of 'data' back on

Cheers,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html



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