From 682953066efcc485097c639491af122a8028f954 Mon Sep 17 00:00:00 2001 From: ishmal Date: Sun, 16 Mar 2008 00:07:46 +0000 Subject: [PATCH] required by SVG-DOM interfaces --- .../java/org/w3c/dom/views/BooleanItem.java | 34 ++ .../java/org/w3c/dom/views/ContentItem.java | 47 +++ .../java/org/w3c/dom/views/IntegerItem.java | 29 ++ src/bind/java/org/w3c/dom/views/Item.java | 37 ++ src/bind/java/org/w3c/dom/views/Match.java | 70 ++++ .../java/org/w3c/dom/views/MatchBoolean.java | 35 ++ .../java/org/w3c/dom/views/MatchContent.java | 43 +++ .../java/org/w3c/dom/views/MatchInteger.java | 35 ++ src/bind/java/org/w3c/dom/views/MatchSet.java | 49 +++ .../java/org/w3c/dom/views/MatchString.java | 35 ++ src/bind/java/org/w3c/dom/views/Segment.java | 198 ++++++++++ .../java/org/w3c/dom/views/StringItem.java | 29 ++ src/bind/java/org/w3c/dom/views/View.java | 129 +++++++ .../org/w3c/dom/views/VisualCharacter.java | 20 + .../org/w3c/dom/views/VisualCharacterRun.java | 20 + .../java/org/w3c/dom/views/VisualFont.java | 50 +++ .../org/w3c/dom/views/VisualFormButton.java | 24 ++ .../org/w3c/dom/views/VisualFormField.java | 24 ++ .../java/org/w3c/dom/views/VisualFrame.java | 28 ++ .../java/org/w3c/dom/views/VisualImage.java | 28 ++ .../org/w3c/dom/views/VisualResource.java | 21 ++ .../java/org/w3c/dom/views/VisualSegment.java | 348 ++++++++++++++++++ .../java/org/w3c/dom/views/VisualView.java | 112 ++++++ 23 files changed, 1445 insertions(+) create mode 100644 src/bind/java/org/w3c/dom/views/BooleanItem.java create mode 100644 src/bind/java/org/w3c/dom/views/ContentItem.java create mode 100644 src/bind/java/org/w3c/dom/views/IntegerItem.java create mode 100644 src/bind/java/org/w3c/dom/views/Item.java create mode 100644 src/bind/java/org/w3c/dom/views/Match.java create mode 100644 src/bind/java/org/w3c/dom/views/MatchBoolean.java create mode 100644 src/bind/java/org/w3c/dom/views/MatchContent.java create mode 100644 src/bind/java/org/w3c/dom/views/MatchInteger.java create mode 100644 src/bind/java/org/w3c/dom/views/MatchSet.java create mode 100644 src/bind/java/org/w3c/dom/views/MatchString.java create mode 100644 src/bind/java/org/w3c/dom/views/Segment.java create mode 100644 src/bind/java/org/w3c/dom/views/StringItem.java create mode 100644 src/bind/java/org/w3c/dom/views/View.java create mode 100644 src/bind/java/org/w3c/dom/views/VisualCharacter.java create mode 100644 src/bind/java/org/w3c/dom/views/VisualCharacterRun.java create mode 100644 src/bind/java/org/w3c/dom/views/VisualFont.java create mode 100644 src/bind/java/org/w3c/dom/views/VisualFormButton.java create mode 100644 src/bind/java/org/w3c/dom/views/VisualFormField.java create mode 100644 src/bind/java/org/w3c/dom/views/VisualFrame.java create mode 100644 src/bind/java/org/w3c/dom/views/VisualImage.java create mode 100644 src/bind/java/org/w3c/dom/views/VisualResource.java create mode 100644 src/bind/java/org/w3c/dom/views/VisualSegment.java create mode 100644 src/bind/java/org/w3c/dom/views/VisualView.java 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 BooleanItem represents a boolean property to be fetched by + * a Segment. + *

See also the Document Object Model (DOM) Level 3 Views and Formatting +Specification. + * @since DOM Level 3 + */ +public interface BooleanItem extends Item { + /** + * The boolean value returned by the Segment, which is + * undefined if exists is false. + */ + public boolean getValue(); + /** + * The boolean value returned by the Segment, which is + * undefined if exists 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 ContentItem represents a content property to be fetched by + * a Segment. + *

See also the Document Object Model (DOM) Level 3 Views and Formatting +Specification. + * @since DOM Level 3 + */ +public interface ContentItem extends Item { + /** + * The Node value returned by the Segment, which + * is undefined if exists is false. + */ + public Node getNodeArg(); + /** + * The Node value returned by the Segment, which + * is undefined if exists is false. + */ + public void setNodeArg(Node nodeArg); + + /** + * The offset value returned by the Segment, which is + * undefined if exists is false. + */ + public int getOffset(); + /** + * The offset value returned by the Segment, which is + * undefined if exists 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 IntegerItem represents an integer property to be fetched + * by a Segment. + *

See also the Document Object Model (DOM) Level 3 Views and Formatting +Specification. + * @since DOM Level 3 + */ +public interface IntegerItem extends Item { + /** + * The integer value returned by the Segment, which is + * undefined if exists 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 Item represents information to be fetched by a + * Segment. + *

See also the Document Object Model (DOM) Level 3 Views and Formatting +Specification. + * @since DOM Level 3 + */ +public interface Item { + /** + * The exists boolean of a Segment, initially + * set to false during creation, is set after an attempt to fetch the + * values of a Item 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 Segment 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 Match identifies Segments of which a + * Segment should fetch the Items. + *

See also the Document Object Model (DOM) Level 3 Views and Formatting +Specification. + * @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 test value of a Match, 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 MatchBoolean identifies Segments where a + * boolean property matches a specific value. + *

See also the Document Object Model (DOM) Level 3 Views and Formatting +Specification. + * @since DOM level 3 + */ +public interface MatchBoolean extends Match { + /** + * The name of an boolean property of each Segment 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 MatchContent identifies Segments where a + * content property matches a specific value. + *

See also the Document Object Model (DOM) Level 3 Views and Formatting +Specification. + * @since DOM level 3 + */ +public interface MatchContent extends Match { + /** + * The name of an content property of each Segment 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 MatchInteger identifies Segments where an + * integer property matches a specific value. + *

See also the Document Object Model (DOM) Level 3 Views and Formatting +Specification. + * @since DOM level 3 + */ +public interface MatchInteger extends Match { + /** + * The name of an integer property of each Segment 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 MatchSet identifies Segments where a set of + * matches evaluate in a specified way. + *

See also the Document Object Model (DOM) Level 3 Views and Formatting +Specification. + * @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 Match to the set. + * @param add The Match to be added.After adding a match, + * the results of any related call to getNext are + * unpredictable until the segment has been requested again by calling + * matchFirstSegment. + */ + public void addMatch(Match add); + + /** + * Returns a specific Match, of the set, which is to be + * matched during MatchSet evaluation, or returns null if + * the specified index does not correspond to a Match. + * @param index The index of the Match 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 MatchString identifies Segments where a + * string property matches a specific value. + *

See also the Document Object Model (DOM) Level 3 Views and Formatting +Specification. + * @since DOM level 3 + */ +public interface MatchString extends Match { + /** + * The name of a string property of each Segment 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; + +/** + * Segment 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. + *

Note: Types and names of properties of segments of Visual media + * types + *

 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 
+ * + *

Note: Segment types + *

 // 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 
+ * + *

Note: Possible properties of specific types: + *

 (Image) String URL 
+ * (Image) Boolean isLoaded (Image) Integer ScalingFactor (Button) Boolean 
+ * isPressed (Frame) Boolean isScrollable 
+ * + *

See also the Document Object Model (DOM) Level 3 Views and Formatting +Specification. + * @since DOM Level 3 + */ +public interface Segment extends Match { + /** + * The criteria Match of a Segment + * , specified during creation, controls which Segments + * will match. + *
After setting this attribute, the results of any related call to + * getNext are unpredictable until the segment has been + * requested again by calling matchFirstSegment. + */ + public Match getCriteria(); + /** + * The criteria Match of a Segment + * , specified during creation, controls which Segments + * will match. + *
After setting this attribute, the results of any related call to + * getNext are unpredictable until the segment has been + * requested again by calling matchFirstSegment. + */ + public void setCriteria(Match criteria); + + /** + * The order string of a Segment, 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. + *
After setting this attribute, the results of any related call to + * getNext are unpredictable until the segment has been + * requested again by calling matchFirstSegment. + */ + public String getOrder(); + /** + * The order string of a Segment, 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. + *
After setting this attribute, the results of any related call to + * getNext are unpredictable until the segment has been + * requested again by calling matchFirstSegment. + */ + public void setOrder(String order); + + /** + * Adds a specific Item to the Segment. + * @param add The Item to be added.After adding a result, + * the results of any related call to getNext are + * unpredictable until the segment has been requested again by calling + * matchFirstSegment. + */ + 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 MatchString. + */ + 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 MatchInteger. + */ + 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 MatchBoolean. + */ + 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 MatchContent. + */ + 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 MatchSet. + */ + 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 StringItem. + */ + 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 IntegerItem. + */ + 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 BooleanItem. + */ + 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 ContentItem. + */ + public ContentItem createContentItem(String name); + + /** + * Returns a specific Item, of the list specified during the + * creation of the Segment, which is to be fetched during + * Segment execution, or returns null if the specified + * index does not correspond to a Item. + * @param index The index of the Item to be retrieved. + */ + public void getItem(int index); + + /** + * Fetches the results of the next matching Segment, if any. + * @return true if another match, otherwise + * false (same value as exists). + */ + 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 StringItem represents a string property to be fetched by a + * Segment. + *

See also the Document Object Model (DOM) Level 3 Views and Formatting +Specification. + * @since DOM Level 3 + */ +public interface StringItem extends Item { + /** + * The string value returned by the Segment, which is + * undefined if exists 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; + +/** + * View is used as the root Segment, as well as + * providing additional global functionality such as selection. + *

See also the Document Object Model (DOM) Level 3 Views and Formatting +Specification. + * @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 Segment against all nested Segment + * s, fetchingItems associated the requested match number, + * if it exists. + * @param todo The Segment to match within the view. + * @return true if the desired match number was found, + * otherwise false. + * @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 + * Matches and Items. + * @param name The name of the integer property of the segment to be + * retrieved. + * @return The value of the named property of the Segment. + * @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 + * Matches and Items. + * @param name The name of the string property of the segment to be + * retrieved. + * @return The value of the named property of the Segment. + * @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 + * Matches and Items. + * @param name The name of the boolean property of the segment to be + * retrieved. + * @return The value of the named property of the Segment. + * @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 + * Matches and Items. + * @param name The name of the content property of the segment to be + * retrieved. + * @return The Node value of the named property of the + * Segment. + * @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 + * Matches and Items. + * @param name The name of the content property of the segment to be + * retrieved. + * @return The offset value of the named property of the + * Segment. + * @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; + +/** + *

See also the Document Object Model (DOM) Level 3 Views and Formatting +Specification. + */ +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; + +/** + *

See also the Document Object Model (DOM) Level 3 Views and Formatting +Specification. + */ +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. + *

See also the Document Object Model (DOM) Level 3 Views and Formatting +Specification. + */ +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 VisualFont, 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; + +/** + *

See also the Document Object Model (DOM) Level 3 Views and Formatting +Specification. + */ +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; + +/** + *

See also the Document Object Model (DOM) Level 3 Views and Formatting +Specification. + */ +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; + +/** + *

See also the Document Object Model (DOM) Level 3 Views and Formatting +Specification. + */ +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; + +/** + *

See also the Document Object Model (DOM) Level 3 Views and Formatting +Specification. + */ +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. + *

See also the Document Object Model (DOM) Level 3 Views and Formatting +Specification. + */ +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, matchSegment is called + * passing this segment or another segment that references this segment, + * which finds a matching segment and sets result attributes. + *

See also the Document Object Model (DOM) Level 3 Views and Formatting +Specification. + */ +public interface VisualSegment extends VisualResource { + /** + * May be set to cause the corresponding segment to be matched only if it + * contains the specified matchX and matchY + * positions. + */ + public boolean getMatchPosition(); + /** + * May be set to cause the corresponding segment to be matched only if it + * contains the specified matchX and matchY + * 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 + * matchX, matchY, matchXR, and + * matchYR. + */ + 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 + * matchX, matchY, matchXR, and + * matchYR. + */ + 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 + * matchX, matchY, matchXR, and + * matchYR. + */ + public boolean getMatchContaining(); + /** + * May be set to cause the corresponding segment to be matched only if it + * contains the specified rectangular region bounded by + * matchX, matchY, matchXR, and + * matchYR. + */ + 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 matchNode content, offset by + * matchOffset. + */ + public boolean getMatchContent(); + /** + * May be set to cause the corresponding segment to only be matched if it + * presents the matchNode content, offset by + * matchOffset. + */ + 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 + * matchNode offset matchOffset and Node + * matchNodeR offset matchOffsetR. + */ + 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 + * matchNode offset matchOffset and Node + * matchNodeR offset matchOffsetR. + */ + public void setMatchRange(boolean matchRange); + + /** + * The node, or first node in a range to use to match segments which + * present specified content. + *
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. + *
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. + *
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. + *
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 VisualResource, + * 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. + *

See also the Document Object Model (DOM) Level 3 Views and Formatting +Specification. + */ +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 VisualCharacter. + */ + public VisualCharacter createVisualCharacter(); + + /** + * Creates a visual character run to match and return information on a run + * of similar ajdacent visual characters of the view. + *
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 VisualCharacterRun. + */ + public VisualCharacterRun createVisualCharacterRun(); + + /** + * Creates a visual frame to match and return information on a frame of + * the view. + * @return The requested VisualFrame. + */ + public VisualFrame createVisualFrame(); + + /** + * Creates a visual image to match and return information on an image of + * the view. + * @return The requested VisualImage. + */ + public VisualImage createVisualImage(); + + /** + * Creates a visual form button to match and return information on a form + * button of the view. + * @return The requested VisualFormButton. + */ + public VisualFormButton createVisualFormButton(); + + /** + * Creates a visual form field to match and return information on a form + * field of the view. + * @return The requested VisualFormField. + */ + 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); + +} -- 2.30.2