This is probably a really simple thing, but I don't know how to
implement the following.
package mods.client.resultSelector;
import com.google.gwt.event.dom.client.MouseDownEvent;
import com.google.gwt.event.dom.client.MouseDownHandler;
import com.google.gwt.event.dom.client.MouseMoveEvent;
import com.google.gwt.event.dom.client.MouseMoveHandler;
import com.google.gwt.event.dom.client.MouseOutEvent;
import com.google.gwt.event.dom.client.MouseOutHandler;
import com.google.gwt.event.dom.client.MouseUpEvent;
import com.google.gwt.event.dom.client.MouseUpHandler;
import com.google.gwt.user.client.ui.AbsolutePanel;
import com.google.gwt.user.client.ui.Composite;
public class MousyAbsolutePanel extends Composite implements
MouseDownHandler {
AbsolutePanel abs = new AbsolutePanel();
public MousyAbsolutePanel(int width){
System.out.println("MousyAbsolutePanel being created with
width:" +
width);
initWidget(abs);
abs.setWidth(String.valueOf(width));
abs.setHeight("100%");
abs.setStyleName("mousyAbsolutePanel");
}
public void onMouseDown(MouseDownEvent event) {
System.out.println("onMouseDown()");
}
}
I want to have what is effectively a absolutePanel that can accept
mouse events. However, within the Composite object I don't know how to
tie the the handler I have written (the onMouseDown() thing) with the
abs variable. To put it sucinctly, I wan the abs AbsolutePanel to
respond when it is clicked upon, but AbsolutePanels do not naturally
accept click events. How do I go about doing this?
--~--~---------~--~----~------------~-------~--~----~
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=en
-~----------~----~----~----~------~----~------~--~---