Re: Interactive Plot...

Hi Torsten,

I think you are almost done.  I assume the data in your
display is a Field probably a FlatField).

If you declare:

  PickManipulationRendererJ3D pick = new ...

Then in the doAction() of your CellImpl, do:

  int index = pick.getCloseIndex();

Now index is the index of the "picked" sample in your
Field.  You can get the range value at that sample with:

  Data range = field.getSample(index)

And you can get the "picked" Field domain location with:

  Set set = field.getDomainSet();
  float[][] values = set.indexToValue(new int[] {index});
  // now location is (values[0][0], values[1][0], ...)

Please let us know if this is not clear.

Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738

On Wed, 11 Oct 2000, Heftrich, Torsten, AVENTIS/DE wrote:

> Hello,
> I try to create an interactive 2D plot, where the user can pick one Point.
> Then detailed information should be displayed.
> I managed to create an PickManipulationRendererJ2D for that, based on the
> PickManipulationRendererJ3D which gives me the Reference of the clicked
> data.
> I did that as suggested in
>, but i could'nt
> figure out how to use the getCloseIndex() Method mentioned in
> to get the one
> point that was clicked without creating a data reference for every single
> point.
> The Question is: How can I use the PickManipulationRendererJ2D class in the
> doAction Method of CellImpl?
> Thanks for any help about that,
> Torsten
> Torsten Heftrich
> Aventis Research & Technologies
> Frankfurt, Germany
> email: heftrich@xxxxxxxxxxxxxxx