diff options
7 files changed, 1228 insertions, 0 deletions
diff --git a/src/documentation/content/design/alt.design/properties/BorderCommonStyle.html b/src/documentation/content/design/alt.design/properties/BorderCommonStyle.html new file mode 100644 index 000000000..c41905ce0 --- /dev/null +++ b/src/documentation/content/design/alt.design/properties/BorderCommonStyle.html @@ -0,0 +1,131 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> +<!-- Created by htmlize-0.67 in css mode. --> +<html> + <head> + <title>BorderCommonStyle.java</title> + <style type="text/css"> + <!-- + body { + color: #000000; + background-color: #faf0e6; + } /* default */ + .variable-name { + color: #8b008b; + background-color: #faf0e6; + } /* font-lock-variable-name-face */ + .jde-java-font-lock-package { + color: #0000cd; + background-color: #faf0e6; + } /* jde-java-font-lock-package-face */ + .jde-java-font-lock-constant { + color: #5f9ea0; + background-color: #faf0e6; + } /* jde-java-font-lock-constant-face */ + .keyword { + color: #8b0000; + background-color: #faf0e6; + } /* font-lock-keyword-face */ + .string { + color: #008b00; + background-color: #faf0e6; + } /* font-lock-string-face */ + .jde-java-font-lock-number { + color: #bc8f8f; + background-color: #faf0e6; + } /* jde-java-font-lock-number-face */ + .type { + color: #4682b4; + background-color: #faf0e6; + } /* font-lock-type-face */ + .jde-java-font-lock-modifier { + color: #da70d6; + background-color: #faf0e6; + } /* jde-java-font-lock-modifier-face */ + .comment { + color: #00008b; + background-color: #faf0e6; + } /* font-lock-comment-face */ + .function-name { + color: #8b2323; + background-color: #faf0e6; + } /* font-lock-function-name-face */ + a { + color: inherit; + background-color: inherit; + font: inherit; + text-decoration: inherit; + } + a:hover { + text-decoration: underline; + } + --> + </style> + </head> + <body> + <pre> +<span class="keyword">package</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">properties</span>; + +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">expr</span>.<span class="type">PropertyException</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">properties</span>.<span class="type">Property</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">datatypes</span>.<span class="type">Ints</span>; + +<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">HashMap</span>; + +<span class="comment">/** + * Pseudo-property class for common border style values occurring in a + * number of classes. + */</span> +<span class="jde-java-font-lock-modifier">public</span> <span class="keyword">class</span> <span class="function-name" id="BorderCommonStyleClass">BorderCommonStyle</span> <span class="keyword">extends</span> <span class="type">Property</span> { + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="HIDDEN">HIDDEN</span> = <span class="jde-java-font-lock-number">1</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="DOTTED">DOTTED</span> = <span class="jde-java-font-lock-number">2</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="DASHED">DASHED</span> = <span class="jde-java-font-lock-number">3</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="SOLID">SOLID</span> = <span class="jde-java-font-lock-number">4</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="DOUBLE">DOUBLE</span> = <span class="jde-java-font-lock-number">5</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="GROOVE">GROOVE</span> = <span class="jde-java-font-lock-number">6</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="RIDGE">RIDGE</span> = <span class="jde-java-font-lock-number">7</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="INSET">INSET</span> = <span class="jde-java-font-lock-number">8</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="OUTSET">OUTSET</span> = <span class="jde-java-font-lock-number">9</span>; + + <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">String</span>[] <span class="variable-name" id="rwEnums">rwEnums</span> = { + <span class="jde-java-font-lock-constant" id="null">null</span> + ,"<span class="string">hidden</span>" + ,"<span class="string">dotted</span>" + ,"<span class="string">dashed</span>" + ,"<span class="string">solid</span>" + ,"<span class="string">double</span>" + ,"<span class="string">groove</span>" + ,"<span class="string">ridge</span>" + ,"<span class="string">inset</span>" + ,"<span class="string">outset</span>" + }; + + <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">HashMap</span> <span class="variable-name" id="rwEnumHash">rwEnumHash</span>; + <span class="jde-java-font-lock-modifier">static</span> { + rwEnumHash = <span class="keyword">new</span> <span class="type">HashMap</span>(rwEnums.length); + <span class="keyword">for</span> (<span class="type">int</span> <span class="variable-name" id="i">i</span> = <span class="jde-java-font-lock-number">1</span>; i < rwEnums.length; i++ ) { + rwEnumHash.put((<span class="type">Object</span>)rwEnums[i], + (<span class="type">Object</span>) Ints.consts.get(i)); + } + } + + <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="getEnumIndex">getEnumIndex</span>(<span class="type">String</span> <span class="variable-name" id="enum">enum</span>) + <span class="keyword">throws</span> <span class="type">PropertyException</span> + { + <span class="type">Integer</span> <span class="variable-name" id="ii">ii</span> = (<span class="type">Integer</span>)(rwEnumHash.get(enum)); + <span class="keyword">if</span> (ii == <span class="jde-java-font-lock-constant">null</span>) + <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">Unknown enum value: </span>" + enum); + <span class="keyword">return</span> ii.intValue(); + } + <span class="jde-java-font-lock-modifier">public</span> <span class="type">String</span> <span class="function-name" id="getEnumText">getEnumText</span>(<span class="type">int</span> <span class="variable-name" id="index">index</span>) + <span class="keyword">throws</span> <span class="type">PropertyException</span> + { + <span class="keyword">if</span> (index < <span class="jde-java-font-lock-number">1</span> || index >= rwEnums.length) + <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">index out of range: </span>" + index); + <span class="keyword">return</span> rwEnums[index]; + } + +} + +</pre> + </body> +</html> diff --git a/src/documentation/content/design/alt.design/properties/BorderCommonWidth.html b/src/documentation/content/design/alt.design/properties/BorderCommonWidth.html new file mode 100644 index 000000000..1cbca633d --- /dev/null +++ b/src/documentation/content/design/alt.design/properties/BorderCommonWidth.html @@ -0,0 +1,128 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> +<!-- Created by htmlize-0.67 in css mode. --> +<html> + <head> + <title>BorderCommonWidth.java</title> + <style type="text/css"> + <!-- + body { + color: #000000; + background-color: #faf0e6; + } /* default */ + .variable-name { + color: #8b008b; + background-color: #faf0e6; + } /* font-lock-variable-name-face */ + .jde-java-font-lock-package { + color: #0000cd; + background-color: #faf0e6; + } /* jde-java-font-lock-package-face */ + .jde-java-font-lock-constant { + color: #5f9ea0; + background-color: #faf0e6; + } /* jde-java-font-lock-constant-face */ + .keyword { + color: #8b0000; + background-color: #faf0e6; + } /* font-lock-keyword-face */ + .jde-java-font-lock-doc-tag { + color: #008b00; + background-color: #faf0e6; + } /* jde-java-font-lock-doc-tag-face */ + .string { + color: #008b00; + background-color: #faf0e6; + } /* font-lock-string-face */ + .jde-java-font-lock-number { + color: #bc8f8f; + background-color: #faf0e6; + } /* jde-java-font-lock-number-face */ + .type { + color: #4682b4; + background-color: #faf0e6; + } /* font-lock-type-face */ + .jde-java-font-lock-modifier { + color: #da70d6; + background-color: #faf0e6; + } /* jde-java-font-lock-modifier-face */ + .comment { + color: #00008b; + background-color: #faf0e6; + } /* font-lock-comment-face */ + .function-name { + color: #8b2323; + background-color: #faf0e6; + } /* font-lock-function-name-face */ + a { + color: inherit; + background-color: inherit; + font: inherit; + text-decoration: inherit; + } + a:hover { + text-decoration: underline; + } + --> + </style> + </head> + <body> + <pre> +<span class="keyword">package</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">properties</span>; + +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">properties</span>.<span class="type">Property</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">datatypes</span>.<span class="type">Length</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">datatypes</span>.<span class="type">Numeric</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="type">FONode</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">expr</span>.<span class="type">PropertyException</span>; + +<span class="comment">/** + * Pseudo-property class for common border width values occurring in a + * number of classes. + */</span> +<span class="jde-java-font-lock-modifier">public</span> <span class="keyword">class</span> <span class="function-name" id="BorderCommonWidthClass">BorderCommonWidth</span> <span class="keyword">extends</span> <span class="type">Property</span> { + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="THIN">THIN</span> = <span class="jde-java-font-lock-number">1</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="MEDIUM">MEDIUM</span> = <span class="jde-java-font-lock-number">2</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="THICK">THICK</span> = <span class="jde-java-font-lock-number">3</span>; + + <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">String</span>[] <span class="variable-name" id="rwEnums">rwEnums</span> = { + <span class="jde-java-font-lock-constant" id="null">null</span> + ,"<span class="string">thin</span>" + ,"<span class="string">medium</span>" + ,"<span class="string">thick</span>" + }; + + <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">double</span>[] <span class="variable-name" id="mappedPoints">mappedPoints</span> = { + <span class="jde-java-font-lock-number">0d</span> + ,<span class="jde-java-font-lock-number">0.5d</span> + ,<span class="jde-java-font-lock-number">1d</span> + ,<span class="jde-java-font-lock-number">2d</span> + }; + + <span class="comment">// N.B. If these values change, all initial values expressed in these +</span> <span class="comment">// terms must be manually changed. +</span> + <span class="comment">/** + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> <tt>int</tt> property index + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> <tt>int</tt> mappedEnum enumeration value + * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>Numeric[]</tt> containing the values corresponding + * to the MappedNumeric enumeration constants for border width + */</span> + <span class="jde-java-font-lock-modifier">public</span> <span class="type">Numeric</span> <span class="function-name" id="getMappedLength">getMappedLength</span>(<span class="type">FONode</span> <span class="variable-name" id="node">node</span>, <span class="type">int</span> <span class="variable-name">property</span>, <span class="type">int</span> <span class="variable-name">enum</span>) + <span class="keyword">throws</span> <span class="type">PropertyException</span> + { + <span class="keyword">return</span> + Length.makeLength(property, mappedPoints[enum], Length.<span class="jde-java-font-lock-constant" id="PT">PT</span>); + } + + <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="getEnumIndex">getEnumIndex</span>(<span class="type">String</span> <span class="variable-name" id="enum">enum</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> { + <span class="keyword">return</span> enumValueToIndex(enum, rwEnums); + } + <span class="jde-java-font-lock-modifier">public</span> <span class="type">String</span> <span class="function-name" id="getEnumText">getEnumText</span>(<span class="type">int</span> <span class="variable-name" id="index">index</span>) { + <span class="keyword">return</span> rwEnums[index]; + } + +} + +</pre> + </body> +</html> diff --git a/src/documentation/content/design/alt.design/properties/BorderLeftStyle.html b/src/documentation/content/design/alt.design/properties/BorderLeftStyle.html new file mode 100644 index 000000000..dbd3c0bb6 --- /dev/null +++ b/src/documentation/content/design/alt.design/properties/BorderLeftStyle.html @@ -0,0 +1,70 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> +<!-- Created by htmlize-0.67 in css mode. --> +<html> + <head> + <title>BorderLeftStyle.java</title> + <style type="text/css"> + <!-- + body { + color: #000000; + background-color: #faf0e6; + } /* default */ + .variable-name { + color: #8b008b; + background-color: #faf0e6; + } /* font-lock-variable-name-face */ + .jde-java-font-lock-package { + color: #0000cd; + background-color: #faf0e6; + } /* jde-java-font-lock-package-face */ + .jde-java-font-lock-constant { + color: #5f9ea0; + background-color: #faf0e6; + } /* jde-java-font-lock-constant-face */ + .keyword { + color: #8b0000; + background-color: #faf0e6; + } /* font-lock-keyword-face */ + .type { + color: #4682b4; + background-color: #faf0e6; + } /* font-lock-type-face */ + .jde-java-font-lock-modifier { + color: #da70d6; + background-color: #faf0e6; + } /* jde-java-font-lock-modifier-face */ + .function-name { + color: #8b2323; + background-color: #faf0e6; + } /* font-lock-function-name-face */ + a { + color: inherit; + background-color: inherit; + font: inherit; + text-decoration: inherit; + } + a:hover { + text-decoration: underline; + } + --> + </style> + </head> + <body> + <pre> +<span class="keyword">package</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">properties</span>; + +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">properties</span>.<span class="type">BorderCommonStyle</span>; + +<span class="jde-java-font-lock-modifier">public</span> <span class="keyword">class</span> <span class="function-name" id="BorderLeftStyleClass">BorderLeftStyle</span> <span class="keyword">extends</span> <span class="type">BorderCommonStyle</span> { + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="dataTypes">dataTypes</span> = <span class="jde-java-font-lock-constant" id="ENUM">ENUM</span> | <span class="jde-java-font-lock-constant">NONE</span> | <span class="jde-java-font-lock-constant">INHERIT</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="traitMapping">traitMapping</span> = <span class="jde-java-font-lock-constant" id="DISAPPEARS">DISAPPEARS</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="initialValueType">initialValueType</span> = <span class="jde-java-font-lock-constant" id="NONE_IT">NONE_IT</span>; + + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="inherited">inherited</span> = <span class="jde-java-font-lock-constant" id="NO">NO</span>; + + +} + +</pre> + </body> +</html> diff --git a/src/documentation/content/design/alt.design/properties/BorderLeftWidth.html b/src/documentation/content/design/alt.design/properties/BorderLeftWidth.html new file mode 100644 index 000000000..0ef61a336 --- /dev/null +++ b/src/documentation/content/design/alt.design/properties/BorderLeftWidth.html @@ -0,0 +1,85 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> +<!-- Created by htmlize-0.67 in css mode. --> +<html> + <head> + <title>BorderLeftWidth.java</title> + <style type="text/css"> + <!-- + body { + color: #000000; + background-color: #faf0e6; + } /* default */ + .variable-name { + color: #8b008b; + background-color: #faf0e6; + } /* font-lock-variable-name-face */ + .jde-java-font-lock-package { + color: #0000cd; + background-color: #faf0e6; + } /* jde-java-font-lock-package-face */ + .jde-java-font-lock-constant { + color: #5f9ea0; + background-color: #faf0e6; + } /* jde-java-font-lock-constant-face */ + .keyword { + color: #8b0000; + background-color: #faf0e6; + } /* font-lock-keyword-face */ + .type { + color: #4682b4; + background-color: #faf0e6; + } /* font-lock-type-face */ + .jde-java-font-lock-modifier { + color: #da70d6; + background-color: #faf0e6; + } /* jde-java-font-lock-modifier-face */ + .function-name { + color: #8b2323; + background-color: #faf0e6; + } /* font-lock-function-name-face */ + a { + color: inherit; + background-color: inherit; + font: inherit; + text-decoration: inherit; + } + a:hover { + text-decoration: underline; + } + --> + </style> + </head> + <body> + <pre> +<span class="keyword">package</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">properties</span>; + +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">datatypes</span>.<span class="type">Numeric</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">expr</span>.<span class="type">PropertyException</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">datatypes</span>.<span class="type">PropertyValue</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="type">PropNames</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="type">FONode</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">properties</span>.<span class="type">BorderCommonWidth</span>; + +<span class="jde-java-font-lock-modifier">public</span> <span class="keyword">class</span> <span class="function-name" id="BorderLeftWidthClass">BorderLeftWidth</span> <span class="keyword">extends</span> <span class="type">BorderCommonWidth</span> { + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="dataTypes">dataTypes</span> = <span class="jde-java-font-lock-constant" id="LENGTH">LENGTH</span> | <span class="jde-java-font-lock-constant">MAPPED_LENGTH</span> | <span class="jde-java-font-lock-constant">INHERIT</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="traitMapping">traitMapping</span> = <span class="jde-java-font-lock-constant" id="DISAPPEARS">DISAPPEARS</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="initialValueType">initialValueType</span> = <span class="jde-java-font-lock-constant" id="LENGTH_IT">LENGTH_IT</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="type">PropertyValue</span> <span class="function-name" id="getInitialValue">getInitialValue</span>(<span class="type">int</span> <span class="variable-name" id="property">property</span>) + <span class="keyword">throws</span> <span class="type">PropertyException</span> + { + <span class="keyword">return</span> getMappedLength(<span class="jde-java-font-lock-constant" id="null">null</span>, <span class="jde-java-font-lock-constant">MEDIUM</span>); + } + + <span class="jde-java-font-lock-modifier">public</span> <span class="type">Numeric</span> <span class="function-name" id="getMappedLength">getMappedLength</span>(<span class="type">FONode</span> <span class="variable-name" id="node">node</span>, <span class="type">int</span> <span class="variable-name">enum</span>) + <span class="keyword">throws</span> <span class="type">PropertyException</span> + { + <span class="keyword">return</span> getMappedLength(node, PropNames.<span class="jde-java-font-lock-constant" id="BORDER_LEFT_WIDTH">BORDER_LEFT_WIDTH</span>, enum); + } + + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="inherited">inherited</span> = <span class="jde-java-font-lock-constant" id="NO">NO</span>; + +} + +</pre> + </body> +</html> diff --git a/src/documentation/content/design/alt.design/properties/Direction.html b/src/documentation/content/design/alt.design/properties/Direction.html new file mode 100644 index 000000000..672a9f2d4 --- /dev/null +++ b/src/documentation/content/design/alt.design/properties/Direction.html @@ -0,0 +1,99 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> +<!-- Created by htmlize-0.67 in css mode. --> +<html> + <head> + <title>Direction.java</title> + <style type="text/css"> + <!-- + body { + color: #000000; + background-color: #faf0e6; + } /* default */ + .variable-name { + color: #8b008b; + background-color: #faf0e6; + } /* font-lock-variable-name-face */ + .jde-java-font-lock-package { + color: #0000cd; + background-color: #faf0e6; + } /* jde-java-font-lock-package-face */ + .jde-java-font-lock-constant { + color: #5f9ea0; + background-color: #faf0e6; + } /* jde-java-font-lock-constant-face */ + .keyword { + color: #8b0000; + background-color: #faf0e6; + } /* font-lock-keyword-face */ + .string { + color: #008b00; + background-color: #faf0e6; + } /* font-lock-string-face */ + .jde-java-font-lock-number { + color: #bc8f8f; + background-color: #faf0e6; + } /* jde-java-font-lock-number-face */ + .type { + color: #4682b4; + background-color: #faf0e6; + } /* font-lock-type-face */ + .jde-java-font-lock-modifier { + color: #da70d6; + background-color: #faf0e6; + } /* jde-java-font-lock-modifier-face */ + .function-name { + color: #8b2323; + background-color: #faf0e6; + } /* font-lock-function-name-face */ + a { + color: inherit; + background-color: inherit; + font: inherit; + text-decoration: inherit; + } + a:hover { + text-decoration: underline; + } + --> + </style> + </head> + <body> + <pre> +<span class="keyword">package</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">properties</span>; + +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">datastructs</span>.<span class="type">ROStringArray</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">expr</span>.<span class="type">PropertyException</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">datatypes</span>.<span class="type">PropertyValue</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">datatypes</span>.<span class="type">EnumType</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="type">PropNames</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">properties</span>.<span class="type">Property</span>; + +<span class="jde-java-font-lock-modifier">public</span> <span class="keyword">class</span> <span class="function-name" id="DirectionClass">Direction</span> <span class="keyword">extends</span> <span class="type">Property</span> { + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="dataTypes">dataTypes</span> = <span class="jde-java-font-lock-constant" id="ENUM">ENUM</span> | <span class="jde-java-font-lock-constant">INHERIT</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="traitMapping">traitMapping</span> = <span class="jde-java-font-lock-constant" id="NEW_TRAIT">NEW_TRAIT</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="initialValueType">initialValueType</span> = <span class="jde-java-font-lock-constant" id="ENUM_IT">ENUM_IT</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="LTR">LTR</span> = <span class="jde-java-font-lock-number">1</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="RTL">RTL</span> = <span class="jde-java-font-lock-number">2</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="type">PropertyValue</span> <span class="function-name" id="getInitialValue">getInitialValue</span>(<span class="type">int</span> <span class="variable-name" id="property">property</span>) + <span class="keyword">throws</span> <span class="type">PropertyException</span> + { + <span class="keyword">return</span> <span class="keyword">new</span> <span class="type">EnumType</span>(PropNames.<span class="jde-java-font-lock-constant" id="DIRECTION">DIRECTION</span>, <span class="jde-java-font-lock-constant">LTR</span>); + } + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="inherited">inherited</span> = <span class="jde-java-font-lock-constant" id="COMPUTED">COMPUTED</span>; + + <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">String</span>[] <span class="variable-name" id="rwEnums">rwEnums</span> = { + <span class="jde-java-font-lock-constant" id="null">null</span> + ,"<span class="string">ltr</span>" + ,"<span class="string">rtl</span>" + }; + <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="getEnumIndex">getEnumIndex</span>(<span class="type">String</span> <span class="variable-name" id="enum">enum</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> { + <span class="keyword">return</span> enumValueToIndex(enum, rwEnums); + } + <span class="jde-java-font-lock-modifier">public</span> <span class="type">String</span> <span class="function-name" id="getEnumText">getEnumText</span>(<span class="type">int</span> <span class="variable-name" id="index">index</span>) { + <span class="keyword">return</span> rwEnums[index]; + } +} + +</pre> + </body> +</html> diff --git a/src/documentation/content/design/alt.design/properties/PropertyConsts.html b/src/documentation/content/design/alt.design/properties/PropertyConsts.html new file mode 100644 index 000000000..23d70b014 --- /dev/null +++ b/src/documentation/content/design/alt.design/properties/PropertyConsts.html @@ -0,0 +1,598 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> +<!-- Created by htmlize-0.67 in css mode. --> +<html> + <head> + <title>PropertyConsts.java</title> + <style type="text/css"> + <!-- + body { + color: #000000; + background-color: #faf0e6; + } /* default */ + .jde-java-font-lock-code { + background-color: #faf0e6; + } /* jde-java-font-lock-code-face */ + .function-name { + color: #8b2323; + background-color: #faf0e6; + } /* font-lock-function-name-face */ + .jde-java-font-lock-italic { + background-color: #faf0e6; + font-style: italic; + } /* jde-java-font-lock-italic-face */ + .jde-java-font-lock-modifier { + color: #da70d6; + background-color: #faf0e6; + } /* jde-java-font-lock-modifier-face */ + .keyword { + color: #8b0000; + background-color: #faf0e6; + } /* font-lock-keyword-face */ + .jde-java-font-lock-link { + color: #0000ff; + background-color: #faf0e6; + text-decoration: underline; + } /* jde-java-font-lock-link-face */ + .variable-name { + color: #8b008b; + background-color: #faf0e6; + } /* font-lock-variable-name-face */ + .string { + color: #008b00; + background-color: #faf0e6; + } /* font-lock-string-face */ + .jde-java-font-lock-package { + color: #0000cd; + background-color: #faf0e6; + } /* jde-java-font-lock-package-face */ + .jde-java-font-lock-constant { + color: #5f9ea0; + background-color: #faf0e6; + } /* jde-java-font-lock-constant-face */ + .type { + color: #4682b4; + background-color: #faf0e6; + } /* font-lock-type-face */ + .jde-java-font-lock-bold { + background-color: #faf0e6; + font-weight: bold; + } /* jde-java-font-lock-bold-face */ + .jde-java-font-lock-doc-tag { + color: #008b00; + background-color: #faf0e6; + } /* jde-java-font-lock-doc-tag-face */ + .comment { + color: #00008b; + background-color: #faf0e6; + } /* font-lock-comment-face */ + .jde-java-font-lock-number { + color: #bc8f8f; + background-color: #faf0e6; + } /* jde-java-font-lock-number-face */ + a { + color: inherit; + background-color: inherit; + font: inherit; + text-decoration: inherit; + } + a:hover { + text-decoration: underline; + } + --> + </style> + </head> + <body> + <pre> +<span class="comment">/** + * $Id$ + * <br/>Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * <br/>For details on use and redistribution please refer to the + * <br/>LICENSE file included with these sources. + * + * </span><span class="jde-java-font-lock-doc-tag">@author</span><span class="comment"> <a href="mailto:pbwest@powerup.com.au"></span><span class="jde-java-font-lock-link">Peter B. West</span><span class="comment"></a> + * </span><span class="jde-java-font-lock-doc-tag">@version</span><span class="comment"> $Revision$ $Name$ + */</span> + +<span class="keyword">package</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>; + +<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">lang</span>.<span class="type">Character</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">lang</span>.<span class="jde-java-font-lock-package">reflect</span>.<span class="type">Method</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">lang</span>.<span class="jde-java-font-lock-package">reflect</span>.<span class="type">InvocationTargetException</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">Arrays</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">Collections</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">HashMap</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">Map</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">List</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">HashSet</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">LinkedList</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">BitSet</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">StringTokenizer</span>; + +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="type">FOTree</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="type">FONode</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="type">PropNames</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">properties</span>.<span class="type">Property</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">expr</span>.<span class="type">PropertyException</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">datatypes</span>.<span class="type">Numeric</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">datatypes</span>.<span class="type">Ints</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">datastructs</span>.<span class="type">ROIntArray</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">datastructs</span>.<span class="type">ROStringArray</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">datastructs</span>.<span class="type">ROBitSet</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">datatypes</span>.<span class="type">PropertyValue</span>; + +<span class="comment">/** + * This class contains a number of arrays containing values indexed by the + * property index value, determined from the PropNames class. These arrays + * provide a means of accessing information about the nature of a property + * through the property index value. + * <p>Most of these arrays are initialised piecemeal as information is + * required about a particular property. + * There are also <tt>HashMap</tt>s which encode the various sets of + * properties which are defined to apply to each of the Flow Objects, + * and a <tt>BitSet</tt> of those properties which are + * automatically inherited. The <tt>HashMap</tt>s provide a convenient + * means of specifying the relationship between FOs and properties. + */</span> +<span class="jde-java-font-lock-modifier">public</span> <span class="keyword">class</span> <span class="function-name" id="PropertyConstsClass">PropertyConsts</span> { + + <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">String</span> <span class="variable-name" id="tag">tag</span> = "<span class="string">$Name$</span>"; + <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">String</span> <span class="variable-name" id="revision">revision</span> = "<span class="string">$Revision$</span>"; + + <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">String</span> <span class="variable-name" id="packageName">packageName</span> = "<span class="string">org.apache.fop.fo</span>"; + + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">PropertyConsts</span> <span class="variable-name" id="pconsts">pconsts</span>; + <span class="jde-java-font-lock-modifier">static</span> { + <span class="keyword">try</span> { + pconsts = <span class="keyword">new</span> <span class="type">PropertyConsts</span>(); + } <span class="keyword">catch</span> (<span class="type">PropertyException</span> <span class="variable-name" id="e">e</span>) { + <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">RuntimeException</span>(e.getMessage()); + } + } + + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">PropertyConsts</span> <span class="function-name" id="getPropertyConsts">getPropertyConsts</span>() { + <span class="keyword">return</span> pconsts; + } + + + <span class="comment">/** + * A Property[] array containing Property objects corresponding to each + * of the property indices in <tt>PropNames</tt>. + * Initially empty, entries are filled on demand as calls for details + * about individual properties are made. + */</span> + <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">Property</span>[] <span class="variable-name" id="properties">properties</span> + = <span class="keyword">new</span> <span class="type">Property</span>[PropNames.<span class="jde-java-font-lock-constant" id="LAST_PROPERTY_INDEX">LAST_PROPERTY_INDEX</span> + <span class="jde-java-font-lock-number">1</span>]; + + <span class="comment">/** + * A Class[] array containing Class objects corresponding to each of the + * class names in the classNames array. Elements are set + * in parallel to the creation of the class names in + * the classNames array. It can be indexed by the property name + * constants defined in this file. + */</span> + <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">Class</span>[] <span class="variable-name" id="classes">classes</span> + = <span class="keyword">new</span> <span class="type">Class</span>[PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span> + <span class="jde-java-font-lock-number">1</span>]; + + <span class="comment">/** + * A String[] array of the property class names. This array is + * effectively 1-based, with the first element being unused. + * The elements of this array are set by converting the FO + * property names from the array PropNames.propertyNames into class + * names by converting the first character of every component word to + * upper case, and removing all punctuation characters. + * It can be indexed by the property name constants defined in + * the PropNames class. + */</span> + <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">String</span>[] <span class="variable-name" id="classNames">classNames</span> + = <span class="keyword">new</span> <span class="type">String</span>[PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span> + <span class="jde-java-font-lock-number">1</span>]; + + <span class="comment">/** + * A HashMap whose elements are an integer index value keyed by the name + * of a property class. The index value is the index of the property + * class name in the classNames[] array. + */</span> + <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">HashMap</span> <span class="variable-name" id="classToIndex">classToIndex</span> + = <span class="keyword">new</span> <span class="type">HashMap</span>(PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span> + <span class="jde-java-font-lock-number">1</span>); + + <span class="comment">/** + * An <tt>int[]</tt> containing the <i></span><span class="jde-java-font-lock-italic">inherited</span><span class="comment"></i> values from the + * <tt>Property</tt> classes. + */</span> + <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span>[] <span class="variable-name" id="inherited">inherited</span> + = <span class="keyword">new</span> <span class="type">int</span>[PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span> + <span class="jde-java-font-lock-number">1</span>]; + + <span class="comment">/** + * A <tt>BitSet</tt> of properties which are normally inherited + * (strictly, not not inherited). + * It is defined relative to the set of all properties; i.e. the + * inheritability of any property can be established by testing the + * bit in this set that corresponds to the queried property's index. + * <p>The <tt>BitSet</tt> is private and is the basis for + * <i></span><span class="jde-java-font-lock-italic">inheritedProperties</span><span class="comment"></i>. + */</span> + <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">BitSet</span> <span class="variable-name" id="inheritedprops">inheritedprops</span> + = <span class="keyword">new</span> <span class="type">BitSet</span>(PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span> + <span class="jde-java-font-lock-number">1</span>); + + <span class="comment">/** + * An int[] array of the types of the <i></span><span class="jde-java-font-lock-italic">initialValue</span><span class="comment"></i> field of each + * property. The array is indexed by the index value constants that are + * defined in the PropNames class in parallel to the + * PropNames.propertyNames[] array. + */</span> + <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span>[] <span class="variable-name" id="initialValueTypes">initialValueTypes</span> + = <span class="keyword">new</span> <span class="type">int</span>[PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span> + <span class="jde-java-font-lock-number">1</span>]; + + <span class="comment">/** + * A <tt>PropertyValue</tt> array containing the initial values of + * each of the properties. + */</span> + <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">PropertyValue</span>[] <span class="variable-name" id="initialValues">initialValues</span> + = <span class="keyword">new</span> <span class="type">PropertyValue</span>[PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span> + <span class="jde-java-font-lock-number">1</span>]; + + <span class="comment">/** + * An int[] array of the values of the <i></span><span class="jde-java-font-lock-italic">dataTypes</span><span class="comment"></i> field of each + * property. The array is indexed by the index value constants that are + * defined in the PropNames class in parallel to the + * PropNames.propertyNames[] array. + * The array elements are set from the values of the + * <i></span><span class="jde-java-font-lock-italic">dataTypes</span><span class="comment"></i> field in each property class. + */</span> + <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span>[] <span class="variable-name" id="datatypes">datatypes</span> + = <span class="keyword">new</span> <span class="type">int</span>[PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span> + <span class="jde-java-font-lock-number">1</span>]; + + <span class="comment">/** + * An int[] array of the values of the <i></span><span class="jde-java-font-lock-italic">traitMapping</span><span class="comment"></i> field of each + * property. The array is indexed by the index value constants that are + * defined in the PropNames class in parallel to the + * PropNames.propertyNames[] array. + * The array elements are set from the values of the + * <i></span><span class="jde-java-font-lock-italic">traitMapping</span><span class="comment"></i> field in each property class. + */</span> + <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span>[] <span class="variable-name" id="traitMappings">traitMappings</span> + = <span class="keyword">new</span> <span class="type">int</span>[PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span> + <span class="jde-java-font-lock-number">1</span>]; + + <span class="comment">/** + * Get the initial value type for a property name. + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="property">property</span><span class="comment"> String name of the FO property + * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> int enumerated initialValueType. These constants are defined + * as static final ints in this class. Note that an undefined property + * name will return the constant defined as NOTYPE_IT + */</span> + <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="getInitialValueType">getInitialValueType</span>(<span class="type">String</span> <span class="variable-name">property</span>) + <span class="keyword">throws</span> <span class="type">PropertyException</span> + { + <span class="comment">// Get the property index then index into the initialvaluetypes array +</span> <span class="keyword">return</span> getInitialValueType(PropNames.getPropertyIndex(property)); + } + + <span class="comment">/** + * get the initial value type for a property index. + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="propindex">propindex</span><span class="comment"> int index of the FO property + * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> int enumerated initialValueType. These constants are defined + * as static final ints in the Property class. + * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException +</span><span class="comment"> */</span> + <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name">getInitialValueType</span>(<span class="type">int</span> <span class="variable-name">propindex</span>) + <span class="keyword">throws</span> <span class="type">PropertyException</span> + { + setupProperty(propindex); + <span class="comment">//System.out.println("getInitialValueType: " + propindex + " " +</span> <span class="comment">//+ initialValueTypes[propindex]); +</span> <span class="keyword">return</span> initialValueTypes[propindex]; + } + + <span class="comment">/** + * Get the initial value <tt>PropertyValue</tt> for a given property. + * Note that this is a <b></span><span class="jde-java-font-lock-bold">raw</span><span class="comment"></b> value; if it is + * an unresolved percentage that value will be returned. + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="index">index</span><span class="comment"> - the property index. + * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a <tt>PropertyValue</tt> containing the initial property + * value element for the indexed property. + * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type"><tt>PropertyException</tt> +</span><span class="comment"> */</span> + <span class="jde-java-font-lock-modifier">public</span> <span class="type">PropertyValue</span> <span class="function-name" id="getInitialValue">getInitialValue</span>(<span class="type">int</span> <span class="variable-name">propindex</span>) + <span class="keyword">throws</span> <span class="type">PropertyException</span> + { + <span class="keyword">if</span> (initialValues[propindex] != <span class="jde-java-font-lock-constant" id="null">null</span>) + <span class="keyword">return</span> initialValues[propindex]; + <span class="comment">//System.out.println("PropertyConts.getInitialValue(" + propindex +</span> <span class="comment">//+ ") " + PropNames.getPropertyName(propindex)); +</span> <span class="keyword">return</span> + (initialValues[propindex] = + setupProperty(propindex).getInitialValue(propindex)); + } + + <span class="comment">/** + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">propindex</span><span class="comment"> <tt>int</tt> index of the property + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="foNode">foNode</span><span class="comment"> the node whose properties are being constructed. + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="value">value</span><span class="comment"> the <tt>PropertyValue</tt> being refined. + * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>PropertyValue</tt> constructed by the property's + * <i></span><span class="jde-java-font-lock-italic">refineParsing</span><span class="comment"></i> method + * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type"><tt>PropertyException</tt> +</span><span class="comment"> */</span> + <span class="jde-java-font-lock-modifier">public</span> <span class="type">PropertyValue</span> <span class="variable-name" id="refineParsing">refineParsing</span> + (<span class="type">int</span> <span class="variable-name">propindex</span>, <span class="type">FONode</span> <span class="variable-name">foNode</span>, <span class="type">PropertyValue</span> <span class="variable-name">value</span>) + <span class="keyword">throws</span> <span class="type">PropertyException</span> + { + <span class="type">Property</span> <span class="variable-name">property</span> = setupProperty(propindex); + <span class="keyword">return</span> property.refineParsing(propindex, foNode, value); + } + + <span class="comment">/** + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">propindex</span><span class="comment"> <tt>int</tt> index of the property + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">foNode</span><span class="comment"> the node whose properties are being constructed. + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">value</span><span class="comment"> the <tt>PropertyValue</tt> being refined. + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="nested">nested</span><span class="comment"> - <tt>boolean</tt> indicating whether this method is + * called normally (false), or as part of another <i></span><span class="jde-java-font-lock-italic">refineParsing</span><span class="comment"></i> + * method. + * </span><span class="jde-java-font-lock-doc-tag">@see</span><span class="comment"> </span><span class="jde-java-font-lock-code">#refineParsing</span><span class="comment">(FOTree,PropertyValue) + * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>PropertyValue</tt> constructed by the property's + * <i></span><span class="jde-java-font-lock-italic">refineParsing</span><span class="comment"></i> method + * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type"><tt>PropertyException</tt> +</span><span class="comment"> */</span> + <span class="jde-java-font-lock-modifier">public</span> <span class="type">PropertyValue</span> <span class="variable-name">refineParsing</span> + (<span class="type">int</span> <span class="variable-name">propindex</span>, <span class="type">FONode</span> <span class="variable-name">foNode</span>, <span class="type">PropertyValue</span> <span class="variable-name">value</span>, <span class="type">boolean</span> <span class="variable-name">isNested</span>) + <span class="keyword">throws</span> <span class="type">PropertyException</span> + { + <span class="type">Property</span> <span class="variable-name">property</span> = setupProperty(propindex); + <span class="keyword">return</span> property.refineParsing(propindex, foNode, value, isNested); + } + + <span class="comment">/** + * Get the <tt>Numeric</tt> value corresponding to an enumerated value. + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">foNode</span><span class="comment"> the <tt>FONode</tt> being built + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">propindex</span><span class="comment"> int index of the FO property + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="enum">enum</span><span class="comment"> - the integer equivalent of the enumeration keyword. + * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the <tt>Numeric</tt> result. + * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException. +</span><span class="comment"> */</span> + <span class="jde-java-font-lock-modifier">public</span> <span class="type">Numeric</span> <span class="function-name" id="getMappedNumeric">getMappedNumeric</span>(<span class="type">FONode</span> <span class="variable-name">foNode</span>, <span class="type">int</span> <span class="variable-name">propindex</span>, <span class="type">int</span> <span class="variable-name">enum</span>) + <span class="keyword">throws</span> <span class="type">PropertyException</span> + { + <span class="type">Property</span> <span class="variable-name">property</span> = setupProperty(propindex); + <span class="keyword">if</span> ((datatypes[propindex] & Property.<span class="jde-java-font-lock-constant" id="MAPPED_LENGTH">MAPPED_LENGTH</span>) != <span class="jde-java-font-lock-number">0</span>) + <span class="keyword">return</span> property.getMappedLength(foNode, enum); + <span class="keyword">else</span> + <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> + ("<span class="string">MAPPED_LENGTH not valid in </span>" + + PropNames.getPropertyName(propindex)); + } + + <span class="comment">/** + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">propindex</span><span class="comment"> int index of the FO property + * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> int type of inheritance for this property + * (See constants defined in Properties.) + * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException. +</span><span class="comment"> */</span> + <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="inheritance">inheritance</span>(<span class="type">String</span> <span class="variable-name">property</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> { + <span class="keyword">return</span> inheritance(PropNames.getPropertyIndex(property)); + } + + <span class="comment">/** + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">propindex</span><span class="comment"> int index of the FO property + * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> int type of inheritance for this property + * (See constants defined in Property.) + * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException. +</span><span class="comment"> */</span> + <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name">inheritance</span>(<span class="type">int</span> <span class="variable-name">propindex</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> { + setupProperty(propindex); + <span class="keyword">return</span> inherited[propindex]; + } + + <span class="comment">/** + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">propindex</span><span class="comment"> int index of the FO property + * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>boolean</tt> is property inherited? + * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException. +</span><span class="comment"> */</span> + <span class="jde-java-font-lock-modifier">public</span> <span class="type">boolean</span> <span class="function-name" id="isInherited">isInherited</span>(<span class="type">int</span> <span class="variable-name">propindex</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> { + <span class="type">Property</span> <span class="variable-name">property</span> = setupProperty(propindex); + <span class="keyword">return</span> inherited[propindex] != Property.<span class="jde-java-font-lock-constant" id="NO">NO</span>; + } + + <span class="comment">/** + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">property</span><span class="comment"> String name of the FO property + * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>boolean</tt> is property inherited? + * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException. +</span><span class="comment"> */</span> + <span class="jde-java-font-lock-modifier">public</span> <span class="type">boolean</span> <span class="function-name">isInherited</span>(<span class="type">String</span> <span class="variable-name">property</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> { + <span class="keyword">return</span> isInherited(PropNames.getPropertyIndex(property)); + } + + <span class="comment">/** + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">propindex</span><span class="comment"> int index of the FO property + * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>boolean</tt> is property a shorthand? + * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException. +</span><span class="comment"> */</span> + <span class="jde-java-font-lock-modifier">public</span> <span class="type">boolean</span> <span class="function-name" id="isShorthand">isShorthand</span>(<span class="type">int</span> <span class="variable-name">propindex</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> { + <span class="type">Property</span> <span class="variable-name">property</span> = setupProperty(propindex); + <span class="keyword">return</span> (datatypes[propindex] & Property.<span class="jde-java-font-lock-constant" id="SHORTHAND">SHORTHAND</span>) != <span class="jde-java-font-lock-number">0</span>; + } + + <span class="comment">/** + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">property</span><span class="comment"> String name of the FO property + * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>boolean</tt> is property a shorthand? + * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException. +</span><span class="comment"> */</span> + <span class="jde-java-font-lock-modifier">public</span> <span class="type">boolean</span> <span class="function-name">isShorthand</span>(<span class="type">String</span> <span class="variable-name">property</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> { + <span class="keyword">return</span> isShorthand(PropNames.getPropertyIndex(property)); + } + + <span class="comment">/** + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="propertyIndex">propertyIndex</span><span class="comment"> int index of the FO property + * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>boolean</tt> is property a compound? + * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException. +</span><span class="comment"> */</span> + <span class="jde-java-font-lock-modifier">public</span> <span class="type">boolean</span> <span class="function-name" id="isCompound">isCompound</span>(<span class="type">int</span> <span class="variable-name">propertyIndex</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> { + <span class="type">Property</span> <span class="variable-name">property</span> = setupProperty(propertyIndex); + <span class="keyword">return</span> (datatypes[propertyIndex] & Property.<span class="jde-java-font-lock-constant" id="COMPOUND">COMPOUND</span>) != <span class="jde-java-font-lock-number">0</span>; + } + + <span class="comment">/** + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">property</span><span class="comment"> String name of the FO property + * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>boolean</tt> is property a compound? + * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException. +</span><span class="comment"> */</span> + <span class="jde-java-font-lock-modifier">public</span> <span class="type">boolean</span> <span class="function-name">isCompound</span>(<span class="type">String</span> <span class="variable-name">property</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> { + <span class="keyword">return</span> isCompound(PropNames.getPropertyIndex(property)); + } + + <span class="comment">/** + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">propertyIndex</span><span class="comment"> int index of the FO property + * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>int</tt> dataTypes value. + * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException. +</span><span class="comment"> */</span> + <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="getDataTypes">getDataTypes</span>(<span class="type">int</span> <span class="variable-name">propertyIndex</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> { + <span class="type">Property</span> <span class="variable-name">property</span> = setupProperty(propertyIndex); + <span class="keyword">return</span> datatypes[propertyIndex]; + } + + <span class="comment">/** + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">property</span><span class="comment"> String name of the FO property + * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>int</tt> dataTypes value. + * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException. +</span><span class="comment"> */</span> + <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name">getDataTypes</span>(<span class="type">String</span> <span class="variable-name">property</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> { + <span class="keyword">return</span> getDataTypes(PropNames.getPropertyIndex(property)); + } + + <span class="comment">/** + * Map the integer value of an enum into its mapped value. + * Only valid when the datatype of the property includes MAPPED_ENUM. + * <p>Generally, the path will be enumText->enumIndex->mappedEnumText. + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">index</span><span class="comment"> <tt>int</tt> containing the enumeration index. + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="enumMap">enumMap</span><span class="comment"> an <tt>ROStringArray</tt> of the <tt>String</tt>s + * with the mapped enumeration values. + * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a <tt>String</tt> with the mapped enumeration text. + */</span> + <span class="jde-java-font-lock-modifier">public</span> <span class="type">String</span> <span class="function-name" id="enumIndexToMapping">enumIndexToMapping</span>(<span class="type">int</span> <span class="variable-name">index</span>, <span class="type">ROStringArray</span> <span class="variable-name">enumMap</span>) + { + <span class="keyword">return</span> enumMap.get(index); + } + + <span class="comment">/** + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">propindex</span><span class="comment"> <tt>int</tt> property index. + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">enum</span><span class="comment"> <tt>String</tt> containing the enumeration text. + * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>int</tt> constant representing the enumeration value. + * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">PropertyException +</span><span class="comment"> */</span> + <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="getEnumIndex">getEnumIndex</span>(<span class="type">int</span> <span class="variable-name">propindex</span>, <span class="type">String</span> <span class="variable-name">enum</span>) + <span class="keyword">throws</span> <span class="type">PropertyException</span> + { + <span class="type">Property</span> <span class="variable-name">property</span> = setupProperty(propindex); + <span class="keyword">return</span> property.getEnumIndex(enum); + } + + <span class="comment">/** + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">propindex</span><span class="comment"> <tt>int</tt> property index. + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="enumIndex">enumIndex</span><span class="comment"> <tt>int</tt> containing the enumeration index. + * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>String</tt> containing the enumeration text. + * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">PropertyException +</span><span class="comment"> */</span> + <span class="jde-java-font-lock-modifier">public</span> <span class="type">String</span> <span class="function-name" id="getEnumText">getEnumText</span>(<span class="type">int</span> <span class="variable-name">propindex</span>, <span class="type">int</span> <span class="variable-name">enumIndex</span>) + <span class="keyword">throws</span> <span class="type">PropertyException</span> + { + <span class="type">Property</span> <span class="variable-name">property</span> = setupProperty(propindex); + <span class="keyword">return</span> property.getEnumText(enumIndex); + } + + <span class="comment">/** + * Set up the details of a single property and return the + * <tt>Property</tt> object. If the <tt>Property</tt> object + * corresponding to the property index has not been resolved before, + * derive the Class and Property objects, and extract certain field + * values from the Property. + * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">propindex</span><span class="comment"> - the <tt>int</tt> index. + * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> - the <tt>Property</tt> corresponding to the index. + * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type"><tt>PropertyException. +</span><span class="comment"> */</span> + <span class="jde-java-font-lock-modifier">public</span> <span class="type">Property</span> <span class="function-name" id="setupProperty">setupProperty</span>(<span class="type">int</span> <span class="variable-name">propindex</span>) + <span class="keyword">throws</span> <span class="type">PropertyException</span> + { + <span class="type">String</span> <span class="variable-name" id="cname">cname</span> = ""; + <span class="type">Class</span> <span class="variable-name" id="pclass">pclass</span>; + <span class="type">Property</span> <span class="variable-name">property</span>; + + <span class="comment">//System.out.println("setupProperty " + propindex + " " +</span> <span class="comment">//+ PropNames.getPropertyName(propindex)); +</span> <span class="keyword">if</span> ((property = properties[propindex]) != <span class="jde-java-font-lock-constant">null</span>) <span class="keyword">return</span> property; + + <span class="comment">// Get the property class name +</span> <span class="type">StringTokenizer</span> <span class="variable-name" id="stoke">stoke</span>; + stoke = <span class="keyword">new</span> <span class="type">StringTokenizer</span> + (PropNames.getPropertyName(propindex), "<span class="string">-.:</span>"); + <span class="keyword">while</span> (stoke.hasMoreTokens()) { + <span class="type">String</span> <span class="variable-name" id="token">token</span> = stoke.nextToken(); + <span class="type">String</span> <span class="variable-name" id="pname">pname</span> = <span class="keyword">new</span> <span class="type">Character</span>( + Character.toUpperCase(token.charAt(<span class="jde-java-font-lock-number">0</span>)) + ).toString() + token.substring(<span class="jde-java-font-lock-number">1</span>); + cname = cname + pname; + } + classNames[propindex] = cname; + + <span class="comment">// Set up the classToIndex Hashmap with the name of the +</span> <span class="comment">// property class as a key, and the integer index as a value +</span> <span class="keyword">if</span> (classToIndex.put(cname, Ints.consts.get(propindex)) != <span class="jde-java-font-lock-constant">null</span>) + <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> + ("<span class="string">Duplicate values in classToIndex for key </span>" + cname); + + <span class="comment">// Get the class for this property name +</span> <span class="type">String</span> <span class="variable-name" id="name">name</span> = packageName + "<span class="string">.properties.</span>" + cname; + <span class="keyword">try</span> { + <span class="comment">//System.out.println("classes["+propindex+"] "+name);//DEBUG +</span> pclass = Class.forName(name); + classes[propindex] = pclass; + + <span class="comment">// Instantiate the class +</span> property = (<span class="type">Property</span>)(pclass.newInstance()); + properties[propindex] = property; + <span class="comment">//System.out.println +</span> <span class="comment">//("property name " +</span> <span class="comment">//+ property.getClass().getName()); +</span> <span class="comment">//System.out.println +</span> <span class="comment">//("property name " + +</span> <span class="comment">//properties[propindex].getClass().getName()); +</span> + <span class="comment">// Set inheritance value +</span> <span class="keyword">if</span> ((inherited[propindex] + = pclass.getField("<span class="string">inherited</span>").getInt(<span class="jde-java-font-lock-constant">null</span>)) + != Property.<span class="jde-java-font-lock-constant">NO</span>) + inheritedprops.set(propindex); + <span class="comment">// Set datatypes +</span> datatypes[propindex] = pclass.getField("<span class="string">dataTypes</span>").getInt(<span class="jde-java-font-lock-constant">null</span>); + <span class="comment">//System.out.println("datatypes " + datatypes[propindex] + "\n" +</span> <span class="comment">//+ Property.listDataTypes(datatypes[propindex])); +</span> + <span class="comment">// Set initialValueTypes +</span> initialValueTypes[propindex] = + pclass.getField("<span class="string">initialValueType</span>").getInt(<span class="jde-java-font-lock-constant">null</span>); + <span class="comment">//System.out.println("initialValueType " +</span> <span class="comment">//+ initialValueTypes[propindex]); +</span> + traitMappings[propindex] = + pclass.getField("<span class="string">traitMapping</span>").getInt(<span class="jde-java-font-lock-constant">null</span>); + + } <span class="keyword">catch</span> (<span class="type">ClassNotFoundException</span> <span class="variable-name">e</span>) { + <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> + ("<span class="string">ClassNotFoundException</span>" + e.getMessage()); + } <span class="keyword">catch</span> (<span class="type">IllegalAccessException</span> <span class="variable-name">e</span>) { + <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> + ("<span class="string">IllegalAccessException</span>" + e.getMessage()); + } <span class="keyword">catch</span> (<span class="type">InstantiationException</span> <span class="variable-name">e</span>) { + <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> + ("<span class="string">InstantiationException</span>" + e.getMessage()); + } + <span class="keyword">catch</span> (<span class="type">NoSuchFieldException</span> <span class="variable-name">e</span>) { + <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> + ("<span class="string">NoSuchFieldException</span>" + e.getMessage()); + } + + <span class="keyword">return</span> property; + } + + + <span class="jde-java-font-lock-modifier">private</span> <span class="function-name" id="PropertyConsts">PropertyConsts</span> () <span class="keyword">throws</span> <span class="type">PropertyException</span> {} + +} +</pre> + </body> +</html> diff --git a/src/documentation/content/design/alt.design/properties/RenderingIntent.html b/src/documentation/content/design/alt.design/properties/RenderingIntent.html new file mode 100644 index 000000000..d0198acd8 --- /dev/null +++ b/src/documentation/content/design/alt.design/properties/RenderingIntent.html @@ -0,0 +1,117 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> +<!-- Created by htmlize-0.67 in css mode. --> +<html> + <head> + <title>RenderingIntent.java</title> + <style type="text/css"> + <!-- + body { + color: #000000; + background-color: #faf0e6; + } /* default */ + .variable-name { + color: #8b008b; + background-color: #faf0e6; + } /* font-lock-variable-name-face */ + .jde-java-font-lock-package { + color: #0000cd; + background-color: #faf0e6; + } /* jde-java-font-lock-package-face */ + .jde-java-font-lock-constant { + color: #5f9ea0; + background-color: #faf0e6; + } /* jde-java-font-lock-constant-face */ + .keyword { + color: #8b0000; + background-color: #faf0e6; + } /* font-lock-keyword-face */ + .string { + color: #008b00; + background-color: #faf0e6; + } /* font-lock-string-face */ + .jde-java-font-lock-number { + color: #bc8f8f; + background-color: #faf0e6; + } /* jde-java-font-lock-number-face */ + .type { + color: #4682b4; + background-color: #faf0e6; + } /* font-lock-type-face */ + .jde-java-font-lock-modifier { + color: #da70d6; + background-color: #faf0e6; + } /* jde-java-font-lock-modifier-face */ + .function-name { + color: #8b2323; + background-color: #faf0e6; + } /* font-lock-function-name-face */ + a { + color: inherit; + background-color: inherit; + font: inherit; + text-decoration: inherit; + } + a:hover { + text-decoration: underline; + } + --> + </style> + </head> + <body> + <pre> +<span class="keyword">package</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">properties</span>; + +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">expr</span>.<span class="type">PropertyException</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">datastructs</span>.<span class="type">ROStringArray</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">datatypes</span>.<span class="type">Ints</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">properties</span>.<span class="type">Property</span>; + +<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">Map</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">HashMap</span>; +<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">Collections</span>; + +<span class="jde-java-font-lock-modifier">public</span> <span class="keyword">class</span> <span class="function-name" id="RenderingIntentClass">RenderingIntent</span> <span class="keyword">extends</span> <span class="type">Property</span> { + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="dataTypes">dataTypes</span> = <span class="jde-java-font-lock-constant" id="AUTO">AUTO</span> | <span class="jde-java-font-lock-constant">ENUM</span> | <span class="jde-java-font-lock-constant">INHERIT</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="traitMapping">traitMapping</span> = <span class="jde-java-font-lock-constant" id="FORMATTING">FORMATTING</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="initialValueType">initialValueType</span> = <span class="jde-java-font-lock-constant" id="AUTO_IT">AUTO_IT</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="PERCEPTUAL">PERCEPTUAL</span> = <span class="jde-java-font-lock-number">1</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="RELATIVE_COLORIMETRIC">RELATIVE_COLORIMETRIC</span> = <span class="jde-java-font-lock-number">2</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="SATURATION">SATURATION</span> = <span class="jde-java-font-lock-number">3</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="ABSOLUTE_COLORIMETRIC">ABSOLUTE_COLORIMETRIC</span> = <span class="jde-java-font-lock-number">4</span>; + <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="inherited">inherited</span> = <span class="jde-java-font-lock-constant" id="NO">NO</span>; + + <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">String</span>[] <span class="variable-name" id="rwEnums">rwEnums</span> = { + <span class="jde-java-font-lock-constant" id="null">null</span> + ,"<span class="string">perceptual</span>" + ,"<span class="string">relative-colorimetric</span>" + ,"<span class="string">saturation</span>" + ,"<span class="string">absolute-colorimetric</span>" + }; + <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">HashMap</span> <span class="variable-name" id="rwEnumHash">rwEnumHash</span>; + <span class="jde-java-font-lock-modifier">static</span> { + rwEnumHash = <span class="keyword">new</span> <span class="type">HashMap</span>(rwEnums.length); + <span class="keyword">for</span> (<span class="type">int</span> <span class="variable-name" id="i">i</span> = <span class="jde-java-font-lock-number">1</span>; i < rwEnums.length; i++ ) { + rwEnumHash.put((<span class="type">Object</span>)rwEnums[i], + (<span class="type">Object</span>) Ints.consts.get(i)); + } + } + <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="getEnumIndex">getEnumIndex</span>(<span class="type">String</span> <span class="variable-name" id="enum">enum</span>) + <span class="keyword">throws</span> <span class="type">PropertyException</span> + { + <span class="type">Integer</span> <span class="variable-name" id="ii">ii</span> = (<span class="type">Integer</span>)(rwEnumHash.get(enum)); + <span class="keyword">if</span> (ii == <span class="jde-java-font-lock-constant">null</span>) + <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">Unknown enum value: </span>" + enum); + <span class="keyword">return</span> ii.intValue(); + } + <span class="jde-java-font-lock-modifier">public</span> <span class="type">String</span> <span class="function-name" id="getEnumText">getEnumText</span>(<span class="type">int</span> <span class="variable-name" id="index">index</span>) + <span class="keyword">throws</span> <span class="type">PropertyException</span> + { + <span class="keyword">if</span> (index < <span class="jde-java-font-lock-number">1</span> || index >= rwEnums.length) + <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">index out of range: </span>" + index); + <span class="keyword">return</span> rwEnums[index]; + } +} + +</pre> + </body> +</html> |