org.vectomatic.svg.samples.client.events
Class EventSample

java.lang.Object
  extended by org.vectomatic.svg.samples.client.SampleBase
      extended by org.vectomatic.svg.samples.client.events.EventSample
All Implemented Interfaces:
com.google.gwt.event.dom.client.MouseDownHandler, com.google.gwt.event.dom.client.MouseMoveHandler, com.google.gwt.event.dom.client.MouseUpHandler, com.google.gwt.event.shared.EventHandler

public class EventSample
extends SampleBase
implements com.google.gwt.event.dom.client.MouseUpHandler, com.google.gwt.event.dom.client.MouseMoveHandler, com.google.gwt.event.dom.client.MouseDownHandler

Class to demonstrate the SVG event handling

Author:
laaglu

Field Summary
static Main.MainBundle mainBundle
           
 
Fields inherited from class org.vectomatic.svg.samples.client.SampleBase
HTML_SRC_DIR, sourceHtml, tabPanel, UIBINDER_SRC_DIR, uiBinderHtml
 
Constructor Summary
EventSample()
           
 
Method Summary
 org.vectomatic.dom.svg.OMSVGPoint getLocalCoordinates(com.google.gwt.event.dom.client.MouseEvent<? extends com.google.gwt.event.shared.EventHandler> e)
          Returns the coordinates of a mouse event, converted to the SVG coordinate system
 com.google.gwt.user.client.ui.TabLayoutPanel getPanel()
          Instantiates the tab panel which contains the sample
 void onMouseDown(com.google.gwt.event.dom.client.MouseDownEvent event)
           
 void onMouseMove(com.google.gwt.event.dom.client.MouseMoveEvent event)
           
 void onMouseUp(com.google.gwt.event.dom.client.MouseUpEvent event)
           
 
Methods inherited from class org.vectomatic.svg.samples.client.SampleBase
createCodeTabs, requestCodeContents, resize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mainBundle

@UiField(provided=true)
public static Main.MainBundle mainBundle
Constructor Detail

EventSample

public EventSample()
Method Detail

getPanel

public com.google.gwt.user.client.ui.TabLayoutPanel getPanel()
Description copied from class: SampleBase
Instantiates the tab panel which contains the sample

Specified by:
getPanel in class SampleBase
Returns:

onMouseUp

public void onMouseUp(com.google.gwt.event.dom.client.MouseUpEvent event)
Specified by:
onMouseUp in interface com.google.gwt.event.dom.client.MouseUpHandler

onMouseMove

public void onMouseMove(com.google.gwt.event.dom.client.MouseMoveEvent event)
Specified by:
onMouseMove in interface com.google.gwt.event.dom.client.MouseMoveHandler

getLocalCoordinates

public org.vectomatic.dom.svg.OMSVGPoint getLocalCoordinates(com.google.gwt.event.dom.client.MouseEvent<? extends com.google.gwt.event.shared.EventHandler> e)
Returns the coordinates of a mouse event, converted to the SVG coordinate system

Parameters:
e - A mouse event
Returns:
The coordinates of the mouse event, converted to the SVG coordinate system

onMouseDown

public void onMouseDown(com.google.gwt.event.dom.client.MouseDownEvent event)
Specified by:
onMouseDown in interface com.google.gwt.event.dom.client.MouseDownHandler


Copyright © 2011. All Rights Reserved.