sk.baka.ikslibs
Enum EventClassEnum

java.lang.Object
  extended by java.lang.Enum<EventClassEnum>
      extended by sk.baka.ikslibs.EventClassEnum
All Implemented Interfaces:
Serializable, Comparable<EventClassEnum>

public enum EventClassEnum
extends Enum<EventClassEnum>

All default event classes, as specified in event specification.

Author:
Martin Vysny

Enum Constant Summary
HTML
           The HTML event module is composed of events listed in HTML 4.0 and additional events which are supported in DOM Level 0 browsers.
Mouse
           The Mouse event module is composed of events listed in HTML 4.0 and additional events which are supported in DOM Level 0 browsers.
Mutation
           The mutation event module is designed to allow notification of any changes to the structure of a document, including attr and text modifications.
UI
           The User Interface event module is composed of events listed in HTML 4.0 and additional events which are supported in DOM Level 0 browsers.
 
Method Summary
 Node getMutatedNode(MutationEvent event)
          Returns the node being mutated by a mutation event (the attribute that was inserted, deleted or modified, the character data being modified, node being inserted or deleted, etc).
 boolean isAddition(MutationEvent event)
          Checks if given event is a node insertion event.
 boolean isModification(MutationEvent event)
          Checks if given event is a node modification event.
 boolean isRemoval(MutationEvent event)
          Checks if given event is a node removal event.
static EventClassEnum valueOf(String name)
          Returns the enum constant of this type with the specified name.
static EventClassEnum[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UI

public static final EventClassEnum UI

The User Interface event module is composed of events listed in HTML 4.0 and additional events which are supported in DOM Level 0 browsers.

A DOM application may use the hasFeature(feature, version) method of the DOMImplementation interface with parameter values "UIEvents" and "2.0" (respectively) to determine whether or not the User Interface event module is supported by the implementation. In order to fully support this module, an implementation must also support the "Events" feature defined in this specification and the "Views" feature defined in the DOM Level 2 Views specification [DOM Level 2 Views]. Please, refer to additional information about conformance in the DOM Level 2 Core specification [DOM Level 2 Core].


Mouse

public static final EventClassEnum Mouse

The Mouse event module is composed of events listed in HTML 4.0 and additional events which are supported in DOM Level 0 browsers. This event module is specifically designed for use with mouse input devices.

A DOM application may use the hasFeature(feature, version) method of the DOMImplementation interface with parameter values "MouseEvents" and "2.0" (respectively) to determine whether or not the Mouse event module is supported by the implementation. In order to fully support this module, an implementation must also support the "UIEvents" feature defined in this specification. Please, refer to additional information about conformance in the DOM Level 2 Core specification [DOM Level 2 Core].


Mutation

public static final EventClassEnum Mutation

The mutation event module is designed to allow notification of any changes to the structure of a document, including attr and text modifications. It may be noted that none of the mutation events listed are designated as cancelable. This stems from the fact that it is very difficult to make use of existing DOM interfaces which cause document modifications if any change to the document might or might not take place due to cancelation of the related event. Although this is still a desired capability, it was decided that it would be better left until the addition of transactions into the DOM.

Many single modifications of the tree can cause multiple mutation events to be fired. Rather than attempt to specify the ordering of mutation events due to every possible modification of the tree, the ordering of these events is left to the implementation.

A DOM application may use the hasFeature(feature, version) method of the DOMImplementation interface with parameter values "MutationEvents" and "2.0" (respectively) to determine whether or not the Mutation event module is supported by the implementation. In order to fully support this module, an implementation must also support the "Events" feature defined in this specification. Please, refer to additional information about conformance in the DOM Level 2 Core specification [DOM Level 2 Core].


HTML

public static final EventClassEnum HTML

The HTML event module is composed of events listed in HTML 4.0 and additional events which are supported in DOM Level 0 browsers.

A DOM application may use the hasFeature(feature, version) method of the DOMImplementation interface with parameter values "HTMLEvents" and "2.0" (respectively) to determine whether or not the HTML event module is supported by the implementation. In order to fully support this module, an implementation must also support the "Events" feature defined in this specification. Please, refer to additional information about conformance in the DOM Level 2 Core specification [DOM Level 2 Core].

Method Detail

values

public static final EventClassEnum[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(EventClassEnum c : EventClassEnum.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static EventClassEnum valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

getMutatedNode

public Node getMutatedNode(MutationEvent event)
Returns the node being mutated by a mutation event (the attribute that was inserted, deleted or modified, the character data being modified, node being inserted or deleted, etc). Applicable to the Mutation constant only.

Parameters:
event - event to check.
Returns:
the node that was mutated (or is going to be mutated) by given event. Returns null on non-mutating events.

isRemoval

public boolean isRemoval(MutationEvent event)
Checks if given event is a node removal event. Applicable to the Mutation constant only.

Parameters:
event - the event to check
Returns:
true if a node is about to be removed from the document.

isModification

public boolean isModification(MutationEvent event)
Checks if given event is a node modification event. Applicable to the Mutation constant only.

Parameters:
event - the event to check
Returns:
true if a node is about to be modified (or the node was modified if the event is bubbling).

isAddition

public boolean isAddition(MutationEvent event)
Checks if given event is a node insertion event. Applicable to the Mutation constant only.

Parameters:
event - the event to check
Returns:
true if a node was just recently inserted in the document.


Copyright © 2006 Martin Vysny - baka. All Rights Reserved.