|
From: Patrick H. <pa...@13...> - 2001-05-03 17:17:07
|
To folow up on this, further debugging has shown that an element is
being added to mouseListeners in AbstractVisualGraphComponent properly.
When processMouseEvent() is called, however, mouseListeners has no
elements. This leads me to believe that the code below is modifying
the wrong VisualVertex object (i.e., a different object than what is
clicked on in the graph panel). If that is case, how do I get a
reference to the VisualVertex that is in the VisualGraph so that I can
operate on it? Thanks.
-Patrick
Patrick Hartling <pa...@13...> wrote:
} I am trying to handle the event generated when a VisualVertex object is
} clicked on by the user. I have code similar to the following:
}
} public class MyClass extends VisualGraph {
} public boolean addVertex (Vertex v) {
} try {
} add(v);
}
} VisualVertex vis_vertex = getVisaulVertex(v);
} vis_vertex.addMouseListener(new MouseListener () { ... });
} }
} catch (Exception e) {
} // Handle exception ...
} }
} }
} }:
}
} My listener never gets called--or at least, the mouseClicked() method
} never gets called. Am I misunderstanding how vertex selection events
} are generated, or does my graph have to be in a certain state for the
} mouse clicks to be received?
}
} -Patrick
}
}
} Patrick L. Hartling | Research Assistant, VRAC
} pa...@13... | 2624 Howe Hall -- (515)294-49
*** 16
} http://www.137.org/patrick/ | http://www.vrac.iastate.edu/
}
} _______________________________________________
} Openjgraph-development mailing list
} Ope...@li...
} http://lists.sourceforge.net/lists/listinfo/openjgraph-development
Patrick L. Hartling | Research Assistant, VRAC
pa...@13... | 2624 Howe Hall -- (515)294-4916
http://www.137.org/patrick/ | http://www.vrac.iastate.edu/
|