We use cookies to serve our customers and website visitors in the best possible way. Cookies are used for the proper functioning of the website and for improving the user experience, monitoring visitor traffic and marketing purposes. By continuing to browse the site, you agree to our use of cookies. You can read more about cookies here.
com.vaadin.terminal.gwt.client.ui.
Class ClickEventHandler
java.lang.Object
com.vaadin.terminal.gwt.client.ui.ClickEventHandler
All Implemented Interfaces:
com.google.gwt.event.dom.client.ContextMenuHandler, com.google.gwt.event.dom.client.DoubleClickHandler, com.google.gwt.event.dom.client.MouseDownHandler, com.google.gwt.event.dom.client.MouseUpHandler, com.google.gwt.event.shared.EventHandler
Direct Known Subclasses:
- extends Object
- implements com.google.gwt.event.dom.client.DoubleClickHandler, com.google.gwt.event.dom.client.ContextMenuHandler, com.google.gwt.event.dom.client.MouseUpHandler, com.google.gwt.event.dom.client.MouseDownHandler
public abstract class ClickEventHandler
Field Summary | |
---|---|
protected String |
clickEventIdentifier
|
protected Paintable |
paintable
|
Constructor Summary | |
---|---|
ClickEventHandler(Paintable paintable,
String clickEventIdentifier)
|
Method Summary | ||
---|---|---|
protected void |
fireClick(com.google.gwt.dom.client.NativeEvent event)
|
|
protected ApplicationConnection |
getApplicationConnection()
|
|
protected com.google.gwt.user.client.Element |
getRelativeToElement()
Click event calculates and returns coordinates relative to the element returned by this method. |
|
void |
handleEventHandlerRegistration(ApplicationConnection client)
|
|
boolean |
hasEventListener()
|
|
void |
onContextMenu(com.google.gwt.event.dom.client.ContextMenuEvent event)
|
|
void |
onDoubleClick(com.google.gwt.event.dom.client.DoubleClickEvent event)
|
|
void |
onMouseDown(com.google.gwt.event.dom.client.MouseDownEvent event)
|
|
void |
onMouseUp(com.google.gwt.event.dom.client.MouseUpEvent event)
|
|
protected abstract
|
registerHandler(H handler,
com.google.gwt.event.dom.client.DomEvent.Type<H> type)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
clickEventIdentifier
protected String clickEventIdentifier
paintable
protected Paintable paintable
Constructor Detail |
---|
ClickEventHandler
public ClickEventHandler(Paintable paintable,
String clickEventIdentifier)
Method Detail |
---|
handleEventHandlerRegistration
public void handleEventHandlerRegistration(ApplicationConnection client)
registerHandler
protected abstract <H extends com.google.gwt.event.shared.EventHandler> com.google.gwt.event.shared.HandlerRegistration registerHandler(H handler,
com.google.gwt.event.dom.client.DomEvent.Type<H> type)
getApplicationConnection
protected ApplicationConnection getApplicationConnection()
hasEventListener
public boolean hasEventListener()
fireClick
protected void fireClick(com.google.gwt.dom.client.NativeEvent event)
onContextMenu
public void onContextMenu(com.google.gwt.event.dom.client.ContextMenuEvent event)
- Specified by:
onContextMenu
in interfacecom.google.gwt.event.dom.client.ContextMenuHandler
onMouseDown
public void onMouseDown(com.google.gwt.event.dom.client.MouseDownEvent event)
- Specified by:
onMouseDown
in interfacecom.google.gwt.event.dom.client.MouseDownHandler
onMouseUp
public void onMouseUp(com.google.gwt.event.dom.client.MouseUpEvent event)
- Specified by:
onMouseUp
in interfacecom.google.gwt.event.dom.client.MouseUpHandler
onDoubleClick
public void onDoubleClick(com.google.gwt.event.dom.client.DoubleClickEvent event)
- Specified by:
onDoubleClick
in interfacecom.google.gwt.event.dom.client.DoubleClickHandler
getRelativeToElement
protected com.google.gwt.user.client.Element getRelativeToElement()
- Returns:
- The Element used for calculating relative coordinates for a click or null if no relative coordinates can be calculated.
Click event calculates and returns coordinates relative to the element returned by this method. Default implementation uses the root element of the widget. Override to provide a different relative element.