Search in sources :

Example 1 with MouseEvent

use of com.teamdev.jxbrowser.dom.event.MouseEvent in project JxBrowser-Examples by TeamDev-IP.

the class DomMouseEvents method printEventDetails.

private static void printEventDetails(Event event) {
    MouseEvent mouseEvent = (MouseEvent) event;
    Point location = mouseEvent.pageLocation();
    String message = format("Event type: %s. Button: %s. Page location: (%d, %d)", mouseEvent.type().value(), mouseEvent.button(), location.x(), location.y());
    System.out.println(message);
}
Also used : MouseEvent(com.teamdev.jxbrowser.dom.event.MouseEvent) Point(com.teamdev.jxbrowser.ui.Point)

Aggregations

MouseEvent (com.teamdev.jxbrowser.dom.event.MouseEvent)1 Point (com.teamdev.jxbrowser.ui.Point)1