WD-DOM-Level-2-19981228


Appendix D: Java Language Binding

This appendix contains the complete Java bindings for the Level 2 Document Object Model. The definitions are divided into CSS , Events , Filters and Iterators , and Range .

D.1: Document Object Model Level 2 CSS

org/w3c/dom/css/StyleSheet.java:

package org.w3c.dom.css;

import org.w3c.dom.*;

public interface StyleSheet {
  public String             getType();
  public boolean            getDisabled();
  public void               setDisabled(boolean disabled);
  public Node               getOwningNode();
  public StyleSheet         getParentStyleSheet();
  public String             getHref();
  public String             getTitle();
  public String             getMedia();
}

org/w3c/dom/css/StyleSheetCollection.java:

package org.w3c.dom.css;

import org.w3c.dom.*;

public interface StyleSheetCollection {
  public int                getLength();
  public StyleSheet         item(int index);
}

org/w3c/dom/css/CSSStyleSheet.java:

package org.w3c.dom.css;

import org.w3c.dom.*;

public interface CSSStyleSheet extends StyleSheet {
  public CSSRuleCollection  getCssRules();
  public int                insertRule(String rule, 
                                       int index)
                                       throws DOMException;
  public void               deleteRule(int index)
                                       throws DOMException;
}

org/w3c/dom/css/CSSRuleCollection.java:

package org.w3c.dom.css;

import org.w3c.dom.*;

public interface CSSRuleCollection {
  public int                getLength();
  public CSSRule            item(int index);
}

org/w3c/dom/css/CSSRule.java:

package org.w3c.dom.css;

import org.w3c.dom.*;

public interface CSSRule {
  // RuleType
  public static final short           UNKNOWN_RULE         = 0;
  public static final short           STYLE_RULE           = 1;
  public static final short           IMPORT_RULE          = 2;
  public static final short           MEDIA_RULE           = 3;
  public static final short           FONT_FACE_RULE       = 4;
  public static final short           PAGE_RULE            = 5;

  public short              getType();
  public String             getCssText();
  public void               setCssText(String cssText);
  public CSSStyleSheet      getParentStyleSheet();
}

org/w3c/dom/css/CSSStyleRule.java:

package org.w3c.dom.css;

import org.w3c.dom.*;

public interface CSSStyleRule extends CSSRule {
  public String             getSelectorText();
  public void               setSelectorText(String selectorText);
  public CSSStyleDeclaration getStyle();
}

org/w3c/dom/css/CSSMediaRule.java:

package org.w3c.dom.css;

import org.w3c.dom.*;

public interface CSSMediaRule extends CSSRule {
  public String             getMediaTypes();
  public void               setMediaTypes(String mediaTypes);
  public CSSRuleCollection  getCssRules();
  public int                insertRule(String rule, 
                                       int index)
                                       throws DOMException;
  public void               deleteRule(int index);
}

org/w3c/dom/css/CSSFontFaceRule.java:

package org.w3c.dom.css;

import org.w3c.dom.*;

public interface CSSFontFaceRule extends CSSRule {
  public CSSStyleDeclaration getStyle();
}

org/w3c/dom/css/CSSPageRule.java:

package org.w3c.dom.css;

import org.w3c.dom.*;

public interface CSSPageRule extends CSSRule {
  public String             getSelectorText();
  public void               setSelectorText(String selectorText);
  public CSSStyleDeclaration getStyle();
}

org/w3c/dom/css/CSSImportRule.java:

package org.w3c.dom.css;

import org.w3c.dom.*;

public interface CSSImportRule extends CSSRule {
  public String             getHref();
  public void               setHref(String href);
  public String             getMedia();
  public void               setMedia(String media);
  public CSSStyleSheet      getStyleSheet();
}

org/w3c/dom/css/CSSUnknownRule.java:

package org.w3c.dom.css;

import org.w3c.dom.*;

public interface CSSUnknownRule extends CSSRule {
}

org/w3c/dom/css/CSSStyleDeclaration.java:

package org.w3c.dom.css;

import org.w3c.dom.*;

public interface CSSStyleDeclaration {
  public String             getCssText();
  public void               setCssText(String cssText);
  public String             getPropertyValue(String propertyName);
  public String             getPropertyPriority(String propertyName);
  public void               setProperty(String propertyName, 
                                        String value, 
                                        String priority)
                                        throws DOMException;
  public int                getLength();
  public String             item(int index);
}

org/w3c/dom/css/CSS2Properties.java:

package org.w3c.dom.css;

import org.w3c.dom.*;

public interface CSS2Properties {
  public String             getAzimuth();
  public void               setAzimuth(String azimuth);
  public String             getBackground();
  public void               setBackground(String background);
  public String             getBackgroundAttachment();
  public void               setBackgroundAttachment(String backgroundAttachment);
  public String             getBackgroundColor();
  public void               setBackgroundColor(String backgroundColor);
  public String             getBackgroundImage();
  public void               setBackgroundImage(String backgroundImage);
  public String             getBackgroundPosition();
  public void               setBackgroundPosition(String backgroundPosition);
  public String             getBackgroundRepeat();
  public void               setBackgroundRepeat(String backgroundRepeat);
  public String             getBorder();
  public void               setBorder(String border);
  public String             getBorderCollapse();
  public void               setBorderCollapse(String borderCollapse);
  public String             getBorderColor();
  public void               setBorderColor(String borderColor);
  public String             getBorderSpacing();
  public void               setBorderSpacing(String borderSpacing);
  public String             getBorderStyle();
  public void               setBorderStyle(String borderStyle);
  public String             getBorderTop();
  public void               setBorderTop(String borderTop);
  public String             getBorderRight();
  public void               setBorderRight(String borderRight);
  public String             getBorderBottom();
  public void               setBorderBottom(String borderBottom);
  public String             getBorderLeft();
  public void               setBorderLeft(String borderLeft);
  public String             getBorderTopColor();
  public void               setBorderTopColor(String borderTopColor);
  public String             getBorderRightColor();
  public void               setBorderRightColor(String borderRightColor);
  public String             getBorderBottomColor();
  public void               setBorderBottomColor(String borderBottomColor);
  public String             getBorderLeftColor();
  public void               setBorderLeftColor(String borderLeftColor);
  public String             getBorderTopStyle();
  public void               setBorderTopStyle(String borderTopStyle);
  public String             getBorderRightStyle();
  public void               setBorderRightStyle(String borderRightStyle);
  public String             getBorderBottomStyle();
  public void               setBorderBottomStyle(String borderBottomStyle);
  public String             getBorderLeftStyle();
  public void               setBorderLeftStyle(String borderLeftStyle);
  public String             getBorderTopWidth();
  public void               setBorderTopWidth(String borderTopWidth);
  public String             getBorderRightWidth();
  public void               setBorderRightWidth(String borderRightWidth);
  public String             getBorderBottomWidth();
  public void               setBorderBottomWidth(String borderBottomWidth);
  public String             getBorderLeftWidth();
  public void               setBorderLeftWidth(String borderLeftWidth);
  public String             getBorderWidth();
  public void               setBorderWidth(String borderWidth);
  public String             getBottom();
  public void               setBottom(String bottom);
  public String             getCaptionSide();
  public void               setCaptionSide(String captionSide);
  public String             getClear();
  public void               setClear(String clear);
  public String             getClip();
  public void               setClip(String clip);
  public String             getColor();
  public void               setColor(String color);
  public String             getContent();
  public void               setContent(String content);
  public String             getCounterIncrement();
  public void               setCounterIncrement(String counterIncrement);
  public String             getCounterReset();
  public void               setCounterReset(String counterReset);
  public String             getCue();
  public void               setCue(String cue);
  public String             getCueAfter();
  public void               setCueAfter(String cueAfter);
  public String             getCueBefore();
  public void               setCueBefore(String cueBefore);
  public String             getCursor();
  public void               setCursor(String cursor);
  public String             getDirection();
  public void               setDirection(String direction);
  public String             getDisplay();
  public void               setDisplay(String display);
  public String             getElevation();
  public void               setElevation(String elevation);
  public String             getEmptyCells();
  public void               setEmptyCells(String emptyCells);
  public String             getCssFloat();
  public void               setCssFloat(String cssFloat);
  public String             getFont();
  public void               setFont(String font);
  public String             getFontFamily();
  public void               setFontFamily(String fontFamily);
  public String             getFontSize();
  public void               setFontSize(String fontSize);
  public String             getFontSizeAdjust();
  public void               setFontSizeAdjust(String fontSizeAdjust);
  public String             getFontStretch();
  public void               setFontStretch(String fontStretch);
  public String             getFontStyle();
  public void               setFontStyle(String fontStyle);
  public String             getFontVariant();
  public void               setFontVariant(String fontVariant);
  public String             getFontWeight();
  public void               setFontWeight(String fontWeight);
  public String             getHeight();
  public void               setHeight(String height);
  public String             getLeft();
  public void               setLeft(String left);
  public String             getLetterSpacing();
  public void               setLetterSpacing(String letterSpacing);
  public String             getLineHeight();
  public void               setLineHeight(String lineHeight);
  public String             getListStyle();
  public void               setListStyle(String listStyle);
  public String             getListStyleImage();
  public void               setListStyleImage(String listStyleImage);
  public String             getListStylePosition();
  public void               setListStylePosition(String listStylePosition);
  public String             getListStyleType();
  public void               setListStyleType(String listStyleType);
  public String             getMargin();
  public void               setMargin(String margin);
  public String             getMarginTop();
  public void               setMarginTop(String marginTop);
  public String             getMarginRight();
  public void               setMarginRight(String marginRight);
  public String             getMarginBottom();
  public void               setMarginBottom(String marginBottom);
  public String             getMarginLeft();
  public void               setMarginLeft(String marginLeft);
  public String             getMarkerOffset();
  public void               setMarkerOffset(String markerOffset);
  public String             getMarks();
  public void               setMarks(String marks);
  public String             getMaxHeight();
  public void               setMaxHeight(String maxHeight);
  public String             getMaxWidth();
  public void               setMaxWidth(String maxWidth);
  public String             getMinHeight();
  public void               setMinHeight(String minHeight);
  public String             getMinWidth();
  public void               setMinWidth(String minWidth);
  public String             getOrphans();
  public void               setOrphans(String orphans);
  public String             getOutline();
  public void               setOutline(String outline);
  public String             getOutlineColor();
  public void               setOutlineColor(String outlineColor);
  public String             getOutlineStyle();
  public void               setOutlineStyle(String outlineStyle);
  public String             getOutlineWidth();
  public void               setOutlineWidth(String outlineWidth);
  public String             getOverflow();
  public void               setOverflow(String overflow);
  public String             getPadding();
  public void               setPadding(String padding);
  public String             getPaddingTop();
  public void               setPaddingTop(String paddingTop);
  public String             getPaddingRight();
  public void               setPaddingRight(String paddingRight);
  public String             getPaddingBottom();
  public void               setPaddingBottom(String paddingBottom);
  public String             getPaddingLeft();
  public void               setPaddingLeft(String paddingLeft);
  public String             getPage();
  public void               setPage(String page);
  public String             getPageBreakAfter();
  public void               setPageBreakAfter(String pageBreakAfter);
  public String             getPageBreakBefore();
  public void               setPageBreakBefore(String pageBreakBefore);
  public String             getPageBreakInside();
  public void               setPageBreakInside(String pageBreakInside);
  public String             getPause();
  public void               setPause(String pause);
  public String             getPauseAfter();
  public void               setPauseAfter(String pauseAfter);
  public String             getPauseBefore();
  public void               setPauseBefore(String pauseBefore);
  public String             getPitch();
  public void               setPitch(String pitch);
  public String             getPitchRange();
  public void               setPitchRange(String pitchRange);
  public String             getPlayDuring();
  public void               setPlayDuring(String playDuring);
  public String             getPosition();
  public void               setPosition(String position);
  public String             getQuotes();
  public void               setQuotes(String quotes);
  public String             getRichness();
  public void               setRichness(String richness);
  public String             getRight();
  public void               setRight(String right);
  public String             getSize();
  public void               setSize(String size);
  public String             getSpeak();
  public void               setSpeak(String speak);
  public String             getSpeakHeader();
  public void               setSpeakHeader(String speakHeader);
  public String             getSpeakNumeral();
  public void               setSpeakNumeral(String speakNumeral);
  public String             getSpeakPunctuation();
  public void               setSpeakPunctuation(String speakPunctuation);
  public String             getSpeechRate();
  public void               setSpeechRate(String speechRate);
  public String             getStress();
  public void               setStress(String stress);
  public String             getTableLayout();
  public void               setTableLayout(String tableLayout);
  public String             getTextAlign();
  public void               setTextAlign(String textAlign);
  public String             getTextDecoration();
  public void               setTextDecoration(String textDecoration);
  public String             getTextIndent();
  public void               setTextIndent(String textIndent);
  public String             getTextShadow();
  public void               setTextShadow(String textShadow);
  public String             getTextTransform();
  public void               setTextTransform(String textTransform);
  public String             getTop();
  public void               setTop(String top);
  public String             getUnicodeBidi();
  public void               setUnicodeBidi(String unicodeBidi);
  public String             getVerticalAlign();
  public void               setVerticalAlign(String verticalAlign);
  public String             getVisibility();
  public void               setVisibility(String visibility);
  public String             getVoiceFamily();
  public void               setVoiceFamily(String voiceFamily);
  public String             getVolume();
  public void               setVolume(String volume);
  public String             getWhiteSpace();
  public void               setWhiteSpace(String whiteSpace);
  public String             getWidows();
  public void               setWidows(String widows);
  public String             getWidth();
  public void               setWidth(String width);
  public String             getWordSpacing();
  public void               setWordSpacing(String wordSpacing);
  public String             getZIndex();
  public void               setZIndex(String zIndex);
}


D.2: Document Object Model Level 2 Events

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

package org.w3c.dom.events;

import org.w3c.dom.*;

public interface EventCapturer {
  public void               captureEvent(String type);
  public void               releaseEvent(String type);
  public void               routeEvent();
}

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

package org.w3c.dom.events;

import org.w3c.dom.*;

public interface Event {
  public String             getType();
  public void               setType(String type);
  public Node               getTarget();
  public void               setTarget(Node target);
  public boolean            getCancelBubble();
  public void               setCancelBubble(boolean cancelBubble);
  public boolean            getReturnValue();
  public void               setReturnValue(boolean returnValue);
}

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

package org.w3c.dom.events;

import org.w3c.dom.*;

public interface UIEvent extends Event {
  public int                getScreenX();
  public void               setScreenX(int screenX);
  public int                getScreenY();
  public void               setScreenY(int screenY);
  public int                getClientX();
  public void               setClientX(int clientX);
  public int                getClientY();
  public void               setClientY(int clientY);
  public boolean            getAltKey();
  public void               setAltKey(boolean altKey);
  public boolean            getCtrlKey();
  public void               setCtrlKey(boolean ctrlKey);
  public boolean            getShiftKey();
  public void               setShiftKey(boolean shiftKey);
  public int                getKeyCode();
  public void               setKeyCode(int keyCode);
  public int                getCharCode();
  public void               setCharCode(int charCode);
  public short              getButton();
  public void               setButton(short button);
}


D.3: Document Object Model Level 2 Filters and Iterators

org/w3c/dom/fi/NodeIterator.java:

package org.w3c.dom.fi;

import org.w3c.dom.*;

public interface NodeIterator {
  public Node               nextNode();
  public void               reset();
}

org/w3c/dom/fi/NodeFilter.java:

package org.w3c.dom.fi;

import org.w3c.dom.*;

public interface NodeFilter {
  public boolean            acceptNode(Node n);
}


D.4: Document Object Model Level 2 Range

org/w3c/dom/range/RangeException.java:

package org.w3c.dom.range;

import org.w3c.dom.*;

public abstract class RangeException extends RuntimeException {
  public RangeException(short code, String message) {
     super(message);
     this.code = code;
  }
  public short   code;
  // RangeExceptionCode
  public static final short           BAD_ENDPOINTS_ERR    = 201;
  public static final short           INVALID_NODE_TYPE_ERR = 202;
  public static final short           NULL_PARENT_ERR      = 203;

}

org/w3c/dom/range/Range.java:

package org.w3c.dom.range;

import org.w3c.dom.*;

public interface Range {
  public Node               getStartParent();
  public int                getStartOffset();
  public Node               getEndParent();
  public int                getEndOffset();
  public boolean            getIsCollapsed();
  public Node               getCommonParent();
  public void               setStart(Node parent, 
                                     int offset)
                                     throws RangeException;
  public void               setEnd(Node parent, 
                                   int offset)
                                   throws RangeException;
  public void               setStartBefore(Node sibling)
                                           throws RangeException;
  public void               setStartAfter(Node sibling)
                                          throws RangeException;
  public void               setEndBefore(Node sibling)
                                         throws RangeException;
  public void               setEndAfter(Node sibling)
                                        throws RangeException;
  public void               collapse(boolean toStart);
  public void               selectNode(Node n)
                                       throws RangeException;
  public void               selectNodeContents(Node n)
                                               throws RangeException;

  public static final int StartToStart = 1;
  public static final int StartToEnd   = 2;
  public static final int EndToEnd     = 3;
  public static final int EndToStart   = 4;


  public short              compareEndPoints(int how, 
                                             Range sourceRange)
                                             throws DOMException;
  public void               deleteContents()
                                           throws DOMException;
  public DocumentFragment   extractContents()
                                            throws DOMException;
  public DocumentFragment   cloneContents();
  public void               insertNode(Node n)
                                       throws DOMException, RangeException;
  public void               surroundContents(Node n)
                                             throws DOMException, RangeException;
  public Range              cloneRange();
  public String             toString();
}