2
* Licensed to the Apache Software Foundation (ASF) under one or more
3
* contributor license agreements. See the NOTICE file distributed with
4
* this work for additional information regarding copyright ownership.
5
* The ASF licenses this file to You under the Apache License, Version 2.0
6
* (the "License"); you may not use this file except in compliance with
7
* the License. You may obtain a copy of the License at
9
* http://www.apache.org/licenses/LICENSE-2.0
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
18
package org.apache.xerces.dom.events;
20
import org.w3c.dom.events.EventTarget;
21
import org.w3c.dom.events.MouseEvent;
22
import org.w3c.dom.views.AbstractView;
25
* An implementation of the DOM Level 2 <code>MouseEvent</code> interface.
29
* @version $Id: MouseEventImpl.java,v 1.2 2009/12/10 03:18:08 matthewoliver Exp $
31
public class MouseEventImpl
33
implements MouseEvent {
39
private boolean fCtrlKey;
40
private boolean fAltKey;
41
private boolean fShiftKey;
42
private boolean fMetaKey;
43
private short fButton;
44
private EventTarget fRelatedTarget;
46
public int getScreenX() {
50
public int getScreenY() {
54
public int getClientX() {
58
public int getClientY() {
62
public boolean getCtrlKey() {
66
public boolean getAltKey() {
70
public boolean getShiftKey() {
74
public boolean getMetaKey() {
78
public short getButton() {
82
public EventTarget getRelatedTarget() {
83
return fRelatedTarget;
86
public void initMouseEvent(String typeArg, boolean canBubbleArg, boolean cancelableArg, AbstractView viewArg,
87
int detailArg, int screenXArg, int screenYArg, int clientXArg, int clientYArg,
88
boolean ctrlKeyArg, boolean altKeyArg, boolean shiftKeyArg, boolean metaKeyArg,
89
short buttonArg, EventTarget relatedTargetArg) {
90
fScreenX = screenXArg;
91
fScreenY = screenYArg;
92
fClientX = clientXArg;
93
fClientY = clientYArg;
94
fCtrlKey = ctrlKeyArg;
96
fShiftKey = shiftKeyArg;
97
fMetaKey = metaKeyArg;
99
fRelatedTarget = relatedTargetArg;
100
super.initUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg);