Re: Grid problem

Hi Karan,

> We have a 2D display and there is a 4 sided geometry
> display intially. We can drag the end points of the
> geometry and and it can be stretched to any 4 sided
> shape and once the geometry is satified we can create
> the grid. Now, if i again i want to change my geometry
> by clicking the mouse near end points, the old grid
> should be removed and the gemetry can be again
> redrawn. The grid is created again after the geometry
> is done. This has to be repeated.
>    we are trying to remove the references of the grid
> which are added to a data reference. WE are able to
> remove only the last lines. Do we have to add each
> gridded set to each reference? Please tell us the way
> how to approach the above procedure and also how to
> remove all the gridded sets.

There are two ways to remove references:

1. display.removeAllReferences();
This removes all DataReferences.

2. display.removeReference(DataReferenceImpl)
This removes them one at a time.

You need to keep track of all the DataReferences linked
to your display via addReference() or addReferences()
calls, and then remove them all or remove certain ones,
one at a time.

Each DataReference is a reference to one Data object.
This may be one GriddedSet, or may be one UnionSet that
includes many GriddedSets. It all depends on how you
structure your program.

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

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