package nl.danielm.touringband.client;

import com.google.gwt.user.client.Event;
import com.smartgwt.client.widgets.Button;
import com.smartgwt.client.widgets.events.MouseDownEvent;
import com.smartgwt.client.widgets.events.MouseDownHandler;

public class MyButton extends Button {
	public MyButton() {
		sinkEvents(Event.ONMOUSEDOWN);
		
		addMouseDownHandler(new MouseDownHandler() {
			public void onMouseDown(MouseDownEvent event) {
				System.out.println("mousedown : button");
			}
		});
	}

	@Override
	public void onBrowserEvent(Event event) {
		System.out.println("onBrowserEvent 1 : " + event.getString());
		event.stopPropagation();
	}
}
