~vcs-imports/xena/trunk

« back to all changes in this revision

Viewing changes to ext/src/xerces-2_9_1/src/org/apache/xerces/dom/events/MouseEventImpl.java

  • Committer: matthewoliver
  • Date: 2009-12-10 03:18:07 UTC
  • Revision ID: vcs-imports@canonical.com-20091210031807-l086qguzdlljtkl9
Merged Xena Testing into Xena Stable for the Xena 5 release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
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
 
8
 * 
 
9
 *      http://www.apache.org/licenses/LICENSE-2.0
 
10
 * 
 
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.
 
16
 */
 
17
 
 
18
package org.apache.xerces.dom.events;
 
19
 
 
20
import org.w3c.dom.events.EventTarget;
 
21
import org.w3c.dom.events.MouseEvent;
 
22
import org.w3c.dom.views.AbstractView;
 
23
 
 
24
/**
 
25
 * An implementation of the DOM Level 2 <code>MouseEvent</code> interface.
 
26
 * 
 
27
 * @xerces.internal 
 
28
 * 
 
29
 * @version $Id: MouseEventImpl.java,v 1.2 2009/12/10 03:18:08 matthewoliver Exp $
 
30
 */
 
31
public class MouseEventImpl 
 
32
    extends UIEventImpl 
 
33
    implements MouseEvent {
 
34
    
 
35
    private int fScreenX;
 
36
    private int fScreenY;
 
37
    private int fClientX;
 
38
    private int fClientY;
 
39
    private boolean fCtrlKey;
 
40
    private boolean fAltKey;
 
41
    private boolean fShiftKey;
 
42
    private boolean fMetaKey;
 
43
    private short fButton;
 
44
    private EventTarget fRelatedTarget;
 
45
 
 
46
    public int getScreenX() {
 
47
        return fScreenX;
 
48
    }
 
49
 
 
50
    public int getScreenY() {
 
51
        return fScreenY;
 
52
    }
 
53
 
 
54
    public int getClientX() {
 
55
        return fClientX;
 
56
    }
 
57
 
 
58
    public int getClientY() {
 
59
        return fClientY;
 
60
    }
 
61
 
 
62
    public boolean getCtrlKey() {
 
63
        return fCtrlKey;
 
64
    }
 
65
    
 
66
    public boolean getAltKey() {
 
67
        return fAltKey;
 
68
    }
 
69
 
 
70
    public boolean getShiftKey() {
 
71
        return fShiftKey;
 
72
    }
 
73
 
 
74
    public boolean getMetaKey() {
 
75
        return fMetaKey;
 
76
    }
 
77
 
 
78
    public short getButton() {
 
79
        return fButton;
 
80
    }
 
81
 
 
82
    public EventTarget getRelatedTarget() {
 
83
        return fRelatedTarget;
 
84
    }
 
85
 
 
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;
 
95
        fAltKey = altKeyArg;
 
96
        fShiftKey = shiftKeyArg;
 
97
        fMetaKey = metaKeyArg;
 
98
        fButton = buttonArg;
 
99
        fRelatedTarget = relatedTargetArg;
 
100
        super.initUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg);
 
101
    }
 
102
}