Re: Rubber band zoom

Hi Marco,

> I am looking for way to implement a rubberband zoom function for a 2D
> display. Unfortunately I have not found a solution.
> Any suggestions ?

You can create a 2-D display in Java3D using:

  new DisplayImplJ3D("display", new TwoDDisplayRendererJ3D())

Then you can create a visad.bom.RubberBandBoxRendererJ3D
for a RealTuple in this display. See the main() method of
visad/bom/RubberBandBoxRendererJ3D.java for an example.
Note in the CellImpl of that example, you'd call something
like:

  xmap.setRange(samples[0][0], samples[0][1]);
  ymap.setRange(samples[1][0], samples[1][1]);

where xmap and ymap are your ScalarMaps to XAxis and YAxis.
This would rescale the display to the bounds selected by
the rubber band box.

Good luck,
Bill