Hello,
I am working on a piece of code that in one state needs a click handler like this:
but when the state changes i need to remove this click handler from the main canvas.
I know that Canvas has this functionality:
mainCanvas.getHandlerManager().removeHandler(type, handler)
but I can't get it to work: what do i input for the type and the handler?
Thanks!
I am working on a piece of code that in one state needs a click handler like this:
Code:
mainCanvas.addClickHandler(new ClickHandler(){
@Override
public void onClick(ClickEvent event) {
int x= event.getX();
int y=event.getY();
textCreate.setTop(y);
textCreate.setLeft(x);
textCreate.draw();
}
});
I know that Canvas has this functionality:
mainCanvas.getHandlerManager().removeHandler(type, handler)
but I can't get it to work: what do i input for the type and the handler?
Thanks!
Comment