feat(jdk8): move files to new folder to avoid resources compiled.

This commit is contained in:
2025-09-07 15:25:52 +08:00
parent 3f0047bf6f
commit 8c35cfb1c0
17415 changed files with 217 additions and 213 deletions

View File

@@ -0,0 +1,85 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* This file is available under and governed by the GNU General Public
* License version 2 only, as published by the Free Software Foundation.
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*
* Copyright (c) 2000 World Wide Web Consortium,
* (Massachusetts Institute of Technology, Institut National de
* Recherche en Informatique et en Automatique, Keio University). All
* Rights Reserved. This program is distributed under the W3C's Software
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE.
* See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom.events;
import org.w3c.dom.DOMException;
/**
* The <code>DocumentEvent</code> interface provides a mechanism by which the
* user can create an Event of a type supported by the implementation. It is
* expected that the <code>DocumentEvent</code> interface will be
* implemented on the same object which implements the <code>Document</code>
* interface in an implementation which supports the Event model.
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113'>Document Object Model (DOM) Level 2 Events Specification</a>.
* @since DOM Level 2
*/
public interface DocumentEvent {
/**
*
* @param eventType The <code>eventType</code> parameter specifies the
* type of <code>Event</code> interface to be created. If the
* <code>Event</code> interface specified is supported by the
* implementation this method will return a new <code>Event</code> of
* the interface type requested. If the <code>Event</code> is to be
* dispatched via the <code>dispatchEvent</code> method the
* appropriate event init method must be called after creation in
* order to initialize the <code>Event</code>'s values. As an example,
* a user wishing to synthesize some kind of <code>UIEvent</code>
* would call <code>createEvent</code> with the parameter "UIEvents".
* The <code>initUIEvent</code> method could then be called on the
* newly created <code>UIEvent</code> to set the specific type of
* UIEvent to be dispatched and set its context information.The
* <code>createEvent</code> method is used in creating
* <code>Event</code>s when it is either inconvenient or unnecessary
* for the user to create an <code>Event</code> themselves. In cases
* where the implementation provided <code>Event</code> is
* insufficient, users may supply their own <code>Event</code>
* implementations for use with the <code>dispatchEvent</code> method.
* @return The newly created <code>Event</code>
* @exception DOMException
* NOT_SUPPORTED_ERR: Raised if the implementation does not support the
* type of <code>Event</code> interface requested
*/
public Event createEvent(String eventType)
throws DOMException;
}

View File

@@ -0,0 +1,170 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* This file is available under and governed by the GNU General Public
* License version 2 only, as published by the Free Software Foundation.
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*
* Copyright (c) 2000 World Wide Web Consortium,
* (Massachusetts Institute of Technology, Institut National de
* Recherche en Informatique et en Automatique, Keio University). All
* Rights Reserved. This program is distributed under the W3C's Software
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE.
* See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom.events;
/**
* The <code>Event</code> interface is used to provide contextual information
* about an event to the handler processing the event. An object which
* implements the <code>Event</code> interface is generally passed as the
* first parameter to an event handler. More specific context information is
* passed to event handlers by deriving additional interfaces from
* <code>Event</code> which contain information directly relating to the
* type of event they accompany. These derived interfaces are also
* implemented by the object passed to the event listener.
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113'>Document Object Model (DOM) Level 2 Events Specification</a>.
* @since DOM Level 2
*/
public interface Event {
// PhaseType
/**
* The current event phase is the capturing phase.
*/
public static final short CAPTURING_PHASE = 1;
/**
* The event is currently being evaluated at the target
* <code>EventTarget</code>.
*/
public static final short AT_TARGET = 2;
/**
* The current event phase is the bubbling phase.
*/
public static final short BUBBLING_PHASE = 3;
/**
* The name of the event (case-insensitive). The name must be an XML name.
*/
public String getType();
/**
* Used to indicate the <code>EventTarget</code> to which the event was
* originally dispatched.
*/
public EventTarget getTarget();
/**
* Used to indicate the <code>EventTarget</code> whose
* <code>EventListeners</code> are currently being processed. This is
* particularly useful during capturing and bubbling.
*/
public EventTarget getCurrentTarget();
/**
* Used to indicate which phase of event flow is currently being
* evaluated.
*/
public short getEventPhase();
/**
* Used to indicate 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();
/**
* Used to indicate 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();
/**
* Used to specify the time (in milliseconds relative to the epoch) at
* which the event was created. Due to the fact that some systems may
* not provide this information the value of <code>timeStamp</code> may
* be not available for all events. When not available, a value of 0
* will be returned. Examples of epoch time are the time of the system
* start or 0:0:0 UTC 1st January 1970.
*/
public long getTimeStamp();
/**
* The <code>stopPropagation</code> method is used prevent further
* propagation of an event during event flow. If this method is called
* by any <code>EventListener</code> the event will cease propagating
* through the tree. The event will complete dispatch to all listeners
* on the current <code>EventTarget</code> before event flow stops. This
* method may be used during any stage of event flow.
*/
public void stopPropagation();
/**
* If an event is cancelable, the <code>preventDefault</code> 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
* <code>preventDefault</code> 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
* <code>preventDefault</code> has been called it will remain in effect
* throughout the remainder of the event's propagation. This method may
* be used during any stage of event flow.
*/
public void preventDefault();
/**
* The <code>initEvent</code> method is used to initialize the value of an
* <code>Event</code> created through the <code>DocumentEvent</code>
* interface. This method may only be called before the
* <code>Event</code> has been dispatched via the
* <code>dispatchEvent</code> method, though it may be called multiple
* times during that phase if necessary. If called multiple times the
* final invocation takes precedence. If called from a subclass of
* <code>Event</code> interface only the values specified in the
* <code>initEvent</code> method are modified, all other attributes are
* left unchanged.
* @param eventTypeArg Specifies the event type. This type may be any
* event type currently defined in this specification or a new event
* type.. The string must be an XML name. 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. It is
* also strongly recommended that third parties adding their own
* events use their own prefix to avoid confusion and lessen the
* probability of conflicts with other new events.
* @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);
}

View File

@@ -0,0 +1,65 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* This file is available under and governed by the GNU General Public
* License version 2 only, as published by the Free Software Foundation.
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*
* Copyright (c) 2000 World Wide Web Consortium,
* (Massachusetts Institute of Technology, Institut National de
* Recherche en Informatique et en Automatique, Keio University). All
* Rights Reserved. This program is distributed under the W3C's Software
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE.
* See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom.events;
/**
* Event operations may throw an <code>EventException</code> as specified in
* their method descriptions.
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113'>Document Object Model (DOM) Level 2 Events Specification</a>.
* @since DOM Level 2
*/
public class EventException extends RuntimeException {
public EventException(short code, String message) {
super(message);
this.code = code;
}
public short code;
// EventExceptionCode
/**
* If the <code>Event</code>'s type was not specified by initializing the
* event before the method was called. Specification of the Event's type
* as <code>null</code> or an empty string will also trigger this
* exception.
*/
public static final short UNSPECIFIED_EVENT_TYPE_ERR = 0;
}

View File

@@ -0,0 +1,70 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* This file is available under and governed by the GNU General Public
* License version 2 only, as published by the Free Software Foundation.
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*
* Copyright (c) 2000 World Wide Web Consortium,
* (Massachusetts Institute of Technology, Institut National de
* Recherche en Informatique et en Automatique, Keio University). All
* Rights Reserved. This program is distributed under the W3C's Software
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE.
* See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom.events;
/**
* The <code>EventListener</code> interface is the primary method for
* handling events. Users implement the <code>EventListener</code> interface
* and register their listener on an <code>EventTarget</code> using the
* <code>AddEventListener</code> method. The users should also remove their
* <code>EventListener</code> from its <code>EventTarget</code> after they
* have completed using the listener.
* <p> When a <code>Node</code> is copied using the <code>cloneNode</code>
* method the <code>EventListener</code>s attached to the source
* <code>Node</code> are not attached to the copied <code>Node</code>. If
* the user wishes the same <code>EventListener</code>s to be added to the
* newly created copy the user must add them manually.
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113'>Document Object Model (DOM) Level 2 Events Specification</a>.
* @since DOM Level 2
*/
public interface EventListener {
/**
* This method is called whenever an event occurs of the type for which
* the <code> EventListener</code> interface was registered.
* @param evt The <code>Event</code> contains contextual information
* about the event. It also contains the <code>stopPropagation</code>
* and <code>preventDefault</code> methods which are used in
* determining the event's flow and default action.
*/
public void handleEvent(Event evt);
}

View File

@@ -0,0 +1,131 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* This file is available under and governed by the GNU General Public
* License version 2 only, as published by the Free Software Foundation.
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*
* Copyright (c) 2000 World Wide Web Consortium,
* (Massachusetts Institute of Technology, Institut National de
* Recherche en Informatique et en Automatique, Keio University). All
* Rights Reserved. This program is distributed under the W3C's Software
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE.
* See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom.events;
/**
* The <code>EventTarget</code> interface is implemented by all
* <code>Nodes</code> in an implementation which supports the DOM Event
* Model. Therefore, this interface can be obtained by using
* binding-specific casting methods on an instance of the <code>Node</code>
* interface. The interface allows registration and removal of
* <code>EventListeners</code> on an <code>EventTarget</code> and dispatch
* of events to that <code>EventTarget</code>.
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113'>Document Object Model (DOM) Level 2 Events Specification</a>.
* @since DOM Level 2
*/
public interface EventTarget {
/**
* This method allows the registration of event listeners on the event
* target. If an <code>EventListener</code> is added to an
* <code>EventTarget</code> while it is processing an event, it will not
* be triggered by the current actions but may be triggered during a
* later stage of event flow, such as the bubbling phase.
* <br> If multiple identical <code>EventListener</code>s are registered
* on the same <code>EventTarget</code> with the same parameters the
* duplicate instances are discarded. They do not cause the
* <code>EventListener</code> to be called twice and since they are
* discarded they do not need to be removed with the
* <code>removeEventListener</code> method.
* @param type The event type for which the user is registering
* @param listener The <code>listener</code> parameter takes an interface
* implemented by the user which contains the methods to be called
* when the event occurs.
* @param useCapture If true, <code>useCapture</code> indicates that the
* user wishes to initiate capture. After initiating capture, all
* events of the specified type will be dispatched to the registered
* <code>EventListener</code> before being dispatched to any
* <code>EventTargets</code> beneath them in the tree. Events which
* are bubbling upward through the tree will not trigger an
* <code>EventListener</code> designated to use capture.
*/
public void addEventListener(String type,
EventListener listener,
boolean useCapture);
/**
* This method allows the removal of event listeners from the event
* target. If an <code>EventListener</code> is removed from an
* <code>EventTarget</code> while it is processing an event, it will not
* be triggered by the current actions. <code>EventListener</code>s can
* never be invoked after being removed.
* <br>Calling <code>removeEventListener</code> with arguments which do
* not identify any currently registered <code>EventListener</code> on
* the <code>EventTarget</code> has no effect.
* @param type Specifies the event type of the <code>EventListener</code>
* being removed.
* @param listener The <code>EventListener</code> parameter indicates the
* <code>EventListener </code> to be removed.
* @param useCapture Specifies whether the <code>EventListener</code>
* being removed was registered as a capturing listener or not. If a
* listener was registered twice, one with capture and one without,
* each must be removed separately. Removal of a capturing listener
* does not affect a non-capturing version of the same listener, and
* vice versa.
*/
public void removeEventListener(String type,
EventListener listener,
boolean useCapture);
/**
* This method allows the dispatch of events into the implementations
* event model. Events dispatched in this manner will have the same
* capturing and bubbling behavior as events dispatched directly by the
* implementation. The target of the event is the
* <code> EventTarget</code> on which <code>dispatchEvent</code> is
* called.
* @param evt Specifies the event type, behavior, and contextual
* information to be used in processing the event.
* @return The return value of <code>dispatchEvent</code> indicates
* whether any of the listeners which handled the event called
* <code>preventDefault</code>. If <code>preventDefault</code> was
* called the value is false, else the value is true.
* @exception EventException
* UNSPECIFIED_EVENT_TYPE_ERR: Raised if the <code>Event</code>'s type
* was not specified by initializing the event before
* <code>dispatchEvent</code> was called. Specification of the
* <code>Event</code>'s type as <code>null</code> or an empty string
* will also trigger this exception.
*/
public boolean dispatchEvent(Event evt)
throws EventException;
}

View File

@@ -0,0 +1,185 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* This file is available under and governed by the GNU General Public
* License version 2 only, as published by the Free Software Foundation.
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*
* Copyright (c) 2000 World Wide Web Consortium,
* (Massachusetts Institute of Technology, Institut National de
* Recherche en Informatique et en Automatique, Keio University). All
* Rights Reserved. This program is distributed under the W3C's Software
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE.
* See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom.events;
import org.w3c.dom.views.AbstractView;
/**
* The <code>MouseEvent</code> interface provides specific contextual
* information associated with Mouse events.
* <p>The <code>detail</code> attribute inherited from <code>UIEvent</code>
* indicates the number of times a mouse button has been pressed and
* released over the same screen location during a user action. The
* attribute value is 1 when the user begins this action and increments by 1
* for each full sequence of pressing and releasing. If the user moves the
* mouse between the mousedown and mouseup the value will be set to 0,
* indicating that no click is occurring.
* <p>In the case of nested elements mouse events are always targeted at the
* most deeply nested element. Ancestors of the targeted element may use
* bubbling to obtain notification of mouse events which occur within its
* descendent elements.
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113'>Document Object Model (DOM) Level 2 Events Specification</a>.
* @since DOM Level 2
*/
public interface MouseEvent extends UIEvent {
/**
* The horizontal coordinate at which the event occurred relative to the
* origin of the screen coordinate system.
*/
public int getScreenX();
/**
* The vertical coordinate at which the event occurred relative to the
* origin of the screen coordinate system.
*/
public int getScreenY();
/**
* The horizontal coordinate at which the event occurred relative to the
* DOM implementation's client area.
*/
public int getClientX();
/**
* The vertical coordinate at which the event occurred relative to the DOM
* implementation's client area.
*/
public int getClientY();
/**
* Used to indicate whether the 'ctrl' key was depressed during the firing
* of the event.
*/
public boolean getCtrlKey();
/**
* Used to indicate whether the 'shift' key was depressed during the
* firing of the event.
*/
public boolean getShiftKey();
/**
* Used to indicate 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 boolean getAltKey();
/**
* Used to indicate 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 boolean getMetaKey();
/**
* During mouse events caused by the depression or release of a mouse
* button, <code>button</code> is used to indicate which mouse button
* changed state. The values for <code>button</code> range from zero to
* indicate the left button of the mouse, one to indicate the middle
* button if present, and two to indicate the right button. For mice
* configured for left handed use in which the button actions are
* reversed the values are instead read from right to left.
*/
public short getButton();
/**
* Used to identify a secondary <code>EventTarget</code> related to a UI
* event. Currently this attribute is used with the mouseover event to
* indicate the <code>EventTarget</code> which the pointing device
* exited and with the mouseout event to indicate the
* <code>EventTarget</code> which the pointing device entered.
*/
public EventTarget getRelatedTarget();
/**
* The <code>initMouseEvent</code> method is used to initialize the value
* of a <code>MouseEvent</code> created through the
* <code>DocumentEvent</code> interface. This method may only be called
* before the <code>MouseEvent</code> has been dispatched via the
* <code>dispatchEvent</code> method, though it may be called multiple
* times during that phase if necessary. If called multiple times, the
* final invocation takes precedence.
* @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 prevented.
* @param viewArg Specifies the <code>Event</code>'s
* <code>AbstractView</code>.
* @param detailArg Specifies the <code>Event</code>'s mouse click count.
* @param screenXArg Specifies the <code>Event</code>'s screen x
* coordinate
* @param screenYArg Specifies the <code>Event</code>'s screen y
* coordinate
* @param clientXArg Specifies the <code>Event</code>'s client x
* coordinate
* @param clientYArg Specifies the <code>Event</code>'s client y
* coordinate
* @param ctrlKeyArg Specifies whether or not control key was depressed
* during the <code>Event</code>.
* @param altKeyArg Specifies whether or not alt key was depressed during
* the <code>Event</code>.
* @param shiftKeyArg Specifies whether or not shift key was depressed
* during the <code>Event</code>.
* @param metaKeyArg Specifies whether or not meta key was depressed
* during the <code>Event</code>.
* @param buttonArg Specifies the <code>Event</code>'s mouse button.
* @param relatedTargetArg Specifies the <code>Event</code>'s related
* <code>EventTarget</code>.
*/
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,
EventTarget relatedTargetArg);
}

View File

@@ -0,0 +1,137 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* This file is available under and governed by the GNU General Public
* License version 2 only, as published by the Free Software Foundation.
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*
* Copyright (c) 2000 World Wide Web Consortium,
* (Massachusetts Institute of Technology, Institut National de
* Recherche en Informatique et en Automatique, Keio University). All
* Rights Reserved. This program is distributed under the W3C's Software
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE.
* See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom.events;
import org.w3c.dom.Node;
/**
* The <code>MutationEvent</code> interface provides specific contextual
* information associated with Mutation events.
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113'>Document Object Model (DOM) Level 2 Events Specification</a>.
* @since DOM Level 2
*/
public interface MutationEvent extends Event {
// attrChangeType
/**
* The <code>Attr</code> was modified in place.
*/
public static final short MODIFICATION = 1;
/**
* The <code>Attr</code> was just added.
*/
public static final short ADDITION = 2;
/**
* The <code>Attr</code> was just removed.
*/
public static final short REMOVAL = 3;
/**
* <code>relatedNode</code> is used to identify a secondary node related
* to a mutation event. For example, if a mutation event is dispatched
* to a node indicating that its parent has changed, the
* <code>relatedNode</code> is the changed parent. If an event is
* instead dispatched to a subtree indicating a node was changed within
* it, the <code>relatedNode</code> is the changed node. In the case of
* the DOMAttrModified event it indicates the <code>Attr</code> node
* which was modified, added, or removed.
*/
public Node getRelatedNode();
/**
* <code>prevValue</code> indicates the previous value of the
* <code>Attr</code> node in DOMAttrModified events, and of the
* <code>CharacterData</code> node in DOMCharacterDataModified events.
*/
public String getPrevValue();
/**
* <code>newValue</code> indicates the new value of the <code>Attr</code>
* node in DOMAttrModified events, and of the <code>CharacterData</code>
* node in DOMCharacterDataModified events.
*/
public String getNewValue();
/**
* <code>attrName</code> indicates the name of the changed
* <code>Attr</code> node in a DOMAttrModified event.
*/
public String getAttrName();
/**
* <code>attrChange</code> indicates the type of change which triggered
* the DOMAttrModified event. The values can be <code>MODIFICATION</code>
* , <code>ADDITION</code>, or <code>REMOVAL</code>.
*/
public short getAttrChange();
/**
* The <code>initMutationEvent</code> method is used to initialize the
* value of a <code>MutationEvent</code> created through the
* <code>DocumentEvent</code> interface. This method may only be called
* before the <code>MutationEvent</code> has been dispatched via the
* <code>dispatchEvent</code> method, though it may be called multiple
* times during that phase if necessary. If called multiple times, the
* final invocation takes precedence.
* @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 prevented.
* @param relatedNodeArg Specifies the <code>Event</code>'s related Node.
* @param prevValueArg Specifies the <code>Event</code>'s
* <code>prevValue</code> attribute. This value may be null.
* @param newValueArg Specifies the <code>Event</code>'s
* <code>newValue</code> attribute. This value may be null.
* @param attrNameArg Specifies the <code>Event</code>'s
* <code>attrName</code> attribute. This value may be null.
* @param attrChangeArg Specifies the <code>Event</code>'s
* <code>attrChange</code> attribute
*/
public void initMutationEvent(String typeArg,
boolean canBubbleArg,
boolean cancelableArg,
Node relatedNodeArg,
String prevValueArg,
String newValueArg,
String attrNameArg,
short attrChangeArg);
}

View File

@@ -0,0 +1,87 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* This file is available under and governed by the GNU General Public
* License version 2 only, as published by the Free Software Foundation.
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*
* Copyright (c) 2000 World Wide Web Consortium,
* (Massachusetts Institute of Technology, Institut National de
* Recherche en Informatique et en Automatique, Keio University). All
* Rights Reserved. This program is distributed under the W3C's Software
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE.
* See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom.events;
import org.w3c.dom.views.AbstractView;
/**
* The <code>UIEvent</code> interface provides specific contextual information
* associated with User Interface events.
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113'>Document Object Model (DOM) Level 2 Events Specification</a>.
* @since DOM Level 2
*/
public interface UIEvent extends Event {
/**
* The <code>view</code> attribute identifies the <code>AbstractView</code>
* from which the event was generated.
*/
public AbstractView getView();
/**
* Specifies some detail information about the <code>Event</code>,
* depending on the type of event.
*/
public int getDetail();
/**
* The <code>initUIEvent</code> method is used to initialize the value of
* a <code>UIEvent</code> created through the <code>DocumentEvent</code>
* interface. This method may only be called before the
* <code>UIEvent</code> has been dispatched via the
* <code>dispatchEvent</code> method, though it may be called multiple
* times during that phase if necessary. If called multiple times, the
* final invocation takes precedence.
* @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 prevented.
* @param viewArg Specifies the <code>Event</code>'s
* <code>AbstractView</code>.
* @param detailArg Specifies the <code>Event</code>'s detail.
*/
public void initUIEvent(String typeArg,
boolean canBubbleArg,
boolean cancelableArg,
AbstractView viewArg,
int detailArg);
}