Re: Labelling problem

Karan,

You've sent the same message twice, plus a third message.
You should send just one message with both questions.
And your code won't compile because of line wrap in the
middle of comments and text literals.

And I think your problems are just ordinary programming
problems, which you should be able to fix yourselves.
There is no special VisAD logic here that should
require me to debug your code.

I think you can solve your problems by understanding
and controlling exactly what data are linked to the
display after each event.

You can find out what DataReferences are linked to a
display by:

  DisplayImpl display = ...
  ...
  Enumeration renderers = display.getRendererVector().elements();
  while (renderers.hasMoreElements()) {
    DataRenderer renderer = (DataRenderer) renderers.nextElement();
    DataDisplayLink[] links = renderer.getLinks();
    for (int i=0; i<links.length; i++) {
      DataReference ref = links[i].getDataReference();
      System.out.println(ref.toString());
      Data data = ref.getData(); // if you want to print actual data values
    }
  }

> According to your mail yesterday we tried to work on
> labelling the real tuples with the vertex numbers(1,
> 2,... etc). We tried to do for one tuple according to
> the "Delaunay.java" and we found that only the label
> is visible and no real tuple. We want both of them to
> be visible and the vertex labelling to be displayed
> bit far away from the tuple. we worked on it and it is
> shown in our code commented. un-commenting the
> setdata() method, we cannot see even the tuples also
> and it gives exception. Please help us in this matter.

You'll have to look at whatever the Exception says and
figure it out. If your RealTuple is not displayed, study
what DataReferences are linked to the display.

> As we mentioned earlier we want a tuple when we right
> click a mouse button. Now we are able to see only one
> real tuple when we click the mouse button but, the
> earlier ones are not seen. Suggest us in doing this.

You probably need to maintain an array of DataReferences,
all linked to the display, for your history of RealTuples.

Good luck,
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


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