public class DOMHelperImpl extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
DOMHelperImpl.Resource |
Modifier and Type | Field and Description |
---|---|
protected OMSVGElement |
captureElt |
protected static boolean |
eventsInitialized |
Constructor and Description |
---|
DOMHelperImpl() |
Modifier and Type | Method and Description |
---|---|
void |
bindEventListener(com.google.gwt.dom.client.Element elem,
String eventName)
Makes a node sink the events emitted by the specified element
|
void |
dispatch(com.google.gwt.dom.client.NativeEvent event,
OMNode node,
com.google.gwt.dom.client.Element elem)
Central dispatching function for events emitted by DOM objects
|
void |
dispatchCapturedEvent(com.google.gwt.dom.client.NativeEvent event,
com.google.gwt.dom.client.Element elem)
Dispatching function for events which result from a call
to
setCaptureElement(OMSVGElement, LoseCaptureHandler) |
boolean |
evaluateBooleanXPath_(com.google.gwt.dom.client.Element svgElement,
String expr,
XPathPrefixResolver resolver) |
com.google.gwt.core.client.JavaScriptObject |
evaluateNodeListXPath_(com.google.gwt.dom.client.Element svgElement,
String expr,
XPathPrefixResolver resolver) |
com.google.gwt.dom.client.Node |
evaluateNodeXPath_(com.google.gwt.dom.client.Element svgElement,
String expr,
XPathPrefixResolver resolver) |
float |
evaluateNumberXPath_(com.google.gwt.dom.client.Element svgElement,
String expr,
XPathPrefixResolver resolver) |
String |
evaluateStringXPath_(com.google.gwt.dom.client.Element svgElement,
String expr,
XPathPrefixResolver resolver) |
OMSVGElement |
getCaptureElement()
Returns the element which currently captures all the
events after a call to
setCaptureElement(OMSVGElement, LoseCaptureHandler)
or null if element is set to capture events |
static com.google.gwt.dom.client.Document |
getIFrameDocument() |
static boolean |
hasGetTransformToElement() |
static boolean |
hasNativePathSeg() |
static boolean |
hasNativeXPath() |
protected void |
init() |
protected void |
initEventSystem()
Initializes the event system.
|
protected void |
initXPath() |
protected boolean |
isChildOf(com.google.gwt.dom.client.Node root,
com.google.gwt.dom.client.Node node)
Tests if a node is part of a DOM subtree.
|
void |
releaseCaptureElement()
Stops the forwarding of all events to the capturing element
specified by
setCaptureElement(OMSVGElement, LoseCaptureHandler) |
com.google.gwt.event.shared.HandlerRegistration |
setCaptureElement(OMSVGElement captureElt,
com.google.gwt.event.dom.client.LoseCaptureHandler loseCaptureHandler)
Makes the specified element capture all the events, until
a call to
releaseCaptureElement()
terminates the capture |
protected void |
sinkEvents(com.google.gwt.dom.client.Element elem,
String eventName)
Activate the event listener for the specified
event on an element
|
void |
unbindEventListener(com.google.gwt.dom.client.Element elem,
String eventName)
Makes a node stop sinking the events emitted by the specified element
|
protected void |
unsinkEvents(com.google.gwt.dom.client.Element elem,
String eventName)
Deactivate the event listener for the specified
event on an element
|
protected static boolean eventsInitialized
protected OMSVGElement captureElt
protected void initEventSystem()
protected void init()
public void bindEventListener(com.google.gwt.dom.client.Element elem, String eventName)
elem
- The element emitting the eventseventName
- The event namepublic void unbindEventListener(com.google.gwt.dom.client.Element elem, String eventName)
elem
- The element emitting the eventseventName
- The event namepublic OMSVGElement getCaptureElement()
setCaptureElement(OMSVGElement, LoseCaptureHandler)
or null if element is set to capture eventspublic com.google.gwt.event.shared.HandlerRegistration setCaptureElement(OMSVGElement captureElt, com.google.gwt.event.dom.client.LoseCaptureHandler loseCaptureHandler)
releaseCaptureElement()
terminates the capturecaptureElt
- The capturing elementloseCaptureHandler
- A handler which will be invoked
if the element loses captureHandlerRegistration
used to remove this handlerpublic void releaseCaptureElement()
setCaptureElement(OMSVGElement, LoseCaptureHandler)
protected void sinkEvents(com.google.gwt.dom.client.Element elem, String eventName)
elem
- The object which emits eventseventName
- The event nameprotected void unsinkEvents(com.google.gwt.dom.client.Element elem, String eventName)
elem
- The object which emits eventseventName
- The event namepublic void dispatch(com.google.gwt.dom.client.NativeEvent event, OMNode node, com.google.gwt.dom.client.Element elem)
event
- The DOM eventnode
- The object processing the eventelem
- The object emitting the eventpublic void dispatchCapturedEvent(com.google.gwt.dom.client.NativeEvent event, com.google.gwt.dom.client.Element elem)
setCaptureElement(OMSVGElement, LoseCaptureHandler)
event
- The DOM eventelem
- The object emitting the eventprotected boolean isChildOf(com.google.gwt.dom.client.Node root, com.google.gwt.dom.client.Node node)
root
- The subtree rootnode
- The node to be testedpublic com.google.gwt.core.client.JavaScriptObject evaluateNodeListXPath_(com.google.gwt.dom.client.Element svgElement, String expr, XPathPrefixResolver resolver)
public com.google.gwt.dom.client.Node evaluateNodeXPath_(com.google.gwt.dom.client.Element svgElement, String expr, XPathPrefixResolver resolver)
public String evaluateStringXPath_(com.google.gwt.dom.client.Element svgElement, String expr, XPathPrefixResolver resolver)
public float evaluateNumberXPath_(com.google.gwt.dom.client.Element svgElement, String expr, XPathPrefixResolver resolver)
public boolean evaluateBooleanXPath_(com.google.gwt.dom.client.Element svgElement, String expr, XPathPrefixResolver resolver)
public static boolean hasNativeXPath()
public static boolean hasNativePathSeg()
public static boolean hasGetTransformToElement()
protected void initXPath()
public static com.google.gwt.dom.client.Document getIFrameDocument()
Copyright © 2018. All Rights Reserved.