10 April 2001

Appendix B: Java Language Binding

This appendix contains the complete Java [Java] bindings for the Level 3 Document Object Model Events.

The Java files are also available as http://www.w3.org/TR/2001/WD-DOM-Level-3-Events-20010410/java-binding.zip

org/w3c/dom/events/KeyEvent.java:

package org.w3c.dom.events;

import org.w3c.dom.views.AbstractView;
import org.w3c.dom.UIEvent;

public interface KeyEvent extends UIEvent {
    // VirtualKeyCode
    public static final int DOM_VK_UNDEFINED          = 0x0;
    public static final int DOM_VK_RIGHT_ALT          = 0x01;
    public static final int DOM_VK_LEFT_ALT           = 0x02;
    public static final int DOM_VK_LEFT_CONTROL       = 0x03;
    public static final int DOM_VK_RIGHT_CONTROL      = 0x04;
    public static final int DOM_VK_LEFT_SHIFT         = 0x05;
    public static final int DOM_VK_RIGHT_SHIFT        = 0x06;
    public static final int DOM_VK_LEFT_META          = 0x07;
    public static final int DOM_VK_RIGHT_META         = 0x08;
    public static final int DOM_VK_CAPS_LOCK          = 0x09;
    public static final int DOM_VK_DELETE             = 0x0A;
    public static final int DOM_VK_END                = 0x0B;
    public static final int DOM_VK_ENTER              = 0x0C;
    public static final int DOM_VK_ESCAPE             = 0x0D;
    public static final int DOM_VK_HOME               = 0x0E;
    public static final int DOM_VK_INSERT             = 0x0F;
    public static final int DOM_VK_NUM_LOCK           = 0x10;
    public static final int DOM_VK_PAUSE              = 0x11;
    public static final int DOM_VK_PRINTSCREEN        = 0x12;
    public static final int DOM_VK_SCROLL_LOCK        = 0x13;
    public static final int DOM_VK_LEFT               = 0x14;
    public static final int DOM_VK_RIGHT              = 0x15;
    public static final int DOM_VK_UP                 = 0x16;
    public static final int DOM_VK_DOWN               = 0x17;
    public static final int DOM_VK_PAGE_DOWN          = 0x18;
    public static final int DOM_VK_PAGE_UP            = 0x19;
    public static final int DOM_VK_F1                 = 0x1A;
    public static final int DOM_VK_F2                 = 0x1B;
    public static final int DOM_VK_F3                 = 0x1C;
    public static final int DOM_VK_F4                 = 0x1D;
    public static final int DOM_VK_F5                 = 0x1E;
    public static final int DOM_VK_F6                 = 0x1F;
    public static final int DOM_VK_F7                 = 0x20;
    public static final int DOM_VK_F8                 = 0x21;
    public static final int DOM_VK_F9                 = 0x22;
    public static final int DOM_VK_F10                = 0x23;
    public static final int DOM_VK_F11                = 0x24;
    public static final int DOM_VK_F12                = 0x25;
    public static final int DOM_VK_F13                = 0x26;
    public static final int DOM_VK_F14                = 0x27;
    public static final int DOM_VK_F15                = 0x28;
    public static final int DOM_VK_F16                = 0x29;
    public static final int DOM_VK_F17                = 0x2A;
    public static final int DOM_VK_F18                = 0x2B;
    public static final int DOM_VK_F19                = 0x2C;
    public static final int DOM_VK_F20                = 0x2D;
    public static final int DOM_VK_F21                = 0x2E;
    public static final int DOM_VK_F22                = 0x2F;
    public static final int DOM_VK_F23                = 0x30;
    public static final int DOM_VK_F24                = 0x31;

    public String getOutputString();
    public void setOutputString(String outputString);

    public int getKeyVal();
    public void setKeyVal(int keyVal);

    public int getVirtKeyVal();
    public void setVirtKeyVal(int virtKeyVal);

    public boolean getInputGenerated();
    public void setInputGenerated(boolean inputGenerated);

    public boolean getNumPad();
    public void setNumPad(boolean numPad);

    public boolean checkModifier(int modifer);

    public void initKeyEvent(String typeArg, 
                             boolean canBubbleArg, 
                             boolean cancelableArg, 
                             AbstractView viewArg, 
                             short detailArg, 
                             String outputStringArg, 
                             int keyValArg, 
                             int virtKeyValArg, 
                             boolean inputGeneratedArg, 
                             boolean numPadArg);

    public void initModifier(int modifier, 
                             boolean value);

}

org/w3c/dom/events/EventGroup.java:

package org.w3c.dom.events;

public interface EventGroup {
    public boolean isSameEventGroup(EventGroup eventGroup);

}

org/w3c/dom/events/EventTargetGroup.java:

package org.w3c.dom.events;

import org.w3c.dom.EventListener;

public interface EventTargetGroup {
    public void addEventListener(String type, 
                                 EventListener listener, 
                                 boolean useCapture, 
                                 EventGroup eventGroup);

    public void removeEventListener(String type, 
                                    EventListener listener, 
                                    boolean useCapture, 
                                    EventGroup eventGroup);

}

org/w3c/dom/events/DocumentEventGroup.java:

package org.w3c.dom.events;

public interface DocumentEventGroup {
    public EventGroup createEventGroup();

}