This appendix contains the complete Java [Java] bindings for the Level 3 Document Object Views and Formatting.
The Java files are also available as http://www.w3.org/TR/2000/WD-DOM-Level-3-Views-20001115/java-binding.zip
package org.w3c.dom.views; import org.w3c.dom.Node; import org.w3c.dom.DOMException; public interface View { public void select(Node boundary, int offset, boolean extend, boolean add); public Segment createSegment(); public boolean matchFirstSegment(Segment todo) throws DOMException; public int getIntegerProperty(String name) throws DOMException; public String getStringProperty(String name) throws DOMException; public boolean getBooleanProperty(boolean name) throws DOMException; public Node getContentPropertyNode(String name) throws DOMException; public int getContentPropertyOffset(String name) throws DOMException; }
package org.w3c.dom.views; import org.w3c.dom.Node; public interface Segment extends Match { public Match getCriteria(); public void setCriteria(Match criteria); public String getOrder(); public void setOrder(String order); public void addItem(Item add); public MatchString createMatchString(short test, String name, String value); public MatchInteger createMatchInteger(short test, String name, int value); public MatchBoolean createMatchBoolean(short test, String name, boolean value); public MatchContent createMatchContent(short test, String name, int offset, Node node); public MatchSet createMatchSet(short test); public StringItem createStringItem(String name); public IntegerItem createIntegerItem(String name); public BooleanItem createBooleanItem(String name); public ContentItem createContentItem(String name); public void getItem(int index); public boolean getNext(); }
package org.w3c.dom.views; public interface Match { // MatchTestGroup public static final short IS_EQUAL = 0; public static final short IS_NOT_EQUAL = 1; public static final short INT_PRECEDES = 2; public static final short INT_PRECEDES_OR_EQUALS = 3; public static final short INT_FOLLOWS = 4; public static final short INT_FOLLOWS_OR_EQUALS = 5; public static final short STR_STARTS_WITH = 6; public static final short STR_ENDS_WITH = 7; public static final short STR_CONTAINS = 8; public static final short SET_ANY = 9; public static final short SET_ALL = 10; public static final short SET_NOT_ANY = 11; public static final short SET_NOT_ALL = 12; public short getTest(); }
package org.w3c.dom.views; public interface MatchString extends Match { public String getName(); public String getValue(); }
package org.w3c.dom.views; public interface MatchInteger extends Match { public String getName(); public int getValue(); }
package org.w3c.dom.views; public interface MatchBoolean extends Match { public String getName(); public boolean getValue(); }
package org.w3c.dom.views; import org.w3c.dom.Node; public interface MatchContent extends Match { public String getName(); public Node getNode(); public int getOffset(); }
package org.w3c.dom.views; import org.w3c.dom.Node; public interface MatchSet extends Match { public Node getNode(); public void addMatch(Match add); public Match getMatch(int index); }
package org.w3c.dom.views; public interface Item { public boolean getExists(); public String getName(); }
package org.w3c.dom.views; public interface StringItem extends Item { public String getValue(); }
package org.w3c.dom.views; public interface IntegerItem extends Item { public int getValue(); }
package org.w3c.dom.views; public interface BooleanItem extends Item { public boolean getValue(); public void setValue(boolean value); }
package org.w3c.dom.views; import org.w3c.dom.Node; public interface ContentItem extends Item { public Node getNode(); public void setNode(Node node); public int getOffset(); public void setOffset(int offset); }
package org.w3c.dom.views; import org.w3c.dom.Node; public interface VisualView { public String getFontScheme(); public int getWidth(); public int getHeight(); public int getHorizontalDPI(); public int getVerticalDPI(); public VisualCharacter createVisualCharacter(); public VisualCharacterRun createVisualCharacterRun(); public VisualFrame createVisualFrame(); public VisualImage createVisualImage(); public VisualFormButton createVisualFormButton(); public VisualFormField createVisualFormField(); public void select(Node boundary, int offset, boolean extend, boolean add); public void matchSegment(VisualResource segment); }
package org.w3c.dom.views; public interface VisualResource { }
package org.w3c.dom.views; public interface VisualFont extends VisualResource { public String getMatchFontName(); public void setMatchFontName(String matchFontName); public boolean getExists(); public String getFontName(); public boolean getNext(); }
package org.w3c.dom.views; import org.w3c.dom.Node; public interface VisualSegment extends VisualResource { public boolean getMatchPosition(); public void setMatchPosition(boolean matchPosition); public boolean getMatchInside(); public void setMatchInside(boolean matchInside); public boolean getMatchContaining(); public void setMatchContaining(boolean matchContaining); public int getMatchX(); public void setMatchX(int matchX); public int getMatchY(); public void setMatchY(int matchY); public int getMatchXR(); public void setMatchXR(int matchXR); public int getMatchYR(); public void setMatchYR(int matchYR); public boolean getMatchContent(); public void setMatchContent(boolean matchContent); public boolean getMatchRange(); public void setMatchRange(boolean matchRange); public Node getMatchNode(); public void setMatchNode(Node matchNode); public int getMatchOffset(); public void setMatchOffset(int matchOffset); public Node getMatchNodeR(); public void setMatchNodeR(Node matchNodeR); public int getMatchOffsetR(); public void setMatchOffsetR(int matchOffsetR); public boolean getMatchContainsSelected(); public void setMatchContainsSelected(boolean matchContainsSelected); public boolean getMatchContainsVisible(); public void setMatchContainsVisible(boolean matchContainsVisible); public boolean getExists(); public Node getStartNode(); public int getStartOffset(); public Node getEndNode(); public int getEndOffset(); public int getTopOffset(); public int getBottomOffset(); public int getLeftOffset(); public int getRightOffset(); public int getWidth(); public int getHeight(); public boolean getSelected(); public boolean getVisible(); public int getForegroundColor(); public int getBackgroundColor(); public String getFontName(); public String getFontHeight(); public boolean getNext(); }
package org.w3c.dom.views; public interface VisualCharacter extends VisualSegment { }
package org.w3c.dom.views; public interface VisualCharacterRun extends VisualSegment { }
package org.w3c.dom.views; public interface VisualFrame extends VisualSegment { public VisualSegment getEmbedded(); }
package org.w3c.dom.views; public interface VisualImage extends VisualSegment { public String getImageURL(); public boolean getIsLoaded(); }
package org.w3c.dom.views; public interface VisualFormButton extends VisualSegment { public boolean getIsPressed(); }
package org.w3c.dom.views; public interface VisualFormField extends VisualSegment { public String getFormValue(); }