ad.setBaseTransform(curTxf); //curTxf is the AffineTransform
public void mouseEvent1(final MouseEvent evt){ //transport the parameter of evt to this method
final Element rect = r; // the element r has been initialized
RunnableQueue rq = manager.getUpdateRunnableQueue(); // add the event to RunableQueue
try { rq.invokeAndWait(new Runnable() {
public void run() {
ad.mouseClicked(evt); // set mouse event to change the GTV tree
rect.setAttributeNS(null, "x", ""+5); // setAttribute of the document
};
});
} catch (InterruptedException ie) {
ie.printStackTrace();
}
if(manager.getUpdateTracker().hasChanged()) // test whether the GVTtree has been changed
System.out.println("GTV changed"); }
But unfortunately, I could find the GVTtree has been changed only by the Attribute changed. If I removed the line of attribute, it seems that the GTVTree will not been changed. I want to know whether this is a right way that just only setRootNode() and then call the mouseCliked(). Or I should add some code. For the RunableQueue, I think this way is right, because if I removed it, I can not see the result of the Attribute changed.
What should I do to change the GVTtree by one mouseclick?
Thanks a lot
Regards
zhao
