diff options
Diffstat (limited to 'src/bind/java/org')
23 files changed, 1445 insertions, 0 deletions
diff --git a/src/bind/java/org/w3c/dom/views/BooleanItem.java b/src/bind/java/org/w3c/dom/views/BooleanItem.java new file mode 100644 index 000000000..41d751f3a --- /dev/null +++ b/src/bind/java/org/w3c/dom/views/BooleanItem.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom.views; + +/** + * The <code>BooleanItem</code> represents a boolean property to be fetched by + * a <code>Segment</code>. + * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting +Specification</a>. + * @since DOM Level 3 + */ +public interface BooleanItem extends Item { + /** + * The boolean value returned by the <code>Segment</code>, which is + * undefined if <code>exists</code> is false. + */ + public boolean getValue(); + /** + * The boolean value returned by the <code>Segment</code>, which is + * undefined if <code>exists</code> is false. + */ + public void setValue(boolean value); + +} diff --git a/src/bind/java/org/w3c/dom/views/ContentItem.java b/src/bind/java/org/w3c/dom/views/ContentItem.java new file mode 100644 index 000000000..c4cf7d7aa --- /dev/null +++ b/src/bind/java/org/w3c/dom/views/ContentItem.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom.views; + +import org.w3c.dom.Node; + +/** + * The <code>ContentItem</code> represents a content property to be fetched by + * a <code>Segment</code>. + * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting +Specification</a>. + * @since DOM Level 3 + */ +public interface ContentItem extends Item { + /** + * The <code>Node</code> value returned by the <code>Segment</code>, which + * is undefined if <code>exists</code> is false. + */ + public Node getNodeArg(); + /** + * The <code>Node</code> value returned by the <code>Segment</code>, which + * is undefined if <code>exists</code> is false. + */ + public void setNodeArg(Node nodeArg); + + /** + * The offset value returned by the <code>Segment</code>, which is + * undefined if <code>exists</code> is false. + */ + public int getOffset(); + /** + * The offset value returned by the <code>Segment</code>, which is + * undefined if <code>exists</code> is false. + */ + public void setOffset(int offset); + +} diff --git a/src/bind/java/org/w3c/dom/views/IntegerItem.java b/src/bind/java/org/w3c/dom/views/IntegerItem.java new file mode 100644 index 000000000..b64a18a30 --- /dev/null +++ b/src/bind/java/org/w3c/dom/views/IntegerItem.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom.views; + +/** + * The <code>IntegerItem</code> represents an integer property to be fetched + * by a <code>Segment</code>. + * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting +Specification</a>. + * @since DOM Level 3 + */ +public interface IntegerItem extends Item { + /** + * The integer value returned by the <code>Segment</code>, which is + * undefined if <code>exists</code> is false. + */ + public int getValue(); + +} diff --git a/src/bind/java/org/w3c/dom/views/Item.java b/src/bind/java/org/w3c/dom/views/Item.java new file mode 100644 index 000000000..a949adebc --- /dev/null +++ b/src/bind/java/org/w3c/dom/views/Item.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom.views; + +/** + * The <code>Item</code> represents information to be fetched by a + * <code>Segment</code>. + * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting +Specification</a>. + * @since DOM Level 3 + */ +public interface Item { + /** + * The <code>exists</code> boolean of a <code>Segment</code>, initially + * set to false during creation, is set after an attempt to fetch the + * values of a <code>Item</code> to indicate whether or not the required + * data was present. A true value indicates that it was. + */ + public boolean getExists(); + + /** + * The name of a property of the matched <code>Segment</code> to be + * fetched, which is specified during construction. + */ + public String getName(); + +} diff --git a/src/bind/java/org/w3c/dom/views/Match.java b/src/bind/java/org/w3c/dom/views/Match.java new file mode 100644 index 000000000..9a6dd9fc5 --- /dev/null +++ b/src/bind/java/org/w3c/dom/views/Match.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom.views; + +/** + * The <code>Match</code> identifies <code>Segment</code>s of which a + * <code>Segment</code> should fetch the <code>Item</code>s. + * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting +Specification</a>. + * @since DOM Level 3 + */ +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; + + /** + * The <code>test</code> value of a <code>Match</code>, specified during + * creation, controls the test to be applied. + */ + public short getTest(); + +} diff --git a/src/bind/java/org/w3c/dom/views/MatchBoolean.java b/src/bind/java/org/w3c/dom/views/MatchBoolean.java new file mode 100644 index 000000000..27f4b4c85 --- /dev/null +++ b/src/bind/java/org/w3c/dom/views/MatchBoolean.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom.views; + +/** + * The <code>MatchBoolean</code> identifies <code>Segment</code>s where a + * boolean property matches a specific value. + * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting +Specification</a>. + * @since DOM level 3 + */ +public interface MatchBoolean extends Match { + /** + * The name of an boolean property of each <code>Segment</code> to be + * compared against, which is specified during construction. + */ + public String getName(); + + /** + * The boolean value to be compared against, which is specified during + * construction. + */ + public boolean getValue(); + +} diff --git a/src/bind/java/org/w3c/dom/views/MatchContent.java b/src/bind/java/org/w3c/dom/views/MatchContent.java new file mode 100644 index 000000000..518e69b95 --- /dev/null +++ b/src/bind/java/org/w3c/dom/views/MatchContent.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom.views; + +import org.w3c.dom.Node; + +/** + * The <code>MatchContent</code> identifies <code>Segment</code>s where a + * content property matches a specific value. + * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting +Specification</a>. + * @since DOM level 3 + */ +public interface MatchContent extends Match { + /** + * The name of an content property of each <code>Segment</code> to be + * compared against, which is specified during construction. + */ + public String getName(); + + /** + * The Node value to be compared against, which is specified during + * construction. + */ + public Node getNodeArg(); + + /** + * The offset value to be compared against, which is specified during + * construction. + */ + public int getOffset(); + +} diff --git a/src/bind/java/org/w3c/dom/views/MatchInteger.java b/src/bind/java/org/w3c/dom/views/MatchInteger.java new file mode 100644 index 000000000..ccb28fca1 --- /dev/null +++ b/src/bind/java/org/w3c/dom/views/MatchInteger.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom.views; + +/** + * The <code>MatchInteger</code> identifies <code>Segment</code>s where an + * integer property matches a specific value. + * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting +Specification</a>. + * @since DOM level 3 + */ +public interface MatchInteger extends Match { + /** + * The name of an integer property of each <code>Segment</code> to be + * compared against, which is specified during construction. + */ + public String getName(); + + /** + * The integer value to be compared against, which is specified during + * construction. + */ + public int getValue(); + +} diff --git a/src/bind/java/org/w3c/dom/views/MatchSet.java b/src/bind/java/org/w3c/dom/views/MatchSet.java new file mode 100644 index 000000000..098d2c707 --- /dev/null +++ b/src/bind/java/org/w3c/dom/views/MatchSet.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom.views; + +import org.w3c.dom.Node; + +/** + * The <code>MatchSet</code> identifies <code>Segment</code>s where a set of + * matches evaluate in a specified way. + * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting +Specification</a>. + * @since DOM level 3 + */ +public interface MatchSet extends Match { + /** + * The Node value to be compared against, which is specified during + * construction. + */ + public Node getNodeArg(); + + /** + * Adds a specific <code>Match</code> to the set. + * @param add The <code>Match</code> to be added.After adding a match, + * the results of any related call to <code>getNext</code> are + * unpredictable until the segment has been requested again by calling + * <code>matchFirstSegment</code>. + */ + public void addMatch(Match add); + + /** + * Returns a specific <code>Match</code>, of the set, which is to be + * matched during <code>MatchSet</code> evaluation, or returns null if + * the specified index does not correspond to a <code>Match</code>. + * @param index The index of the <code>Match</code> to be retrieved. + * @return The requested match, if any, or null. + */ + public Match getMatch(int index); + +} diff --git a/src/bind/java/org/w3c/dom/views/MatchString.java b/src/bind/java/org/w3c/dom/views/MatchString.java new file mode 100644 index 000000000..81e224b88 --- /dev/null +++ b/src/bind/java/org/w3c/dom/views/MatchString.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom.views; + +/** + * The <code>MatchString</code> identifies <code>Segment</code>s where a + * string property matches a specific value. + * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting +Specification</a>. + * @since DOM level 3 + */ +public interface MatchString extends Match { + /** + * The name of a string property of each <code>Segment</code> to be + * compared against, which is specified during construction. + */ + public String getName(); + + /** + * The string value to be compared against, which is specified during + * construction. + */ + public String getValue(); + +} diff --git a/src/bind/java/org/w3c/dom/views/Segment.java b/src/bind/java/org/w3c/dom/views/Segment.java new file mode 100644 index 000000000..55082e193 --- /dev/null +++ b/src/bind/java/org/w3c/dom/views/Segment.java @@ -0,0 +1,198 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom.views; + +import org.w3c.dom.Node; + +/** + * <code>Segment</code> is used to retrieve specific items from specific + * segments. Segments may be nested as a match and may be repeatedly applied + * for traversing multiple matching segments. + * <p ><b>Note:</b> Types and names of properties of segments of Visual media + * types + * <pre> Integer TopOffset Integer BottomOffset Integer LeftOffset Integer + * RightOffset Integer Width Integer Height Boolean Visible Boolean Selected + * Integer ForegroundColor Integer BackgroundColor String FontName String + * FontHeight String FontBaseline String FontSpace Width String FontMaximum + * Width </pre> + * + * <p ><b>Note:</b> Segment types + * <pre> // Display info and root (the default + * segment) Display // An area that objects or text lines flow in // or are + * anchored to Frame // A single character Character // + * Sequentially-appearing characters // with identical properties + * CharacterRun FormField {Text | Label | Button | Menu ...} Embedded Object + * Image </pre> + * + * <p ><b>Note:</b> Possible properties of specific types: + * <pre> (Image) String URL + * (Image) Boolean isLoaded (Image) Integer ScalingFactor (Button) Boolean + * isPressed (Frame) Boolean isScrollable </pre> + * + * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting +Specification</a>. + * @since DOM Level 3 + */ +public interface Segment extends Match { + /** + * The <code>criteria</code> <code>Match</code> of a <code>Segment</code> + * , specified during creation, controls which <code>Segment</code>s + * will match. + * <br>After setting this attribute, the results of any related call to + * <code>getNext</code> are unpredictable until the segment has been + * requested again by calling <code>matchFirstSegment</code>. + */ + public Match getCriteria(); + /** + * The <code>criteria</code> <code>Match</code> of a <code>Segment</code> + * , specified during creation, controls which <code>Segment</code>s + * will match. + * <br>After setting this attribute, the results of any related call to + * <code>getNext</code> are unpredictable until the segment has been + * requested again by calling <code>matchFirstSegment</code>. + */ + public void setCriteria(Match criteria); + + /** + * The <code>order</code> string of a <code>Segment</code>, specified + * during creation, controls the order in which matching segments will + * be returned. If this attribute is not specified, the order defaults + * to an implementation-specific order. + * <br>After setting this attribute, the results of any related call to + * <code>getNext</code> are unpredictable until the segment has been + * requested again by calling <code>matchFirstSegment</code>. + */ + public String getOrder(); + /** + * The <code>order</code> string of a <code>Segment</code>, specified + * during creation, controls the order in which matching segments will + * be returned. If this attribute is not specified, the order defaults + * to an implementation-specific order. + * <br>After setting this attribute, the results of any related call to + * <code>getNext</code> are unpredictable until the segment has been + * requested again by calling <code>matchFirstSegment</code>. + */ + public void setOrder(String order); + + /** + * Adds a specific <code>Item</code> to the <code>Segment</code>. + * @param add The <code>Item</code> to be added.After adding a result, + * the results of any related call to <code>getNext</code> are + * unpredictable until the segment has been requested again by calling + * <code>matchFirstSegment</code>. + */ + public void addItem(Item add); + + /** + * Creates a match for a string value, which can be used to specify a + * criterium to find desired segments. + * @param test The match test desired. + * @param name The name of a string property to be compared against. + * @param value The string value to be compared against. + * @return The requested <code>MatchString</code>. + */ + public MatchString createMatchString(short test, + String name, + String value); + + /** + * Creates a match for an integral value, which can be used to specify a + * criterium to find desired segments. + * @param test The match test desired. + * @param name The name of an integer property to be compared against. + * @param value The integer value to be compared against. + * @return The requested <code>MatchInteger</code>. + */ + public MatchInteger createMatchInteger(short test, + String name, + int value); + + /** + * Creates a match for a boolean value, which can be used to specify a + * criterium to find desired segments. + * @param test The match test desired. + * @param name The name of a boolean property to be compared against. + * @param value The boolean value to be compared against. + * @return The requested <code>MatchBoolean</code>. + */ + public MatchBoolean createMatchBoolean(short test, + String name, + boolean value); + + /** + * Creates a match for a content value, which can be used to specify a + * criterium to find desired segments. + * @param test The match test desired. + * @param name The name of an integer property to be compared against. + * @param offset The offset of the content value to be compared against. + * @param nodeArg The Node of the content value to be compared against. + * @return The requested <code>MatchContent</code>. + */ + public MatchContent createMatchContent(short test, + String name, + int offset, + Node nodeArg); + + /** + * Creates a match for an set of matches, which can be used to specify a + * criterium to find desired segments. + * @param test The match test desired. + * @return The requested <code>MatchSet</code>. + */ + public MatchSet createMatchSet(short test); + + /** + * Creates an item for a segment that can receive a string value. + * @param name The name of a string property to be received. + * @return The requested <code>StringItem</code>. + */ + public StringItem createStringItem(String name); + + /** + * Creates an item for a segment that can receive an integral value. + * @param name The name of an integral property to be received. + * @return The requested <code>IntegerItem</code>. + */ + public IntegerItem createIntegerItem(String name); + + /** + * Creates an item for a segment that can receive a boolean value. + * @param name The name of a boolean property to be received. + * @return The requested <code>BooleanItem</code>. + */ + public BooleanItem createBooleanItem(String name); + + /** + * Creates an item for a segment that can receive a content value. + * @param name The name of a content property to be received. + * @return The requested <code>ContentItem</code>. + */ + public ContentItem createContentItem(String name); + + /** + * Returns a specific <code>Item</code>, of the list specified during the + * creation of the <code>Segment</code>, which is to be fetched during + * <code>Segment</code> execution, or returns null if the specified + * index does not correspond to a <code>Item</code>. + * @param index The index of the <code>Item</code> to be retrieved. + */ + public void getItem(int index); + + /** + * Fetches the results of the next matching <code>Segment</code>, if any. + * @return <code>true</code> if another match, otherwise + * <code>false</code> (same value as <code>exists</code>). + */ + public boolean getNext(); + +} diff --git a/src/bind/java/org/w3c/dom/views/StringItem.java b/src/bind/java/org/w3c/dom/views/StringItem.java new file mode 100644 index 000000000..88002918f --- /dev/null +++ b/src/bind/java/org/w3c/dom/views/StringItem.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom.views; + +/** + * The <code>StringItem</code> represents a string property to be fetched by a + * <code>Segment</code>. + * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting +Specification</a>. + * @since DOM Level 3 + */ +public interface StringItem extends Item { + /** + * The string value returned by the <code>Segment</code>, which is + * undefined if <code>exists</code> is false. + */ + public String getValue(); + +} diff --git a/src/bind/java/org/w3c/dom/views/View.java b/src/bind/java/org/w3c/dom/views/View.java new file mode 100644 index 000000000..c87add1ee --- /dev/null +++ b/src/bind/java/org/w3c/dom/views/View.java @@ -0,0 +1,129 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom.views; + +import org.w3c.dom.Node; +import org.w3c.dom.DOMException; + +/** + * <code>View</code> is used as the root <code>Segment</code>, as well as + * providing additional global functionality such as selection. + * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting +Specification</a>. + * @since DOM Level 3 + */ +public interface View { + /** + * Selects a new region of the document or adds to the existing selection. + * @param boundary The Node at which to create or extend the selection. + * @param offset The offset within the node at which to create or extend + * the selection. + * @param extend If false, sets a selection anchor. If true, extends the + * selection with respect to the most-recently-set anchor. + * @param add If false, clears any existing selection. If true adds a new + * region to existing selection regions. + */ + public void select(Node boundary, + int offset, + boolean extend, + boolean add); + + /** + * Creates a segment that can be used to obtain segment items from the + * view. + * @return A new segment object, that can be set up to obtain information + * about the view. + */ + public Segment createSegment(); + + /** + * Executes a <code>Segment</code> against all nested <code>Segment</code> + * s, fetching<code>Item</code>s associated the requested match number, + * if it exists. + * @param todo The <code>Segment</code> to match within the view. + * @return <code>true</code> if the desired match number was found, + * otherwise <code>false</code>. + * @exception DOMException + * NOT_SUPPORTED_ERR: If the segment request could not be interpreted. + */ + public boolean matchFirstSegment(Segment todo) + throws DOMException; + + /** + * Returns the value of an integer property of the segment, used by + * <code>Match</code>es and <code>Item</code>s. + * @param name The name of the integer property of the segment to be + * retrieved. + * @return The value of the named property of the <code>Segment</code>. + * @exception DOMException + * NOT_SUPPORTED_ERR: Raised if the named property does not exist on the + * view or is not an integer. + */ + public int getIntegerProperty(String name) + throws DOMException; + + /** + * Returns the value of a string property of the segment, used by + * <code>Match</code>es and <code>Item</code>s. + * @param name The name of the string property of the segment to be + * retrieved. + * @return The value of the named property of the <code>Segment</code>. + * @exception DOMException + * NOT_SUPPORTED_ERR: Raised if the named property does not exist on the + * view or is not a string. + */ + public String getStringProperty(String name) + throws DOMException; + + /** + * Returns the value of a boolean property of the segment, used by + * <code>Match</code>es and <code>Item</code>s. + * @param name The name of the boolean property of the segment to be + * retrieved. + * @return The value of the named property of the <code>Segment</code>. + * @exception DOMException + * NOT_SUPPORTED_ERR: Raised if the named property does not exist on the + * view or is not a boolean. + */ + public boolean getBooleanProperty(boolean name) + throws DOMException; + + /** + * Returns the Node value of a content property of the segment, used by + * <code>Match</code>es and <code>Item</code>s. + * @param name The name of the content property of the segment to be + * retrieved. + * @return The Node value of the named property of the + * <code>Segment</code>. + * @exception DOMException + * NOT_SUPPORTED_ERR: Raised if the named property does not exist on the + * view or is not content. + */ + public Node getContentPropertyNode(String name) + throws DOMException; + + /** + * Returns the offset value of a content property of the segment, used by + * <code>Match</code>es and <code>Item</code>s. + * @param name The name of the content property of the segment to be + * retrieved. + * @return The offset value of the named property of the + * <code>Segment</code>. + * @exception DOMException + * NOT_SUPPORTED_ERR: Raised if the named property does not exist on the + * view or is not content. + */ + public int getContentPropertyOffset(String name) + throws DOMException; + +} diff --git a/src/bind/java/org/w3c/dom/views/VisualCharacter.java b/src/bind/java/org/w3c/dom/views/VisualCharacter.java new file mode 100644 index 000000000..e8317b373 --- /dev/null +++ b/src/bind/java/org/w3c/dom/views/VisualCharacter.java @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom.views; + +/** + * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting +Specification</a>. + */ +public interface VisualCharacter extends VisualSegment { +} diff --git a/src/bind/java/org/w3c/dom/views/VisualCharacterRun.java b/src/bind/java/org/w3c/dom/views/VisualCharacterRun.java new file mode 100644 index 000000000..98b4233a8 --- /dev/null +++ b/src/bind/java/org/w3c/dom/views/VisualCharacterRun.java @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom.views; + +/** + * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting +Specification</a>. + */ +public interface VisualCharacterRun extends VisualSegment { +} diff --git a/src/bind/java/org/w3c/dom/views/VisualFont.java b/src/bind/java/org/w3c/dom/views/VisualFont.java new file mode 100644 index 000000000..e5a2bd321 --- /dev/null +++ b/src/bind/java/org/w3c/dom/views/VisualFont.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom.views; + +/** + * Visual font resources contain match criteria and result attributes for + * getting information about fonts available to a view. + * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting +Specification</a>. + */ +public interface VisualFont extends VisualResource { + /** + * May be set to cause fonts with the corresponding name to be matched. + */ + public String getMatchFontName(); + /** + * May be set to cause fonts with the corresponding name to be matched. + */ + public void setMatchFontName(String matchFontName); + + /** + * Returns true result if the desired font was located, or false if it was + * not. If this value is set to false, no other results are set. If this + * value is set to true, all other results are set. + */ + public boolean getExists(); + + /** + * When a font is matched, the name of the font is returned here. + */ + public String getFontName(); + + /** + * Fetches the results of the next matching <code>VisualFont</code>, if + * any. + * @return + */ + public boolean getNext(); + +} diff --git a/src/bind/java/org/w3c/dom/views/VisualFormButton.java b/src/bind/java/org/w3c/dom/views/VisualFormButton.java new file mode 100644 index 000000000..e2bdb149a --- /dev/null +++ b/src/bind/java/org/w3c/dom/views/VisualFormButton.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom.views; + +/** + * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting +Specification</a>. + */ +public interface VisualFormButton extends VisualSegment { + /** + */ + public boolean isPressed(); + +} diff --git a/src/bind/java/org/w3c/dom/views/VisualFormField.java b/src/bind/java/org/w3c/dom/views/VisualFormField.java new file mode 100644 index 000000000..3b556e1a6 --- /dev/null +++ b/src/bind/java/org/w3c/dom/views/VisualFormField.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom.views; + +/** + * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting +Specification</a>. + */ +public interface VisualFormField extends VisualSegment { + /** + */ + public String getFormValue(); + +} diff --git a/src/bind/java/org/w3c/dom/views/VisualFrame.java b/src/bind/java/org/w3c/dom/views/VisualFrame.java new file mode 100644 index 000000000..107f8f631 --- /dev/null +++ b/src/bind/java/org/w3c/dom/views/VisualFrame.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom.views; + +/** + * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting +Specification</a>. + */ +public interface VisualFrame extends VisualSegment { + /** + * May be set to contain embedded visual segments inside the frame. If + * this value is set, the embedded segment serves as a conditional for + * the frame while receiving the results of the embedded segment that + * was matched. + */ + public VisualSegment getEmbedded(); + +} diff --git a/src/bind/java/org/w3c/dom/views/VisualImage.java b/src/bind/java/org/w3c/dom/views/VisualImage.java new file mode 100644 index 000000000..b8eb7555f --- /dev/null +++ b/src/bind/java/org/w3c/dom/views/VisualImage.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom.views; + +/** + * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting +Specification</a>. + */ +public interface VisualImage extends VisualSegment { + /** + */ + public String getImageURL(); + + /** + */ + public boolean isLoaded(); + +} diff --git a/src/bind/java/org/w3c/dom/views/VisualResource.java b/src/bind/java/org/w3c/dom/views/VisualResource.java new file mode 100644 index 000000000..0aa8f5973 --- /dev/null +++ b/src/bind/java/org/w3c/dom/views/VisualResource.java @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom.views; + +/** + * Visual segments allow things within a visual view to be accessed. + * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting +Specification</a>. + */ +public interface VisualResource { +} diff --git a/src/bind/java/org/w3c/dom/views/VisualSegment.java b/src/bind/java/org/w3c/dom/views/VisualSegment.java new file mode 100644 index 000000000..c8d0ddc72 --- /dev/null +++ b/src/bind/java/org/w3c/dom/views/VisualSegment.java @@ -0,0 +1,348 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom.views; + +import org.w3c.dom.Node; + +/** + * Visual segments contain match criteria attributes and result attributes + * common to visual views of a document. When this structure is created, all + * booleans are set to false, all integral values are set to 0, and all + * strings and object references are set to null. Match criteria are then + * set. After setting match criteria, <code>matchSegment</code> is called + * passing this segment or another segment that references this segment, + * which finds a matching segment and sets result attributes. + * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting +Specification</a>. + */ +public interface VisualSegment extends VisualResource { + /** + * May be set to cause the corresponding segment to be matched only if it + * contains the specified <code>matchX</code> and <code>matchY</code> + * positions. + */ + public boolean getMatchPosition(); + /** + * May be set to cause the corresponding segment to be matched only if it + * contains the specified <code>matchX</code> and <code>matchY</code> + * positions. + */ + public void setMatchPosition(boolean matchPosition); + + /** + * May be set to cause the corresponding segment to be matched only if it + * is inside the specified rectangular region bounded by + * <code>matchX</code>, <code>matchY</code>, <code>matchXR</code>, and + * <code>matchYR</code>. + */ + public boolean getMatchInside(); + /** + * May be set to cause the corresponding segment to be matched only if it + * is inside the specified rectangular region bounded by + * <code>matchX</code>, <code>matchY</code>, <code>matchXR</code>, and + * <code>matchYR</code>. + */ + public void setMatchInside(boolean matchInside); + + /** + * May be set to cause the corresponding segment to be matched only if it + * contains the specified rectangular region bounded by + * <code>matchX</code>, <code>matchY</code>, <code>matchXR</code>, and + * <code>matchYR</code>. + */ + public boolean getMatchContaining(); + /** + * May be set to cause the corresponding segment to be matched only if it + * contains the specified rectangular region bounded by + * <code>matchX</code>, <code>matchY</code>, <code>matchXR</code>, and + * <code>matchYR</code>. + */ + public void setMatchContaining(boolean matchContaining); + + /** + * An integral X coordinate, specified in horizontal view units, that may + * be used to match a point or region. + */ + public int getMatchX(); + /** + * An integral X coordinate, specified in horizontal view units, that may + * be used to match a point or region. + */ + public void setMatchX(int matchX); + + /** + * An integral Y coordinate, specified in vertical view units, that may be + * used to match a point or region. + */ + public int getMatchY(); + /** + * An integral Y coordinate, specified in vertical view units, that may be + * used to match a point or region. + */ + public void setMatchY(int matchY); + + /** + * An integral X coordinate, specified in horizontal view units, that may + * be used to match a region. + */ + public int getMatchXR(); + /** + * An integral X coordinate, specified in horizontal view units, that may + * be used to match a region. + */ + public void setMatchXR(int matchXR); + + /** + * An integral Y coordinate, specified in vertical view units, that may be + * used to match a region. + */ + public int getMatchYR(); + /** + * An integral Y coordinate, specified in vertical view units, that may be + * used to match a region. + */ + public void setMatchYR(int matchYR); + + /** + * May be set to cause the corresponding segment to only be matched if it + * presents the <code>matchNode</code> content, offset by + * <code>matchOffset</code>. + */ + public boolean getMatchContent(); + /** + * May be set to cause the corresponding segment to only be matched if it + * presents the <code>matchNode</code> content, offset by + * <code>matchOffset</code>. + */ + public void setMatchContent(boolean matchContent); + + /** + * May be set to cause the corresponding segment to only be matched if the + * content it presents is within the range of content between Node + * <code>matchNode</code> offset <code>matchOffset</code> and Node + * <code>matchNodeR</code> offset <code>matchOffsetR</code>. + */ + public boolean getMatchRange(); + /** + * May be set to cause the corresponding segment to only be matched if the + * content it presents is within the range of content between Node + * <code>matchNode</code> offset <code>matchOffset</code> and Node + * <code>matchNodeR</code> offset <code>matchOffsetR</code>. + */ + public void setMatchRange(boolean matchRange); + + /** + * The node, or first node in a range to use to match segments which + * present specified content. + * <br>If matching content is enabled, but this is set to null, then only + * segments that are not associated with content will be matched. + */ + public Node getMatchNode(); + /** + * The node, or first node in a range to use to match segments which + * present specified content. + * <br>If matching content is enabled, but this is set to null, then only + * segments that are not associated with content will be matched. + */ + public void setMatchNode(Node matchNode); + + /** + * The offset, or first offset in a range to use to match segments which + * present specified content. + */ + public int getMatchOffset(); + /** + * The offset, or first offset in a range to use to match segments which + * present specified content. + */ + public void setMatchOffset(int matchOffset); + + /** + * The second node in a range to use to match segments which present + * specified content. + * <br>If matching a content range is enabled, but this is set to null, + * then only segments that are not associated with content will be + * matched. + */ + public Node getMatchNodeR(); + /** + * The second node in a range to use to match segments which present + * specified content. + * <br>If matching a content range is enabled, but this is set to null, + * then only segments that are not associated with content will be + * matched. + */ + public void setMatchNodeR(Node matchNodeR); + + /** + * The offset, or first offset in a range to use to match segments which + * present specified content. + */ + public int getMatchOffsetR(); + /** + * The offset, or first offset in a range to use to match segments which + * present specified content. + */ + public void setMatchOffsetR(int matchOffsetR); + + /** + * May be set to cause the corresponding segment to only be matched if the + * content being presented contains a cursor or part of a selected + * region. + */ + public boolean getMatchContainsSelected(); + /** + * May be set to cause the corresponding segment to only be matched if the + * content being presented contains a cursor or part of a selected + * region. + */ + public void setMatchContainsSelected(boolean matchContainsSelected); + + /** + * May be set to cause the corresponding segment to only be matched if the + * segment being presented contains some part that is visible. + */ + public boolean getMatchContainsVisible(); + /** + * May be set to cause the corresponding segment to only be matched if the + * segment being presented contains some part that is visible. + */ + public void setMatchContainsVisible(boolean matchContainsVisible); + + /** + * Returns true result if the desired segment was located, or false if it + * was not. If this value is set to false, no other results are set. If + * this value is set to true, all other results are set. + */ + public boolean getExists(); + + /** + * Whenever a segment is matched, this is set to the first node presented + * by the matched segment or null if the segment does not present any + * specific document content. + */ + public Node getStartNode(); + + /** + * Whenever a segment is matched, this is set to the first offset + * presented within the first node presented by the matched segment or 0 + * if the segment does not present any specific document content. + */ + public int getStartOffset(); + + /** + * Whenever a segment is matched, this is set to the last node presented + * by the matched segment or null if the segment does not present any + * specific document content. + */ + public Node getEndNode(); + + /** + * Whenever a segment is matched, this is set to first offset not + * presented within the last node presented by the matched segment or 0 + * if the segment does not present any specific document content. + */ + public int getEndOffset(); + + /** + * Whenever a segment is matched, this is set to the top offset of the + * segment within the view, specified in vertical view units. + */ + public int getTopOffset(); + + /** + * Whenever a segment is matched, this is set to the bottom offset of the + * segment within the view, specified in vertical view units. + */ + public int getBottomOffset(); + + /** + * Whenever a segment is matched, this is set to the left offset of the + * segment within the view, specified in horizontal view units. + */ + public int getLeftOffset(); + + /** + * Whenever a segment is matched, this is set to the right offset of the + * segment within the view, specified in horizontal view units. + */ + public int getRightOffset(); + + /** + * Whenever a segment is matched, this is set to the width of the segment + * within the view, specified in horizontal view units. + */ + public int getWidth(); + + /** + * Whenever a segment is matched, this is set to the width of the segment + * within the view, specified in vertical view units. + */ + public int getHeight(); + + /** + * Whenever a segment is matched, this is set to true if the segment + * presents the content with the cursor or selected content, otherwise, + * this is set to false. + */ + public boolean getSelected(); + + /** + * Whenever a segment is matched, this is set to true if the segment + * contains some part that is visible, otherwise, this is set to false. + */ + public boolean getVisible(); + + /** + * Whenever a segment is matched, this is set to the integral value of the + * foreground color of that segment, or transparent if there is no + * foreground color. The 32 bits of this value are divided into the + * following 8-bit sub-fields, from most significant to least + * significant: alpha, red, green, blue. The color fields range from 0 + * for no intensity to 255 to indicate the contribution of each color. + * The alpha field ranges from 0 for transparent to 255 for completely + * opaque. For complete transparency, the color fields will be + * normalized to 0 as well. + */ + public int getForegroundColor(); + + /** + * Whenever a segment is matched, this is set to the integral value of the + * background color of that segment, or transparent if there is no + * background color. The 32 bits of this value are divided into the + * following 8-bit sub-fields, from most significant to least + * significant: alpha, red, green, blue. The color fields range from 0 + * for no intensity to 255 to indicate the contribution of each color. + * The alpha field ranges from 0 for transparent to 255 for completely + * opaque. For a transparent alpha value of 0, the color fields are be + * normalized to 0 as well. + */ + public int getBackgroundColor(); + + /** + * The font name is a view-specific designation of the font name. + */ + public String getFontName(); + + /** + */ + public String getFontHeight(); + + /** + * Fetches the results of the next matching <code>VisualResource</code>, + * if any. + * @return + */ + public boolean getNext(); + +} diff --git a/src/bind/java/org/w3c/dom/views/VisualView.java b/src/bind/java/org/w3c/dom/views/VisualView.java new file mode 100644 index 000000000..c35839322 --- /dev/null +++ b/src/bind/java/org/w3c/dom/views/VisualView.java @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2004 World Wide Web Consortium, + * + * (Massachusetts Institute of Technology, European Research Consortium for + * Informatics and Mathematics, Keio University). All Rights Reserved. This + * work is distributed under the W3C(r) Software License [1] in the hope that + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + */ + +package org.w3c.dom.views; + +import org.w3c.dom.Node; + +/** + * Presents a flatter model of a visual view. + * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting +Specification</a>. + */ +public interface VisualView { + /** + * A string identifying the type of fonts on the system so that font name + * strings may be properly interpreted. + */ + public String getFontScheme(); + + /** + * The width, in horizontal units, of the view. + */ + public int getWidth(); + + /** + * The height, in vertical units, of the view. + */ + public int getHeight(); + + /** + * The number of horizontal dots per inch in the view, used to interpret + * horizontal values. + */ + public int getHorizontalDPI(); + + /** + * The number of vertical dots per inch in the view, used to interpret + * vertical values. + */ + public int getVerticalDPI(); + + /** + * Creates a visual character to match and return information on a single + * visual character of the view. + * @return The requested <code>VisualCharacter</code>. + */ + public VisualCharacter createVisualCharacter(); + + /** + * Creates a visual character run to match and return information on a run + * of similar ajdacent visual characters of the view. + * <br>This will match the largest character run that meets the specified + * criteria, is not contiguously displayed on the view and has + * homogeneous display properties. + * @return The requested <code>VisualCharacterRun</code>. + */ + public VisualCharacterRun createVisualCharacterRun(); + + /** + * Creates a visual frame to match and return information on a frame of + * the view. + * @return The requested <code>VisualFrame</code>. + */ + public VisualFrame createVisualFrame(); + + /** + * Creates a visual image to match and return information on an image of + * the view. + * @return The requested <code>VisualImage</code>. + */ + public VisualImage createVisualImage(); + + /** + * Creates a visual form button to match and return information on a form + * button of the view. + * @return The requested <code>VisualFormButton</code>. + */ + public VisualFormButton createVisualFormButton(); + + /** + * Creates a visual form field to match and return information on a form + * field of the view. + * @return The requested <code>VisualFormField</code>. + */ + public VisualFormField createVisualFormField(); + + /** + * @param boundary + * @param offset + * @param extend + * @param add + */ + public void select(Node boundary, + int offset, + boolean extend, + boolean add); + + /** + * @param segment + */ + public void matchSegment(VisualResource segment); + +} |
