From 6ead812d571a412b8eb9049d3fac94e4b6fc1685 Mon Sep 17 00:00:00 2001 From: "sdv%sparc.spb.su" Date: Tue, 28 Mar 2000 02:11:13 +0000 Subject: [PATCH] added new methods from the recent w3c java binding git-svn-id: svn://10.0.0.236/trunk@64299 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/java/dom/jni/ElementImpl.java | 8 + mozilla/java/dom/jni/EventImpl.java | 202 ++++++++++----------- mozilla/java/dom/jni/MouseEventImpl.java | 212 +++++++++++------------ 3 files changed, 217 insertions(+), 205 deletions(-) diff --git a/mozilla/java/dom/jni/ElementImpl.java b/mozilla/java/dom/jni/ElementImpl.java index 6390893be61..c2a36e292b8 100644 --- a/mozilla/java/dom/jni/ElementImpl.java +++ b/mozilla/java/dom/jni/ElementImpl.java @@ -68,4 +68,12 @@ public class ElementImpl extends NodeImpl implements Element { throw new UnsupportedOperationException(); } + public boolean hasAttribute(String name) { + throw new UnsupportedOperationException(); + } + + public boolean hasAttributeNS(String namespaceURI, + String localName) { + throw new UnsupportedOperationException(); + } } diff --git a/mozilla/java/dom/jni/EventImpl.java b/mozilla/java/dom/jni/EventImpl.java index 9909841a21d..b7b6f986c0d 100644 --- a/mozilla/java/dom/jni/EventImpl.java +++ b/mozilla/java/dom/jni/EventImpl.java @@ -50,109 +50,113 @@ public class EventImpl implements Event { " p=" + Long.toHexString(p_nsIDOMEvent) + ">"; } - /** - * The type property represents the event name as a string - * property. - */ - public native String getType(); + /** + * The type property represents the event name as a string + * property. + */ + public native String getType(); + + /** + * The target property indicates the EventTarget + * to which the event was originally dispatched. + */ + public native EventTarget getTarget(); - /** - * The target property indicates the EventTarget - * to which the event was originally dispatched. - */ - public native EventTarget getTarget(); + /** + * The currentNode property indicates the Node + * whose EventListeners are currently being processed. This + * is particularly useful during capturing and bubbling. + */ + public native Node getCurrentNode(); - /** - * The currentNode property indicates the Node - * whose EventListeners are currently being processed. This - * is particularly useful during capturing and bubbling. - */ - public native Node getCurrentNode(); + /** + * The eventPhase property indicates which phase of event flow + * is currently being evaluated. + */ + public native short getEventPhase(); + + /** + * The bubbles property indicates whether or not an event is a + * bubbling event. If the event can bubble the value is true, else the + * value is false. + */ + public boolean getBubbles() { + throw new UnsupportedOperationException(); + } - /** - * The eventPhase property indicates which phase of event flow - * is currently being evaluated. - */ - public native short getEventPhase(); + /** + * The cancelable property indicates whether or not an event + * can have its default action prevented. If the default action can be + * prevented the value is true, else the value is false. + */ + public boolean getCancelable() { + throw new UnsupportedOperationException(); + } - /** - * The bubbles property indicates whether or not an event is a - * bubbling event. If the event can bubble the value is true, else the - * value is false. - */ - public boolean getBubbles() { - throw new UnsupportedOperationException(); - } + /** + * The preventBubble method is used to end the bubbling phase + * of event flow. If this method is called by any + * EventListeners registered on the same + * EventTarget during bubbling, the bubbling phase will cease + * at that level and the event will not be propagated upward within the + * tree. + */ + public native void preventBubble(); + + /** + * The preventCapture method is used to end the capturing phase + * of event flow. If this method is called by any + * EventListeners registered on the same + * EventTarget during capturing, the capturing phase will + * cease at that level and the event will not be propagated any further + * down. + */ + public native void preventCapture(); - /** - * The cancelable property indicates whether or not an event - * can have its default action prevented. If the default action can be - * prevented the value is true, else the value is false. - */ - public boolean getCancelable() { - throw new UnsupportedOperationException(); - } - - /** - * The preventBubble method is used to end the bubbling phase - * of event flow. If this method is called by any - * EventListeners registered on the same - * EventTarget during bubbling, the bubbling phase will cease - * at that level and the event will not be propagated upward within the - * tree. - */ - public native void preventBubble(); - - /** - * The preventCapture method is used to end the capturing phase - * of event flow. If this method is called by any - * EventListeners registered on the same - * EventTarget during capturing, the capturing phase will - * cease at that level and the event will not be propagated any further - * down. - */ - public native void preventCapture(); - - /** - * If an event is cancelable, the preventCapture method is used - * to signify that the event is to be canceled, meaning any default action - * normally taken by the implementation as a result of the event will not - * occur. If, during any stage of event flow, the - * preventDefault method is called the event is canceled. Any - * default action associated with the event will not occur. Calling this - * method for a non-cancelable event has no effect. Once - * preventDefault has been called it will remain in effect - * throughout the remainder of the event's propagation. - */ - public native void preventDefault(); - - /** - * The stopPropagation method is used prevent further - * propagation of an event during event flow. If this method is called by - * any EventListener the event will cease propagating - * through the tree. The event will complete dispatch to all listeners - * on the current EventTarget before event flow stops. This - * method may be used during any stage of event flow. - */ - public void stopPropagation() { - throw new UnsupportedOperationException(); - } - - /** - * - * @param eventTypeArg Specifies the event type. This type may be any event - * type currently defined in this specification or a new event type. Any - * new event type must not begin with any upper, lower, or mixed case - * version of the string "DOM". This prefix is reserved for future DOM - * event sets. - * @param canBubbleArg Specifies whether or not the event can bubble. - * @param cancelableArg Specifies whether or not the event's default action - * can be prevented. - */ - public void initEvent(String eventTypeArg, - boolean canBubbleArg, - boolean cancelableArg) { - throw new UnsupportedOperationException(); - } + /** + * If an event is cancelable, the preventCapture method is used + * to signify that the event is to be canceled, meaning any default action + * normally taken by the implementation as a result of the event will not + * occur. If, during any stage of event flow, the + * preventDefault method is called the event is canceled. Any + * default action associated with the event will not occur. Calling this + * method for a non-cancelable event has no effect. Once + * preventDefault has been called it will remain in effect + * throughout the remainder of the event's propagation. + */ + public native void preventDefault(); + + /** + * The stopPropagation method is used prevent further + * propagation of an event during event flow. If this method is called by + * any EventListener the event will cease propagating + * through the tree. The event will complete dispatch to all listeners + * on the current EventTarget before event flow stops. This + * method may be used during any stage of event flow. + */ + public void stopPropagation() { + throw new UnsupportedOperationException(); + } + + /** + * + * @param eventTypeArg Specifies the event type. This type may be any event + * type currently defined in this specification or a new event type. Any + * new event type must not begin with any upper, lower, or mixed case + * version of the string "DOM". This prefix is reserved for future DOM + * event sets. + * @param canBubbleArg Specifies whether or not the event can bubble. + * @param cancelableArg Specifies whether or not the event's default action + * can be prevented. + */ + public void initEvent(String eventTypeArg, + boolean canBubbleArg, + boolean cancelableArg) { + throw new UnsupportedOperationException(); + } + + public long getTimeStamp() { + throw new UnsupportedOperationException(); + } } diff --git a/mozilla/java/dom/jni/MouseEventImpl.java b/mozilla/java/dom/jni/MouseEventImpl.java index 8f109cb8d57..636e1601829 100644 --- a/mozilla/java/dom/jni/MouseEventImpl.java +++ b/mozilla/java/dom/jni/MouseEventImpl.java @@ -53,111 +53,111 @@ public class MouseEventImpl extends UIEventImpl implements MouseEvent { " p=" + Long.toHexString(p_nsIDOMEvent) + ">"; } - /** - * screenX indicates the horizontal coordinate at which the - * event occurred in relative to the origin of the screen coordinate system. - */ - public native int getScreenX(); - - /** - * screenY indicates the vertical coordinate at which the event - * occurred relative to the origin of the screen coordinate system. - */ - public native int getScreenY(); - - /** - * clientX indicates the horizontal coordinate at which the - * event occurred relative to the DOM implementation's client area. - */ - public native int getClientX(); - - /** - * clientY indicates the vertical coordinate at which the event - * occurred relative to the DOM implementation's client area. - */ - public native int getClientY(); - - /** - * ctrlKey indicates whether the 'ctrl' key was depressed - * during the firing of the event. - */ - public native boolean getCtrlKey(); - - /** - * shiftKey indicates whether the 'shift' key was depressed - * during the firing of the event. - */ - public native boolean getShiftKey(); - - /** - * altKey indicates whether the 'alt' key was depressed during - * the firing of the event. On some platforms this key may map to an - * alternative key name. - */ - public native boolean getAltKey(); - - /** - * metaKey indicates whether the 'meta' key was depressed - * during the firing of the event. On some platforms this key may map to - * an alternative key name. - */ - public native boolean getMetaKey(); - - /** - * During mouse events caused by the depression or release of a mouse - * button, button is used to indicate which mouse button - * changed state. - */ - public native short getButton(); - - /** - * relatedNode is used to identify a secondary node related to - * a UI event. - */ - public Node getRelatedNode() { - throw new UnsupportedOperationException(); - } - - /** - * - * @param typeArg Specifies the event type. - * @param canBubbleArg Specifies whether or not the event can bubble. - * @param cancelableArg Specifies whether or not the event's default action - * can be prevent. - * @param viewArg Specifies the Event's - * AbstractView. - * @param detailArg Specifies the Event's mouse click count. - * @param screenXArg Specifies the Event's screen x coordinate - * @param screenYArg Specifies the Event's screen y coordinate - * @param clientXArg Specifies the Event's client x coordinate - * @param clientYArg Specifies the Event's client y coordinate - * @param ctrlKeyArg Specifies whether or not control key was depressed - * during the Event. - * @param altKeyArg Specifies whether or not alt key was depressed during - * the Event. - * @param shiftKeyArg Specifies whether or not shift key was depressed - * during the Event. - * @param metaKeyArg Specifies whether or not meta key was depressed during - * the Event. - * @param buttonArg Specifies the Event's mouse button. - * @param relatedNodeArg Specifies the Event's related Node. - */ - public void initMouseEvent(String typeArg, - boolean canBubbleArg, - boolean cancelableArg, - AbstractView viewArg, - short detailArg, - int screenXArg, - int screenYArg, - int clientXArg, - int clientYArg, - boolean ctrlKeyArg, - boolean altKeyArg, - boolean shiftKeyArg, - boolean metaKeyArg, - short buttonArg, - Node relatedNodeArg) { - throw new UnsupportedOperationException(); - } + /** + * screenX indicates the horizontal coordinate at which the + * event occurred in relative to the origin of the screen coordinate system. + */ + public native int getScreenX(); + + /** + * screenY indicates the vertical coordinate at which the event + * occurred relative to the origin of the screen coordinate system. + */ + public native int getScreenY(); + + /** + * clientX indicates the horizontal coordinate at which the + * event occurred relative to the DOM implementation's client area. + */ + public native int getClientX(); + + /** + * clientY indicates the vertical coordinate at which the event + * occurred relative to the DOM implementation's client area. + */ + public native int getClientY(); + + /** + * ctrlKey indicates whether the 'ctrl' key was depressed + * during the firing of the event. + */ + public native boolean getCtrlKey(); + + /** + * shiftKey indicates whether the 'shift' key was depressed + * during the firing of the event. + */ + public native boolean getShiftKey(); + + /** + * altKey indicates whether the 'alt' key was depressed during + * the firing of the event. On some platforms this key may map to an + * alternative key name. + */ + public native boolean getAltKey(); + + /** + * metaKey indicates whether the 'meta' key was depressed + * during the firing of the event. On some platforms this key may map to + * an alternative key name. + */ + public native boolean getMetaKey(); + + /** + * During mouse events caused by the depression or release of a mouse + * button, button is used to indicate which mouse button + * changed state. + */ + public native short getButton(); + + /** + * relatedNode is used to identify a secondary node related to + * a UI event. + */ + public Node getRelatedNode() { + throw new UnsupportedOperationException(); + } + + /** + * + * @param typeArg Specifies the event type. + * @param canBubbleArg Specifies whether or not the event can bubble. + * @param cancelableArg Specifies whether or not the event's default action + * can be prevent. + * @param viewArg Specifies the Event's + * AbstractView. + * @param detailArg Specifies the Event's mouse click count. + * @param screenXArg Specifies the Event's screen x coordinate + * @param screenYArg Specifies the Event's screen y coordinate + * @param clientXArg Specifies the Event's client x coordinate + * @param clientYArg Specifies the Event's client y coordinate + * @param ctrlKeyArg Specifies whether or not control key was depressed + * during the Event. + * @param altKeyArg Specifies whether or not alt key was depressed during + * the Event. + * @param shiftKeyArg Specifies whether or not shift key was depressed + * during the Event. + * @param metaKeyArg Specifies whether or not meta key was depressed during + * the Event. + * @param buttonArg Specifies the Event's mouse button. + * @param relatedNodeArg Specifies the Event's related Node. + */ + public void initMouseEvent(String typeArg, + boolean canBubbleArg, + boolean cancelableArg, + AbstractView viewArg, + int detailArg, + int screenXArg, + int screenYArg, + int clientXArg, + int clientYArg, + boolean ctrlKeyArg, + boolean altKeyArg, + boolean shiftKeyArg, + boolean metaKeyArg, + short buttonArg, + Node relatedNodeArg) { + throw new UnsupportedOperationException(); + } }