Hi,
I am using gwt graphics and gwt dnd for a program. I have a button
which when clicked creates a circle at specified position on the panel
and the circle is draggable. For dragging i have used gwt-dnd. I have
also added a click handler to the circle which when click should print
"ERD Circle".
Here is the code layout:
Button b = new Button("Circle");
b.addClickHandler(new ClickHandler(){
@Override
public void onClick(ClickEvent event) {
// TODO Auto-generated method stub
Circle c = new Circle(20, 15, 10);
d.add(c);
c.addClickHandler(new ClickHandler(){
@Override
public void onClick(ClickEvent event)
{
// TODO Auto-generated method
stub
System.out.println("ERD
Circle");
}
});
dragController.makeDraggable(d);
boundaryPanel.add(d, 200, 200 );
}
});
This button is then added to an absolutepanel which in turn is added
to the rootpanel.
Problem that i am facing is click handler does not work when it is
made draggable. If i remove
dragController.makeDraggable(d);
click handler works perfectly fine.
Question:
1. Am i doing anything wrong here?
2. If the code is correct, then is there anything else that i need
to add to get both click handler and draggable working?
Any suggestions will be of great help.
Thank you.
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=.