diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-08-22 21:06:46 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-08-22 21:06:46 +0000 |
commit | bf23ccc626b54217e16c8f5042ecc2c03618ba9f (patch) | |
tree | 16d0a76ef3e25e808c4b056d66089ae986bf1ac3 /src/documentation | |
parent | de8d88e2a43539da52998032a49f58b83be44e67 (diff) | |
download | xmlgraphics-fop-bf23ccc626b54217e16c8f5042ecc2c03618ba9f.tar.gz xmlgraphics-fop-bf23ccc626b54217e16c8f5042ecc2c03618ba9f.zip |
Removed some left-over alt-design docs.
Moved raw content under xdocs to fix Forrest failures.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@239253 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/documentation')
55 files changed, 0 insertions, 10309 deletions
diff --git a/src/documentation/content/design/alt.design/FOPropertySets.html b/src/documentation/content/design/alt.design/FOPropertySets.html deleted file mode 100644 index c266c8d80..000000000 --- a/src/documentation/content/design/alt.design/FOPropertySets.html +++ /dev/null @@ -1,385 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- - Copyright 2001-2002,2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- $Id$ --> -<!-- Created by htmlize-0.67 in css mode. --> -<html> - <head> - <title>FOPropertySets.java</title> - <style type="text/css"> - <!-- - body { - color: #000000; - background-color: #faf0e6; - } /* default */ - .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 */ - .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 */ - .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">/* - * Copyright 2001-2002,2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */</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">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">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">StringTokenizer</span>; - -<span class="comment">// Only for tree property set partitions -</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">Iterator</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">apps</span>.<span class="type">FOPException</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">FObjectNames</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">PropertySets</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">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">ROBitSet</span>; - -<span class="comment">/** - * Data class relating sets of properties to Flow Objects. - * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a> - */</span> - -<span class="jde-java-font-lock-modifier">public</span> <span class="keyword">class</span> <span class="function-name" id="FOPropertySetsClass">FOPropertySets</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">public</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="packageNamePrefix">packageNamePrefix</span> = "<span class="string">org.apache.fop</span>"; - - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">String</span> <span class="function-name" id="getAttrSetName">getAttrSetName</span>(<span class="type">int</span> <span class="variable-name" id="ancestry">ancestry</span>) <span class="keyword">throws</span> <span class="type">FOPException</span> { - <span class="keyword">if</span> ((ancestry & FONode.<span class="jde-java-font-lock-constant" id="MC_MARKER">MC_MARKER</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> "<span class="string">MARKER</span>"; - <span class="keyword">if</span> ((ancestry & FONode.<span class="jde-java-font-lock-constant" id="FLOW">FLOW</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> "<span class="string">FLOW</span>"; - <span class="keyword">if</span> ((ancestry & FONode.<span class="jde-java-font-lock-constant" id="STATIC">STATIC</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> "<span class="string">STATIC</span>"; - <span class="keyword">if</span> ((ancestry & FONode.<span class="jde-java-font-lock-constant" id="TITLE">TITLE</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> "<span class="string">TITLE</span>"; - <span class="keyword">if</span> ((ancestry & FONode.<span class="jde-java-font-lock-constant" id="PAGESEQ">PAGESEQ</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> "<span class="string">PAGESEQ</span>"; - <span class="keyword">if</span> ((ancestry & FONode.<span class="jde-java-font-lock-constant" id="SEQ_MASTER">SEQ_MASTER</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> "<span class="string">SEQ_MASTER</span>"; - <span class="keyword">if</span> ((ancestry & FONode.<span class="jde-java-font-lock-constant" id="LAYOUT">LAYOUT</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> "<span class="string">LAYOUT_MASTER</span>"; - <span class="keyword">if</span> ((ancestry & FONode.<span class="jde-java-font-lock-constant" id="DECLARATIONS">DECLARATIONS</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> "<span class="string">DECLARATIONS</span>"; - <span class="keyword">if</span> ((ancestry & FONode.<span class="jde-java-font-lock-constant" id="ROOT">ROOT</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> "<span class="string">ROOT</span>"; - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">FOPException</span>("<span class="string">Invalid attribute set: </span>" + ancestry); - } - - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">ROBitSet</span> <span class="function-name" id="getAttrROBitSet">getAttrROBitSet</span>(<span class="type">int</span> <span class="variable-name">ancestry</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="keyword">if</span> ((ancestry & FONode.<span class="jde-java-font-lock-constant">MC_MARKER</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> markerAllSet; - <span class="keyword">if</span> ((ancestry & FONode.<span class="jde-java-font-lock-constant">FLOW</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> flowAllSet; - <span class="keyword">if</span> ((ancestry & FONode.<span class="jde-java-font-lock-constant">STATIC</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> staticAllSet; - <span class="keyword">if</span> ((ancestry & FONode.<span class="jde-java-font-lock-constant">TITLE</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> titleAllSet; - <span class="keyword">if</span> ((ancestry & FONode.<span class="jde-java-font-lock-constant">PAGESEQ</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> pageSeqSet; - <span class="keyword">if</span> ((ancestry & FONode.<span class="jde-java-font-lock-constant">SEQ_MASTER</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> seqMasterSet; - <span class="keyword">if</span> ((ancestry & FONode.<span class="jde-java-font-lock-constant">LAYOUT</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> layoutMasterSet; - <span class="keyword">if</span> ((ancestry & FONode.<span class="jde-java-font-lock-constant">DECLARATIONS</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> declarationsAll; - <span class="keyword">if</span> ((ancestry & FONode.<span class="jde-java-font-lock-constant">ROOT</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> allProps; - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">FOPException</span>("<span class="string">Invalid attribute set: </span>" + ancestry); - } - - <span class="comment">/** - * Set of all properties available at fo:root. - */</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">ROBitSet</span> <span class="variable-name" id="allProps">allProps</span>; - - <span class="comment">/** - * set of all properties which are - * usable within the declarations subtree. - */</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">ROBitSet</span> <span class="variable-name" id="declarationsAll">declarationsAll</span>; - - <span class="comment">/** - * set of all properties which are - * usable within the page-sequence-master-set subtree. - */</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">ROBitSet</span> <span class="variable-name" id="seqMasterSet">seqMasterSet</span>; - - <span class="comment">/** - * set of all properties which are - * usable within the layout-master-set subtree. - */</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">ROBitSet</span> <span class="variable-name" id="layoutMasterSet">layoutMasterSet</span>; - - <span class="comment">/** - * set of all properties which are - * usable within the page sequence subtree. - */</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">ROBitSet</span> <span class="variable-name" id="pageSeqSet">pageSeqSet</span>; - - <span class="comment">/** - * set of all properties which are - * usable within the fo:flow subtree. - */</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">ROBitSet</span> <span class="variable-name" id="flowAllSet">flowAllSet</span>; - - <span class="comment">/** - * set of all properties which are - * usable <i></span><span class="jde-java-font-lock-italic">within</span><span class="comment"></i> the fo:marker subtree. - */</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">ROBitSet</span> <span class="variable-name" id="markerAllSet">markerAllSet</span>; - - <span class="comment">/** - * set of all properties which are - * usable within the fo:static-content subtree. - */</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">ROBitSet</span> <span class="variable-name" id="staticAllSet">staticAllSet</span>; - - <span class="comment">/** - * set of all properties which are - * usable within the fo:title subtree. - */</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">ROBitSet</span> <span class="variable-name" id="titleAllSet">titleAllSet</span>; - - <span class="jde-java-font-lock-modifier">static</span> { - - <span class="comment">// fill the BitSet of all properties -</span> <span class="type">BitSet</span> <span class="variable-name" id="allprops">allprops</span> = <span class="keyword">new</span> <span class="type">BitSet</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>); - allprops.set(<span class="jde-java-font-lock-number">1</span>, PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span>); - - allProps = <span class="keyword">new</span> <span class="type">ROBitSet</span>(allprops); - - <span class="comment">//root only set of properties - properties for exclusive use on the -</span> <span class="comment">// root element -</span> <span class="type">BitSet</span> <span class="variable-name" id="rootonly">rootonly</span> = <span class="keyword">new</span> <span class="type">BitSet</span>(PropNames.<span class="jde-java-font-lock-constant" id="MEDIA_USAGE">MEDIA_USAGE</span> + <span class="jde-java-font-lock-number">1</span>); - rootonly.set(PropNames.<span class="jde-java-font-lock-constant">MEDIA_USAGE</span>); - - <span class="comment">//declarations only set of properties - properties for exclusive use -</span> <span class="comment">// in the declarations SUBTREE -</span> <span class="type">BitSet</span> <span class="variable-name" id="declarationsonly">declarationsonly</span> = <span class="keyword">new</span> <span class="type">BitSet</span>(); - declarationsonly.set(PropNames.<span class="jde-java-font-lock-constant" id="COLOR_PROFILE_NAME">COLOR_PROFILE_NAME</span>); - declarationsonly.set(PropNames.<span class="jde-java-font-lock-constant" id="RENDERING_INTENT">RENDERING_INTENT</span>); - - <span class="comment">// set of all declarations properties - properties which may be -</span> <span class="comment">// used in the declarations SUBTREE -</span> <span class="type">BitSet</span> <span class="variable-name" id="declarationsall">declarationsall</span> = (<span class="type">BitSet</span>)declarationsonly.clone(); - declarationsall.set(PropNames.<span class="jde-java-font-lock-constant" id="SRC">SRC</span>); - - declarationsAll = <span class="keyword">new</span> <span class="type">ROBitSet</span>(declarationsall); - - <span class="comment">// seq-master-only set of properties for exclusive use within -</span> <span class="comment">// the page-sequence-master subtree -</span> <span class="type">BitSet</span> <span class="variable-name" id="seqmasteronly">seqmasteronly</span> = <span class="keyword">new</span> <span class="type">BitSet</span>(); - seqmasteronly.set(PropNames.<span class="jde-java-font-lock-constant" id="MAXIMUM_REPEATS">MAXIMUM_REPEATS</span>); - seqmasteronly.set(PropNames.<span class="jde-java-font-lock-constant" id="PAGE_POSITION">PAGE_POSITION</span>); - seqmasteronly.set(PropNames.<span class="jde-java-font-lock-constant" id="ODD_OR_EVEN">ODD_OR_EVEN</span>); - seqmasteronly.set(PropNames.<span class="jde-java-font-lock-constant" id="BLANK_OR_NOT_BLANK">BLANK_OR_NOT_BLANK</span>); - - <span class="comment">// seq-master-set set of properties for use within -</span> <span class="comment">// the page-sequence-master subtree -</span> <span class="type">BitSet</span> <span class="variable-name" id="seqmasterset">seqmasterset</span> = (<span class="type">BitSet</span>)seqmasteronly.clone(); - seqmasterset.set(PropNames.<span class="jde-java-font-lock-constant" id="MASTER_NAME">MASTER_NAME</span>); - seqmasterset.set(PropNames.<span class="jde-java-font-lock-constant" id="MASTER_REFERENCE">MASTER_REFERENCE</span>); - - seqMasterSet = <span class="keyword">new</span> <span class="type">ROBitSet</span>(seqmasterset); - - <span class="comment">//layout-master-set only set of properties - properties for exclusive -</span> <span class="comment">// use within the layout-master-set SUBTREE -</span> <span class="type">BitSet</span> <span class="variable-name" id="layoutmasteronly">layoutmasteronly</span> = (<span class="type">BitSet</span>)seqmasteronly.clone(); - layoutmasteronly.set(PropNames.<span class="jde-java-font-lock-constant">MASTER_NAME</span>); - layoutmasteronly.set(PropNames.<span class="jde-java-font-lock-constant" id="PAGE_HEIGHT">PAGE_HEIGHT</span>); - layoutmasteronly.set(PropNames.<span class="jde-java-font-lock-constant" id="PAGE_WIDTH">PAGE_WIDTH</span>); - layoutmasteronly.set(PropNames.<span class="jde-java-font-lock-constant" id="COLUMN_COUNT">COLUMN_COUNT</span>); - layoutmasteronly.set(PropNames.<span class="jde-java-font-lock-constant" id="COLUMN_GAP">COLUMN_GAP</span>); - layoutmasteronly.set(PropNames.<span class="jde-java-font-lock-constant" id="REGION_NAME">REGION_NAME</span>); - layoutmasteronly.set(PropNames.<span class="jde-java-font-lock-constant" id="EXTENT">EXTENT</span>); - layoutmasteronly.set(PropNames.<span class="jde-java-font-lock-constant" id="PRECEDENCE">PRECEDENCE</span>); - - <span class="comment">// set of all layout-master-set properties - properties which may be -</span> <span class="comment">// used in the layout-master-set SUBTREE -</span> <span class="comment">// Add the layout-master-set exclusive properties -</span> <span class="type">BitSet</span> <span class="variable-name" id="layoutmasterset">layoutmasterset</span> = (<span class="type">BitSet</span>)layoutmasteronly.clone(); - - layoutmasterset.set(PropNames.<span class="jde-java-font-lock-constant">MASTER_REFERENCE</span>); - layoutmasterset.set(PropNames.<span class="jde-java-font-lock-constant" id="REFERENCE_ORIENTATION">REFERENCE_ORIENTATION</span>); - layoutmasterset.set(PropNames.<span class="jde-java-font-lock-constant" id="WRITING_MODE">WRITING_MODE</span>); - layoutmasterset.set(PropNames.<span class="jde-java-font-lock-constant" id="CLIP">CLIP</span>); - layoutmasterset.set(PropNames.<span class="jde-java-font-lock-constant" id="DISPLAY_ALIGN">DISPLAY_ALIGN</span>); - layoutmasterset.set(PropNames.<span class="jde-java-font-lock-constant" id="OVERFLOW">OVERFLOW</span>); - - <span class="comment">// Add the common margin properties - block -</span> layoutmasterset.or(PropertySets.marginBlockSet); - <span class="comment">// Add the common border properties -</span> layoutmasterset.or(PropertySets.borderSet); - <span class="comment">// Add the common padding properties -</span> layoutmasterset.or(PropertySets.paddingSet); - <span class="comment">// Add the common background properties -</span> layoutmasterset.or(PropertySets.backgroundSet); - layoutMasterSet = <span class="keyword">new</span> <span class="type">ROBitSet</span>(layoutmasterset); - - <span class="type">BitSet</span> <span class="variable-name" id="flowonlyset">flowonlyset</span> = <span class="keyword">new</span> <span class="type">BitSet</span>(); - flowonlyset.set(PropNames.<span class="jde-java-font-lock-constant" id="MARKER_CLASS_NAME">MARKER_CLASS_NAME</span>); - - <span class="type">BitSet</span> <span class="variable-name" id="staticonlyset">staticonlyset</span> = <span class="keyword">new</span> <span class="type">BitSet</span>(); - staticonlyset.set(PropNames.<span class="jde-java-font-lock-constant" id="RETRIEVE_CLASS_NAME">RETRIEVE_CLASS_NAME</span>); - staticonlyset.set(PropNames.<span class="jde-java-font-lock-constant" id="RETRIEVE_POSITION">RETRIEVE_POSITION</span>); - staticonlyset.set(PropNames.<span class="jde-java-font-lock-constant" id="RETRIEVE_BOUNDARY">RETRIEVE_BOUNDARY</span>); - - <span class="comment">// pageseqonly contains the properties which are exclusive to -</span> <span class="comment">// fo:pagesequence -</span> <span class="type">BitSet</span> <span class="variable-name" id="pageseqonly">pageseqonly</span> = <span class="keyword">new</span> <span class="type">BitSet</span>(); - pageseqonly.set(PropNames.<span class="jde-java-font-lock-constant" id="FORMAT">FORMAT</span>); - pageseqonly.set(PropNames.<span class="jde-java-font-lock-constant" id="LETTER_VALUE">LETTER_VALUE</span>); - pageseqonly.set(PropNames.<span class="jde-java-font-lock-constant" id="GROUPING_SEPARATOR">GROUPING_SEPARATOR</span>); - pageseqonly.set(PropNames.<span class="jde-java-font-lock-constant" id="GROUPING_SIZE">GROUPING_SIZE</span>); - pageseqonly.set(PropNames.<span class="jde-java-font-lock-constant" id="INITIAL_PAGE_NUMBER">INITIAL_PAGE_NUMBER</span>); - pageseqonly.set(PropNames.<span class="jde-java-font-lock-constant" id="FORCE_PAGE_COUNT">FORCE_PAGE_COUNT</span>); - - <span class="comment">// pageseqset may contain any of the exclusive elements of the -</span> <span class="comment">// flow set or the static-content set, which may be accessed by -</span> <span class="comment">// the from-nearest-specified-property() function. -</span> <span class="type">BitSet</span> <span class="variable-name" id="pageseqset">pageseqset</span> = (<span class="type">BitSet</span>)allprops.clone(); - pageseqset.andNot(rootonly); - pageseqset.andNot(declarationsonly); - pageseqset.andNot(layoutmasteronly); - pageSeqSet = <span class="keyword">new</span> <span class="type">ROBitSet</span>(pageseqset); - - <span class="type">BitSet</span> <span class="variable-name" id="flowallset">flowallset</span> = (<span class="type">BitSet</span>)pageseqset.clone(); - flowallset.andNot(pageseqonly); - flowallset.andNot(staticonlyset); - - flowAllSet = <span class="keyword">new</span> <span class="type">ROBitSet</span>(flowallset); - - <span class="type">BitSet</span> <span class="variable-name" id="staticallset">staticallset</span> = (<span class="type">BitSet</span>)pageseqset.clone(); - staticallset.andNot(pageseqonly); - staticallset.andNot(flowonlyset); - - staticAllSet = <span class="keyword">new</span> <span class="type">ROBitSet</span>(staticallset); - - <span class="type">BitSet</span> <span class="variable-name" id="markerallset">markerallset</span> = (<span class="type">BitSet</span>)flowallset.clone(); - markerallset.clear(PropNames.<span class="jde-java-font-lock-constant">MARKER_CLASS_NAME</span>); - - markerAllSet = <span class="keyword">new</span> <span class="type">ROBitSet</span>(markerallset); - - <span class="comment">// markers are not allowed within fo:title -</span> titleAllSet = markerAllSet; - } - - <span class="comment">/** - * ReferenceArea trait mappings. Immutable BitSet of FOs for which - * the <tt>reference-area</tt> trait is true. - */</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">ROBitSet</span> <span class="variable-name" id="isReferenceArea">isReferenceArea</span>; - <span class="jde-java-font-lock-modifier">static</span> { - <span class="type">BitSet</span> <span class="variable-name" id="refareas">refareas</span> = <span class="keyword">new</span> <span class="type">BitSet</span>(FObjectNames.<span class="jde-java-font-lock-constant" id="LAST_FO">LAST_FO</span> + <span class="jde-java-font-lock-number">1</span>); - refareas.set(FObjectNames.<span class="jde-java-font-lock-constant" id="SIMPLE_PAGE_MASTER">SIMPLE_PAGE_MASTER</span>); - refareas.set(FObjectNames.<span class="jde-java-font-lock-constant" id="REGION_AFTER">REGION_AFTER</span>); - refareas.set(FObjectNames.<span class="jde-java-font-lock-constant" id="REGION_BEFORE">REGION_BEFORE</span>); - refareas.set(FObjectNames.<span class="jde-java-font-lock-constant" id="REGION_BODY">REGION_BODY</span>); - refareas.set(FObjectNames.<span class="jde-java-font-lock-constant" id="REGION_END">REGION_END</span>); - refareas.set(FObjectNames.<span class="jde-java-font-lock-constant" id="REGION_START">REGION_START</span>); - refareas.set(FObjectNames.<span class="jde-java-font-lock-constant" id="BLOCK_CONTAINER">BLOCK_CONTAINER</span>); - refareas.set(FObjectNames.<span class="jde-java-font-lock-constant" id="INLINE_CONTAINER">INLINE_CONTAINER</span>); - refareas.set(FObjectNames.<span class="jde-java-font-lock-constant" id="TABLE">TABLE</span>); - refareas.set(FObjectNames.<span class="jde-java-font-lock-constant" id="TABLE_CAPTION">TABLE_CAPTION</span>); - refareas.set(FObjectNames.<span class="jde-java-font-lock-constant" id="TABLE_CELL">TABLE_CELL</span>); - refareas.set(FObjectNames.<span class="jde-java-font-lock-constant">TITLE</span>); - - isReferenceArea = <span class="keyword">new</span> <span class="type">ROBitSet</span>(refareas); - } - -} - -</pre> - </body> -</html> diff --git a/src/documentation/content/design/alt.design/FoXMLEvent.html b/src/documentation/content/design/alt.design/FoXMLEvent.html deleted file mode 100644 index 1884f13bf..000000000 --- a/src/documentation/content/design/alt.design/FoXMLEvent.html +++ /dev/null @@ -1,238 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- - Copyright 2001-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- $Id$ --> -<!-- Created by htmlize-0.67 in css mode. --> -<html> - <head> - <title>FoXMLEvent.java</title> - <style type="text/css"> - <!-- - body { - color: #000000; - background-color: #faf0e6; - } /* default */ - .comment { - color: #00008b; - background-color: #faf0e6; - } /* font-lock-comment-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 */ - .function-name { - color: #8b2323; - background-color: #faf0e6; - } /* font-lock-function-name-face */ - .variable-name { - color: #8b008b; - background-color: #faf0e6; - } /* font-lock-variable-name-face */ - .jde-java-font-lock-doc-tag { - color: #008b00; - background-color: #faf0e6; - } /* jde-java-font-lock-doc-tag-face */ - .keyword { - color: #8b0000; - background-color: #faf0e6; - } /* font-lock-keyword-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 */ - .string { - color: #008b00; - background-color: #faf0e6; - } /* font-lock-string-face */ - .type { - color: #4682b4; - background-color: #faf0e6; - } /* font-lock-type-face */ - a { - color: inherit; - background-color: inherit; - font: inherit; - text-decoration: inherit; - } - a:hover { - text-decoration: underline; - } - --> - </style> - </head> - <body> - <pre> -<span class="comment">/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */</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">xml</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">apps</span>.<span class="type">FOPException</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">FObjectNames</span>; - -<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">xml</span>.<span class="jde-java-font-lock-package">sax</span>.<span class="jde-java-font-lock-package">helpers</span>.<span class="type">AttributesImpl</span>; - -<span class="comment">/** - * This is a data class to encapsulate the data of an individual XML - * parse event in an XML-FO file. The current version, while defining - * accessor methods, leaves the component data of the event as protected. - * The <tt>XMLSerialHandler</tt> methods set the values directly. - * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a> - */</span> - -<span class="jde-java-font-lock-modifier">public</span> <span class="keyword">class</span> <span class="function-name" id="FoXMLEventClass">FoXMLEvent</span> <span class="keyword">extends</span> <span class="type">XMLEvent</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="comment">/** The FO type, as defined in FObjectNames, of fo: XML events. */</span> - <span class="jde-java-font-lock-modifier">protected</span> <span class="type">int</span> <span class="variable-name" id="foType">foType</span> = FObjectNames.<span class="jde-java-font-lock-constant" id="NO_FO">NO_FO</span>; - - <span class="comment">/** - * The one-argument constructor uses the default initialization values: - * NOEVENT for the event <i></span><span class="jde-java-font-lock-italic">type</span><span class="comment"></i>, and null references for all others - * except <i></span><span class="jde-java-font-lock-italic">namespaces</span><span class="comment"></i>. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="function-name" id="FoXMLEvent">FoXMLEvent</span> (<span class="type">XMLNamespaces</span> <span class="variable-name" id="namespaces">namespaces</span>) { - <span class="keyword">super</span>(namespaces); - } - - <span class="comment">/** - * The fully defined constructor takes values for each of the data - * elements. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="function-name">FoXMLEvent</span>(<span class="type">int</span> <span class="variable-name" id="type">type</span>, <span class="type">String</span> <span class="variable-name">chars</span>, <span class="type">int</span> <span class="variable-name">uriIndex</span>, - <span class="type">String</span> <span class="variable-name" id="localName">localName</span>, <span class="type">String</span> <span class="variable-name">qName</span>, - <span class="type">AttributesImpl</span> <span class="variable-name" id="attributes">attributes</span>, <span class="type">XMLNamespaces</span> <span class="variable-name">namespaces</span>, - <span class="type">int</span> <span class="variable-name">foType</span>) - { - <span class="keyword">super</span> - (type, chars, uriIndex, localName, qName, attributes, namespaces); - <span class="keyword">this</span>.foType = foType; - } - - <span class="comment">/** - * The cloning constructor takes a reference to an existing - * <tt>FoXMLEvent</tt> object. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="function-name">FoXMLEvent</span>(<span class="type">FoXMLEvent</span> <span class="variable-name" id="ev">ev</span>) { - <span class="keyword">super</span>(ev); - foType = ev.foType; - } - - <span class="jde-java-font-lock-modifier">public</span> <span class="function-name">FoXMLEvent</span>(<span class="type">int</span> <span class="variable-name">type</span>, <span class="type">String</span> <span class="variable-name">chars</span>, <span class="type">XMLNamespaces</span> <span class="variable-name">namespaces</span>) { - <span class="keyword">super</span>(type, chars, namespaces); - } - - <span class="jde-java-font-lock-modifier">public</span> <span class="function-name">FoXMLEvent</span>(<span class="type">int</span> <span class="variable-name">type</span>, <span class="type">int</span> <span class="variable-name">uriIndex</span>, <span class="type">AttributesImpl</span> <span class="variable-name">attributes</span>, - <span class="type">XMLNamespaces</span> <span class="variable-name">namespaces</span>, <span class="type">int</span> <span class="variable-name">foType</span>) { - <span class="keyword">super</span>(namespaces); - <span class="keyword">this</span>.type = type; - <span class="keyword">this</span>.uriIndex = uriIndex; - <span class="keyword">this</span>.attributes = attributes; - <span class="keyword">this</span>.foType = foType; - } - - <span class="comment">/** - * Clear the fields of this event. Provided for pool operations. - * Neither the <i></span><span class="jde-java-font-lock-italic">namespaces</i> nor the <i>id</span><span class="comment"></i> field is cleared. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the cleared <tt>XMLEvent</tt> event. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">XMLEvent</span> <span class="function-name" id="clear">clear</span>() { - foType = FObjectNames.<span class="jde-java-font-lock-constant">NO_FO</span>; - <span class="keyword">return</span> <span class="keyword">super</span>.clear(); - } - - <span class="comment">/** - * Clear the fields of this event. Provided for pool operations. - * Neither the <i></span><span class="jde-java-font-lock-italic">namespaces</i> nor the <i>id</span><span class="comment"></i> field is cleared. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the cleared <tt>XMLEvent</tt> event. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name" id="clearFo">clearFo</span>() { - <span class="keyword">return</span> (<span class="type">FoXMLEvent</span>)clear(); - } - - <span class="comment">/** - * Copy the fields of the argument event to this event. - * Provided for pool operations. - * Neither the <i></span><span class="jde-java-font-lock-italic">namespaces</i> nor the <i>id</span><span class="comment"></i> field is copied. - * The <i></span><span class="jde-java-font-lock-italic">namespaces</span><span class="comment"></i> field is not cleared. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">ev</span><span class="comment"> the <tt>XMLEvent</tt> to copy. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the copied <tt>XMLEvent</tt> event. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">XMLEvent</span> <span class="function-name" id="copyEvent">copyEvent</span>(<span class="type">FoXMLEvent</span> <span class="variable-name">ev</span>) { - foType = ev.foType; - <span class="keyword">return</span> <span class="keyword">super</span>.copyEvent(ev); - } - - <span class="comment">/** - * Copy the fields of the argument event to this event. - * Provided for pool operations. - * Neither the <i></span><span class="jde-java-font-lock-italic">namespaces</i> nor the <i>id</span><span class="comment"></i> field is copied. - * The <i></span><span class="jde-java-font-lock-italic">namespaces</span><span class="comment"></i> field is not cleared. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the copied <tt>XMLEvent</tt> event. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name" id="copyFoEvent">copyFoEvent</span>(<span class="type">FoXMLEvent</span> <span class="variable-name">ev</span>) { - <span class="keyword">return</span> (<span class="type">FoXMLEvent</span>)copyEvent(ev); - } - - <span class="comment">/** - * Get the FO type of this <i></span><span class="jde-java-font-lock-italic">FoXMLEvent</span><span class="comment"></i>. - * </span><span class="jde-java-font-lock-doc-tag">@returns</span><span class="comment"> the FO type. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="getFoType">getFoType</span>() { <span class="keyword">return</span> foType; } - - <span class="comment">/** - * Set the FO type of this <i></span><span class="jde-java-font-lock-italic">FoXMLEvent</span><span class="comment"></i>. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">foType</span><span class="comment"> -the FO type. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">void</span> <span class="function-name" id="setFoType">setFoType</span>(<span class="type">int</span> <span class="variable-name">foType</span>) { <span class="keyword">this</span>.foType = foType; } - - <span class="jde-java-font-lock-modifier">public</span> <span class="type">String</span> <span class="function-name" id="toString">toString</span>() { - <span class="type">String</span> <span class="variable-name" id="tstr">tstr</span>; - <span class="keyword">try</span> { - tstr = "<span class="string">FO type: </span>" + FObjectNames.getFOName(foType) + "<span class="string">\n</span>"; - } <span class="keyword">catch</span> (<span class="type">FOPException</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()); - } - tstr = tstr + <span class="keyword">super</span>.toString(); - <span class="keyword">return</span> tstr; - } - -} -</pre> - </body> -</html> diff --git a/src/documentation/content/design/alt.design/SyncedFoXmlEventsBuffer.html b/src/documentation/content/design/alt.design/SyncedFoXmlEventsBuffer.html deleted file mode 100644 index cd83e114c..000000000 --- a/src/documentation/content/design/alt.design/SyncedFoXmlEventsBuffer.html +++ /dev/null @@ -1,1367 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- - Copyright 2001-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- $Id$ --> -<!-- Created by htmlize-0.67 in css mode. --> -<html> - <head> - <title>SyncedFoXmlEventsBuffer.java</title> - <style type="text/css"> - <!-- - body { - color: #000000; - background-color: #faf0e6; - } /* default */ - .reference { - color: #cd0000; - background-color: #faf0e6; - } /* font-lock-reference-face */ - .comment { - color: #00008b; - background-color: #faf0e6; - } /* font-lock-comment-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 */ - .function-name { - color: #8b2323; - background-color: #faf0e6; - } /* font-lock-function-name-face */ - .variable-name { - color: #8b008b; - background-color: #faf0e6; - } /* font-lock-variable-name-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 */ - .keyword { - color: #8b0000; - background-color: #faf0e6; - } /* font-lock-keyword-face */ - .jde-java-font-lock-number { - color: #bc8f8f; - background-color: #faf0e6; - } /* jde-java-font-lock-number-face */ - .jde-java-font-lock-code { - background-color: #faf0e6; - } /* jde-java-font-lock-code-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 */ - .string { - color: #008b00; - background-color: #faf0e6; - } /* font-lock-string-face */ - .type { - color: #4682b4; - background-color: #faf0e6; - } /* font-lock-type-face */ - a { - color: inherit; - background-color: inherit; - font: inherit; - text-decoration: inherit; - } - a:hover { - text-decoration: underline; - } - --> - </style> - </head> - <body> - <pre> -<span class="comment">/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */</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">xml</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">SyncedCircularBuffer</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">apps</span>.<span class="type">FOPException</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">FObjectNames</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">FObjectSets</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">xml</span>.<span class="type">FoXMLEventPool</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">NoSuchElementException</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">Iterator</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="comment">/** - * A synchronized circular buffer for FoXMLEvents. - * </span><span class="jde-java-font-lock-doc-tag">@see</span><span class="comment"> </span><span class="jde-java-font-lock-code">org.apache.fop.datastructs.SyncedCircularBuffer</span><span class="comment"> - * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a> - */</span> -<span class="jde-java-font-lock-modifier">public</span> <span class="keyword">class</span> <span class="function-name" id="SyncedFoXmlEventsBufferClass">SyncedFoXmlEventsBuffer</span> <span class="keyword">extends</span> <span class="type">SyncedCircularBuffer</span> { - - <span class="comment">/** - * Constant for <i></span><span class="jde-java-font-lock-italic">discardEvent</span><span class="comment"></i> field of - * <i>getEndElement(boolean discardEvent, FoXMLEvent(, boolean)). - */</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">boolean</span> <span class="variable-name" id="DISCARD_EV">DISCARD_EV</span> = <span class="jde-java-font-lock-constant" id="true">true</span>, - <span class="jde-java-font-lock-constant" id="RETAIN_EV">RETAIN_EV</span> = <span class="jde-java-font-lock-constant">false</span>; - - <span class="comment">/** - * Maintains an index of namespace URIs. These can then be referred to - * by an <tt>int</tt> index. - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">XMLNamespaces</span> <span class="variable-name" id="namespaces">namespaces</span>; - - <span class="comment">/** - * The FoXMLEventPool for this buffer. - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">FoXMLEventPool</span> <span class="variable-name" id="pool">pool</span>; - - <span class="comment">/** - * No-argument constructor sets up a buffer with the default number of - * elements. - * The producer and consumer <tt>Thread</tt>s default to the current - * thread at the time of instantiation. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="function-name" id="SyncedFoXmlEventsBuffer">SyncedFoXmlEventsBuffer</span>() - <span class="keyword">throws</span> <span class="type">IllegalArgumentException</span> - { - <span class="keyword">super</span>(); - namespaces = <span class="keyword">new</span> <span class="type">XMLNamespaces</span>(); - pool = <span class="keyword">new</span> <span class="type">FoXMLEventPool</span>(namespaces, <span class="jde-java-font-lock-constant" id="DEFAULTBUFSIZE">DEFAULTBUFSIZE</span>); - } - - <span class="comment">/** - * Constructor taking one argument; the size of the buffer. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="size">size</span><span class="comment"> the size of the buffer. Must be > 1. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="function-name">SyncedFoXmlEventsBuffer</span>(<span class="type">int</span> <span class="variable-name">size</span>) - <span class="keyword">throws</span> <span class="type">IllegalArgumentException</span> - { - <span class="keyword">super</span>(size); - namespaces = <span class="keyword">new</span> <span class="type">XMLNamespaces</span>(); - pool = <span class="keyword">new</span> <span class="type">FoXMLEventPool</span>(namespaces); - } - - <span class="comment">/** - * Get the <tt>XMLNamespaces</tt> from this buffer. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> - the namespaces object. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">XMLNamespaces</span> <span class="function-name" id="getNamespaces">getNamespaces</span>() { <span class="keyword">return</span> namespaces; } - - <span class="comment">/** - * Get the <tt>FoXMLEventPool</tt> from this buffer. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> - the pool object. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEventPool</span> <span class="function-name" id="getPool">getPool</span>() { <span class="keyword">return</span> pool; } - - <span class="comment">/** - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> next event from the SyncedCircularBuffer - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException.</span><span class="comment"> The purpose of this method is to catch - * and transform any InterruptedException exceptions thrown by the - * <tt>SyncedCircularBuffer</tt>. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name" id="getEvent">getEvent</span>() <span class="keyword">throws</span> <span class="type">FOPException</span> { - <span class="type">FoXMLEvent</span> <span class="variable-name" id="ev">ev</span>; - <span class="keyword">try</span> { - ev = (<span class="type">FoXMLEvent</span>)get(); - <span class="comment">//System.out.println("getEvent: " + ev); -</span> <span class="keyword">return</span> ev; - } <span class="keyword">catch</span> (<span class="type">InterruptedException</span> <span class="variable-name" id="e">e</span>) { - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">FOPException</span>(e); - } - } - - <span class="comment">/** - * Get the next event of the given type from the buffer. Discard - * intervening events. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="eventType">eventType</span><span class="comment"> - the <tt>int</tt> event type. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> an event of the given type. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if the event is not found. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name" id="getTypedEvent">getTypedEvent</span>(<span class="type">int</span> <span class="variable-name">eventType</span>) <span class="keyword">throws</span> <span class="type">FOPException</span> { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span> = getEvent(); - <span class="keyword">while</span> (ev != <span class="jde-java-font-lock-constant" id="null">null</span> && ev.type != eventType) { - ev = getEvent(); - } - <span class="keyword">if</span> (ev == <span class="jde-java-font-lock-constant">null</span>) { - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">NoSuchElementException</span> - (XMLEvent.eventTypeName(eventType) + "<span class="string"> not found.</span>"); - } - <span class="keyword">return</span> ev; - } - - <span class="comment">/** - * Get the next event of the given type and with the given <tt>QName</tt> - * from the buffer. Discard intervening events. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">eventType</span><span class="comment"> - the <tt>int</tt> event type. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="qName">qName</span><span class="comment"> a <tt>String</tt> with the <tt>QName</tt> of the - * required element. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> an event of the given type. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if the event is not found. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name">getTypedEvent</span>(<span class="type">int</span> <span class="variable-name">eventType</span>, <span class="type">String</span> <span class="variable-name">qName</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span> = getEvent(); - <span class="keyword">while</span> (ev != <span class="jde-java-font-lock-constant">null</span> && - ! (ev.type == eventType && ev.qName.equals(qName))) { - ev = getEvent(); - } - <span class="keyword">if</span> (ev == <span class="jde-java-font-lock-constant">null</span>) { - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">NoSuchElementException</span> - (XMLEvent.eventTypeName(eventType) + "<span class="string"> </span>" + qName + "<span class="string"> not found.</span>"); - } - <span class="keyword">return</span> ev; - } - - <span class="comment">/** - * Get the next event of the given type, and with the given URI index and - * local name, from the buffer. Discard intervening events. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">eventType</span><span class="comment"> - the <tt>int</tt> event type. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="uriIndex">uriIndex</span><span class="comment"> - the <tt>int</tt> URI index maintained in the - * <tt>XMLNamespaces</tt> object. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="localName">localName</span><span class="comment"> a <tt>String</tt> with the local name of the - * required element. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> an event of the given type. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if the event is not found. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="variable-name">getTypedEvent</span> - (<span class="type">int</span> <span class="variable-name">eventType</span>, <span class="type">int</span> <span class="variable-name">uriIndex</span>, <span class="type">String</span> <span class="variable-name">localName</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span> = getEvent(); - <span class="keyword">while</span> (ev != <span class="jde-java-font-lock-constant">null</span> && - ! (ev.type == eventType - && ev.uriIndex == uriIndex - && ev.localName.equals(localName))) { - pool.surrenderEvent(ev); - ev = getEvent(); - } - <span class="keyword">if</span> (ev == <span class="jde-java-font-lock-constant">null</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">NoSuchElementException</span> - (XMLEvent.eventTypeName(eventType) - + namespaces.getIndexURI(uriIndex) - + "<span class="string">:</span>" + localName + "<span class="string"> not found.</span>"); - <span class="keyword">return</span> ev; - } - - <span class="comment">/** - * Get the next event of the given type, from the fo: namespace, with - * the given FO type. Discard intervening events. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">eventType</span><span class="comment"> - the <tt>int</tt> event type. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="foType">foType</span><span class="comment"> - the <tt>int</tt> FO type. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> an event of the given type. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if the event is not found. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name">getTypedEvent</span>(<span class="type">int</span> <span class="variable-name">eventType</span>, <span class="type">int</span> <span class="variable-name">foType</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span> = getEvent(); - <span class="keyword">while</span> (ev != <span class="jde-java-font-lock-constant">null</span> && - ! (ev.type == eventType && ev.foType == foType)) { - pool.surrenderEvent(ev); - ev = getEvent(); - } - <span class="keyword">if</span> (ev == <span class="jde-java-font-lock-constant">null</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">NoSuchElementException</span> - (XMLEvent.eventTypeName(eventType) - + "<span class="string"> FO type </span>" + foType + "<span class="string"> not found.</span>"); - <span class="keyword">return</span> ev; - } - - <span class="comment">/** - * Return the next element if it is of the required type. If the next - * element is not of the required type, push it back onto the buffer. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">eventType</span><span class="comment"> - the <tt>int</tt> event type. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="discardWhiteSpace">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> an event of the required type. If the next - * event detected is not of the required type, <tt>null</tt> is returned. - * The erroneous event is pushed back. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if the buffer is empty. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="variable-name" id="expectTypedEvent">expectTypedEvent</span> - (<span class="type">int</span> <span class="variable-name">eventType</span>, <span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span> = getEvent(); - <span class="keyword">if</span> (discardWhiteSpace) { - <span class="keyword">while</span> (ev != <span class="jde-java-font-lock-constant">null</span> && ev.type == <span class="reference">XMLEvent</span>.<span class="type">CHARACTERS</span> - && ev.chars.trim().equals("")) { - pool.surrenderEvent(ev); - ev = getEvent(); - } - } - <span class="keyword">if</span> (ev != <span class="jde-java-font-lock-constant">null</span> && ev.type == eventType) { - <span class="keyword">return</span> ev; - } - <span class="keyword">if</span> (ev == <span class="jde-java-font-lock-constant">null</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">NoSuchElementException</span> - (XMLEvent.eventTypeName(eventType) - + "<span class="string"> not found: end of buffer.</span>"); - pushBack(ev); - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">null</span>; - } - - <span class="comment">/** - * Return the next element if it is of the required type and has the - * required <tt>QName</tt>. If the next - * element is not of the required type, push it back onto the buffer. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">eventType</span><span class="comment"> - the <tt>int</tt> event type. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">qName</span><span class="comment"> a <tt>String</tt> with the <tt>QName</tt> of the - * required element. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> an event of the required type. If the next - * event detected is not of the required type, <tt>null</tt> is returned. - * The erroneous event is pushed back. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if the event is not found. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="variable-name">expectTypedEvent</span> - (<span class="type">int</span> <span class="variable-name">eventType</span>, <span class="type">String</span> <span class="variable-name">qName</span>, <span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span> = getEvent(); - <span class="keyword">if</span> (discardWhiteSpace) { - <span class="keyword">while</span> (ev != <span class="jde-java-font-lock-constant">null</span> && ev.type == <span class="reference">XMLEvent</span>.<span class="type">CHARACTERS</span> - && ev.chars.trim().equals("")) { - pool.surrenderEvent(ev); - ev = getEvent(); - } - } - <span class="keyword">if</span> (ev != <span class="jde-java-font-lock-constant">null</span> && ev.type == eventType && ev.qName.equals(qName)) { - <span class="keyword">return</span> ev; - } - <span class="keyword">if</span> (ev == <span class="jde-java-font-lock-constant">null</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">NoSuchElementException</span> - (XMLEvent.eventTypeName(eventType) - + "<span class="string"> not found: end of buffer.</span>"); - pushBack(ev); - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">null</span>; - } - - <span class="comment">/** - * Return the next element if it is of the required type and has the - * required URI index and local name. If the next - * element is not of the required type, push it back onto the buffer. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">eventType</span><span class="comment"> - the <tt>int</tt> event type. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">uriIndex</span><span class="comment"> - the <tt>int</tt> URI index. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">localName</span><span class="comment"> a <tt>String</tt> with the local name of the - * required element. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> an event of the required type. If the next - * event detected is not of the required type, <tt>null</tt> is returned. - * The erroneous event is pushed back. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if end of buffer detected. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="variable-name">expectTypedEvent</span> - (<span class="type">int</span> <span class="variable-name">eventType</span>, <span class="type">int</span> <span class="variable-name">uriIndex</span>, - <span class="type">String</span> <span class="variable-name">localName</span>, <span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span> = getEvent(); - <span class="keyword">if</span> (discardWhiteSpace) { - <span class="keyword">while</span> (ev != <span class="jde-java-font-lock-constant">null</span> && ev.type == <span class="reference">XMLEvent</span>.<span class="type">CHARACTERS</span> - && ev.chars.trim().equals("")) { - pool.surrenderEvent(ev); - ev = getEvent(); - } - } - <span class="keyword">if</span> (ev != <span class="jde-java-font-lock-constant">null</span> - && ev.type == eventType - && ev.uriIndex == uriIndex - && ev.localName.equals(localName)) { - <span class="keyword">return</span> ev; - } - <span class="keyword">if</span> (ev == <span class="jde-java-font-lock-constant">null</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">NoSuchElementException</span> - (XMLEvent.eventTypeName(eventType) - + "<span class="string"> not found: end of buffer.</span>"); - pushBack(ev); - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">null</span>; - } - - <span class="comment">/** - * Return the next element if it is of the required type and has the - * required FO type. If the next - * element is not of the required type, push it back onto the buffer. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">eventType</span><span class="comment"> - the <tt>int</tt> event type. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">foType</span><span class="comment"> - the <tt>int</tt> FO type. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> an event of the required type. If the next - * event detected is not of the required type, <tt>null</tt> is returned. - * The erroneous event is pushed back. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if end of buffer detected. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="variable-name">expectTypedEvent</span> - (<span class="type">int</span> <span class="variable-name">eventType</span>, <span class="type">int</span> <span class="variable-name">foType</span>, <span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span> = getEvent(); - <span class="keyword">if</span> (discardWhiteSpace) { - <span class="keyword">while</span> (ev != <span class="jde-java-font-lock-constant">null</span> && ev.type == <span class="reference">XMLEvent</span>.<span class="type">CHARACTERS</span> - && ev.chars.trim().equals("")) { - pool.surrenderEvent(ev); - ev = getEvent(); - } - } - <span class="keyword">if</span> (ev != <span class="jde-java-font-lock-constant">null</span> && ev.type == eventType && ev.foType == foType) { - <span class="keyword">return</span> ev; - } - <span class="keyword">if</span> (ev == <span class="jde-java-font-lock-constant">null</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">NoSuchElementException</span> - (XMLEvent.eventTypeName(eventType) - + "<span class="string"> not found: end of buffer.</span>"); - pushBack(ev); - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">null</span>; - } - - <span class="comment">/** - * Get the next ENDDOCUMENT event from the buffer. Discard any other - * events preceding the ENDDOCUMENT event. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> an ENDDOCUMENT event - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if the event is not found - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name" id="getEndDocument">getEndDocument</span>() <span class="keyword">throws</span> <span class="type">FOPException</span> { - <span class="keyword">return</span> getTypedEvent(XMLEvent.<span class="jde-java-font-lock-constant" id="ENDDOCUMENT">ENDDOCUMENT</span>); - } - - <span class="comment">/** - * Return the next element if it is an ENDDOCUMENT. If the next - * element is not of the required type, push it back onto the buffer. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> an ENDDOCUMENT event. If the next - * event detected is not of the required type, <tt>null</tt> is returned. - * The erroneous event is pushed back. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if end of buffer detected. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name" id="expectEndDocument">expectEndDocument</span>(<span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="keyword">return</span> expectTypedEvent(XMLEvent.<span class="jde-java-font-lock-constant">ENDDOCUMENT</span>, discardWhiteSpace); - } - - <span class="comment">/** - * Get the next STARTELEMENT event from the buffer. Discard any other - * events preceding the STARTELEMENT event. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a STARTELEMENT event - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if the event is not found - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name" id="getStartElement">getStartElement</span>() <span class="keyword">throws</span> <span class="type">FOPException</span> { - <span class="keyword">return</span> getTypedEvent(XMLEvent.<span class="jde-java-font-lock-constant" id="STARTELEMENT">STARTELEMENT</span>); - } - - <span class="comment">/** - * Return the next element if it is a STARTELEMENT. If the next - * element is not of the required type, push it back onto the buffer. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a STARTELEMENT event. If the next - * event detected is not of the required type, <tt>null</tt> is returned. - * The erroneous event is pushed back. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if end of buffer detected. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name" id="expectStartElement">expectStartElement</span>(<span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="keyword">return</span> expectTypedEvent(XMLEvent.<span class="jde-java-font-lock-constant">STARTELEMENT</span>, discardWhiteSpace); - } - - <span class="comment">/** - * Get the next STARTELEMENT event with the given <tt>QName</tt> - * from the buffer. Discard any other events preceding the - * STARTELEMENT event. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">qName</span><span class="comment"> a <tt>String</tt> with the <tt>QName</tt> of the - * required STARTELEMENT - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a STARTELEMENT event - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if the event is not found - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name">getStartElement</span>(<span class="type">String</span> <span class="variable-name">qName</span>) <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="keyword">return</span> getTypedEvent(XMLEvent.<span class="jde-java-font-lock-constant">STARTELEMENT</span>, qName); - } - - <span class="comment">/** - * Return the next element if it is a STARTELEMENT with the given - * <tt>QName</tt>. If the next - * element is not of the required type, push it back onto the buffer. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">qName</span><span class="comment"> a <tt>String</tt> with the <tt>QName</tt> of the - * required STARTELEMENT - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a STARTELEMENT event. If the next - * event detected is not of the required type, <tt>null</tt> is returned. - * The erroneous event is pushed back. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if end of buffer detected. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="variable-name">expectStartElement</span> - (<span class="type">String</span> <span class="variable-name">qName</span>, <span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="keyword">return</span> expectTypedEvent - (XMLEvent.<span class="jde-java-font-lock-constant">STARTELEMENT</span>, qName, discardWhiteSpace); - } - - <span class="comment">/** - * Get the next STARTELEMENT event with the given URI index and local name - * from the buffer. Discard any other events preceding the - * STARTELEMENT event. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">uriIndex</span><span class="comment"> an <tt>int</tt> with the index of the URI of the - * required URI - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">localName</span><span class="comment"> a <tt>String</tt> with the local name of the - * required STARTELEMENT - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a STARTELEMENT event - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if the event is not found - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name">getStartElement</span>(<span class="type">int</span> <span class="variable-name">uriIndex</span>, <span class="type">String</span> <span class="variable-name">localName</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="keyword">return</span> getTypedEvent(XMLEvent.<span class="jde-java-font-lock-constant">STARTELEMENT</span>, uriIndex, localName); - } - - <span class="comment">/** - * Return the next element if it is a STARTELEMENT with the given - * URI index and local name. If the next - * element is not of the required type, push it back onto the buffer. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">uriIndex</span><span class="comment"> an <tt>int</tt> URI index. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">localName</span><span class="comment"> a <tt>String</tt> with the local name of the - * required STARTELEMENT - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a STARTELEMENT event. If the next - * event detected is not of the required type, <tt>null</tt> is returned. - * The erroneous event is pushed back. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if end of buffer detected. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="variable-name">expectStartElement</span> - (<span class="type">int</span> <span class="variable-name">uriIndex</span>, <span class="type">String</span> <span class="variable-name">localName</span>, <span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="keyword">return</span> expectTypedEvent - (XMLEvent.<span class="jde-java-font-lock-constant">STARTELEMENT</span>, uriIndex, localName, discardWhiteSpace); - } - - <span class="comment">/** - * From the buffer get the next STARTELEMENT event from the fo: namespace - * with the given FO object type. - * Discard any other events preceding the - * STARTELEMENT event. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">foType</span><span class="comment"> - the <tt>int</tt> FO object type, as defined in - * <tt>FObjectNames</tt>. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a matching STARTELEMENT event. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if the event is not found - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name">getStartElement</span>(<span class="type">int</span> <span class="variable-name">foType</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="keyword">return</span> getTypedEvent(XMLEvent.<span class="jde-java-font-lock-constant">STARTELEMENT</span>, foType); - } - - <span class="comment">/** - * From the buffer return the next STARTELEMENT event from the fo: - * namespace with the given FO object type. If the next - * element is not of the required type, push it back onto the buffer. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">foType</span><span class="comment"> - the <tt>int</tt> FO object type, as defined in - * <tt>FObjectNames</tt>. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a matching STARTELEMENT event. If the next - * event detected is not of the required type, <tt>null</tt> is returned. - * The erroneous event is pushed back. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if end of buffer detected. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="variable-name">expectStartElement</span> - (<span class="type">int</span> <span class="variable-name">foType</span>, <span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="keyword">return</span> expectTypedEvent - (XMLEvent.<span class="jde-java-font-lock-constant">STARTELEMENT</span>, foType, discardWhiteSpace); - } - - <span class="comment">/** - * Get one of a list of possible STARTELEMENT events. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="list">list</span><span class="comment"> a <tt>LinkedList</tt> containing either <tt>String</tt>s - * with the <tt>QName</tt>, or <tt>UriLocalName</tt> - * objects with the URI index and local name of one of the required - * STARTELEMENT events. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a STARTELEMENT event - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if the event is not found - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="variable-name">getStartElement</span> - (<span class="type">LinkedList</span> <span class="variable-name">list</span>, <span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span>; - <span class="keyword">do</span> { - ev = expectStartElement(list, discardWhiteSpace); - <span class="keyword">if</span> (ev != <span class="jde-java-font-lock-constant">null</span>) <span class="keyword">return</span> ev; - <span class="comment">// The non-matching event has been pushed back. -</span> <span class="comment">// Get it and discard. Note that if the first attempt to -</span> <span class="comment">// getEvent() returns null, the expectStartElement() calls -</span> <span class="comment">// return null. -</span> ev = getEvent(); - pool.surrenderEvent(ev); - } <span class="keyword">while</span> (ev != <span class="jde-java-font-lock-constant">null</span>); - <span class="comment">// Exit from this while loop is only by discovery of null event -</span> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">NoSuchElementException</span> - ("<span class="string">StartElement from list not found.</span>"); - } - - <span class="comment">/** - * Get one of a list of possible STARTELEMENT events. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">list</span><span class="comment"> a <tt>LinkedList</tt> containing either <tt>String</tt>s - * with the <tt>QName</tt>, or <tt>UriLocalName</tt> - * objects with the URI index and local name of one of the required - * STARTELEMENT events. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a STARTELEMENT event. If the next - * event detected is not of the required type, <tt>null</tt> is returned. - * The erroneous event is pushed back. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if end of buffer detected. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="variable-name">expectStartElement</span> - (<span class="type">LinkedList</span> <span class="variable-name">list</span>, <span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span>; - <span class="type">Iterator</span> <span class="variable-name" id="elements">elements</span> = list.iterator(); - <span class="keyword">while</span> (elements.hasNext()) { - <span class="type">Object</span> <span class="variable-name" id="o">o</span> = elements.next(); - <span class="keyword">if</span> (o <span class="keyword">instanceof</span> <span class="type">String</span>) { - ev = expectStartElement((<span class="type">String</span>) o, discardWhiteSpace); - <span class="comment">// Found it! -</span> <span class="keyword">if</span> (ev != <span class="jde-java-font-lock-constant">null</span>) <span class="keyword">return</span> ev; - } <span class="keyword">else</span> <span class="keyword">if</span> (o <span class="keyword">instanceof</span> <span class="type">UriLocalName</span>) { - ev = expectStartElement - (((<span class="type">UriLocalName</span>) o).uriIndex, - ((<span class="type">UriLocalName</span>) o).localName, - discardWhiteSpace); - <span class="comment">// Found it! -</span> <span class="keyword">if</span> (ev != <span class="jde-java-font-lock-constant">null</span>) <span class="keyword">return</span> ev; - } <span class="keyword">else</span> <span class="keyword">if</span> (o <span class="keyword">instanceof</span> <span class="type">Integer</span>) { - ev = expectStartElement(((<span class="type">Integer</span>)o).intValue(), - discardWhiteSpace); - <span class="keyword">if</span> (ev != <span class="jde-java-font-lock-constant">null</span>) <span class="keyword">return</span> ev; - } <span class="keyword">else</span> - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">FOPException</span> - ("<span class="string">Invalid list elements for getStartElement</span>"); - } - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">null</span>; - } - - <span class="comment">/** - * Get one of a array of possible STARTELEMENT events. Scan and discard - * events until a STARTELEMENT event is found whose URI index and - * local name matches one of those in the argument - * <tt>UriLocalName[]</tt> array. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">list</span><span class="comment"> an array containing <tt>UriLocalName</tt> - * objects with the URI index and local name of - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * STARTELEMENT events, one of which is required. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the next matching STARTELEMENT event from the buffer. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if the event is not found - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="variable-name">getStartElement</span> - (<span class="type">UriLocalName</span>[] <span class="variable-name">list</span>, <span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span>; - <span class="keyword">do</span> { - ev = expectStartElement(list, discardWhiteSpace); - <span class="keyword">if</span> (ev != <span class="jde-java-font-lock-constant">null</span>) <span class="keyword">return</span> ev; - <span class="comment">// The non-matching event has been pushed back. -</span> <span class="comment">// Get it and discard. Note that if the first attempt to -</span> <span class="comment">// getEvent() returns null, the expectStartElement() calls -</span> <span class="comment">// will throw a NoSuchElementException -</span> ev = getEvent(); - pool.surrenderEvent(ev); - } <span class="keyword">while</span> (ev != <span class="jde-java-font-lock-constant">null</span>); - <span class="comment">// Exit from this while loop is only by discovery of null event -</span> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">NoSuchElementException</span> - ("<span class="string">StartElement from list not found.</span>"); - } - - <span class="comment">/** - * Expect one of an array of possible STARTELEMENT events. The next - * STARTELEMENT must have a URI index and local name which match - * an element of the argument <tt>UriLocalName[]</tt> list. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">list</span><span class="comment"> an <tt>UriLocalName[]</tt> array containing the - * namespace Uri index and LocalName - * of possible events, one of which must be the next returned. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the matching STARTELEMENT event. If the next - * event detected is not of the required type, <tt>null</tt> is returned. - * The erroneous event is pushed back. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if end of buffer detected. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="variable-name">expectStartElement</span> - (<span class="type">UriLocalName</span>[] <span class="variable-name">list</span>, <span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span>; - <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">0</span>; i < list.length; i++) { - ev = expectStartElement(list[i].uriIndex, - list[i].localName, - discardWhiteSpace); - <span class="comment">// Found it! -</span> <span class="keyword">if</span> (ev != <span class="jde-java-font-lock-constant">null</span>) <span class="keyword">return</span> ev; - } - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">null</span>; - } - - <span class="comment">/** - * Get one of a array of possible STARTELEMENT events. Scan and discard - * events until a STARTELEMENT event is found whose <tt>QName</tt> - * matches one of those in the argument <tt>String[]</tt> array. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">list</span><span class="comment"> a <tt>String[]</tt> array containing <tt>QName</tt>s, - * one of which is required. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the next matching STARTELEMENT event from the buffer. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if the event is not found - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name">getStartElement</span>(<span class="type">String</span>[] <span class="variable-name">list</span>, <span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span>; - <span class="keyword">do</span> { - ev = expectStartElement(list, discardWhiteSpace); - <span class="keyword">if</span> (ev != <span class="jde-java-font-lock-constant">null</span>) <span class="keyword">return</span> ev; - <span class="comment">// The non-matching event has been pushed back. -</span> <span class="comment">// Get it and discard. Note that if the first attempt to -</span> <span class="comment">// getEvent() returns null, the expectStartElement() calls -</span> <span class="comment">// will throw a NoSuchElementException -</span> ev = getEvent(); - pool.surrenderEvent(ev); - } <span class="keyword">while</span> (ev != <span class="jde-java-font-lock-constant">null</span>); - <span class="comment">// Exit from this while loop is only by discovery of null event -</span> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">NoSuchElementException</span> - ("<span class="string">StartElement from array not found.</span>"); - } - - <span class="comment">/** - * Expect one of an array of possible STARTELEMENT events. The next - * STARTELEMENT must have a <tt>QName</tt> which matches an element - * of the argument <tt>String[]</tt> list. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">list</span><span class="comment"> a <tt>String[]</tt> array containing <tt>QName</tt>s - * of possible events, one of which must be the next returned. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the matching STARTELEMENT event.If the next - * event detected is not of the required type, <tt>null</tt> is returned. - * The erroneous event is pushed back. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if end of buffer detected. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="variable-name">expectStartElement</span> - (<span class="type">String</span>[] <span class="variable-name">list</span>, <span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span>; - <span class="keyword">for</span> (<span class="type">int</span> <span class="variable-name">i</span> = <span class="jde-java-font-lock-number">0</span>; i < list.length; i++) { - ev = expectStartElement(list[i], discardWhiteSpace); - <span class="comment">// Found it! -</span> <span class="keyword">if</span> (ev != <span class="jde-java-font-lock-constant">null</span>) <span class="keyword">return</span> ev; - } - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">null</span>; - } - - <span class="comment">/** - * Get one of a array of possible STARTELEMENT events. Scan and discard - * events until a STARTELEMENT event is found which is in the fo: - * namespace and whose FO type matches one of those in the argument - * <tt>int</tt> array. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">list</span><span class="comment"> an <tt>int[]</tt> array containing FO types - * one of which is required. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the next matching STARTELEMENT event from the buffer. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if the event is not found - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name">getStartElement</span>(<span class="type">int</span>[] <span class="variable-name">list</span>, <span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span>; - <span class="keyword">do</span> { - ev = expectStartElement(list, discardWhiteSpace); - <span class="keyword">if</span> (ev != <span class="jde-java-font-lock-constant">null</span>) <span class="keyword">return</span> ev; - <span class="comment">// The non-matching event has been pushed back. -</span> <span class="comment">// Get it and discard. Note that if the first attempt to -</span> <span class="comment">// getEvent() returns null, the expectStartElement() calls -</span> <span class="comment">// will throw a NoSuchElementException -</span> ev = getEvent(); - pool.surrenderEvent(ev); - } <span class="keyword">while</span> (ev != <span class="jde-java-font-lock-constant">null</span>); - <span class="comment">// Exit from this while loop is only by discovery of null event -</span> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">NoSuchElementException</span> - ("<span class="string">StartElement from array not found.</span>"); - } - - <span class="comment">/** - * Expect one of an array of possible STARTELEMENT events. The next - * STARTELEMENT must be in the fo: namespace, and must have an FO type - * which matches one of those in the argument <tt>int[]</tt> list. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">list</span><span class="comment"> a <tt>int[]</tt> array containing the FO types - * of possible events, one of which must be the next returned. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the matching STARTELEMENT event.If the next - * event detected is not of the required type, <tt>null</tt> is returned. - * The erroneous event is pushed back. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if end of buffer detected. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="variable-name">expectStartElement</span> - (<span class="type">int</span>[] <span class="variable-name">list</span>, <span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span>; - <span class="keyword">for</span> (<span class="type">int</span> <span class="variable-name">i</span> = <span class="jde-java-font-lock-number">0</span>; i < list.length; i++) { - ev = expectStartElement(list[i], discardWhiteSpace); - <span class="comment">// Found it! -</span> <span class="keyword">if</span> (ev != <span class="jde-java-font-lock-constant">null</span>) <span class="keyword">return</span> ev; - } - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">null</span>; - } - - <span class="comment">/** - * Get one of a <tt>BitSet</tt> of possible STARTELEMENT events. Scan - * and discard events until a STARTELEMENT event is found which is in - * the fo: namespace and whose FO type matches one of those in the - * argument <tt>BitSet</tt>. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="set">set</span><span class="comment"> a <tt>BitSet</tt> containing FO types one of which is - * required. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the next matching STARTELEMENT event from the buffer. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if the event is not found - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name">getStartElement</span>(<span class="type">BitSet</span> <span class="variable-name">set</span>, <span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span>; - <span class="keyword">do</span> { - <span class="keyword">try</span> { - ev = expectStartElement(set, discardWhiteSpace); - <span class="keyword">if</span> (ev != <span class="jde-java-font-lock-constant">null</span>) <span class="keyword">return</span> ev; - <span class="comment">// The non-matching event has been pushed back. -</span> <span class="comment">// Get it and discard. Note that if the first attempt to -</span> <span class="comment">// getEvent() returns null, the expectStartElement() calls -</span> <span class="comment">// will throw a NoSuchElementException -</span> ev = getEvent(); - pool.surrenderEvent(ev); - } <span class="keyword">catch</span>(<span class="type">UnexpectedStartElementException</span> <span class="variable-name">e</span>) { - ev = getEvent(); - pool.surrenderEvent(ev); - } - } <span class="keyword">while</span> (ev != <span class="jde-java-font-lock-constant">null</span>); - <span class="comment">// Exit from this while loop is only by discovery of null event -</span> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">NoSuchElementException</span> - ("<span class="string">StartElement from BitSet not found.</span>"); - } - - <span class="comment">/** - * Expect one of an <tt>BitSet</tt> of possible STARTELEMENT events. - * The next STARTELEMENT must be in the fo: namespace, and must have an - * FO type which matches one of those in the argument <tt>BitSet</tt>. - * <p>TODO:<br> - * This method should be retro-fitted to list and array versions. - * - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">set</span><span class="comment"> a <tt>BitSet</tt> containing the FO types - * of possible events, one of which must be the next returned. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the matching STARTELEMENT event.If the next - * event detected is not of the required type, <tt>null</tt> is returned. - * The erroneous event is pushed back. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if end of buffer detected. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="variable-name">expectStartElement</span> - (<span class="type">BitSet</span> <span class="variable-name">set</span>, <span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span>, <span class="type">UnexpectedStartElementException</span> - { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span>; - ev = expectTypedEvent(XMLEvent.<span class="jde-java-font-lock-constant">STARTELEMENT</span>, discardWhiteSpace); - <span class="keyword">if</span> (ev == <span class="jde-java-font-lock-constant">null</span>) <span class="keyword">return</span> ev; - - <span class="keyword">for</span> (<span class="type">int</span> <span class="variable-name">i</span> = set.nextSetBit(<span class="jde-java-font-lock-number">0</span>); i >= <span class="jde-java-font-lock-number">0</span>; i = set.nextSetBit(++i)) { - <span class="keyword">if</span> (ev.foType == i) - <span class="keyword">return</span> ev; <span class="comment">// Found it! -</span> } - <span class="comment">// Not found - push the STARTELEMENT event back and throw an -</span> <span class="comment">// UnexpectedStartElementException -</span> pushBack(ev); - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">UnexpectedStartElementException</span> - ("<span class="string">Unexpected START element: </span>" + ev.getQName()); - } - - <span class="comment">/** - * Expect that the next element will be a STARTELEMENT for one of the - * flow objects which are members of %block; from - * <b></span><span class="jde-java-font-lock-bold">6.2 Formatting Object Content</span><span class="comment"></b>, including out-of-line flow - * objects which may occur except as descendents of out-of-line formatting - * objects. White space is discarded. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the <tt>FoXMLEvent found. If any other events are encountered - * return <tt>null</tt>. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name" id="expectBlock">expectBlock</span>() - <span class="keyword">throws</span> <span class="type">FOPException</span>, <span class="type">UnexpectedStartElementException</span> - { - <span class="keyword">return</span> expectStartElement - (FObjectSets.blockEntity, XMLEvent.<span class="jde-java-font-lock-constant" id="DISCARD_W_SPACE">DISCARD_W_SPACE</span>); - } - - <span class="comment">/** - * Expect that the next element will be a STARTELEMENT for one of the - * flow objects which are members of %block; from - * <b></span><span class="jde-java-font-lock-bold">6.2 Formatting Object Content</span><span class="comment"></b>, excluding out-of-line flow - * objects which may not occur as descendents of out-of-line formatting - * objects. White space is discarded. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the <tt>FoXMLEvent found. If any other events are encountered - * return <tt>null</tt>. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name" id="expectOutOfLineBlock">expectOutOfLineBlock</span>() - <span class="keyword">throws</span> <span class="type">FOPException</span>, <span class="type">UnexpectedStartElementException</span> - { - <span class="keyword">return</span> expectStartElement - (FObjectSets.outOfLineBlockSet, XMLEvent.<span class="jde-java-font-lock-constant">DISCARD_W_SPACE</span>); - } - - <span class="comment">/** - * Expect that the next element will be a STARTELEMENT for one of the - * flow objects which are members of (#PCDATA|%inline;) from - * <b></span><span class="jde-java-font-lock-bold">6.2 Formatting Object Content</span><span class="comment"></b>, including out-of-line flow - * objects which may occur except as descendents of out-of-line - * formatting objects. White space is retained, and - * will appear as #PCDATA, i.e, as an instance of FoCharacters. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the <tt>FoXMLEvent found. If any other events are encountered - * return <tt>null</tt>. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name" id="expectPcdataOrInline">expectPcdataOrInline</span>() - <span class="keyword">throws</span> <span class="type">FOPException</span>, <span class="type">UnexpectedStartElementException</span> - { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span> = expectStartElement - (FObjectSets.normalPcdataInlineSet, XMLEvent.<span class="jde-java-font-lock-constant" id="RETAIN_W_SPACE">RETAIN_W_SPACE</span>); - <span class="keyword">if</span> (ev == <span class="jde-java-font-lock-constant">null</span>) - ev = expectCharacters(); - <span class="keyword">return</span> ev; - } - - <span class="comment">/** - * Expect that the next element will be a STARTELEMENT for one of the - * flow objects which are members of (#PCDATA|%inline;) from - * <b></span><span class="jde-java-font-lock-bold">6.2 Formatting Object Content</span><span class="comment"></b>, excluding out-of-line flow - * objects which may not occur as descendents of out-of-line formatting - * objects. White space is retained, and - * will appear as #PCDATA, i.e, as an instance of FoCharacters. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the <tt>FoXMLEvent found. If any other events are encountered - * return <tt>null</tt>. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name" id="expectOutOfLinePcdataOrInline">expectOutOfLinePcdataOrInline</span>() - <span class="keyword">throws</span> <span class="type">FOPException</span>, <span class="type">UnexpectedStartElementException</span> - { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span> = expectStartElement - (FObjectSets.inlineEntity, XMLEvent.<span class="jde-java-font-lock-constant">RETAIN_W_SPACE</span>); - <span class="keyword">if</span> (ev == <span class="jde-java-font-lock-constant">null</span>) - ev = expectCharacters(); - <span class="keyword">return</span> ev; - } - - <span class="comment">/** - * Expect that the next element will be a STARTELEMENT for one of the - * flow objects which are members of (#PCDATA|%inline;|%block;) from - * <b></span><span class="jde-java-font-lock-bold">6.2 Formatting Object Content</span><span class="comment"></b>, including out-of-line flow - * objects which may occur except as descendents of out-of-line - * formatting objects. White space is retained, and - * will appear as #PCDATA, i.e, as an instance of FoCharacters. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the <tt>FoXMLEvent</tt> found. If any other events are - * encountered return <tt>null</tt>. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name" id="expectPcdataOrInlineOrBlock">expectPcdataOrInlineOrBlock</span>() - <span class="keyword">throws</span> <span class="type">FOPException</span>, <span class="type">UnexpectedStartElementException</span> - { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span> = expectStartElement - (FObjectSets.normalPcdataBlockInlineSet, XMLEvent.<span class="jde-java-font-lock-constant">RETAIN_W_SPACE</span>); - <span class="keyword">if</span> (ev == <span class="jde-java-font-lock-constant">null</span>) - ev = expectCharacters(); - <span class="keyword">return</span> ev; - } - - <span class="comment">/** - * Expect that the next element will be a STARTELEMENT for one of the - * flow objects which are members of (#PCDATA|%inline;|%block;) from - * <b></span><span class="jde-java-font-lock-bold">6.2 Formatting Object Content</span><span class="comment"></b>, excluding out-of-line flow - * objects which may not occur as descendents of out-of-line formatting - * objects. White space is retained, and - * will appear as #PCDATA, i.e, as an instance of FoCharacters. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the <tt>FoXMLEvent</tt> found. If any other events are - * encountered return <tt>null</tt>. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name" id="expectOutOfLinePcdataOrInlineOrBlock">expectOutOfLinePcdataOrInlineOrBlock</span>() - <span class="keyword">throws</span> <span class="type">FOPException</span>, <span class="type">UnexpectedStartElementException</span> - { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span> = expectStartElement - (FObjectSets.outOfLinePcdataBlockInlineSet, - XMLEvent.<span class="jde-java-font-lock-constant">RETAIN_W_SPACE</span>); - <span class="keyword">if</span> (ev == <span class="jde-java-font-lock-constant">null</span>) - ev = expectCharacters(); - <span class="keyword">return</span> ev; - } - - <span class="comment">/** - * Get the next ENDELEMENT event from the buffer. Discard any other - * events preceding the ENDELEMENT event. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> an ENDELEMENT event - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if the event is not found - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name" id="getEndElement">getEndElement</span>() <span class="keyword">throws</span> <span class="type">FOPException</span> { - <span class="keyword">return</span> getTypedEvent(XMLEvent.<span class="jde-java-font-lock-constant" id="ENDELEMENT">ENDELEMENT</span>); - } - - <span class="comment">/** - * Return the next element if it is an ENDELEMENT. If the next - * element is not of the required type, push it back onto the buffer. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a matching ENDELEMENT event. If the next - * event detected is not of the required type, <tt>null</tt> is returned. - * The erroneous event is pushed back. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if ENDELEMENT is not the next - * event detected. The erroneous event is pushed back. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if end of buffer detected. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name" id="expectEndElement">expectEndElement</span>(<span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="keyword">return</span> expectTypedEvent(XMLEvent.<span class="jde-java-font-lock-constant">ENDELEMENT</span>, discardWhiteSpace); - } - - <span class="comment">/** - * Get the next ENDELEMENT event with the given <tt>QName</tt> - * from the buffer. Discard any other events preceding the - * ENDELEMENT event. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">qName</span><span class="comment"> a <tt>String</tt> with the <tt>QName</tt> of the - * required STARTELEMENT - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> an ENDELEMENT event - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if the event is not found - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name">getEndElement</span>(<span class="type">String</span> <span class="variable-name">qName</span>) <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="keyword">return</span> getTypedEvent(XMLEvent.<span class="jde-java-font-lock-constant">ENDELEMENT</span>, qName); - } - - <span class="comment">/** - * Return the next element if it is an ENDELEMENT with the given - * <tt>QName</tt>. If the next - * element is not of the required type, push it back onto the buffer. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">qName</span><span class="comment"> a <tt>String</tt> with the <tt>QName</tt> of the - * required ENDELEMENT - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> an ENDELEMENT with the given qname. If the next - * event detected is not an ENDELEMENT, <tt>null</tt> is returned. - * The erroneous event is pushed back. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if end of buffer detected. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name">expectEndElement</span>(<span class="type">String</span> <span class="variable-name">qName</span>, <span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="keyword">return</span> expectTypedEvent(XMLEvent.<span class="jde-java-font-lock-constant">ENDELEMENT</span>, qName, discardWhiteSpace); - } - - <span class="comment">/** - * Get the next ENDELEMENT event with the given URI index and local name - * from the buffer. Discard any other events preceding the - * ENDELEMENT event. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">uriIndex</span><span class="comment"> an <tt>int</tt> with the index of the URI of the - * required URI - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">localName</span><span class="comment"> a <tt>String</tt> with the local name of the - * required ENDELEMENT - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> an ENDELEMENT event - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if the event is not found - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name">getEndElement</span>(<span class="type">int</span> <span class="variable-name">uriIndex</span>, <span class="type">String</span> <span class="variable-name">localName</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="keyword">return</span> getTypedEvent(XMLEvent.<span class="jde-java-font-lock-constant">ENDELEMENT</span>, uriIndex, localName); - } - - <span class="comment">/** - * Return the next element if it is an ENDELEMENT with the given - * URI index and local name. If the next - * element is not of the required type, push it back onto the buffer. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">uriIndex</span><span class="comment"> an <tt>int</tt> with the index of the URI of the - * required URI - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">localName</span><span class="comment"> a <tt>String</tt> with the local name of the - * required ENDELEMENT - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a matching ENDELEMENT event. - * If the next - * event detected is not an ENDELEMENT, <tt>null</tt> is returned. - * The erroneous event is pushed back. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if end of buffer detected. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="variable-name">expectEndElement</span> - (<span class="type">int</span> <span class="variable-name">uriIndex</span>, <span class="type">String</span> <span class="variable-name">localName</span>, <span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="keyword">return</span> expectTypedEvent - (XMLEvent.<span class="jde-java-font-lock-constant">ENDELEMENT</span>, uriIndex, localName, discardWhiteSpace); - } - - <span class="comment">/** - * Get the next ENDELEMENT event with the given Fo type - * from the buffer. Discard any other events preceding the - * ENDELEMENT event. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">foType</span><span class="comment"> - the FO type of the required ENDELEMENT - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a matching ENDELEMENT event. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if the event is not found - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name">getEndElement</span>(<span class="type">int</span> <span class="variable-name">foType</span>) <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="keyword">return</span> getTypedEvent(XMLEvent.<span class="jde-java-font-lock-constant">ENDELEMENT</span>, foType); - } - - <span class="comment">/** - * Return the next element if it is an ENDELEMENT with the given - * FO type. If the next - * element is not of the required type, push it back onto the buffer. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">foType</span><span class="comment"> - the FO type of the required ENDELEMENT - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a matching ENDELEMENT. If the next - * event detected is not an ENDELEMENT, <tt>null</tt> is returned. - * The erroneous event is pushed back. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if end of buffer detected. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name">expectEndElement</span>(<span class="type">int</span> <span class="variable-name">foType</span>, <span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="keyword">return</span> expectTypedEvent - (XMLEvent.<span class="jde-java-font-lock-constant">ENDELEMENT</span>, foType, discardWhiteSpace); - } - - <span class="comment">/** - * Get the next ENDELEMENT event, with the same URI index and local name - * as the <tt>FoXMLEvent</tt> argument, from the buffer. - * Discard any other events preceding the ENDELEMENT event. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="event">event</span><span class="comment"> an <tt>FoXMLEvent</tt>. Only the uriIndex and the - * localName from the event are used. It is intended that the FoXMLEvent - * returned to the corresponding get/expectStartElement() call be used. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> an ENDELEMENT event - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if the event is not found - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name">getEndElement</span>(<span class="type">FoXMLEvent</span> <span class="variable-name">event</span>) <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="keyword">if</span> (event.foType != FObjectNames.<span class="jde-java-font-lock-constant" id="NO_FO">NO_FO</span>) - <span class="keyword">return</span> getTypedEvent(XMLEvent.<span class="jde-java-font-lock-constant">ENDELEMENT</span>, event.foType); - <span class="keyword">return</span> getTypedEvent - (XMLEvent.<span class="jde-java-font-lock-constant">ENDELEMENT</span>, event.uriIndex, event.localName); - } - - <span class="comment">/** - * Return the next element if it is an ENDELEMENT with the same - * URI index and local name as the <tt>FoXMLEvent argument</tt>. If the - * next element is not of the required type, push it back onto the buffer. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">event</span><span class="comment"> an <tt>FoXMLEvent</tt>. Only the uriIndex and the - * localName from the event are used. It is intended that the FoXMLEvent - * returned to the corresponding get/expectStartElement() call be used. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a matching ENDELEMENT event. If the next - * event detected is not an ENDELEMENT, <tt>null</tt> is returned. - * The erroneous event is pushed back. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if end of buffer detected. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="variable-name">expectEndElement</span> - (<span class="type">FoXMLEvent</span> <span class="variable-name">event</span>, <span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="keyword">if</span> (event.foType != FObjectNames.<span class="jde-java-font-lock-constant">NO_FO</span>) - <span class="keyword">return</span> expectTypedEvent - (XMLEvent.<span class="jde-java-font-lock-constant">ENDELEMENT</span>, event.foType, discardWhiteSpace); - <span class="keyword">return</span> expectTypedEvent - (XMLEvent.<span class="jde-java-font-lock-constant">ENDELEMENT</span>, event.uriIndex, event.localName, - discardWhiteSpace); - } - - <span class="comment">/** - * Get the next ENDELEMENT event, with the same URI index and local name - * as the <tt>FoXMLEvent</tt> argument, from the buffer. - * Discard any other events preceding the ENDELEMENT event. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="discardEvent">discardEvent</span><span class="comment"> the argument event may be discarded. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">event</span><span class="comment"> an <tt>FoXMLEvent</tt>. Only the uriIndex and the - * localName from the event are used. It is intended that the FoXMLEvent - * returned to the corresponding get/expectStartElement() call be used. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> an ENDELEMENT event - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if the event is not found - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name">getEndElement</span>(<span class="type">boolean</span> <span class="variable-name">discardEvent</span>, <span class="type">FoXMLEvent</span> <span class="variable-name">event</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span>; - <span class="keyword">if</span> (event.foType != FObjectNames.<span class="jde-java-font-lock-constant">NO_FO</span>) - ev = getTypedEvent(XMLEvent.<span class="jde-java-font-lock-constant">ENDELEMENT</span>, event.foType); - <span class="keyword">else</span> - ev = getTypedEvent - (XMLEvent.<span class="jde-java-font-lock-constant">ENDELEMENT</span>, event.uriIndex, event.localName); - <span class="keyword">if</span> (discardEvent) { - <span class="comment">//System.out.println("discardEvent"); -</span> pool.surrenderEvent(event); - } - <span class="keyword">return</span> ev; - } - - <span class="comment">/** - * Return the next element if it is an ENDELEMENT with the same - * URI index and local name as the <tt>FoXMLEvent argument</tt>. If the - * next element is not of the required type, push it back onto the buffer. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardEvent</span><span class="comment"> the argument event may be discarded. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">event</span><span class="comment"> an <tt>FoXMLEvent</tt>. Only the uriIndex and the - * localName from the event are used. It is intended that the FoXMLEvent - * returned to the corresponding get/expectStartElement() call be used. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">discardWhiteSpace</span><span class="comment"> - if true, discard any <tt>characters</tt> - * events which contain only whitespace. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a matching ENDELEMENT event. If the next - * event detected is not an ENDELEMENT, <tt>null</tt> is returned. - * The erroneous event is pushed back. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if end of buffer detected. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="variable-name">expectEndElement</span> - (<span class="type">boolean</span> <span class="variable-name">discardEvent</span>, <span class="type">FoXMLEvent</span> <span class="variable-name">event</span>, <span class="type">boolean</span> <span class="variable-name">discardWhiteSpace</span>) - <span class="keyword">throws</span> <span class="type">FOPException</span> - { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span>; - <span class="keyword">if</span> (event.foType != FObjectNames.<span class="jde-java-font-lock-constant">NO_FO</span>) - ev = expectTypedEvent - (XMLEvent.<span class="jde-java-font-lock-constant">ENDELEMENT</span>, event.foType, discardWhiteSpace); - <span class="keyword">else</span> - ev = expectTypedEvent - (XMLEvent.<span class="jde-java-font-lock-constant">ENDELEMENT</span>, event.uriIndex, event.localName, - discardWhiteSpace); - <span class="keyword">if</span> (discardEvent) - pool.surrenderEvent(event); - <span class="keyword">return</span> ev; - } - - <span class="comment">/** - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a CHARACTERS event - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if the event is not found - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name" id="getCharacters">getCharacters</span>() <span class="keyword">throws</span> <span class="type">FOPException</span> { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span> = getEvent(); - <span class="keyword">while</span> (ev != <span class="jde-java-font-lock-constant">null</span> && ev.type != XMLEvent.<span class="jde-java-font-lock-constant">CHARACTERS</span>) { - pool.surrenderEvent(ev); - ev = getEvent(); - } - <span class="keyword">if</span> (ev == <span class="jde-java-font-lock-constant">null</span>) { - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">NoSuchElementException</span>("<span class="string">Characters not found.</span>"); - } - <span class="keyword">return</span> ev; - } - - <span class="comment">/** - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a CHARACTERS event. If the next event detected is not - * a CHARACTERS event, <tt>null</tt> is returned. - * The erroneous event is pushed back. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">FOPException</span><span class="comment"> if buffer errors or interrupts occur - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">NoSuchElementException</span><span class="comment"> if end of buffer detected. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">FoXMLEvent</span> <span class="function-name" id="expectCharacters">expectCharacters</span>() <span class="keyword">throws</span> <span class="type">FOPException</span> { - <span class="type">FoXMLEvent</span> <span class="variable-name">ev</span> = getEvent(); - <span class="keyword">if</span> (ev != <span class="jde-java-font-lock-constant">null</span> && ev.type == XMLEvent.<span class="jde-java-font-lock-constant">CHARACTERS</span>) { - <span class="keyword">return</span> ev; - } - pushBack(ev); - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">null</span>; - } - -} -</pre> - </body> -</html> diff --git a/src/documentation/content/design/alt.design/XMLNamespaces.html b/src/documentation/content/design/alt.design/XMLNamespaces.html deleted file mode 100644 index 9ee86166a..000000000 --- a/src/documentation/content/design/alt.design/XMLNamespaces.html +++ /dev/null @@ -1,245 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- - Copyright 2001-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- $Id$ --> -<!-- Created by htmlize-0.67 in css mode. --> -<html> - <head> - <title>XMLNamespaces.java</title> - <style type="text/css"> - <!-- - body { - color: #000000; - background-color: #faf0e6; - } /* default */ - .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 */ - .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 */ - .jde-java-font-lock-number { - color: #bc8f8f; - background-color: #faf0e6; - } /* jde-java-font-lock-number-face */ - .string { - color: #008b00; - background-color: #faf0e6; - } /* font-lock-string-face */ - .variable-name { - color: #8b008b; - background-color: #faf0e6; - } /* font-lock-variable-name-face */ - .jde-java-font-lock-italic { - background-color: #faf0e6; - font-style: italic; - } /* jde-java-font-lock-italic-face */ - .type { - color: #4682b4; - background-color: #faf0e6; - } /* font-lock-type-face */ - a { - color: inherit; - background-color: inherit; - font: inherit; - text-decoration: inherit; - } - a:hover { - text-decoration: underline; - } - --> - </style> - </head> - <body> - <pre> -<span class="comment">/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */</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">xml</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="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">ArrayList</span>; - -<span class="comment">/** - * Maintains the namespaces encountered by an invocation of - * <tt>XMLSerialHandler</tt>. - * <p>One instance of <i></span><span class="jde-java-font-lock-italic">XMLNamespaces</span><span class="comment"></i> is maintained across all - * documents that may be processed in a single invocation of - * <tt>XMLSerialhandler</tt>. A reference to that instance is kept with - * every instance of <tt>XMLEvent</tt>. - * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a> - */</span> - -<span class="jde-java-font-lock-modifier">public</span> <span class="keyword">class</span> <span class="function-name" id="XMLNamespacesClass">XMLNamespaces</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">public</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="DefAttrNSpace">DefAttrNSpace</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">String</span> <span class="variable-name" id="XSLNamespace">XSLNamespace</span> = - "<span class="string">http://www.w3.org/1999/XSL/Format</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">String</span> <span class="variable-name" id="SVGNamespace">SVGNamespace</span> = "<span class="string">http://www.w3.org/2000/svg</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">String</span> <span class="variable-name" id="XlinkNamespace">XlinkNamespace</span> = - "<span class="string">http://www.w3.org/1999/xlink</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="DefAttrNSIndex">DefAttrNSIndex</span> = <span class="jde-java-font-lock-number">0</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="XSLNSpaceIndex">XSLNSpaceIndex</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="SVGNSpaceIndex">SVGNSpaceIndex</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="XLinkNSpaceIndex">XLinkNSpaceIndex</span> = <span class="jde-java-font-lock-number">3</span>; - - <span class="comment">/** - * A <tt>HashMap</tt> mapping a namespace URI to an <tt>int</tt> - * index. The HashMap is initialized with a few well-known URIs. As - * URIs are encountered in parsing, they are converted to an integer - * index by lookup in this HashMap. If the URI has not been seen, it - * is added to the <i></span><span class="jde-java-font-lock-italic">uriIndices</i> and <i>uris</span><span class="comment"></i> for future reference. - * <b>It is vital that no URI, once added, ever be deleted - * from this <tt>HashMap</tt></b>. - * <p><tt>HashMap</> is unsynchronized, so accesses and updates must be - * protected. - * <p> - * Updates will be very rare, and accesses are directly related to the - * number of elements (and attributes) encountered. - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">HashMap</span> <span class="variable-name" id="uriIndices">uriIndices</span>; - <span class="comment">/** - * A <tt>ArrayList</tt> of namespace URIs. Effectively, a mapping of - * an <tt>int</tt> index onto a URI. - * ArrayList is initialized with a few well-known URIs. As - * URIs are encountered in parsing, they are converted to an integer - * index by lookup in the <i></span><span class="jde-java-font-lock-italic">uriIndices</span><span class="comment"></i> Hashmap. If the URI has not - * been seen, it is added to <i></span><span class="jde-java-font-lock-italic">uriIndices</i> and <i>uris</span><span class="comment"></i> - * for future reference. - * <p> - * <tt>ArrayList</> is unsynchronized, so access and updates must be - * protected. Both will be more rare than accesses to <i></span><span class="jde-java-font-lock-italic">uriIndices</span><span class="comment"></i>. - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">ArrayList</span> <span class="variable-name" id="uris">uris</span>; - - <span class="comment">/** - * A sequence object for use by <tt>XMLEvent</tt>s. Because an - * <tt>XMLEvent</tt> object must always be associated with an - * <i></span><span class="jde-java-font-lock-italic">XMLNamespace</span><span class="comment"></i> object, this namespace object will act as a - * singleton for <tt>XMLEvent</tt>s. This field provides a - * counter for those objects. The range of values which may be - * assigned to <i></span><span class="jde-java-font-lock-italic">sequence</i> is restricted by <i>seqMask</span><span class="comment"></i>. - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">int</span> <span class="variable-name" id="sequence">sequence</span> = <span class="jde-java-font-lock-number">0</span>; - - <span class="comment">/** Mask to restrict the range of values within which <i></span><span class="jde-java-font-lock-italic">sequence</span><span class="comment"></i> - * may cycle. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="seqMask">seqMask</span> = (<span class="jde-java-font-lock-number">1</span> << <span class="jde-java-font-lock-number">20</span>) - <span class="jde-java-font-lock-number">1</span>; - - <span class="comment">/** - * The access function for the sequence. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the next positive sequence number. This number may wrap - * but is guaranteed to be within the range seqMask >= sequence >= 0. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="getSequence">getSequence</span>() { - sequence = ++sequence & seqMask; - <span class="keyword">return</span> sequence; - } - - <span class="jde-java-font-lock-modifier">public</span> <span class="function-name" id="XMLNamespaces">XMLNamespaces</span>() { - uriIndices = <span class="keyword">new</span> <span class="type">HashMap</span>(<span class="jde-java-font-lock-number">4</span>); - uris = <span class="keyword">new</span> <span class="type">ArrayList</span>(<span class="jde-java-font-lock-number">4</span>); - uriIndices.put(DefAttrNSpace, Ints.consts.get(DefAttrNSIndex)); - uris.add(DefAttrNSIndex, DefAttrNSpace); - uriIndices.put(XSLNamespace, Ints.consts.get(XSLNSpaceIndex)); - uris.add(XSLNSpaceIndex, XSLNamespace); - uriIndices.put(SVGNamespace, Ints.consts.get(SVGNSpaceIndex)); - uris.add(SVGNSpaceIndex, SVGNamespace); - uriIndices.put(XlinkNamespace, Ints.consts.get(XLinkNSpaceIndex)); - uris.add(XLinkNSpaceIndex, XlinkNamespace); - } - - <span class="comment">/** - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> size of the <tt>uris</tt> <ttArrayList</tt>. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">synchronized</span> <span class="type">int</span> <span class="function-name" id="getUrisSize">getUrisSize</span>() { - <span class="keyword">return</span> uris.size(); - } - - <span class="comment">/** - * If the URI is not pre-defined, and has not been seen before, add - * it to the stored namespaces, and return the index. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="uri">uri</span><span class="comment"> the namespace uri - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> integer index of the namespace URI - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">synchronized</span> <span class="type">int</span> <span class="function-name" id="getURIIndex">getURIIndex</span>(<span class="type">String</span> <span class="variable-name">uri</span>) { - <span class="type">int</span> <span class="variable-name" id="i">i</span>; - <span class="type">Integer</span> <span class="variable-name" id="intg">intg</span> = (<span class="type">Integer</span>)uriIndices.get(uri); - <span class="keyword">if</span> (intg == <span class="jde-java-font-lock-constant" id="null">null</span>) { - <span class="comment">// update the indices -</span> i = uris.size(); - <span class="comment">//System.out.println("****Adding namespace " + uri + " " + i); -</span> uriIndices.put(uri, Ints.consts.get(i)); - uris.add(i, uri); - <span class="keyword">return</span> i; - } - <span class="comment">// not null - found the integer -</span> <span class="keyword">return</span> intg.intValue(); - } - - <span class="comment">/** - * </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 integer index of the namespace URI - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the corresponding namespace URI - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">synchronized</span> <span class="type">String</span> <span class="function-name" id="getIndexURI">getIndexURI</span>(<span class="type">int</span> <span class="variable-name">index</span>) { - <span class="keyword">return</span> (<span class="type">String</span>)uris.get(index); - } - -} -</pre> - </body> -</html> diff --git a/src/documentation/content/design/alt.design/codedisplay.js b/src/documentation/content/design/alt.design/codedisplay.js deleted file mode 100644 index 8fd0ceb03..000000000 --- a/src/documentation/content/design/alt.design/codedisplay.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 1999-2004 The Apache Software Foundation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// $Id$ -var showing = new Array(); -var x = new Array(); // scrollX -var y = new Array(); // scrollY - -function toggleCode(id, src, height, width) { - //alert('In toggleCode'); - if (showing[id]) { - hideCode(id); - } else { - showCode(id, src, height, width); - } -} - -function showCode(id, src, height, width) { - //alert('In showCode'); - if (showing[id]) { return; } - if (document.getElementById && document.createElement) { - if (window.scrollX != undefined) { - x[id] = window.scrollX; - y[id] = window.scrollY; - } - var parent = document.getElementById(id); - var span = document.createElement('SPAN'); - parent.appendChild(span); - var br = document.createElement('BR'); - var iframe = document.createElement('IFRAME'); - iframe.setAttribute('src', src); - iframe.setAttribute('height', height); - iframe.setAttribute('width', width); - span.appendChild(br); - span.appendChild(iframe); - //parent.replaceChild(iframe, parent.lastChild); - // window.scrollTo(x[id],y[id]); - showing[id] = true; - } else { - alert( - "Requires Navigator >= 7, Mozilla >= 1.2.1 or IE >= 6"); - return; - } -} - -function hideCode(id) { - //alert('In hideCode'); - if ( ! showing[id]) { return; } - if (document.getElementById && document.createElement) { - var parent = document.getElementById(id); - parent.removeChild(parent.lastChild); - if (x[id] != undefined) { - window.scrollTo(x[id],y[id]); - } - showing[id] = false; - } else { - alert( - "Requires Navigator >= 7, Mozilla >= 1.2.1 or IE >= 6"); - return; - } -} - diff --git a/src/documentation/content/design/alt.design/properties/AbstractPropertyValue.html b/src/documentation/content/design/alt.design/properties/AbstractPropertyValue.html deleted file mode 100644 index 787966364..000000000 --- a/src/documentation/content/design/alt.design/properties/AbstractPropertyValue.html +++ /dev/null @@ -1,254 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- - Copyright 1999-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- $Id$ --> -<!-- Created by htmlize-0.67 in css mode. --> -<html> - <head> - <title>AbstractPropertyValue.java</title> - <style type="text/css"> - <!-- - body { - color: #000000; - background-color: #faf0e6; - } /* default */ - .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 */ - .jde-java-font-lock-number { - color: #bc8f8f; - background-color: #faf0e6; - } /* jde-java-font-lock-number-face */ - .jde-java-font-lock-italic { - background-color: #faf0e6; - font-style: italic; - } /* jde-java-font-lock-italic-face */ - .string { - color: #008b00; - background-color: #faf0e6; - } /* font-lock-string-face */ - .variable-name { - color: #8b008b; - background-color: #faf0e6; - } /* font-lock-variable-name-face */ - .jde-java-font-lock-modifier { - color: #da70d6; - background-color: #faf0e6; - } /* jde-java-font-lock-modifier-face */ - .type { - color: #4682b4; - background-color: #faf0e6; - } /* font-lock-type-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="comment">/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */</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">datatypes</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">PropertyConsts</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="jde-java-font-lock-number">*</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="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">/** - * Base abstract class for all property value types. - * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a> - */</span> - -<span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">abstract</span> <span class="keyword">class</span> <span class="function-name" id="AbstractPropertyValueClass">AbstractPropertyValue</span> - <span class="keyword">implements</span> <span class="type">PropertyValue</span>, <span class="type">Cloneable</span> -{ - - <span class="comment">/** - * An integer index to the type of property of which this is a value. - */</span> - <span class="jde-java-font-lock-modifier">protected</span> <span class="type">int</span> <span class="variable-name" id="property">property</span>; - - <span class="comment">/** - * An integer property type. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="type">type</span>; - - <span class="comment">/** - * The PropertyConsts singleton. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">PropertyConsts</span> <span class="variable-name" id="propertyConsts">propertyConsts</span>; - - <span class="comment">/** - * </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"> index of the property in the property arrays. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">type</span><span class="comment"> of this value - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="function-name" id="AbstractPropertyValue">AbstractPropertyValue</span>(<span class="type">int</span> <span class="variable-name">index</span>, <span class="type">int</span> <span class="variable-name">type</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 > PropNames.<span class="jde-java-font-lock-constant" id="LAST_PROPERTY_INDEX">LAST_PROPERTY_INDEX</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">Invalid property index: </span>" + index); - <span class="keyword">if</span> (type < <span class="jde-java-font-lock-number">0</span> || type > PropertyValue.<span class="jde-java-font-lock-constant" id="LAST_PROPERTY_TYPE">LAST_PROPERTY_TYPE</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">Invalid property type: </span>" + type); - property = index; - <span class="keyword">this</span>.type = type; - propertyConsts = PropertyConsts.getPropertyConsts(); - } - - <span class="comment">/** - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="propertyName">propertyName</span><span class="comment"> a <tt>String</tt> containing the property name. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="function-name">AbstractPropertyValue</span>(<span class="type">String</span> <span class="variable-name">propertyName</span>, <span class="type">int</span> <span class="variable-name">type</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - propertyConsts = PropertyConsts.getPropertyConsts(); - property = PropNames.getPropertyIndex(propertyName); - <span class="keyword">if</span> (property < <span class="jde-java-font-lock-number">1</span> || property > PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">Invalid property index: </span>" + property); - <span class="keyword">if</span> (type < <span class="jde-java-font-lock-number">0</span> || type > PropertyValue.<span class="jde-java-font-lock-constant">LAST_PROPERTY_TYPE</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">Invalid property type: </span>" + type); - <span class="keyword">this</span>.type = type; - } - - <span class="comment">/** - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>int</tt> property index. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="getProperty">getProperty</span>() { - <span class="keyword">return</span> property; - } - - <span class="jde-java-font-lock-modifier">public</span> <span class="type">void</span> <span class="function-name" id="setProperty">setProperty</span>(<span class="type">int</span> <span class="variable-name">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">0</span> || index > PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">Invalid property index: </span>" + index); - property = index; - } - - <span class="comment">/** - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> type field of the <tt>PropertyValue</tt>. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="getType">getType</span>() { - <span class="keyword">return</span> type; - } - - <span class="comment">/** - * In some circumstances, the property against which a type is to be - * validated may not be the same as the property against which this - * <i></span><span class="jde-java-font-lock-italic">AbstractPropertyValue</span><span class="comment"></i> is defined. - * A specific property argument is then required. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="testProperty">testProperty</span><span class="comment"> <tt>int</tt> property index of the property - * for which the type is to be validated. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">type</span><span class="comment"> <tt>int</tt> bitmap of data types to check for - * validity against this property. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">void</span> <span class="function-name" id="validate">validate</span>(<span class="type">int</span> <span class="variable-name">testProperty</span>, <span class="type">int</span> <span class="variable-name">type</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="comment">// N.B. PROPERTY_SPECIFIC inheritance may require more specialized -</span> <span class="comment">// checks. Only line-height comes into this category. -</span> - <span class="comment">// N.B. The first commented-out condition means that I cannot validate -</span> <span class="comment">// unless the property is NOT inherited. -</span> <span class="comment">// I can't remember why I put this -</span> <span class="comment">// condition in here. Removing it. pbw 2002/02/18 -</span> <span class="comment">//if (propertyConsts.inherited.get(testProperty) == Property.NO -</span> <span class="comment">//&& (propertyConsts.getDataTypes(testProperty) & type) == 0) { -</span> - <span class="keyword">if</span> ((propertyConsts.getDataTypes(testProperty) & type) == <span class="jde-java-font-lock-number">0</span>) { - <span class="type">String</span> <span class="variable-name" id="pname">pname</span> = PropNames.getPropertyName(testProperty); - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">Datatype(s) </span>" + - Property.listDataTypes(type) + - "<span class="string"> not defined on </span>" + pname); - } - } - - <span class="comment">/** - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">type</span><span class="comment"> <tt>int</tt> bitmap of data types to check for - * validity against this property. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">void</span> <span class="function-name">validate</span>(<span class="type">int</span> <span class="variable-name">type</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> { - <span class="comment">// N.B. PROPERTY_SPECIFIC inheritance may require more specialized -</span> <span class="comment">// checks. Only line-height comes into this category. -</span> validate(property, type); - } - - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">String</span> <span class="function-name" id="typeString">typeString</span>(<span class="type">int</span> <span class="variable-name">type</span>) { - <span class="keyword">if</span> (type < <span class="jde-java-font-lock-number">0</span> || type >PropertyValue.<span class="jde-java-font-lock-constant">LAST_PROPERTY_TYPE</span>) - <span class="keyword">return</span> "<span class="string">Property type out of range</span>"; - <span class="keyword">return</span> PropertyValue.propertyTypes.get(type); - } - - <span class="jde-java-font-lock-modifier">public</span> <span class="type">String</span> <span class="function-name" id="toString">toString</span>() { - <span class="keyword">try</span> { - <span class="keyword">return</span> "<span class="string">Property: </span>" + PropNames.getPropertyName(property) - + "<span class="string"> Index: </span>" + property + "<span class="string"> Type: </span>" + - typeString(type); - } <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="type">Object</span> <span class="function-name" id="clone">clone</span>() <span class="keyword">throws</span> <span class="type">CloneNotSupportedException</span> { - <span class="keyword">return</span> <span class="keyword">super</span>.clone(); - } -} -</pre> - </body> -</html> diff --git a/src/documentation/content/design/alt.design/properties/AutoRestore.html b/src/documentation/content/design/alt.design/properties/AutoRestore.html deleted file mode 100644 index 20c46be42..000000000 --- a/src/documentation/content/design/alt.design/properties/AutoRestore.html +++ /dev/null @@ -1,92 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- - Copyright 2001-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- $Id$ --> -<!-- Created by htmlize-0.67 in css mode. --> -<html> - <head> - <title>AutoRestore.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">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="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">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">Bool</span>; - -<span class="jde-java-font-lock-modifier">public</span> <span class="keyword">class</span> <span class="function-name" id="AutoRestoreClass">AutoRestore</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="BOOL">BOOL</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="ACTION">ACTION</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="BOOL_IT">BOOL_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> <span class="keyword">new</span> <span class="type">Bool</span>(PropNames.<span class="jde-java-font-lock-constant" id="AUTO_RESTORE">AUTO_RESTORE</span>, <span class="jde-java-font-lock-constant">true</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>; -} - -</pre> - </body> -</html> diff --git a/src/documentation/content/design/alt.design/properties/BorderCommonStyle.html b/src/documentation/content/design/alt.design/properties/BorderCommonStyle.html deleted file mode 100644 index 52148a5df..000000000 --- a/src/documentation/content/design/alt.design/properties/BorderCommonStyle.html +++ /dev/null @@ -1,147 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- - Copyright 2001-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- $Id$ --> -<!-- 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 deleted file mode 100644 index 1d748c1da..000000000 --- a/src/documentation/content/design/alt.design/properties/BorderCommonWidth.html +++ /dev/null @@ -1,144 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- - Copyright 2001-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- $Id$ --> -<!-- 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 deleted file mode 100644 index 985207d90..000000000 --- a/src/documentation/content/design/alt.design/properties/BorderLeftStyle.html +++ /dev/null @@ -1,86 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- - Copyright 2001-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- $Id$ --> -<!-- 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 deleted file mode 100644 index 3619c5413..000000000 --- a/src/documentation/content/design/alt.design/properties/BorderLeftWidth.html +++ /dev/null @@ -1,101 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- - Copyright 2001-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- $Id$ --> -<!-- 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/Character.html b/src/documentation/content/design/alt.design/properties/Character.html deleted file mode 100644 index 62c64b2db..000000000 --- a/src/documentation/content/design/alt.design/properties/Character.html +++ /dev/null @@ -1,84 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- - Copyright 2001-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- $Id$ --> -<!-- Created by htmlize-0.67 in css mode. --> -<html> - <head> - <title>Character.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">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="jde-java-font-lock-modifier">public</span> <span class="keyword">class</span> <span class="function-name" id="CharacterClass">Character</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="CHARACTER_T">CHARACTER_T</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="NOTYPE_IT">NOTYPE_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/Direction.html b/src/documentation/content/design/alt.design/properties/Direction.html deleted file mode 100644 index 0320f0770..000000000 --- a/src/documentation/content/design/alt.design/properties/Direction.html +++ /dev/null @@ -1,115 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- - Copyright 2001-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- $Id$ --> -<!-- 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/FOAttributes.html b/src/documentation/content/design/alt.design/properties/FOAttributes.html deleted file mode 100644 index 254515f61..000000000 --- a/src/documentation/content/design/alt.design/properties/FOAttributes.html +++ /dev/null @@ -1,426 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- - Copyright 2001-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- $Id$ --> -<!-- Created by htmlize-0.67 in css mode. --> -<html> - <head> - <title>FOAttributes.java</title> - <style type="text/css"> - <!-- - body { - color: #000000; - background-color: #faf0e6; - } /* default */ - .jde-java-font-lock-number { - color: #bc8f8f; - background-color: #faf0e6; - } /* jde-java-font-lock-number-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 */ - .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-doc-tag { - color: #008b00; - background-color: #faf0e6; - } /* jde-java-font-lock-doc-tag-face */ - .comment { - color: #00008b; - background-color: #faf0e6; - } /* font-lock-comment-face */ - .reference { - color: #cd0000; - background-color: #faf0e6; - } /* font-lock-reference-face */ - a { - color: inherit; - background-color: inherit; - font: inherit; - text-decoration: inherit; - } - a:hover { - text-decoration: underline; - } - --> - </style> - </head> - <body> - <pre> -<span class="comment">/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */</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">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">apps</span>.<span class="type">FOPException</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="type">PropertyConsts</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">FObjectNames</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">messaging</span>.<span class="type">MessageHandler</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">xml</span>.<span class="type">FoXMLEvent</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">xml</span>.<span class="type">XMLNamespaces</span>; - -<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">xml</span>.<span class="jde-java-font-lock-package">sax</span>.<span class="type">Attributes</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">Iterator</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">ArrayList</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">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">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">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">Arrays</span>; - -<span class="comment">/** - * The FO Attributes data structures and methods needed to manage the - * Attributes associated with FO nodes. - * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a> - */</span> - -<span class="jde-java-font-lock-modifier">public</span> <span class="keyword">class</span> <span class="function-name" id="FOAttributesClass">FOAttributes</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="comment">/** - * <i></span><span class="jde-java-font-lock-italic">nSpaceAttrMaps</span><span class="comment"></i> is an <tt>ArrayList</tt> to hold the array of - * <tt>HashMap</tt>s which contain the attribute lists for each - * namespace which may be active for a particular FO element. The - * <tt>ArrayList</tt> is indexed by the URIIndex for this namespace - * which is maintained in an <tt>XMLNamespaces</tt> object by the - * <tt>FOTree</tt> object which is processing the FO input. The - * values in the <tt>HashMap</tt>s are indexed by the local name of the - * attribute. - * The <tt>ArrayList</tt> will not be created for a particular instance - * of <tt>FOAttributes</tt> unless a namespace other than the standard - * XSL namespace is activated for this instance. - * See <i></span><span class="jde-java-font-lock-italic">foAttrMap</span><span class="comment"></i>. - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">ArrayList</span> <span class="variable-name" id="nSpaceAttrMaps">nSpaceAttrMaps</span>; - - <span class="comment">/** - * <i></span><span class="jde-java-font-lock-italic">foAttrMap</span><span class="comment"></i> is a <tt>HashMap</tt> to hold the FO namespace - * attribute list specified in the FO element with which this list is - * associated. The <tt>String</tt> attribute value is stored - * indexed by the integer constant property identifier from - * <tt>PropertyConsts</tt>. - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">HashMap</span> <span class="variable-name" id="foAttrMap">foAttrMap</span> = <span class="keyword">new</span> <span class="type">HashMap</span>(<span class="jde-java-font-lock-number">0</span>); - - <span class="comment">/** - * A sorted array of the keys (property indices) of the values in - * <i></span><span class="jde-java-font-lock-italic">foAttrMap</span><span class="comment"></i>. - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">Integer</span>[] <span class="variable-name" id="foAttrKeys">foAttrKeys</span> = <span class="jde-java-font-lock-constant" id="null">null</span>; - - <span class="comment">/** - * A static array of <tt>Integer</tt> as a template for the generation - * of the <i></span><span class="jde-java-font-lock-italic">foAttrKeys</span><span class="comment"></i> array. - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">Integer</span>[] <span class="variable-name" id="integerArray">integerArray</span> - = <span class="keyword">new</span> <span class="type">Integer</span>[] { Ints.consts.get(<span class="jde-java-font-lock-number">0</span>) }; - - <span class="comment">/** - * Construct an <i></span><span class="jde-java-font-lock-italic">FOAttributes</span><span class="comment"></i> object. - * <p>The <tt>Attributes</tt> object on the event is scanned, and each - * attribute is examined. If the attribute is in the default namespace - * for fo: attributes, it is an fo: property, and its value is entered - * into the <i></span><span class="jde-java-font-lock-italic">foAttrMap</span><span class="comment"></i> <tt>Hashmap</tt> indexed by the property - * index. - * <p>If the attribute does not belong to the default namespace, its - * value is entered into the appropriate <tt>HashMap</tt> in the - * <tt>ArrayList</tt> <i></span><span class="jde-java-font-lock-italic">nSpaceAttrMaps</span><span class="comment"></i>, indexed by the attribute's - * local name. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="event">event</span><span class="comment"> - the FO XML event which triggered construction of the - * parent <tt>FONode</tt>. - * </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 <tt>FONode</tt> with which these attributes are - * associated. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="function-name" id="FOAttributes">FOAttributes</span>(<span class="type">FoXMLEvent</span> <span class="variable-name">event</span>, <span class="type">FONode</span> <span class="variable-name">foNode</span>) <span class="keyword">throws</span> <span class="type">FOPException</span> { - - <span class="comment">// If the event is null, there is no event associated with this -</span> <span class="comment">// node, probably because this is a manufactured node; e.g., -</span> <span class="comment">// an "invented" FopageSequenceMaster. The default initialisation -</span> <span class="comment">// includes an empty foAttrMap HashMap. -</span> <span class="keyword">if</span> (event == <span class="jde-java-font-lock-constant">null</span>) <span class="keyword">return</span>; - - <span class="keyword">if</span> (event.getFoType() == FObjectNames.<span class="jde-java-font-lock-constant" id="PCDATA">PCDATA</span>) - <span class="keyword">return</span>; <span class="comment">// go with the empty foAttrMap -</span> - <span class="comment">// Create the foAttrMap. -</span> <span class="type">Attributes</span> <span class="variable-name" id="attributes">attributes</span> = event.getAttributes(); - <span class="keyword">if</span> (attributes == <span class="jde-java-font-lock-constant">null</span>) <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">FOPException</span> - ("<span class="string">No Attributes in XMLEvent</span>"); - <span class="type">int</span> <span class="variable-name" id="propIndex">propIndex</span>; - <span class="type">HashMap</span> <span class="variable-name" id="tmpHash">tmpHash</span>; - <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">0</span>; i < attributes.getLength(); i++) { - <span class="type">String</span> <span class="variable-name" id="attrUri">attrUri</span> = attributes.getURI(i); - <span class="type">String</span> <span class="variable-name" id="attrLocalname">attrLocalname</span> = attributes.getLocalName(i); - <span class="type">String</span> <span class="variable-name" id="attrQName">attrQName</span> = attributes.getQName(i); - <span class="type">int</span> <span class="variable-name" id="sep">sep</span> = attrQName.indexOf('<span class="string">:</span>'); - <span class="type">String</span> <span class="variable-name" id="prefix">prefix</span> = attrQName.substring(<span class="jde-java-font-lock-number">0</span>, (sep == -<span class="jde-java-font-lock-number">1</span> ? <span class="jde-java-font-lock-number">0</span> : sep)); - <span class="keyword">if</span> (prefix.equals("<span class="string">xmlns</span>")) <span class="keyword">break</span>; - <span class="type">String</span> <span class="variable-name" id="attrValue">attrValue</span> = attributes.getValue(i); - <span class="type">int</span> <span class="variable-name" id="attrUriIndex">attrUriIndex</span> = foNode.namespaces.getURIIndex(attrUri); - - <span class="comment">//System.out.println("FONode:" + event); -</span> <span class="keyword">if</span> (attrUriIndex == XMLNamespaces.DefAttrNSIndex) { - <span class="comment">// Standard FO namespace -</span> <span class="comment">// Catch default namespace declaration here. -</span> <span class="keyword">if</span> (attrLocalname.equals("<span class="string">xmlns</span>")) <span class="keyword">break</span>; - <span class="comment">// Is this a known (valid) property? -</span> propIndex = PropNames.getPropertyIndex(attrLocalname); - <span class="comment">// Known attribute name -</span> foAttrMap.put(Ints.consts.get(propIndex), attrValue); - } <span class="keyword">else</span> { <span class="comment">// Not the XSL FO namespace -</span> <span class="type">int</span> <span class="variable-name" id="j">j</span>; - <span class="keyword">if</span> (nSpaceAttrMaps == <span class="jde-java-font-lock-constant">null</span>) { - <span class="comment">//Create the list -</span> System.out.println("<span class="string">Creating nSpaceAttrMaps</span>"); - nSpaceAttrMaps = <span class="keyword">new</span> <span class="type">ArrayList</span>(attrUriIndex + <span class="jde-java-font-lock-number">1</span>); - <span class="comment">// Add the fo list -</span> <span class="keyword">for</span> (j = <span class="jde-java-font-lock-number">0</span>; j < XMLNamespaces.DefAttrNSIndex; j++) - nSpaceAttrMaps.add(<span class="keyword">new</span> <span class="type">HashMap</span>(<span class="jde-java-font-lock-number">0</span>)); - - System.out.println("<span class="string">Adding foAttrMap</span>"); - nSpaceAttrMaps.add(foAttrMap); - } - <span class="comment">// Make sure there are elements between the last current -</span> <span class="comment">// and the one to be added -</span> <span class="keyword">for</span> (j = nSpaceAttrMaps.size(); j <= attrUriIndex; j++) - nSpaceAttrMaps.add(<span class="keyword">new</span> <span class="type">HashMap</span>(<span class="jde-java-font-lock-number">0</span>)); - - <span class="comment">// Does a HashMap exist for this namespace? -</span> <span class="keyword">if</span> ((tmpHash = - (<span class="type">HashMap</span>)nSpaceAttrMaps.get(attrUriIndex)) == <span class="jde-java-font-lock-constant">null</span>) { - tmpHash = <span class="keyword">new</span> <span class="type">HashMap</span>(<span class="jde-java-font-lock-number">1</span>); - nSpaceAttrMaps.set(attrUriIndex, tmpHash); - } - <span class="comment">// Now put this value in the HashMap -</span> tmpHash.put(attrLocalname, attrValue); - } - } - <span class="comment">// Set up the sorted array of the foAttr keys, if foAttrMap has -</span> <span class="comment">// any entries. -</span> <span class="keyword">if</span> (foAttrMap.size() > <span class="jde-java-font-lock-number">0</span>) { - foAttrKeys = (<span class="type">Integer</span>[])(foAttrMap.keySet().toArray(integerArray)); - Arrays.sort(foAttrKeys); - } - <span class="comment">// Finished with the Attributes object -</span> event.setAttributes(<span class="jde-java-font-lock-constant">null</span>); - } - - <span class="comment">/** - * Get the default namespace attribute values as an unmodifiable - * <tt>Map</tt>. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a unmodifiable <tt>Map</tt> containing the the attribute - * values for all of the default attribute namespace attributes in this - * attribute list, indexed by the property name index from - * <tt>PropNames</tt>. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">Map</span> <span class="function-name" id="getFixedFoAttrMap">getFixedFoAttrMap</span>() { - <span class="keyword">return</span> Collections.unmodifiableMap((<span class="type">Map</span>)foAttrMap); - } - - <span class="comment">/** - * Get the <tt>HashMap</tt> of all default namespace attributes. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>HashMap</tt> <i></span><span class="jde-java-font-lock-italic">foAttrMap</span><span class="comment"></i> containing the the attribute - * values for all of the default attribute namespace attributes in this - * attribute list, indexed by the property name index from - * <tt>PropNames</tt>. This HashMap may be changed by the calling - * process. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">HashMap</span> <span class="function-name" id="getFoAttrMap">getFoAttrMap</span>() { - <span class="keyword">return</span> foAttrMap; - } - - <span class="comment">/** - * Get the sorted array of property index keys for the default namespace - * attributes. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>Integer[]</tt> <i></span><span class="jde-java-font-lock-italic">foAttrKeys</span><span class="comment"></i> containing the the - * sorted keys (the property indices from <tt>PropNames</tt>) of the - * attribute values for all of the default attribute namespace attributes - * in this attribute list. - * Warning: This array may be changed by the calling process. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">Integer</span>[] <span class="function-name" id="getFoAttrKeys">getFoAttrKeys</span>() { - <span class="keyword">return</span> foAttrKeys; - } - - <span class="comment">/** - * A convenience method for accessing attribute values from the default - * attribute namespace. - * </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"> an <tt>int</tt> containing the property name index - * from <tt>PropNames</tt>. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a <tt>String</tt> containing the associated property value. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">String</span> <span class="function-name" id="getFoAttrValue">getFoAttrValue</span>(<span class="type">int</span> <span class="variable-name">property</span>) { - <span class="keyword">return</span> (<span class="type">String</span>)(foAttrMap.get(Ints.consts.get(property))); - } - - <span class="comment">/** - * A convenience method for accessing attribute values from the default - * attribute namespace. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="propertyName">propertyName</span><span class="comment"> a <tt>String</tt> containing the property name. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a <tt>String</tt> containing the associated property value. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">String</span> <span class="function-name">getFoAttrValue</span>(<span class="type">String</span> <span class="variable-name">propertyName</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="keyword">return</span> getFoAttrValue(PropNames.getPropertyIndex(propertyName)); - } - - <span class="comment">/** - * Get an unmodifiable <tt>Map</tt> of the attribute values for a - * particular namespace. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="uriIndex">uriIndex</span><span class="comment"> an <tt>int</tt> containing the index of the attribute - * values namespace, maintained in an <tt>XMLEvent</tt> <tt>static</tt> - * array. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> an unmodifiable <tt>Map</tt> of the attribute values - * within the indexed namespace, for this attribute list, indexed by the - * local name of the attribute. The <tt>Map</tt> returned is - * derived from the one maintained in <i></span><span class="jde-java-font-lock-italic">nSpaceAttrMaps</span><span class="comment"></i>. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">Map</span> <span class="function-name" id="getAttrMap">getAttrMap</span>(<span class="type">int</span> <span class="variable-name">uriIndex</span>) { - <span class="keyword">if</span> (uriIndex == XMLNamespaces.DefAttrNSIndex) - <span class="keyword">return</span> Collections.unmodifiableMap((<span class="type">Map</span>)foAttrMap); - <span class="keyword">if</span> (nSpaceAttrMaps != <span class="jde-java-font-lock-constant">null</span>) { - <span class="keyword">if</span> (uriIndex >= nSpaceAttrMaps.size()) <span class="keyword">return</span> <span class="jde-java-font-lock-constant">null</span>; - <span class="keyword">return</span> Collections.unmodifiableMap - ((<span class="type">Map</span>)(nSpaceAttrMaps.get(uriIndex))); - } <span class="keyword">else</span> { - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">null</span>; - } - } - - <span class="comment">/** - * Get the value of an attribute in a particular namespace. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">uriIndex</span><span class="comment"> an <tt>int</tt> index of the URIs maintained - * by <tt>XMLEvent</tt>. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="localName">localName</span><span class="comment"> a <tt>String</tt> with the local name of the - * attribute. In the case of the default attribute namespace, this - * will be the fo property name. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a <tt>String</tt> containing the value of the attribute. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">String</span> <span class="function-name" id="getUriAttrValue">getUriAttrValue</span>(<span class="type">int</span> <span class="variable-name">uriIndex</span>, <span class="type">String</span> <span class="variable-name">localName</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="keyword">if</span> (uriIndex == XMLNamespaces.DefAttrNSIndex) - <span class="keyword">return</span> getFoAttrValue(PropNames.getPropertyIndex(localName)); - <span class="keyword">return</span> (String) - (((<span class="type">HashMap</span>)nSpaceAttrMaps.get(uriIndex)).get(localName)); - } - - <span class="comment">/** - * Get the size of the <i></span><span class="jde-java-font-lock-italic">foAttrMap</span><span class="comment"></i> <tt>HashMap</tt> - * containing attributes for the default fo: namespace - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> an <tt>int</tt> containing the size. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="getFoAttrMapSize">getFoAttrMapSize</span>() { - <span class="keyword">return</span> foAttrMap.size(); - } - - <span class="comment">/** - * Get the size of the <i></span><span class="jde-java-font-lock-italic">nSpaceAttrMaps</span><span class="comment"></i> <tt>ArrayList</tt> - * containing attribute namespaces active in this set of attributes. - * <i></span><span class="jde-java-font-lock-italic">N.B.</span><span class="comment"></i> this may be zero if only the default attribute - * namespace has been seen in the attribute set. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> an <tt>int</tt> containing the size. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="getNSpaceAttrMapsSize">getNSpaceAttrMapsSize</span>() { - <span class="keyword">if</span> (nSpaceAttrMaps == <span class="jde-java-font-lock-constant">null</span>) - <span class="keyword">return</span> <span class="jde-java-font-lock-number">0</span>; - <span class="keyword">return</span> nSpaceAttrMaps.size(); - } - - <span class="comment">/** - * Merge attributes from another <tt>FOAttributes</tt> into <i></span><span class="jde-java-font-lock-italic">this</span><span class="comment"></i>. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="foAttrs">foAttrs</span><span class="comment"> the <tt>FOAttributes</tt> containing the attributes - * to merge. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">void</span> <span class="function-name" id="merge">merge</span>(<span class="type">FOAttributes</span> <span class="variable-name">foAttrs</span>) { - foAttrMap.putAll(foAttrs.getFoAttrMap()); - <span class="type">int</span> <span class="variable-name" id="attrLen">attrLen</span> = foAttrs.getNSpaceAttrMapsSize(); - <span class="keyword">if</span> (attrLen != <span class="jde-java-font-lock-number">0</span>) { - <span class="comment">// something to copy -</span> <span class="keyword">if</span> (nSpaceAttrMaps == <span class="jde-java-font-lock-constant">null</span>) { - <span class="comment">// no "foreign" attribute lists in this -</span> <span class="comment">// copy the others in -</span> nSpaceAttrMaps = <span class="keyword">new</span> <span class="type">ArrayList</span>(attrLen); - } - <span class="comment">// If the merging ArrayList of namespaces is larger, add the -</span> <span class="comment">// extra elements and initialise each to an empty HashMap -</span> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable-name">i</span> = nSpaceAttrMaps.size(); i < attrLen; i++) - nSpaceAttrMaps.add(<span class="keyword">new</span> <span class="type">HashMap</span>(<span class="jde-java-font-lock-number">0</span>)); - <span class="comment">// Except for foAttrs, which has already been merged, merge -</span> <span class="comment">// the entries from the merging foAttrs -</span> <span class="keyword">for</span> (<span class="type">int</span> <span class="variable-name">i</span> = <span class="jde-java-font-lock-number">0</span>; i < attrLen; i++) { - <span class="comment">// skip foAttrMap -</span> <span class="keyword">if</span> (i == <span class="reference">XMLNamespaces</span>.<span class="type">DefAttrNSIndex</span>) <span class="keyword">continue</span>; - ((<span class="type">HashMap</span>) nSpaceAttrMaps.get(i)) - .putAll(foAttrs.getAttrMap(i)); - } - } - } - -}<span class="comment">// FOAttributes -</span></pre> - </body> -</html> diff --git a/src/documentation/content/design/alt.design/properties/PropNames.html b/src/documentation/content/design/alt.design/properties/PropNames.html deleted file mode 100644 index 4947330a6..000000000 --- a/src/documentation/content/design/alt.design/properties/PropNames.html +++ /dev/null @@ -1,891 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- - Copyright 2001-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- $Id$ --> -<!-- Created by htmlize-0.67 in css mode. --> -<html> - <head> - <title>PropNames.java</title> - <style type="text/css"> - <!-- - body { - color: #000000; - background-color: #faf0e6; - } /* default */ - .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 */ - .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-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">/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */</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">util</span>.<span class="type">HashMap</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">Ints</span>; - -<span class="comment">/** - * A class of constants; an array of all property names and the constants - * by which to refer to them. - * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a> - */</span> - -<span class="jde-java-font-lock-modifier">public</span> <span class="keyword">class</span> <span class="function-name" id="PropNamesClass">PropNames</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="comment">/* - * List of property constants in property processing order - - * FONT, FONT_SIZE first - * Shorthands must precede any of their expansion elements. - * Compounds must precede any of their components. - * The list of property constants can be regenerated in XEmacs by setting - * the region on the list of constants. (C-Space at the beginning, - * move to last line, C-x C-x to exchange mark and point.) Then run - * a shell command on the region with replacement (M-1 M-|). Use - * the perl command: - * perl -p -e 'BEGIN{$n=0};$n++ if s/= [0-9]+,/= $n,/' - * Alternatively, start at a given point in the list by setting the - * appropriate start value for $n. - * - * in vi, set mark `</span><span class="jde-java-font-lock-doc-tag">a</span><span class="comment">' at the last line and - * !'aperl... etc - */</span> - <span class="comment">/** Constant for matching property defined in <i></span><span class="jde-java-font-lock-italic">XSLFO</span><span class="comment"></i>. */</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="jde-java-font-lock-constant" id="NO_PROPERTY">NO_PROPERTY</span> = <span class="jde-java-font-lock-number">0</span>, - <span class="comment">// Properties setting up environment for from-table-column(), -</span> <span class="comment">// e.g. font-size = from-table-column() -</span> <span class="jde-java-font-lock-constant" id="COLUMN_NUMBER">COLUMN_NUMBER</span> = <span class="jde-java-font-lock-number">1</span>, - <span class="jde-java-font-lock-constant" id="NUMBER_COLUMNS_SPANNED">NUMBER_COLUMNS_SPANNED</span> = <span class="jde-java-font-lock-number">2</span>, - <span class="comment">// Properties setting font-size first -</span> <span class="comment">// Shorthand first -</span> <span class="jde-java-font-lock-constant" id="FONT">FONT</span> = <span class="jde-java-font-lock-number">3</span>, - <span class="jde-java-font-lock-constant" id="FONT_SIZE">FONT_SIZE</span> = <span class="jde-java-font-lock-number">4</span>, - <span class="comment">// Writing mode early for handling of corresponding values -</span> <span class="jde-java-font-lock-constant" id="WRITING_MODE">WRITING_MODE</span> = <span class="jde-java-font-lock-number">5</span>, - <span class="comment">// All other shorthands -</span> <span class="jde-java-font-lock-constant" id="BACKGROUND">BACKGROUND</span> = <span class="jde-java-font-lock-number">6</span>, - <span class="jde-java-font-lock-constant" id="BACKGROUND_POSITION">BACKGROUND_POSITION</span> = <span class="jde-java-font-lock-number">7</span>, - <span class="jde-java-font-lock-constant" id="BORDER">BORDER</span> = <span class="jde-java-font-lock-number">8</span>, - <span class="jde-java-font-lock-constant" id="BORDER_COLOR">BORDER_COLOR</span> = <span class="jde-java-font-lock-number">9</span>, - <span class="jde-java-font-lock-constant" id="BORDER_STYLE">BORDER_STYLE</span> = <span class="jde-java-font-lock-number">10</span>, - <span class="jde-java-font-lock-constant" id="BORDER_WIDTH">BORDER_WIDTH</span> = <span class="jde-java-font-lock-number">11</span>, - <span class="jde-java-font-lock-constant" id="BORDER_BOTTOM">BORDER_BOTTOM</span> = <span class="jde-java-font-lock-number">12</span>, - <span class="jde-java-font-lock-constant" id="BORDER_LEFT">BORDER_LEFT</span> = <span class="jde-java-font-lock-number">13</span>, - <span class="jde-java-font-lock-constant" id="BORDER_RIGHT">BORDER_RIGHT</span> = <span class="jde-java-font-lock-number">14</span>, - <span class="jde-java-font-lock-constant" id="BORDER_TOP">BORDER_TOP</span> = <span class="jde-java-font-lock-number">15</span>, - <span class="jde-java-font-lock-constant" id="BORDER_SPACING">BORDER_SPACING</span> = <span class="jde-java-font-lock-number">16</span>, - <span class="jde-java-font-lock-constant" id="CUE">CUE</span> = <span class="jde-java-font-lock-number">17</span>, - <span class="jde-java-font-lock-constant" id="MARGIN">MARGIN</span> = <span class="jde-java-font-lock-number">18</span>, - <span class="jde-java-font-lock-constant" id="PADDING">PADDING</span> = <span class="jde-java-font-lock-number">19</span>, - <span class="jde-java-font-lock-constant" id="PAGE_BREAK_AFTER">PAGE_BREAK_AFTER</span> = <span class="jde-java-font-lock-number">20</span>, - <span class="jde-java-font-lock-constant" id="PAGE_BREAK_BEFORE">PAGE_BREAK_BEFORE</span> = <span class="jde-java-font-lock-number">21</span>, - <span class="jde-java-font-lock-constant" id="PAGE_BREAK_INSIDE">PAGE_BREAK_INSIDE</span> = <span class="jde-java-font-lock-number">22</span>, - <span class="jde-java-font-lock-constant" id="PAUSE">PAUSE</span> = <span class="jde-java-font-lock-number">23</span>, - <span class="jde-java-font-lock-constant" id="POSITION">POSITION</span> = <span class="jde-java-font-lock-number">24</span>, - <span class="jde-java-font-lock-constant" id="SIZE">SIZE</span> = <span class="jde-java-font-lock-number">25</span>, - <span class="jde-java-font-lock-constant" id="VERTICAL_ALIGN">VERTICAL_ALIGN</span> = <span class="jde-java-font-lock-number">26</span>, - <span class="jde-java-font-lock-constant" id="WHITE_SPACE">WHITE_SPACE</span> = <span class="jde-java-font-lock-number">27</span>, - <span class="jde-java-font-lock-constant" id="XML_LANG">XML_LANG</span> = <span class="jde-java-font-lock-number">28</span>, - <span class="comment">// Non-shorthand properties -</span> <span class="comment">// Within these, compounds precede their components -</span> <span class="comment">// and corresponding relative properties -</span> <span class="comment">// precede corresponding absolute properties -</span> <span class="jde-java-font-lock-constant" id="ABSOLUTE_POSITION">ABSOLUTE_POSITION</span> = <span class="jde-java-font-lock-number">29</span>, - <span class="jde-java-font-lock-constant" id="ACTIVE_STATE">ACTIVE_STATE</span> = <span class="jde-java-font-lock-number">30</span>, - <span class="jde-java-font-lock-constant" id="ALIGNMENT_ADJUST">ALIGNMENT_ADJUST</span> = <span class="jde-java-font-lock-number">31</span>, - <span class="jde-java-font-lock-constant" id="ALIGNMENT_BASELINE">ALIGNMENT_BASELINE</span> = <span class="jde-java-font-lock-number">32</span>, - <span class="jde-java-font-lock-constant" id="AUTO_RESTORE">AUTO_RESTORE</span> = <span class="jde-java-font-lock-number">33</span>, - <span class="jde-java-font-lock-constant" id="AZIMUTH">AZIMUTH</span> = <span class="jde-java-font-lock-number">34</span>, - <span class="jde-java-font-lock-constant" id="BACKGROUND_ATTACHMENT">BACKGROUND_ATTACHMENT</span> = <span class="jde-java-font-lock-number">35</span>, - <span class="jde-java-font-lock-constant" id="BACKGROUND_COLOR">BACKGROUND_COLOR</span> = <span class="jde-java-font-lock-number">36</span>, - <span class="jde-java-font-lock-constant" id="BACKGROUND_IMAGE">BACKGROUND_IMAGE</span> = <span class="jde-java-font-lock-number">37</span>, - <span class="jde-java-font-lock-constant" id="BACKGROUND_POSITION_HORIZONTAL">BACKGROUND_POSITION_HORIZONTAL</span> = <span class="jde-java-font-lock-number">38</span>, - <span class="jde-java-font-lock-constant" id="BACKGROUND_POSITION_VERTICAL">BACKGROUND_POSITION_VERTICAL</span> = <span class="jde-java-font-lock-number">39</span>, - <span class="jde-java-font-lock-constant" id="BACKGROUND_REPEAT">BACKGROUND_REPEAT</span> = <span class="jde-java-font-lock-number">40</span>, - <span class="jde-java-font-lock-constant" id="BASELINE_SHIFT">BASELINE_SHIFT</span> = <span class="jde-java-font-lock-number">41</span>, - <span class="jde-java-font-lock-constant" id="BLANK_OR_NOT_BLANK">BLANK_OR_NOT_BLANK</span> = <span class="jde-java-font-lock-number">42</span>, - <span class="jde-java-font-lock-constant" id="BLOCK_PROGRESSION_DIMENSION">BLOCK_PROGRESSION_DIMENSION</span> = <span class="jde-java-font-lock-number">43</span>, - <span class="jde-java-font-lock-constant" id="BLOCK_PROGRESSION_DIMENSION_MINIMUM">BLOCK_PROGRESSION_DIMENSION_MINIMUM</span> = <span class="jde-java-font-lock-number">44</span>, - <span class="jde-java-font-lock-constant" id="BLOCK_PROGRESSION_DIMENSION_OPTIMUM">BLOCK_PROGRESSION_DIMENSION_OPTIMUM</span> = <span class="jde-java-font-lock-number">45</span>, - <span class="jde-java-font-lock-constant" id="BLOCK_PROGRESSION_DIMENSION_MAXIMUM">BLOCK_PROGRESSION_DIMENSION_MAXIMUM</span> = <span class="jde-java-font-lock-number">46</span>, - - <span class="comment">// Border corresponding properties -</span> <span class="jde-java-font-lock-constant" id="BORDER_AFTER_COLOR">BORDER_AFTER_COLOR</span> = <span class="jde-java-font-lock-number">47</span>, - <span class="jde-java-font-lock-constant" id="BORDER_AFTER_PRECEDENCE">BORDER_AFTER_PRECEDENCE</span> = <span class="jde-java-font-lock-number">48</span>, - <span class="jde-java-font-lock-constant" id="BORDER_AFTER_STYLE">BORDER_AFTER_STYLE</span> = <span class="jde-java-font-lock-number">49</span>, - <span class="jde-java-font-lock-constant" id="BORDER_AFTER_WIDTH">BORDER_AFTER_WIDTH</span> = <span class="jde-java-font-lock-number">50</span>, - <span class="jde-java-font-lock-constant" id="BORDER_AFTER_WIDTH_LENGTH">BORDER_AFTER_WIDTH_LENGTH</span> = <span class="jde-java-font-lock-number">51</span>, - <span class="jde-java-font-lock-constant" id="BORDER_AFTER_WIDTH_CONDITIONALITY">BORDER_AFTER_WIDTH_CONDITIONALITY</span> = <span class="jde-java-font-lock-number">52</span>, - <span class="jde-java-font-lock-constant" id="BORDER_BEFORE_COLOR">BORDER_BEFORE_COLOR</span> = <span class="jde-java-font-lock-number">53</span>, - <span class="jde-java-font-lock-constant" id="BORDER_BEFORE_PRECEDENCE">BORDER_BEFORE_PRECEDENCE</span> = <span class="jde-java-font-lock-number">54</span>, - <span class="jde-java-font-lock-constant" id="BORDER_BEFORE_STYLE">BORDER_BEFORE_STYLE</span> = <span class="jde-java-font-lock-number">55</span>, - <span class="jde-java-font-lock-constant" id="BORDER_BEFORE_WIDTH">BORDER_BEFORE_WIDTH</span> = <span class="jde-java-font-lock-number">56</span>, - <span class="jde-java-font-lock-constant" id="BORDER_BEFORE_WIDTH_LENGTH">BORDER_BEFORE_WIDTH_LENGTH</span> = <span class="jde-java-font-lock-number">57</span>, - <span class="jde-java-font-lock-constant" id="BORDER_BEFORE_WIDTH_CONDITIONALITY">BORDER_BEFORE_WIDTH_CONDITIONALITY</span> = <span class="jde-java-font-lock-number">58</span>, - <span class="jde-java-font-lock-constant" id="BORDER_END_COLOR">BORDER_END_COLOR</span> = <span class="jde-java-font-lock-number">59</span>, - <span class="jde-java-font-lock-constant" id="BORDER_END_PRECEDENCE">BORDER_END_PRECEDENCE</span> = <span class="jde-java-font-lock-number">60</span>, - <span class="jde-java-font-lock-constant" id="BORDER_END_STYLE">BORDER_END_STYLE</span> = <span class="jde-java-font-lock-number">61</span>, - <span class="jde-java-font-lock-constant" id="BORDER_END_WIDTH">BORDER_END_WIDTH</span> = <span class="jde-java-font-lock-number">62</span>, - <span class="jde-java-font-lock-constant" id="BORDER_END_WIDTH_LENGTH">BORDER_END_WIDTH_LENGTH</span> = <span class="jde-java-font-lock-number">63</span>, - <span class="jde-java-font-lock-constant" id="BORDER_END_WIDTH_CONDITIONALITY">BORDER_END_WIDTH_CONDITIONALITY</span> = <span class="jde-java-font-lock-number">64</span>, - <span class="jde-java-font-lock-constant" id="BORDER_START_COLOR">BORDER_START_COLOR</span> = <span class="jde-java-font-lock-number">65</span>, - <span class="jde-java-font-lock-constant" id="BORDER_START_PRECEDENCE">BORDER_START_PRECEDENCE</span> = <span class="jde-java-font-lock-number">66</span>, - <span class="jde-java-font-lock-constant" id="BORDER_START_STYLE">BORDER_START_STYLE</span> = <span class="jde-java-font-lock-number">67</span>, - <span class="jde-java-font-lock-constant" id="BORDER_START_WIDTH">BORDER_START_WIDTH</span> = <span class="jde-java-font-lock-number">68</span>, - <span class="jde-java-font-lock-constant" id="BORDER_START_WIDTH_LENGTH">BORDER_START_WIDTH_LENGTH</span> = <span class="jde-java-font-lock-number">69</span>, - <span class="jde-java-font-lock-constant" id="BORDER_START_WIDTH_CONDITIONALITY">BORDER_START_WIDTH_CONDITIONALITY</span> = <span class="jde-java-font-lock-number">70</span>, - - <span class="jde-java-font-lock-constant" id="BORDER_BOTTOM_COLOR">BORDER_BOTTOM_COLOR</span> = <span class="jde-java-font-lock-number">71</span>, - <span class="jde-java-font-lock-constant" id="BORDER_BOTTOM_STYLE">BORDER_BOTTOM_STYLE</span> = <span class="jde-java-font-lock-number">72</span>, - <span class="jde-java-font-lock-constant" id="BORDER_BOTTOM_WIDTH">BORDER_BOTTOM_WIDTH</span> = <span class="jde-java-font-lock-number">73</span>, - <span class="jde-java-font-lock-constant" id="BORDER_LEFT_COLOR">BORDER_LEFT_COLOR</span> = <span class="jde-java-font-lock-number">74</span>, - <span class="jde-java-font-lock-constant" id="BORDER_LEFT_STYLE">BORDER_LEFT_STYLE</span> = <span class="jde-java-font-lock-number">75</span>, - <span class="jde-java-font-lock-constant" id="BORDER_LEFT_WIDTH">BORDER_LEFT_WIDTH</span> = <span class="jde-java-font-lock-number">76</span>, - <span class="jde-java-font-lock-constant" id="BORDER_RIGHT_COLOR">BORDER_RIGHT_COLOR</span> = <span class="jde-java-font-lock-number">77</span>, - <span class="jde-java-font-lock-constant" id="BORDER_RIGHT_STYLE">BORDER_RIGHT_STYLE</span> = <span class="jde-java-font-lock-number">78</span>, - <span class="jde-java-font-lock-constant" id="BORDER_RIGHT_WIDTH">BORDER_RIGHT_WIDTH</span> = <span class="jde-java-font-lock-number">79</span>, - <span class="jde-java-font-lock-constant" id="BORDER_TOP_COLOR">BORDER_TOP_COLOR</span> = <span class="jde-java-font-lock-number">80</span>, - <span class="jde-java-font-lock-constant" id="BORDER_TOP_STYLE">BORDER_TOP_STYLE</span> = <span class="jde-java-font-lock-number">81</span>, - <span class="jde-java-font-lock-constant" id="BORDER_TOP_WIDTH">BORDER_TOP_WIDTH</span> = <span class="jde-java-font-lock-number">82</span>, - - <span class="jde-java-font-lock-constant" id="BORDER_COLLAPSE">BORDER_COLLAPSE</span> = <span class="jde-java-font-lock-number">83</span>, - <span class="jde-java-font-lock-constant" id="BORDER_SEPARATION">BORDER_SEPARATION</span> = <span class="jde-java-font-lock-number">84</span>, - <span class="jde-java-font-lock-constant" id="BORDER_SEPARATION_BLOCK_PROGRESSION_DIRECTION">BORDER_SEPARATION_BLOCK_PROGRESSION_DIRECTION</span> = <span class="jde-java-font-lock-number">85</span>, - <span class="jde-java-font-lock-constant" id="BORDER_SEPARATION_INLINE_PROGRESSION_DIRECTION">BORDER_SEPARATION_INLINE_PROGRESSION_DIRECTION</span> = <span class="jde-java-font-lock-number">86</span>, - <span class="jde-java-font-lock-constant" id="BOTTOM">BOTTOM</span> = <span class="jde-java-font-lock-number">87</span>, - <span class="jde-java-font-lock-constant" id="BREAK_AFTER">BREAK_AFTER</span> = <span class="jde-java-font-lock-number">88</span>, - <span class="jde-java-font-lock-constant" id="BREAK_BEFORE">BREAK_BEFORE</span> = <span class="jde-java-font-lock-number">89</span>, - <span class="jde-java-font-lock-constant" id="CAPTION_SIDE">CAPTION_SIDE</span> = <span class="jde-java-font-lock-number">90</span>, - <span class="jde-java-font-lock-constant" id="CASE_NAME">CASE_NAME</span> = <span class="jde-java-font-lock-number">91</span>, - <span class="jde-java-font-lock-constant" id="CASE_TITLE">CASE_TITLE</span> = <span class="jde-java-font-lock-number">92</span>, - <span class="jde-java-font-lock-constant" id="CHARACTER">CHARACTER</span> = <span class="jde-java-font-lock-number">93</span>, - <span class="jde-java-font-lock-constant" id="CLEAR">CLEAR</span> = <span class="jde-java-font-lock-number">94</span>, - <span class="jde-java-font-lock-constant" id="CLIP">CLIP</span> = <span class="jde-java-font-lock-number">95</span>, - <span class="jde-java-font-lock-constant" id="COLOR">COLOR</span> = <span class="jde-java-font-lock-number">96</span>, - <span class="jde-java-font-lock-constant" id="COLOR_PROFILE_NAME">COLOR_PROFILE_NAME</span> = <span class="jde-java-font-lock-number">97</span>, - <span class="jde-java-font-lock-constant" id="COLUMN_COUNT">COLUMN_COUNT</span> = <span class="jde-java-font-lock-number">98</span>, - <span class="jde-java-font-lock-constant" id="COLUMN_GAP">COLUMN_GAP</span> = <span class="jde-java-font-lock-number">99</span>, - <span class="jde-java-font-lock-constant" id="COLUMN_WIDTH">COLUMN_WIDTH</span> = <span class="jde-java-font-lock-number">100</span>, - <span class="jde-java-font-lock-constant" id="CONTENT_HEIGHT">CONTENT_HEIGHT</span> = <span class="jde-java-font-lock-number">101</span>, - <span class="jde-java-font-lock-constant" id="CONTENT_TYPE">CONTENT_TYPE</span> = <span class="jde-java-font-lock-number">102</span>, - <span class="jde-java-font-lock-constant" id="CONTENT_WIDTH">CONTENT_WIDTH</span> = <span class="jde-java-font-lock-number">103</span>, - <span class="jde-java-font-lock-constant" id="COUNTRY">COUNTRY</span> = <span class="jde-java-font-lock-number">104</span>, - <span class="jde-java-font-lock-constant" id="CUE_AFTER">CUE_AFTER</span> = <span class="jde-java-font-lock-number">105</span>, - <span class="jde-java-font-lock-constant" id="CUE_BEFORE">CUE_BEFORE</span> = <span class="jde-java-font-lock-number">106</span>, - <span class="jde-java-font-lock-constant" id="DESTINATION_PLACEMENT_OFFSET">DESTINATION_PLACEMENT_OFFSET</span> = <span class="jde-java-font-lock-number">107</span>, - <span class="jde-java-font-lock-constant" id="DIRECTION">DIRECTION</span> = <span class="jde-java-font-lock-number">108</span>, - <span class="jde-java-font-lock-constant" id="DISPLAY_ALIGN">DISPLAY_ALIGN</span> = <span class="jde-java-font-lock-number">109</span>, - <span class="jde-java-font-lock-constant" id="DOMINANT_BASELINE">DOMINANT_BASELINE</span> = <span class="jde-java-font-lock-number">110</span>, - <span class="jde-java-font-lock-constant" id="ELEVATION">ELEVATION</span> = <span class="jde-java-font-lock-number">111</span>, - <span class="jde-java-font-lock-constant" id="EMPTY_CELLS">EMPTY_CELLS</span> = <span class="jde-java-font-lock-number">112</span>, - <span class="jde-java-font-lock-constant" id="END_INDENT">END_INDENT</span> = <span class="jde-java-font-lock-number">113</span>, - <span class="jde-java-font-lock-constant" id="ENDS_ROW">ENDS_ROW</span> = <span class="jde-java-font-lock-number">114</span>, - <span class="jde-java-font-lock-constant" id="EXTENT">EXTENT</span> = <span class="jde-java-font-lock-number">115</span>, - <span class="jde-java-font-lock-constant" id="EXTERNAL_DESTINATION">EXTERNAL_DESTINATION</span> = <span class="jde-java-font-lock-number">116</span>, - <span class="jde-java-font-lock-constant" id="FLOAT">FLOAT</span> = <span class="jde-java-font-lock-number">117</span>, - <span class="jde-java-font-lock-constant" id="FLOW_NAME">FLOW_NAME</span> = <span class="jde-java-font-lock-number">118</span>, - <span class="jde-java-font-lock-constant" id="FONT_FAMILY">FONT_FAMILY</span> = <span class="jde-java-font-lock-number">119</span>, - <span class="jde-java-font-lock-constant" id="FONT_SELECTION_STRATEGY">FONT_SELECTION_STRATEGY</span> = <span class="jde-java-font-lock-number">120</span>, - <span class="jde-java-font-lock-constant" id="FONT_SIZE_ADJUST">FONT_SIZE_ADJUST</span> = <span class="jde-java-font-lock-number">121</span>, - <span class="jde-java-font-lock-constant" id="FONT_STRETCH">FONT_STRETCH</span> = <span class="jde-java-font-lock-number">122</span>, - <span class="jde-java-font-lock-constant" id="FONT_STYLE">FONT_STYLE</span> = <span class="jde-java-font-lock-number">123</span>, - <span class="jde-java-font-lock-constant" id="FONT_VARIANT">FONT_VARIANT</span> = <span class="jde-java-font-lock-number">124</span>, - <span class="jde-java-font-lock-constant" id="FONT_WEIGHT">FONT_WEIGHT</span> = <span class="jde-java-font-lock-number">125</span>, - <span class="jde-java-font-lock-constant" id="FORCE_PAGE_COUNT">FORCE_PAGE_COUNT</span> = <span class="jde-java-font-lock-number">126</span>, - <span class="jde-java-font-lock-constant" id="FORMAT">FORMAT</span> = <span class="jde-java-font-lock-number">127</span>, - <span class="jde-java-font-lock-constant" id="GLYPH_ORIENTATION_HORIZONTAL">GLYPH_ORIENTATION_HORIZONTAL</span> = <span class="jde-java-font-lock-number">128</span>, - <span class="jde-java-font-lock-constant" id="GLYPH_ORIENTATION_VERTICAL">GLYPH_ORIENTATION_VERTICAL</span> = <span class="jde-java-font-lock-number">129</span>, - <span class="jde-java-font-lock-constant" id="GROUPING_SEPARATOR">GROUPING_SEPARATOR</span> = <span class="jde-java-font-lock-number">130</span>, - <span class="jde-java-font-lock-constant" id="GROUPING_SIZE">GROUPING_SIZE</span> = <span class="jde-java-font-lock-number">131</span>, - <span class="jde-java-font-lock-constant" id="HEIGHT">HEIGHT</span> = <span class="jde-java-font-lock-number">132</span>, - <span class="jde-java-font-lock-constant" id="HYPHENATE">HYPHENATE</span> = <span class="jde-java-font-lock-number">133</span>, - <span class="jde-java-font-lock-constant" id="HYPHENATION_CHARACTER">HYPHENATION_CHARACTER</span> = <span class="jde-java-font-lock-number">134</span>, - <span class="jde-java-font-lock-constant" id="HYPHENATION_KEEP">HYPHENATION_KEEP</span> = <span class="jde-java-font-lock-number">135</span>, - <span class="jde-java-font-lock-constant" id="HYPHENATION_LADDER_COUNT">HYPHENATION_LADDER_COUNT</span> = <span class="jde-java-font-lock-number">136</span>, - <span class="jde-java-font-lock-constant" id="HYPHENATION_PUSH_CHARACTER_COUNT">HYPHENATION_PUSH_CHARACTER_COUNT</span> = <span class="jde-java-font-lock-number">137</span>, - <span class="jde-java-font-lock-constant" id="HYPHENATION_REMAIN_CHARACTER_COUNT">HYPHENATION_REMAIN_CHARACTER_COUNT</span> = <span class="jde-java-font-lock-number">138</span>, - <span class="jde-java-font-lock-constant" id="ID">ID</span> = <span class="jde-java-font-lock-number">139</span>, - <span class="jde-java-font-lock-constant" id="INDICATE_DESTINATION">INDICATE_DESTINATION</span> = <span class="jde-java-font-lock-number">140</span>, - <span class="jde-java-font-lock-constant" id="INITIAL_PAGE_NUMBER">INITIAL_PAGE_NUMBER</span> = <span class="jde-java-font-lock-number">141</span>, - <span class="jde-java-font-lock-constant" id="INLINE_PROGRESSION_DIMENSION">INLINE_PROGRESSION_DIMENSION</span> = <span class="jde-java-font-lock-number">142</span>, - <span class="jde-java-font-lock-constant" id="INLINE_PROGRESSION_DIMENSION_MINIMUM">INLINE_PROGRESSION_DIMENSION_MINIMUM</span> = <span class="jde-java-font-lock-number">143</span>, - <span class="jde-java-font-lock-constant" id="INLINE_PROGRESSION_DIMENSION_OPTIMUM">INLINE_PROGRESSION_DIMENSION_OPTIMUM</span> = <span class="jde-java-font-lock-number">144</span>, - <span class="jde-java-font-lock-constant" id="INLINE_PROGRESSION_DIMENSION_MAXIMUM">INLINE_PROGRESSION_DIMENSION_MAXIMUM</span> = <span class="jde-java-font-lock-number">145</span>, - <span class="jde-java-font-lock-constant" id="INTERNAL_DESTINATION">INTERNAL_DESTINATION</span> = <span class="jde-java-font-lock-number">146</span>, - <span class="jde-java-font-lock-constant" id="INTRUSION_DISPLACE">INTRUSION_DISPLACE</span> = <span class="jde-java-font-lock-number">147</span>, - <span class="jde-java-font-lock-constant" id="KEEP_TOGETHER">KEEP_TOGETHER</span> = <span class="jde-java-font-lock-number">148</span>, - <span class="jde-java-font-lock-constant" id="KEEP_TOGETHER_WITHIN_LINE">KEEP_TOGETHER_WITHIN_LINE</span> = <span class="jde-java-font-lock-number">149</span>, - <span class="jde-java-font-lock-constant" id="KEEP_TOGETHER_WITHIN_PAGE">KEEP_TOGETHER_WITHIN_PAGE</span> = <span class="jde-java-font-lock-number">150</span>, - <span class="jde-java-font-lock-constant" id="KEEP_TOGETHER_WITHIN_COLUMN">KEEP_TOGETHER_WITHIN_COLUMN</span> = <span class="jde-java-font-lock-number">151</span>, - <span class="jde-java-font-lock-constant" id="KEEP_WITH_NEXT">KEEP_WITH_NEXT</span> = <span class="jde-java-font-lock-number">152</span>, - <span class="jde-java-font-lock-constant" id="KEEP_WITH_NEXT_WITHIN_LINE">KEEP_WITH_NEXT_WITHIN_LINE</span> = <span class="jde-java-font-lock-number">153</span>, - <span class="jde-java-font-lock-constant" id="KEEP_WITH_NEXT_WITHIN_PAGE">KEEP_WITH_NEXT_WITHIN_PAGE</span> = <span class="jde-java-font-lock-number">154</span>, - <span class="jde-java-font-lock-constant" id="KEEP_WITH_NEXT_WITHIN_COLUMN">KEEP_WITH_NEXT_WITHIN_COLUMN</span> = <span class="jde-java-font-lock-number">155</span>, - <span class="jde-java-font-lock-constant" id="KEEP_WITH_PREVIOUS">KEEP_WITH_PREVIOUS</span> = <span class="jde-java-font-lock-number">156</span>, - <span class="jde-java-font-lock-constant" id="KEEP_WITH_PREVIOUS_WITHIN_LINE">KEEP_WITH_PREVIOUS_WITHIN_LINE</span> = <span class="jde-java-font-lock-number">157</span>, - <span class="jde-java-font-lock-constant" id="KEEP_WITH_PREVIOUS_WITHIN_PAGE">KEEP_WITH_PREVIOUS_WITHIN_PAGE</span> = <span class="jde-java-font-lock-number">158</span>, - <span class="jde-java-font-lock-constant" id="KEEP_WITH_PREVIOUS_WITHIN_COLUMN">KEEP_WITH_PREVIOUS_WITHIN_COLUMN</span> = <span class="jde-java-font-lock-number">159</span>, - <span class="jde-java-font-lock-constant" id="LANGUAGE">LANGUAGE</span> = <span class="jde-java-font-lock-number">160</span>, - <span class="jde-java-font-lock-constant" id="LAST_LINE_END_INDENT">LAST_LINE_END_INDENT</span> = <span class="jde-java-font-lock-number">161</span>, - <span class="jde-java-font-lock-constant" id="LEADER_ALIGNMENT">LEADER_ALIGNMENT</span> = <span class="jde-java-font-lock-number">162</span>, - <span class="jde-java-font-lock-constant" id="LEADER_LENGTH">LEADER_LENGTH</span> = <span class="jde-java-font-lock-number">163</span>, - <span class="jde-java-font-lock-constant" id="LEADER_LENGTH_MINIMUM">LEADER_LENGTH_MINIMUM</span> = <span class="jde-java-font-lock-number">164</span>, - <span class="jde-java-font-lock-constant" id="LEADER_LENGTH_OPTIMUM">LEADER_LENGTH_OPTIMUM</span> = <span class="jde-java-font-lock-number">165</span>, - <span class="jde-java-font-lock-constant" id="LEADER_LENGTH_MAXIMUM">LEADER_LENGTH_MAXIMUM</span> = <span class="jde-java-font-lock-number">166</span>, - <span class="jde-java-font-lock-constant" id="LEADER_PATTERN">LEADER_PATTERN</span> = <span class="jde-java-font-lock-number">167</span>, - <span class="jde-java-font-lock-constant" id="LEADER_PATTERN_WIDTH">LEADER_PATTERN_WIDTH</span> = <span class="jde-java-font-lock-number">168</span>, - <span class="jde-java-font-lock-constant" id="LEFT">LEFT</span> = <span class="jde-java-font-lock-number">169</span>, - <span class="jde-java-font-lock-constant" id="LETTER_SPACING">LETTER_SPACING</span> = <span class="jde-java-font-lock-number">170</span>, - <span class="jde-java-font-lock-constant" id="LETTER_SPACING_MINIMUM">LETTER_SPACING_MINIMUM</span> = <span class="jde-java-font-lock-number">171</span>, - <span class="jde-java-font-lock-constant" id="LETTER_SPACING_OPTIMUM">LETTER_SPACING_OPTIMUM</span> = <span class="jde-java-font-lock-number">172</span>, - <span class="jde-java-font-lock-constant" id="LETTER_SPACING_MAXIMUM">LETTER_SPACING_MAXIMUM</span> = <span class="jde-java-font-lock-number">173</span>, - <span class="jde-java-font-lock-constant" id="LETTER_SPACING_CONDITIONALITY">LETTER_SPACING_CONDITIONALITY</span> = <span class="jde-java-font-lock-number">174</span>, - <span class="jde-java-font-lock-constant" id="LETTER_SPACING_PRECEDENCE">LETTER_SPACING_PRECEDENCE</span> = <span class="jde-java-font-lock-number">175</span>, - <span class="jde-java-font-lock-constant" id="LETTER_VALUE">LETTER_VALUE</span> = <span class="jde-java-font-lock-number">176</span>, - <span class="jde-java-font-lock-constant" id="LINEFEED_TREATMENT">LINEFEED_TREATMENT</span> = <span class="jde-java-font-lock-number">177</span>, - <span class="jde-java-font-lock-constant" id="LINE_HEIGHT">LINE_HEIGHT</span> = <span class="jde-java-font-lock-number">178</span>, - <span class="jde-java-font-lock-constant" id="LINE_HEIGHT_MINIMUM">LINE_HEIGHT_MINIMUM</span> = <span class="jde-java-font-lock-number">179</span>, - <span class="jde-java-font-lock-constant" id="LINE_HEIGHT_OPTIMUM">LINE_HEIGHT_OPTIMUM</span> = <span class="jde-java-font-lock-number">180</span>, - <span class="jde-java-font-lock-constant" id="LINE_HEIGHT_MAXIMUM">LINE_HEIGHT_MAXIMUM</span> = <span class="jde-java-font-lock-number">181</span>, - <span class="jde-java-font-lock-constant" id="LINE_HEIGHT_CONDITIONALITY">LINE_HEIGHT_CONDITIONALITY</span> = <span class="jde-java-font-lock-number">182</span>, - <span class="jde-java-font-lock-constant" id="LINE_HEIGHT_PRECEDENCE">LINE_HEIGHT_PRECEDENCE</span> = <span class="jde-java-font-lock-number">183</span>, - <span class="jde-java-font-lock-constant" id="LINE_HEIGHT_SHIFT_ADJUSTMENT">LINE_HEIGHT_SHIFT_ADJUSTMENT</span> = <span class="jde-java-font-lock-number">184</span>, - <span class="jde-java-font-lock-constant" id="LINE_STACKING_STRATEGY">LINE_STACKING_STRATEGY</span> = <span class="jde-java-font-lock-number">185</span>, - - <span class="jde-java-font-lock-constant" id="MARKER_CLASS_NAME">MARKER_CLASS_NAME</span> = <span class="jde-java-font-lock-number">186</span>, - <span class="jde-java-font-lock-constant" id="MASTER_NAME">MASTER_NAME</span> = <span class="jde-java-font-lock-number">187</span>, - <span class="jde-java-font-lock-constant" id="MASTER_REFERENCE">MASTER_REFERENCE</span> = <span class="jde-java-font-lock-number">188</span>, - <span class="jde-java-font-lock-constant" id="MAX_HEIGHT">MAX_HEIGHT</span> = <span class="jde-java-font-lock-number">189</span>, - <span class="jde-java-font-lock-constant" id="MAXIMUM_REPEATS">MAXIMUM_REPEATS</span> = <span class="jde-java-font-lock-number">190</span>, - <span class="jde-java-font-lock-constant" id="MAX_WIDTH">MAX_WIDTH</span> = <span class="jde-java-font-lock-number">191</span>, - <span class="jde-java-font-lock-constant" id="MEDIA_USAGE">MEDIA_USAGE</span> = <span class="jde-java-font-lock-number">192</span>, - <span class="jde-java-font-lock-constant" id="MIN_HEIGHT">MIN_HEIGHT</span> = <span class="jde-java-font-lock-number">193</span>, - <span class="jde-java-font-lock-constant" id="MIN_WIDTH">MIN_WIDTH</span> = <span class="jde-java-font-lock-number">194</span>, - <span class="jde-java-font-lock-constant" id="NUMBER_COLUMNS_REPEATED">NUMBER_COLUMNS_REPEATED</span> = <span class="jde-java-font-lock-number">195</span>, - <span class="jde-java-font-lock-constant" id="NUMBER_ROWS_SPANNED">NUMBER_ROWS_SPANNED</span> = <span class="jde-java-font-lock-number">196</span>, - <span class="jde-java-font-lock-constant" id="ODD_OR_EVEN">ODD_OR_EVEN</span> = <span class="jde-java-font-lock-number">197</span>, - <span class="jde-java-font-lock-constant" id="ORPHANS">ORPHANS</span> = <span class="jde-java-font-lock-number">198</span>, - <span class="jde-java-font-lock-constant" id="OVERFLOW">OVERFLOW</span> = <span class="jde-java-font-lock-number">199</span>, - - <span class="comment">// Padding corresponding properties -</span> <span class="jde-java-font-lock-constant" id="PADDING_AFTER">PADDING_AFTER</span> = <span class="jde-java-font-lock-number">200</span>, - <span class="jde-java-font-lock-constant" id="PADDING_AFTER_LENGTH">PADDING_AFTER_LENGTH</span> = <span class="jde-java-font-lock-number">201</span>, - <span class="jde-java-font-lock-constant" id="PADDING_AFTER_CONDITIONALITY">PADDING_AFTER_CONDITIONALITY</span> = <span class="jde-java-font-lock-number">202</span>, - <span class="jde-java-font-lock-constant" id="PADDING_BEFORE">PADDING_BEFORE</span> = <span class="jde-java-font-lock-number">203</span>, - <span class="jde-java-font-lock-constant" id="PADDING_BEFORE_LENGTH">PADDING_BEFORE_LENGTH</span> = <span class="jde-java-font-lock-number">204</span>, - <span class="jde-java-font-lock-constant" id="PADDING_BEFORE_CONDITIONALITY">PADDING_BEFORE_CONDITIONALITY</span> = <span class="jde-java-font-lock-number">205</span>, - <span class="jde-java-font-lock-constant" id="PADDING_END">PADDING_END</span> = <span class="jde-java-font-lock-number">206</span>, - <span class="jde-java-font-lock-constant" id="PADDING_END_LENGTH">PADDING_END_LENGTH</span> = <span class="jde-java-font-lock-number">207</span>, - <span class="jde-java-font-lock-constant" id="PADDING_END_CONDITIONALITY">PADDING_END_CONDITIONALITY</span> = <span class="jde-java-font-lock-number">208</span>, - <span class="jde-java-font-lock-constant" id="PADDING_START">PADDING_START</span> = <span class="jde-java-font-lock-number">209</span>, - <span class="jde-java-font-lock-constant" id="PADDING_START_LENGTH">PADDING_START_LENGTH</span> = <span class="jde-java-font-lock-number">210</span>, - <span class="jde-java-font-lock-constant" id="PADDING_START_CONDITIONALITY">PADDING_START_CONDITIONALITY</span> = <span class="jde-java-font-lock-number">211</span>, - - <span class="jde-java-font-lock-constant" id="PADDING_BOTTOM">PADDING_BOTTOM</span> = <span class="jde-java-font-lock-number">212</span>, - <span class="jde-java-font-lock-constant" id="PADDING_LEFT">PADDING_LEFT</span> = <span class="jde-java-font-lock-number">213</span>, - <span class="jde-java-font-lock-constant" id="PADDING_RIGHT">PADDING_RIGHT</span> = <span class="jde-java-font-lock-number">214</span>, - <span class="jde-java-font-lock-constant" id="PADDING_TOP">PADDING_TOP</span> = <span class="jde-java-font-lock-number">215</span>, - - <span class="jde-java-font-lock-constant" id="PAGE_HEIGHT">PAGE_HEIGHT</span> = <span class="jde-java-font-lock-number">216</span>, - <span class="jde-java-font-lock-constant" id="PAGE_POSITION">PAGE_POSITION</span> = <span class="jde-java-font-lock-number">217</span>, - <span class="jde-java-font-lock-constant" id="PAGE_WIDTH">PAGE_WIDTH</span> = <span class="jde-java-font-lock-number">218</span>, - <span class="jde-java-font-lock-constant" id="PAUSE_AFTER">PAUSE_AFTER</span> = <span class="jde-java-font-lock-number">219</span>, - <span class="jde-java-font-lock-constant" id="PAUSE_BEFORE">PAUSE_BEFORE</span> = <span class="jde-java-font-lock-number">220</span>, - <span class="jde-java-font-lock-constant" id="PITCH">PITCH</span> = <span class="jde-java-font-lock-number">221</span>, - <span class="jde-java-font-lock-constant" id="PITCH_RANGE">PITCH_RANGE</span> = <span class="jde-java-font-lock-number">222</span>, - <span class="jde-java-font-lock-constant" id="PLAY_DURING">PLAY_DURING</span> = <span class="jde-java-font-lock-number">223</span>, - <span class="jde-java-font-lock-constant" id="PRECEDENCE">PRECEDENCE</span> = <span class="jde-java-font-lock-number">224</span>, - <span class="jde-java-font-lock-constant" id="PROVISIONAL_DISTANCE_BETWEEN_STARTS">PROVISIONAL_DISTANCE_BETWEEN_STARTS</span> = <span class="jde-java-font-lock-number">225</span>, - <span class="jde-java-font-lock-constant" id="PROVISIONAL_LABEL_SEPARATION">PROVISIONAL_LABEL_SEPARATION</span> = <span class="jde-java-font-lock-number">226</span>, - <span class="jde-java-font-lock-constant" id="REFERENCE_ORIENTATION">REFERENCE_ORIENTATION</span> = <span class="jde-java-font-lock-number">227</span>, - <span class="jde-java-font-lock-constant" id="REF_ID">REF_ID</span> = <span class="jde-java-font-lock-number">228</span>, - <span class="jde-java-font-lock-constant" id="REGION_NAME">REGION_NAME</span> = <span class="jde-java-font-lock-number">229</span>, - <span class="jde-java-font-lock-constant" id="RELATIVE_ALIGN">RELATIVE_ALIGN</span> = <span class="jde-java-font-lock-number">230</span>, - <span class="jde-java-font-lock-constant" id="RELATIVE_POSITION">RELATIVE_POSITION</span> = <span class="jde-java-font-lock-number">231</span>, - <span class="jde-java-font-lock-constant" id="RENDERING_INTENT">RENDERING_INTENT</span> = <span class="jde-java-font-lock-number">232</span>, - <span class="jde-java-font-lock-constant" id="RETRIEVE_BOUNDARY">RETRIEVE_BOUNDARY</span> = <span class="jde-java-font-lock-number">233</span>, - <span class="jde-java-font-lock-constant" id="RETRIEVE_CLASS_NAME">RETRIEVE_CLASS_NAME</span> = <span class="jde-java-font-lock-number">234</span>, - <span class="jde-java-font-lock-constant" id="RETRIEVE_POSITION">RETRIEVE_POSITION</span> = <span class="jde-java-font-lock-number">235</span>, - <span class="jde-java-font-lock-constant" id="RICHNESS">RICHNESS</span> = <span class="jde-java-font-lock-number">236</span>, - <span class="jde-java-font-lock-constant" id="RIGHT">RIGHT</span> = <span class="jde-java-font-lock-number">237</span>, - <span class="jde-java-font-lock-constant" id="ROLE">ROLE</span> = <span class="jde-java-font-lock-number">238</span>, - <span class="jde-java-font-lock-constant" id="RULE_STYLE">RULE_STYLE</span> = <span class="jde-java-font-lock-number">239</span>, - <span class="jde-java-font-lock-constant" id="RULE_THICKNESS">RULE_THICKNESS</span> = <span class="jde-java-font-lock-number">240</span>, - <span class="jde-java-font-lock-constant" id="SCALING">SCALING</span> = <span class="jde-java-font-lock-number">241</span>, - <span class="jde-java-font-lock-constant" id="SCALING_METHOD">SCALING_METHOD</span> = <span class="jde-java-font-lock-number">242</span>, - <span class="jde-java-font-lock-constant" id="SCORE_SPACES">SCORE_SPACES</span> = <span class="jde-java-font-lock-number">243</span>, - <span class="jde-java-font-lock-constant" id="SCRIPT">SCRIPT</span> = <span class="jde-java-font-lock-number">244</span>, - <span class="jde-java-font-lock-constant" id="SHOW_DESTINATION">SHOW_DESTINATION</span> = <span class="jde-java-font-lock-number">245</span>, - <span class="jde-java-font-lock-constant" id="SOURCE_DOCUMENT">SOURCE_DOCUMENT</span> = <span class="jde-java-font-lock-number">246</span>, - - <span class="comment">// Space/margin corresponding properties -</span> <span class="jde-java-font-lock-constant" id="SPACE_AFTER">SPACE_AFTER</span> = <span class="jde-java-font-lock-number">247</span>, - <span class="jde-java-font-lock-constant" id="SPACE_AFTER_MINIMUM">SPACE_AFTER_MINIMUM</span> = <span class="jde-java-font-lock-number">248</span>, - <span class="jde-java-font-lock-constant" id="SPACE_AFTER_OPTIMUM">SPACE_AFTER_OPTIMUM</span> = <span class="jde-java-font-lock-number">249</span>, - <span class="jde-java-font-lock-constant" id="SPACE_AFTER_MAXIMUM">SPACE_AFTER_MAXIMUM</span> = <span class="jde-java-font-lock-number">250</span>, - <span class="jde-java-font-lock-constant" id="SPACE_AFTER_CONDITIONALITY">SPACE_AFTER_CONDITIONALITY</span> = <span class="jde-java-font-lock-number">251</span>, - <span class="jde-java-font-lock-constant" id="SPACE_AFTER_PRECEDENCE">SPACE_AFTER_PRECEDENCE</span> = <span class="jde-java-font-lock-number">252</span>, - <span class="jde-java-font-lock-constant" id="SPACE_BEFORE">SPACE_BEFORE</span> = <span class="jde-java-font-lock-number">253</span>, - <span class="jde-java-font-lock-constant" id="SPACE_BEFORE_MINIMUM">SPACE_BEFORE_MINIMUM</span> = <span class="jde-java-font-lock-number">254</span>, - <span class="jde-java-font-lock-constant" id="SPACE_BEFORE_OPTIMUM">SPACE_BEFORE_OPTIMUM</span> = <span class="jde-java-font-lock-number">255</span>, - <span class="jde-java-font-lock-constant" id="SPACE_BEFORE_MAXIMUM">SPACE_BEFORE_MAXIMUM</span> = <span class="jde-java-font-lock-number">256</span>, - <span class="jde-java-font-lock-constant" id="SPACE_BEFORE_CONDITIONALITY">SPACE_BEFORE_CONDITIONALITY</span> = <span class="jde-java-font-lock-number">257</span>, - <span class="jde-java-font-lock-constant" id="SPACE_BEFORE_PRECEDENCE">SPACE_BEFORE_PRECEDENCE</span> = <span class="jde-java-font-lock-number">258</span>, - <span class="jde-java-font-lock-constant" id="SPACE_END">SPACE_END</span> = <span class="jde-java-font-lock-number">259</span>, - <span class="jde-java-font-lock-constant" id="SPACE_END_MINIMUM">SPACE_END_MINIMUM</span> = <span class="jde-java-font-lock-number">260</span>, - <span class="jde-java-font-lock-constant" id="SPACE_END_OPTIMUM">SPACE_END_OPTIMUM</span> = <span class="jde-java-font-lock-number">261</span>, - <span class="jde-java-font-lock-constant" id="SPACE_END_MAXIMUM">SPACE_END_MAXIMUM</span> = <span class="jde-java-font-lock-number">262</span>, - <span class="jde-java-font-lock-constant" id="SPACE_END_CONDITIONALITY">SPACE_END_CONDITIONALITY</span> = <span class="jde-java-font-lock-number">263</span>, - <span class="jde-java-font-lock-constant" id="SPACE_END_PRECEDENCE">SPACE_END_PRECEDENCE</span> = <span class="jde-java-font-lock-number">264</span>, - <span class="jde-java-font-lock-constant" id="SPACE_START">SPACE_START</span> = <span class="jde-java-font-lock-number">265</span>, - <span class="jde-java-font-lock-constant" id="SPACE_START_MINIMUM">SPACE_START_MINIMUM</span> = <span class="jde-java-font-lock-number">266</span>, - <span class="jde-java-font-lock-constant" id="SPACE_START_OPTIMUM">SPACE_START_OPTIMUM</span> = <span class="jde-java-font-lock-number">267</span>, - <span class="jde-java-font-lock-constant" id="SPACE_START_MAXIMUM">SPACE_START_MAXIMUM</span> = <span class="jde-java-font-lock-number">268</span>, - <span class="jde-java-font-lock-constant" id="SPACE_START_CONDITIONALITY">SPACE_START_CONDITIONALITY</span> = <span class="jde-java-font-lock-number">269</span>, - <span class="jde-java-font-lock-constant" id="SPACE_START_PRECEDENCE">SPACE_START_PRECEDENCE</span> = <span class="jde-java-font-lock-number">270</span>, - - <span class="jde-java-font-lock-constant" id="MARGIN_BOTTOM">MARGIN_BOTTOM</span> = <span class="jde-java-font-lock-number">271</span>, - <span class="jde-java-font-lock-constant" id="MARGIN_LEFT">MARGIN_LEFT</span> = <span class="jde-java-font-lock-number">272</span>, - <span class="jde-java-font-lock-constant" id="MARGIN_RIGHT">MARGIN_RIGHT</span> = <span class="jde-java-font-lock-number">273</span>, - <span class="jde-java-font-lock-constant" id="MARGIN_TOP">MARGIN_TOP</span> = <span class="jde-java-font-lock-number">274</span>, - - <span class="jde-java-font-lock-constant" id="SPAN">SPAN</span> = <span class="jde-java-font-lock-number">275</span>, - <span class="jde-java-font-lock-constant" id="SPEAK">SPEAK</span> = <span class="jde-java-font-lock-number">276</span>, - <span class="jde-java-font-lock-constant" id="SPEAK_HEADER">SPEAK_HEADER</span> = <span class="jde-java-font-lock-number">277</span>, - <span class="jde-java-font-lock-constant" id="SPEAK_NUMERAL">SPEAK_NUMERAL</span> = <span class="jde-java-font-lock-number">278</span>, - <span class="jde-java-font-lock-constant" id="SPEAK_PUNCTUATION">SPEAK_PUNCTUATION</span> = <span class="jde-java-font-lock-number">279</span>, - <span class="jde-java-font-lock-constant" id="SPEECH_RATE">SPEECH_RATE</span> = <span class="jde-java-font-lock-number">280</span>, - <span class="jde-java-font-lock-constant" id="SRC">SRC</span> = <span class="jde-java-font-lock-number">281</span>, - <span class="jde-java-font-lock-constant" id="START_INDENT">START_INDENT</span> = <span class="jde-java-font-lock-number">282</span>, - <span class="jde-java-font-lock-constant" id="STARTING_STATE">STARTING_STATE</span> = <span class="jde-java-font-lock-number">283</span>, - <span class="jde-java-font-lock-constant" id="STARTS_ROW">STARTS_ROW</span> = <span class="jde-java-font-lock-number">284</span>, - <span class="jde-java-font-lock-constant" id="STRESS">STRESS</span> = <span class="jde-java-font-lock-number">285</span>, - <span class="jde-java-font-lock-constant" id="SUPPRESS_AT_LINE_BREAK">SUPPRESS_AT_LINE_BREAK</span> = <span class="jde-java-font-lock-number">286</span>, - <span class="jde-java-font-lock-constant" id="SWITCH_TO">SWITCH_TO</span> = <span class="jde-java-font-lock-number">287</span>, - <span class="jde-java-font-lock-constant" id="TABLE_LAYOUT">TABLE_LAYOUT</span> = <span class="jde-java-font-lock-number">288</span>, - <span class="jde-java-font-lock-constant" id="TABLE_OMIT_FOOTER_AT_BREAK">TABLE_OMIT_FOOTER_AT_BREAK</span> = <span class="jde-java-font-lock-number">289</span>, - <span class="jde-java-font-lock-constant" id="TABLE_OMIT_HEADER_AT_BREAK">TABLE_OMIT_HEADER_AT_BREAK</span> = <span class="jde-java-font-lock-number">290</span>, - <span class="jde-java-font-lock-constant" id="TARGET_PRESENTATION_CONTEXT">TARGET_PRESENTATION_CONTEXT</span> = <span class="jde-java-font-lock-number">291</span>, - <span class="jde-java-font-lock-constant" id="TARGET_PROCESSING_CONTEXT">TARGET_PROCESSING_CONTEXT</span> = <span class="jde-java-font-lock-number">292</span>, - <span class="jde-java-font-lock-constant" id="TARGET_STYLESHEET">TARGET_STYLESHEET</span> = <span class="jde-java-font-lock-number">293</span>, - <span class="jde-java-font-lock-constant" id="TEXT_ALIGN">TEXT_ALIGN</span> = <span class="jde-java-font-lock-number">294</span>, - <span class="jde-java-font-lock-constant" id="TEXT_ALIGN_LAST">TEXT_ALIGN_LAST</span> = <span class="jde-java-font-lock-number">295</span>, - <span class="jde-java-font-lock-constant" id="TEXT_ALTITUDE">TEXT_ALTITUDE</span> = <span class="jde-java-font-lock-number">296</span>, - <span class="jde-java-font-lock-constant" id="TEXT_DECORATION">TEXT_DECORATION</span> = <span class="jde-java-font-lock-number">297</span>, - <span class="jde-java-font-lock-constant" id="TEXT_DEPTH">TEXT_DEPTH</span> = <span class="jde-java-font-lock-number">298</span>, - <span class="jde-java-font-lock-constant" id="TEXT_INDENT">TEXT_INDENT</span> = <span class="jde-java-font-lock-number">299</span>, - <span class="jde-java-font-lock-constant" id="TEXT_SHADOW">TEXT_SHADOW</span> = <span class="jde-java-font-lock-number">300</span>, - <span class="jde-java-font-lock-constant" id="TEXT_TRANSFORM">TEXT_TRANSFORM</span> = <span class="jde-java-font-lock-number">301</span>, - <span class="jde-java-font-lock-constant" id="TOP">TOP</span> = <span class="jde-java-font-lock-number">302</span>, - <span class="jde-java-font-lock-constant" id="TREAT_AS_WORD_SPACE">TREAT_AS_WORD_SPACE</span> = <span class="jde-java-font-lock-number">303</span>, - <span class="jde-java-font-lock-constant" id="UNICODE_BIDI">UNICODE_BIDI</span> = <span class="jde-java-font-lock-number">304</span>, - <span class="jde-java-font-lock-constant" id="USAGE_CONTEXT_OF_SUPPRESS_AT_LINE_BREAK">USAGE_CONTEXT_OF_SUPPRESS_AT_LINE_BREAK</span> = <span class="jde-java-font-lock-number">305</span>, - <span class="jde-java-font-lock-constant" id="VISIBILITY">VISIBILITY</span> = <span class="jde-java-font-lock-number">306</span>, - <span class="jde-java-font-lock-constant" id="VOICE_FAMILY">VOICE_FAMILY</span> = <span class="jde-java-font-lock-number">307</span>, - <span class="jde-java-font-lock-constant" id="VOLUME">VOLUME</span> = <span class="jde-java-font-lock-number">308</span>, - <span class="jde-java-font-lock-constant" id="WHITE_SPACE_COLLAPSE">WHITE_SPACE_COLLAPSE</span> = <span class="jde-java-font-lock-number">309</span>, - <span class="jde-java-font-lock-constant" id="WHITE_SPACE_TREATMENT">WHITE_SPACE_TREATMENT</span> = <span class="jde-java-font-lock-number">310</span>, - <span class="jde-java-font-lock-constant" id="WIDOWS">WIDOWS</span> = <span class="jde-java-font-lock-number">311</span>, - <span class="jde-java-font-lock-constant" id="WIDTH">WIDTH</span> = <span class="jde-java-font-lock-number">312</span>, - <span class="jde-java-font-lock-constant" id="WORD_SPACING">WORD_SPACING</span> = <span class="jde-java-font-lock-number">313</span>, - <span class="jde-java-font-lock-constant" id="WORD_SPACING_MINIMUM">WORD_SPACING_MINIMUM</span> = <span class="jde-java-font-lock-number">314</span>, - <span class="jde-java-font-lock-constant" id="WORD_SPACING_OPTIMUM">WORD_SPACING_OPTIMUM</span> = <span class="jde-java-font-lock-number">315</span>, - <span class="jde-java-font-lock-constant" id="WORD_SPACING_MAXIMUM">WORD_SPACING_MAXIMUM</span> = <span class="jde-java-font-lock-number">316</span>, - <span class="jde-java-font-lock-constant" id="WORD_SPACING_CONDITIONALITY">WORD_SPACING_CONDITIONALITY</span> = <span class="jde-java-font-lock-number">317</span>, - <span class="jde-java-font-lock-constant" id="WORD_SPACING_PRECEDENCE">WORD_SPACING_PRECEDENCE</span> = <span class="jde-java-font-lock-number">318</span>, - <span class="jde-java-font-lock-constant" id="WRAP_OPTION">WRAP_OPTION</span> = <span class="jde-java-font-lock-number">319</span>, - <span class="jde-java-font-lock-constant" id="Z_INDEX">Z_INDEX</span> = <span class="jde-java-font-lock-number">320</span>, - - <span class="jde-java-font-lock-constant" id="LAST_PROPERTY_INDEX">LAST_PROPERTY_INDEX</span> = <span class="jde-java-font-lock-constant">Z_INDEX</span>; - - - <span class="comment">/** - * A String[] array containing the names of all of the FO properties. - * The array is effectively 1-based, as the first element is null. - * The list of int constants referring to the properties must be manually - * kept in sync with the names in this array, as the constants can be - * used to index into this, and the other property arrays. - */</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="propertyNames">propertyNames</span> = { - "<span class="string">no-property</span>" <span class="comment">// 0 -</span> - ,"<span class="string">column-number</span>" <span class="comment">// 1 -</span> ,"<span class="string">number-columns-spanned</span>" <span class="comment">// 2 -</span> - ,"<span class="string">font</span>" <span class="comment">// 3 -</span> ,"<span class="string">font-size</span>" <span class="comment">// 4 -</span> - ,"<span class="string">writing-mode</span>" <span class="comment">// 5 -</span> - ,"<span class="string">background</span>" <span class="comment">// 6 -</span> ,"<span class="string">background-position</span>" <span class="comment">// 7 -</span> ,"<span class="string">border</span>" <span class="comment">// 8 -</span> ,"<span class="string">border-color</span>" <span class="comment">// 9 -</span> ,"<span class="string">border-style</span>" <span class="comment">// 10 -</span> ,"<span class="string">border-width</span>" <span class="comment">// 11 -</span> ,"<span class="string">border-bottom</span>" <span class="comment">// 12 -</span> ,"<span class="string">border-left</span>" <span class="comment">// 13 -</span> ,"<span class="string">border-right</span>" <span class="comment">// 14 -</span> ,"<span class="string">border-top</span>" <span class="comment">// 15 -</span> ,"<span class="string">border-spacing</span>" <span class="comment">// 16 -</span> ,"<span class="string">cue</span>" <span class="comment">// 17 -</span> ,"<span class="string">margin</span>" <span class="comment">// 18 -</span> ,"<span class="string">padding</span>" <span class="comment">// 19 -</span> ,"<span class="string">page-break-after</span>" <span class="comment">// 20 -</span> ,"<span class="string">page-break-before</span>" <span class="comment">// 21 -</span> ,"<span class="string">page-break-inside</span>" <span class="comment">// 22 -</span> ,"<span class="string">pause</span>" <span class="comment">// 23 -</span> ,"<span class="string">position</span>" <span class="comment">// 24 -</span> ,"<span class="string">size</span>" <span class="comment">// 25 -</span> ,"<span class="string">vertical-align</span>" <span class="comment">// 26 -</span> ,"<span class="string">white-space</span>" <span class="comment">// 27 -</span> ,"<span class="string">xml:lang</span>" <span class="comment">// 28 -</span> - ,"<span class="string">absolute-position</span>" <span class="comment">// 29 -</span> ,"<span class="string">active-state</span>" <span class="comment">// 30 -</span> ,"<span class="string">alignment-adjust</span>" <span class="comment">// 31 -</span> ,"<span class="string">alignment-baseline</span>" <span class="comment">// 32 -</span> ,"<span class="string">auto-restore</span>" <span class="comment">// 33 -</span> ,"<span class="string">azimuth</span>" <span class="comment">// 34 -</span> ,"<span class="string">background-attachment</span>" <span class="comment">// 35 -</span> ,"<span class="string">background-color</span>" <span class="comment">// 36 -</span> ,"<span class="string">background-image</span>" <span class="comment">// 37 -</span> ,"<span class="string">background-position-horizontal</span>" <span class="comment">// 38 -</span> ,"<span class="string">background-position-vertical</span>" <span class="comment">// 39 -</span> ,"<span class="string">background-repeat</span>" <span class="comment">// 40 -</span> ,"<span class="string">baseline-shift</span>" <span class="comment">// 41 -</span> ,"<span class="string">blank-or-not-blank</span>" <span class="comment">// 42 -</span> ,"<span class="string">block-progression-dimension</span>" <span class="comment">// 43 -</span> ,"<span class="string">block-progression-dimension.minimum</span>" <span class="comment">// 44 -</span> ,"<span class="string">block-progression-dimension.optimum</span>" <span class="comment">// 45 -</span> ,"<span class="string">block-progression-dimension.maximum</span>" <span class="comment">// 46 -</span> - ,"<span class="string">border-after-color</span>" <span class="comment">// 47 -</span> ,"<span class="string">border-after-precedence</span>" <span class="comment">// 48 -</span> ,"<span class="string">border-after-style</span>" <span class="comment">// 49 -</span> ,"<span class="string">border-after-width</span>" <span class="comment">// 50 -</span> ,"<span class="string">border-after-width.length</span>" <span class="comment">// 51 -</span> ,"<span class="string">border-after-width.conditionality</span>" <span class="comment">// 52 -</span> ,"<span class="string">border-before-color</span>" <span class="comment">// 53 -</span> ,"<span class="string">border-before-precedence</span>" <span class="comment">// 54 -</span> ,"<span class="string">border-before-style</span>" <span class="comment">// 55 -</span> ,"<span class="string">border-before-width</span>" <span class="comment">// 56 -</span> ,"<span class="string">border-before-width.length</span>" <span class="comment">// 57 -</span> ,"<span class="string">border-before-width.conditionality</span>" <span class="comment">// 58 -</span> ,"<span class="string">border-end-color</span>" <span class="comment">// 59 -</span> ,"<span class="string">border-end-precedence</span>" <span class="comment">// 60 -</span> ,"<span class="string">border-end-style</span>" <span class="comment">// 61 -</span> ,"<span class="string">border-end-width</span>" <span class="comment">// 62 -</span> ,"<span class="string">border-end-width.length</span>" <span class="comment">// 63 -</span> ,"<span class="string">border-end-width.conditionality</span>" <span class="comment">// 64 -</span> ,"<span class="string">border-start-color</span>" <span class="comment">// 65 -</span> ,"<span class="string">border-start-precedence</span>" <span class="comment">// 66 -</span> ,"<span class="string">border-start-style</span>" <span class="comment">// 67 -</span> ,"<span class="string">border-start-width</span>" <span class="comment">// 68 -</span> ,"<span class="string">border-start-width.length</span>" <span class="comment">// 69 -</span> ,"<span class="string">border-start-width.conditionality</span>" <span class="comment">// 70 -</span> - ,"<span class="string">border-bottom-color</span>" <span class="comment">// 71 -</span> ,"<span class="string">border-bottom-style</span>" <span class="comment">// 72 -</span> ,"<span class="string">border-bottom-width</span>" <span class="comment">// 73 -</span> ,"<span class="string">border-left-color</span>" <span class="comment">// 74 -</span> ,"<span class="string">border-left-style</span>" <span class="comment">// 75 -</span> ,"<span class="string">border-left-width</span>" <span class="comment">// 76 -</span> ,"<span class="string">border-right-color</span>" <span class="comment">// 77 -</span> ,"<span class="string">border-right-style</span>" <span class="comment">// 78 -</span> ,"<span class="string">border-right-width</span>" <span class="comment">// 79 -</span> ,"<span class="string">border-top-color</span>" <span class="comment">// 80 -</span> ,"<span class="string">border-top-style</span>" <span class="comment">// 81 -</span> ,"<span class="string">border-top-width</span>" <span class="comment">// 82 -</span> - ,"<span class="string">border-collapse</span>" <span class="comment">// 83 -</span> ,"<span class="string">border-separation</span>" <span class="comment">// 84 -</span> ,"<span class="string">border-separation.block-progression-direction</span>" <span class="comment">// 85 -</span> ,"<span class="string">border-separation.inline-progression-direction</span>" <span class="comment">// 86 -</span> ,"<span class="string">bottom</span>" <span class="comment">// 87 -</span> ,"<span class="string">break-after</span>" <span class="comment">// 88 -</span> ,"<span class="string">break-before</span>" <span class="comment">// 89 -</span> ,"<span class="string">caption-side</span>" <span class="comment">// 90 -</span> ,"<span class="string">case-name</span>" <span class="comment">// 91 -</span> ,"<span class="string">case-title</span>" <span class="comment">// 92 -</span> ,"<span class="string">character</span>" <span class="comment">// 93 -</span> ,"<span class="string">clear</span>" <span class="comment">// 94 -</span> ,"<span class="string">clip</span>" <span class="comment">// 95 -</span> ,"<span class="string">color</span>" <span class="comment">// 96 -</span> ,"<span class="string">color-profile-name</span>" <span class="comment">// 97 -</span> ,"<span class="string">column-count</span>" <span class="comment">// 98 -</span> ,"<span class="string">column-gap</span>" <span class="comment">// 99 -</span> ,"<span class="string">column-width</span>" <span class="comment">// 100 -</span> ,"<span class="string">content-height</span>" <span class="comment">// 101 -</span> ,"<span class="string">content-type</span>" <span class="comment">// 102 -</span> ,"<span class="string">content-width</span>" <span class="comment">// 103 -</span> ,"<span class="string">country</span>" <span class="comment">// 104 -</span> ,"<span class="string">cue-after</span>" <span class="comment">// 105 -</span> ,"<span class="string">cue-before</span>" <span class="comment">// 106 -</span> ,"<span class="string">destination-placement-offset</span>" <span class="comment">// 107 -</span> ,"<span class="string">direction</span>" <span class="comment">// 108 -</span> ,"<span class="string">display-align</span>" <span class="comment">// 109 -</span> ,"<span class="string">dominant-baseline</span>" <span class="comment">// 110 -</span> ,"<span class="string">elevation</span>" <span class="comment">// 111 -</span> ,"<span class="string">empty-cells</span>" <span class="comment">// 112 -</span> ,"<span class="string">end-indent</span>" <span class="comment">// 113 -</span> ,"<span class="string">ends-row</span>" <span class="comment">// 114 -</span> ,"<span class="string">extent</span>" <span class="comment">// 115 -</span> ,"<span class="string">external-destination</span>" <span class="comment">// 116 -</span> ,"<span class="string">float</span>" <span class="comment">// 117 -</span> ,"<span class="string">flow-name</span>" <span class="comment">// 118 -</span> ,"<span class="string">font-family</span>" <span class="comment">// 119 -</span> ,"<span class="string">font-selection-strategy</span>" <span class="comment">// 120 -</span> ,"<span class="string">font-size-adjust</span>" <span class="comment">// 121 -</span> ,"<span class="string">font-stretch</span>" <span class="comment">// 122 -</span> ,"<span class="string">font-style</span>" <span class="comment">// 123 -</span> ,"<span class="string">font-variant</span>" <span class="comment">// 124 -</span> ,"<span class="string">font-weight</span>" <span class="comment">// 125 -</span> ,"<span class="string">force-page-count</span>" <span class="comment">// 126 -</span> ,"<span class="string">format</span>" <span class="comment">// 127 -</span> ,"<span class="string">glyph-orientation-horizontal</span>" <span class="comment">// 128 -</span> ,"<span class="string">glyph-orientation-vertical</span>" <span class="comment">// 129 -</span> ,"<span class="string">grouping-separator</span>" <span class="comment">// 130 -</span> ,"<span class="string">grouping-size</span>" <span class="comment">// 131 -</span> ,"<span class="string">height</span>" <span class="comment">// 132 -</span> ,"<span class="string">hyphenate</span>" <span class="comment">// 133 -</span> ,"<span class="string">hyphenation-character</span>" <span class="comment">// 134 -</span> ,"<span class="string">hyphenation-keep</span>" <span class="comment">// 135 -</span> ,"<span class="string">hyphenation-ladder-count</span>" <span class="comment">// 136 -</span> ,"<span class="string">hyphenation-push-character-count</span>" <span class="comment">// 137 -</span> ,"<span class="string">hyphenation-remain-character-count</span>" <span class="comment">// 138 -</span> ,"<span class="string">id</span>" <span class="comment">// 139 -</span> ,"<span class="string">indicate-destination</span>" <span class="comment">// 140 -</span> ,"<span class="string">initial-page-number</span>" <span class="comment">// 141 -</span> ,"<span class="string">inline-progression-dimension</span>" <span class="comment">// 142 -</span> ,"<span class="string">inline-progression-dimension.minimum</span>" <span class="comment">// 143 -</span> ,"<span class="string">inline-progression-dimension.optimum</span>" <span class="comment">// 144 -</span> ,"<span class="string">inline-progression-dimension.maximum</span>" <span class="comment">// 145 -</span> ,"<span class="string">internal-destination</span>" <span class="comment">// 146 -</span> ,"<span class="string">intrusion-displace</span>" <span class="comment">// 147 -</span> ,"<span class="string">keep-together</span>" <span class="comment">// 148 -</span> ,"<span class="string">keep-together.within-line</span>" <span class="comment">// 149 -</span> ,"<span class="string">keep-together.within-column</span>" <span class="comment">// 150 -</span> ,"<span class="string">keep-together.within-page</span>" <span class="comment">// 151 -</span> ,"<span class="string">keep-with-next</span>" <span class="comment">// 152 -</span> ,"<span class="string">keep-with-next.within-line</span>" <span class="comment">// 153 -</span> ,"<span class="string">keep-with-next.within-column</span>" <span class="comment">// 154 -</span> ,"<span class="string">keep-with-next.within-page</span>" <span class="comment">// 155 -</span> ,"<span class="string">keep-with-previous</span>" <span class="comment">// 156 -</span> ,"<span class="string">keep-with-previous.within-line</span>" <span class="comment">// 157 -</span> ,"<span class="string">keep-with-previous.within-column</span>" <span class="comment">// 158 -</span> ,"<span class="string">keep-with-previous.within-page</span>" <span class="comment">// 159 -</span> ,"<span class="string">language</span>" <span class="comment">// 160 -</span> ,"<span class="string">last-line-end-indent</span>" <span class="comment">// 161 -</span> ,"<span class="string">leader-alignment</span>" <span class="comment">// 162 -</span> ,"<span class="string">leader-length</span>" <span class="comment">// 163 -</span> ,"<span class="string">leader-length.minimum</span>" <span class="comment">// 164 -</span> ,"<span class="string">leader-length.optimum</span>" <span class="comment">// 165 -</span> ,"<span class="string">leader-length.maximum</span>" <span class="comment">// 166 -</span> ,"<span class="string">leader-pattern</span>" <span class="comment">// 167 -</span> ,"<span class="string">leader-pattern-width</span>" <span class="comment">// 168 -</span> ,"<span class="string">left</span>" <span class="comment">// 169 -</span> ,"<span class="string">letter-spacing</span>" <span class="comment">// 170 -</span> ,"<span class="string">letter-spacing.minimum</span>" <span class="comment">// 171 -</span> ,"<span class="string">letter-spacing.optimum</span>" <span class="comment">// 172 -</span> ,"<span class="string">letter-spacing.maximum</span>" <span class="comment">// 173 -</span> ,"<span class="string">letter-spacing.conditionality</span>" <span class="comment">// 174 -</span> ,"<span class="string">letter-spacing.precedence</span>" <span class="comment">// 175 -</span> ,"<span class="string">letter-value</span>" <span class="comment">// 176 -</span> ,"<span class="string">linefeed-treatment</span>" <span class="comment">// 177 -</span> ,"<span class="string">line-height</span>" <span class="comment">// 178 -</span> ,"<span class="string">line-height.minimum</span>" <span class="comment">// 179 -</span> ,"<span class="string">line-height.optimum</span>" <span class="comment">// 180 -</span> ,"<span class="string">line-height.maximum</span>" <span class="comment">// 181 -</span> ,"<span class="string">line-height.conditionality</span>" <span class="comment">// 182 -</span> ,"<span class="string">line-height.precedence</span>" <span class="comment">// 183 -</span> ,"<span class="string">line-height-shift-adjustment</span>" <span class="comment">// 184 -</span> ,"<span class="string">line-stacking-strategy</span>" <span class="comment">// 185 -</span> - ,"<span class="string">marker-class-name</span>" <span class="comment">// 186 -</span> ,"<span class="string">master-name</span>" <span class="comment">// 187 -</span> ,"<span class="string">master-reference</span>" <span class="comment">// 188 -</span> ,"<span class="string">max-height</span>" <span class="comment">// 189 -</span> ,"<span class="string">maximum-repeats</span>" <span class="comment">// 190 -</span> ,"<span class="string">max-width</span>" <span class="comment">// 191 -</span> ,"<span class="string">media-usage</span>" <span class="comment">// 192 -</span> ,"<span class="string">min-height</span>" <span class="comment">// 193 -</span> ,"<span class="string">min-width</span>" <span class="comment">// 194 -</span> ,"<span class="string">number-columns-repeated</span>" <span class="comment">// 195 -</span> ,"<span class="string">number-rows-spanned</span>" <span class="comment">// 196 -</span> ,"<span class="string">odd-or-even</span>" <span class="comment">// 197 -</span> ,"<span class="string">orphans</span>" <span class="comment">// 198 -</span> ,"<span class="string">overflow</span>" <span class="comment">// 199 -</span> - ,"<span class="string">padding-after</span>" <span class="comment">// 200 -</span> ,"<span class="string">padding-after.length</span>" <span class="comment">// 201 -</span> ,"<span class="string">padding-after.conditionality</span>" <span class="comment">// 202 -</span> ,"<span class="string">padding-before</span>" <span class="comment">// 203 -</span> ,"<span class="string">padding-before.length</span>" <span class="comment">// 204 -</span> ,"<span class="string">padding-before.conditionality</span>" <span class="comment">// 205 -</span> ,"<span class="string">padding-end</span>" <span class="comment">// 206 -</span> ,"<span class="string">padding-end.length</span>" <span class="comment">// 207 -</span> ,"<span class="string">padding-end.conditionality</span>" <span class="comment">// 208 -</span> ,"<span class="string">padding-start</span>" <span class="comment">// 209 -</span> ,"<span class="string">padding-start.length</span>" <span class="comment">// 210 -</span> ,"<span class="string">padding-start.conditionality</span>" <span class="comment">// 211 -</span> - ,"<span class="string">padding-bottom</span>" <span class="comment">// 212 -</span> ,"<span class="string">padding-left</span>" <span class="comment">// 213 -</span> ,"<span class="string">padding-right</span>" <span class="comment">// 214 -</span> ,"<span class="string">padding-top</span>" <span class="comment">// 215 -</span> - ,"<span class="string">page-height</span>" <span class="comment">// 216 -</span> ,"<span class="string">page-position</span>" <span class="comment">// 217 -</span> ,"<span class="string">page-width</span>" <span class="comment">// 218 -</span> ,"<span class="string">pause-after</span>" <span class="comment">// 219 -</span> ,"<span class="string">pause-before</span>" <span class="comment">// 220 -</span> ,"<span class="string">pitch</span>" <span class="comment">// 221 -</span> ,"<span class="string">pitch-range</span>" <span class="comment">// 222 -</span> ,"<span class="string">play-during</span>" <span class="comment">// 223 -</span> ,"<span class="string">precedence</span>" <span class="comment">// 224 -</span> ,"<span class="string">provisional-distance-between-starts</span>" <span class="comment">// 225 -</span> ,"<span class="string">provisional-label-separation</span>" <span class="comment">// 226 -</span> ,"<span class="string">reference-orientation</span>" <span class="comment">// 227 -</span> ,"<span class="string">ref-id</span>" <span class="comment">// 228 -</span> ,"<span class="string">region-name</span>" <span class="comment">// 229 -</span> ,"<span class="string">relative-align</span>" <span class="comment">// 230 -</span> ,"<span class="string">relative-position</span>" <span class="comment">// 231 -</span> ,"<span class="string">rendering-intent</span>" <span class="comment">// 232 -</span> ,"<span class="string">retrieve-boundary</span>" <span class="comment">// 233 -</span> ,"<span class="string">retrieve-class-name</span>" <span class="comment">// 234 -</span> ,"<span class="string">retrieve-position</span>" <span class="comment">// 235 -</span> ,"<span class="string">richness</span>" <span class="comment">// 236 -</span> ,"<span class="string">right</span>" <span class="comment">// 237 -</span> ,"<span class="string">role</span>" <span class="comment">// 238 -</span> ,"<span class="string">rule-style</span>" <span class="comment">// 239 -</span> ,"<span class="string">rule-thickness</span>" <span class="comment">// 240 -</span> ,"<span class="string">scaling</span>" <span class="comment">// 241 -</span> ,"<span class="string">scaling-method</span>" <span class="comment">// 242 -</span> ,"<span class="string">score-spaces</span>" <span class="comment">// 243 -</span> ,"<span class="string">script</span>" <span class="comment">// 244 -</span> ,"<span class="string">show-destination</span>" <span class="comment">// 245 -</span> ,"<span class="string">source-document</span>" <span class="comment">// 246 -</span> - ,"<span class="string">space-after</span>" <span class="comment">// 247 -</span> ,"<span class="string">space-after.minimum</span>" <span class="comment">// 248 -</span> ,"<span class="string">space-after.optimum</span>" <span class="comment">// 249 -</span> ,"<span class="string">space-after.maximum</span>" <span class="comment">// 250 -</span> ,"<span class="string">space-after.conditionality</span>" <span class="comment">// 251 -</span> ,"<span class="string">space-after.precedence</span>" <span class="comment">// 252 -</span> ,"<span class="string">space-before</span>" <span class="comment">// 253 -</span> ,"<span class="string">space-before.minimum</span>" <span class="comment">// 254 -</span> ,"<span class="string">space-before.optimum</span>" <span class="comment">// 255 -</span> ,"<span class="string">space-before.maximum</span>" <span class="comment">// 256 -</span> ,"<span class="string">space-before.conditionality</span>" <span class="comment">// 257 -</span> ,"<span class="string">space-before.precedence</span>" <span class="comment">// 258 -</span> ,"<span class="string">space-end</span>" <span class="comment">// 259 -</span> ,"<span class="string">space-end.minimum</span>" <span class="comment">// 260 -</span> ,"<span class="string">space-end.optimum</span>" <span class="comment">// 261 -</span> ,"<span class="string">space-end.maximum</span>" <span class="comment">// 262 -</span> ,"<span class="string">space-end.conditionality</span>" <span class="comment">// 263 -</span> ,"<span class="string">space-end.precedence</span>" <span class="comment">// 264 -</span> ,"<span class="string">space-start</span>" <span class="comment">// 265 -</span> ,"<span class="string">space-start.minimum</span>" <span class="comment">// 266 -</span> ,"<span class="string">space-start.optimum</span>" <span class="comment">// 267 -</span> ,"<span class="string">space-start.maximum</span>" <span class="comment">// 268 -</span> ,"<span class="string">space-start.conditionality</span>" <span class="comment">// 269 -</span> ,"<span class="string">space-start.precedence</span>" <span class="comment">// 270 -</span> - ,"<span class="string">margin-bottom</span>" <span class="comment">// 271 -</span> ,"<span class="string">margin-left</span>" <span class="comment">// 272 -</span> ,"<span class="string">margin-right</span>" <span class="comment">// 273 -</span> ,"<span class="string">margin-top</span>" <span class="comment">// 274 -</span> - ,"<span class="string">span</span>" <span class="comment">// 275 -</span> ,"<span class="string">speak</span>" <span class="comment">// 276 -</span> ,"<span class="string">speak-header</span>" <span class="comment">// 277 -</span> ,"<span class="string">speak-numeral</span>" <span class="comment">// 278 -</span> ,"<span class="string">speak-punctuation</span>" <span class="comment">// 279 -</span> ,"<span class="string">speech-rate</span>" <span class="comment">// 280 -</span> ,"<span class="string">src</span>" <span class="comment">// 281 -</span> ,"<span class="string">start-indent</span>" <span class="comment">// 282 -</span> ,"<span class="string">starting-state</span>" <span class="comment">// 283 -</span> ,"<span class="string">starts-row</span>" <span class="comment">// 284 -</span> ,"<span class="string">stress</span>" <span class="comment">// 285 -</span> ,"<span class="string">suppress-at-line-break</span>" <span class="comment">// 286 -</span> ,"<span class="string">switch-to</span>" <span class="comment">// 287 -</span> ,"<span class="string">table-layout</span>" <span class="comment">// 288 -</span> ,"<span class="string">table-omit-footer-at-break</span>" <span class="comment">// 289 -</span> ,"<span class="string">table-omit-header-at-break</span>" <span class="comment">// 290 -</span> ,"<span class="string">target-presentation-context</span>" <span class="comment">// 291 -</span> ,"<span class="string">target-processing-context</span>" <span class="comment">// 292 -</span> ,"<span class="string">target-stylesheet</span>" <span class="comment">// 293 -</span> ,"<span class="string">text-align</span>" <span class="comment">// 294 -</span> ,"<span class="string">text-align-last</span>" <span class="comment">// 295 -</span> ,"<span class="string">text-altitude</span>" <span class="comment">// 296 -</span> ,"<span class="string">text-decoration</span>" <span class="comment">// 297 -</span> ,"<span class="string">text-depth</span>" <span class="comment">// 298 -</span> ,"<span class="string">text-indent</span>" <span class="comment">// 299 -</span> ,"<span class="string">text-shadow</span>" <span class="comment">// 300 -</span> ,"<span class="string">text-transform</span>" <span class="comment">// 301 -</span> ,"<span class="string">top</span>" <span class="comment">// 302 -</span> ,"<span class="string">treat-as-word-space</span>" <span class="comment">// 303 -</span> ,"<span class="string">unicode-bidi</span>" <span class="comment">// 304 -</span> ,"<span class="string">usage-context-of-suppress-at-line-break</span>" <span class="comment">// 305 -</span> ,"<span class="string">visibility</span>" <span class="comment">// 306 -</span> ,"<span class="string">voice-family</span>" <span class="comment">// 307 -</span> ,"<span class="string">volume</span>" <span class="comment">// 308 -</span> ,"<span class="string">white-space-collapse</span>" <span class="comment">// 309 -</span> ,"<span class="string">white-space-treatment</span>" <span class="comment">// 310 -</span> ,"<span class="string">widows</span>" <span class="comment">// 311 -</span> ,"<span class="string">width</span>" <span class="comment">// 312 -</span> ,"<span class="string">word-spacing</span>" <span class="comment">// 313 -</span> ,"<span class="string">word-spacing-minimum</span>" <span class="comment">// 314 -</span> ,"<span class="string">word-spacing-optimum</span>" <span class="comment">// 315 -</span> ,"<span class="string">word-spacing-maximum</span>" <span class="comment">// 316 -</span> ,"<span class="string">word-spacing-conditionality</span>" <span class="comment">// 317 -</span> ,"<span class="string">word-spacing-precedence</span>" <span class="comment">// 318 -</span> ,"<span class="string">wrap-option</span>" <span class="comment">// 319 -</span> ,"<span class="string">z-index</span>" <span class="comment">// 320 -</span> }; - - <span class="comment">/** - * A <tt>hashMap</tt> mapping property names (the keys) to - * property integer indices. - */</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="toIndex">toIndex</span>; - <span class="jde-java-font-lock-modifier">static</span> { - toIndex = <span class="keyword">new</span> <span class="type">HashMap</span>(<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span> + <span class="jde-java-font-lock-number">1</span>); - <span class="comment">// Set up the toIndex Hashmap with the name of the -</span> <span class="comment">// property as a key, and the integer index as a value -</span> <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">0</span>; i <= <span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span>; i++) { - <span class="keyword">if</span> (toIndex.put(propertyNames[i], - Ints.consts.get(i)) != <span class="jde-java-font-lock-constant" id="null">null</span>) { - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">RuntimeException</span>( - "<span class="string">Duplicate values in toIndex for key </span>" + - propertyNames[i]); - } - } - } - - <span class="comment">/** - * </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"> <tt>int</tt> index of the FO property. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>String</tt> name of the indexd FO property. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">PropertyException</span><span class="comment"> if the property index is invalid. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">String</span> <span class="function-name" id="getPropertyName">getPropertyName</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> (propindex < <span class="jde-java-font-lock-number">0</span> || propindex > <span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">getPropertyName: index is invalid: </span>" + propindex); - <span class="keyword">return</span> propertyNames[propindex]; - } - - <span class="comment">/** - * Get the property index of a property name. - * </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 FO property. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>String</tt> name of the indexd FO property. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">PropertyException</span><span class="comment"> if the property index is invalid. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">int</span> <span class="function-name" id="getPropertyIndex">getPropertyIndex</span>(<span class="type">String</span> <span class="variable-name" id="name">name</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="type">Integer</span> <span class="variable-name" id="intg">intg</span> = (<span class="type">Integer</span>)(toIndex.get(name)); - <span class="keyword">if</span> (intg == <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">Property name '</span>" + name + "<span class="string">' is unknown.</span>"); - <span class="keyword">return</span> intg.intValue(); - } - -} -</pre> - </body> -</html> diff --git a/src/documentation/content/design/alt.design/properties/Property.html b/src/documentation/content/design/alt.design/properties/Property.html deleted file mode 100644 index 37d019827..000000000 --- a/src/documentation/content/design/alt.design/properties/Property.html +++ /dev/null @@ -1,952 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- - Copyright 2001-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- $Id$ --> -<!-- Created by htmlize-0.67 in css mode. --> -<html> - <head> - <title>Property.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 */ - .jde-java-font-lock-code { - background-color: #faf0e6; - } /* jde-java-font-lock-code-face */ - .type { - color: #4682b4; - background-color: #faf0e6; - } /* font-lock-type-face */ - .jde-java-font-lock-italic { - background-color: #faf0e6; - font-style: italic; - } /* jde-java-font-lock-italic-face */ - .reference { - color: #cd0000; - background-color: #faf0e6; - } /* font-lock-reference-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="comment">/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */</span> - -<span class="comment">/* - * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a> - */</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="jde-java-font-lock-package">properties</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">Class</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">util</span>.<span class="type">Iterator</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">ListIterator</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">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">Collections</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">messaging</span>.<span class="type">MessageHandler</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="type">PropertyConsts</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">ShorthandPropSets</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">FOPropertySets</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">AbstractPropertyValue</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">PropertyValueList</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">expr</span>.<span class="type">PropertyNotImplementedException</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">SystemFontFunction</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">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">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">datatypes</span>.<span class="type">NoType</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">StringType</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">NCName</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">CountryType</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">LanguageType</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">ScriptType</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">UriType</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">MimeType</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">Ems</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">Percentage</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">Angle</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">datatypes</span>.<span class="type">MappedNumeric</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">IntegerType</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">Bool</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">Literal</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">Auto</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">None</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">ColorType</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">FontFamilySet</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">TextDecorations</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">TextDecorator</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">ShadowEffect</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">Slash</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="jde-java-font-lock-package">indirect</span>.<span class="type">Inherit</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="jde-java-font-lock-package">indirect</span>.<span class="type">InheritedValue</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="jde-java-font-lock-package">indirect</span>.<span class="type">FromParent</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="jde-java-font-lock-package">indirect</span>.<span class="type">FromNearestSpecified</span>; - -<span class="comment">/** - * Parent class for all of the individual property classes. It also contains - * sets of integer constants for various types of data. - */</span> - -<span class="jde-java-font-lock-modifier">public</span> <span class="comment">/*abstract*/</span> <span class="keyword">class</span> <span class="function-name" id="PropertyClass">Property</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="comment">/* - * The list of property data types. These are used to form a bitmap of - * the property data types that are valid for values of each of the - * properties. - * - * Maintain the following list by - * in XEmacs: - * set the region to cover the list, EXCLUDING the final (-ve) value - * M-1 M-| followed by the command - * perl -p -e 'BEGIN{$n=0;$n2=0};$n2=2**$n,$n++ if s/= [0-9]+/= $n2/' - * in vi: - * set a mark (ma) at the end of the list but one. - * Go to the beginning and - * !'aperl -p -e ... etc - * - * N.B. The maximum value that can be handled in this way is - * 2^30 or 1073741824. The -ve value is the equivalent of 2^31. - */</span> - <span class="comment">/** - * Constant specifying a property data type or types. - */</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="jde-java-font-lock-constant" id="NOTYPE">NOTYPE</span> = <span class="jde-java-font-lock-number">0</span> - ,<span class="jde-java-font-lock-constant" id="INTEGER">INTEGER</span> = <span class="jde-java-font-lock-number">1</span> - ,<span class="jde-java-font-lock-constant" id="FLOAT">FLOAT</span> = <span class="jde-java-font-lock-number">2</span> - ,<span class="jde-java-font-lock-constant" id="LENGTH">LENGTH</span> = <span class="jde-java-font-lock-number">4</span> - ,<span class="jde-java-font-lock-constant" id="ANGLE">ANGLE</span> = <span class="jde-java-font-lock-number">8</span> - ,<span class="jde-java-font-lock-constant" id="PERCENTAGE">PERCENTAGE</span> = <span class="jde-java-font-lock-number">16</span> - ,<span class="jde-java-font-lock-constant" id="CHARACTER_T">CHARACTER_T</span> = <span class="jde-java-font-lock-number">32</span> - ,<span class="jde-java-font-lock-constant" id="LITERAL">LITERAL</span> = <span class="jde-java-font-lock-number">64</span> - ,<span class="jde-java-font-lock-constant" id="NCNAME">NCNAME</span> = <span class="jde-java-font-lock-number">128</span> - ,<span class="jde-java-font-lock-constant" id="COLOR_T">COLOR_T</span> = <span class="jde-java-font-lock-number">256</span> - ,<span class="jde-java-font-lock-constant" id="COUNTRY_T">COUNTRY_T</span> = <span class="jde-java-font-lock-number">512</span> - ,<span class="jde-java-font-lock-constant" id="LANGUAGE_T">LANGUAGE_T</span> = <span class="jde-java-font-lock-number">1024</span> - ,<span class="jde-java-font-lock-constant" id="SCRIPT_T">SCRIPT_T</span> = <span class="jde-java-font-lock-number">2048</span> - ,<span class="jde-java-font-lock-constant" id="URI_SPECIFICATION">URI_SPECIFICATION</span> = <span class="jde-java-font-lock-number">4096</span> - ,<span class="jde-java-font-lock-constant" id="TIME">TIME</span> = <span class="jde-java-font-lock-number">8192</span> - ,<span class="jde-java-font-lock-constant" id="FREQUENCY">FREQUENCY</span> = <span class="jde-java-font-lock-number">16384</span> - <span class="comment">// Pseudotypes -</span> ,<span class="jde-java-font-lock-constant" id="BOOL">BOOL</span> = <span class="jde-java-font-lock-number">32768</span> - ,<span class="jde-java-font-lock-constant" id="INHERIT">INHERIT</span> = <span class="jde-java-font-lock-number">65536</span> - ,<span class="jde-java-font-lock-constant" id="ENUM">ENUM</span> = <span class="jde-java-font-lock-number">131072</span> - ,<span class="jde-java-font-lock-constant" id="MAPPED_LENGTH">MAPPED_LENGTH</span> = <span class="jde-java-font-lock-number">262144</span> - ,<span class="jde-java-font-lock-constant" id="SHORTHAND">SHORTHAND</span> = <span class="jde-java-font-lock-number">524288</span> - ,<span class="jde-java-font-lock-constant" id="COMPLEX">COMPLEX</span> = <span class="jde-java-font-lock-number">1048576</span> - ,<span class="jde-java-font-lock-constant" id="AUTO">AUTO</span> = <span class="jde-java-font-lock-number">2097152</span> - ,<span class="jde-java-font-lock-constant" id="NONE">NONE</span> = <span class="jde-java-font-lock-number">4194304</span> - ,<span class="jde-java-font-lock-constant" id="AURAL">AURAL</span> = <span class="jde-java-font-lock-number">8388608</span> - <span class="comment">// Color plus transparent -</span> ,<span class="jde-java-font-lock-constant" id="COLOR_TRANS">COLOR_TRANS</span> = <span class="jde-java-font-lock-number">16777216</span> - ,<span class="jde-java-font-lock-constant" id="MIMETYPE">MIMETYPE</span> = <span class="jde-java-font-lock-number">33554432</span> - ,<span class="jde-java-font-lock-constant" id="FONTSET">FONTSET</span> = <span class="jde-java-font-lock-number">67108864</span> - ,<span class="jde-java-font-lock-constant" id="COMPOUND">COMPOUND</span> = <span class="jde-java-font-lock-number">134217728</span> - <span class="comment">// ,SPARE = 268435456 -</span> <span class="comment">// ,SPARE = 536870912 -</span> <span class="comment">// ,SPARE = 1073741824 -</span> <span class="comment">// ,SPARE = -2147483648 -</span> - <span class="comment">// A number of questions are unresolved about the interaction of -</span> <span class="comment">// complex parsing, property expression parsing & property validation. -</span> <span class="comment">// At this time (2002/07/03) it looks as though the refineParsing() method -</span> <span class="comment">// will take full validation responsibility, so it will not be -</span> <span class="comment">// necessary to specify any individual datatypes besides COMPLEX in the -</span> <span class="comment">// property dataTypes field. This renders some such specifications -</span> <span class="comment">// redundant. On the other hand, if such individual datatype validation -</span> <span class="comment">// becomes necessary, the datatype settings for properties with COMPLEX -</span> <span class="comment">// will have to be adjusted. pbw -</span> - ,<span class="jde-java-font-lock-constant" id="NUMBER">NUMBER</span> = <span class="jde-java-font-lock-constant">FLOAT</span> | <span class="type">INTEGER</span> - ,<span class="jde-java-font-lock-constant" id="ENUM_TYPE">ENUM_TYPE</span> = <span class="jde-java-font-lock-constant">ENUM</span> | <span class="type">MAPPED_LENGTH</span> - ,<span class="jde-java-font-lock-constant" id="STRING">STRING</span> = <span class="jde-java-font-lock-constant">LITERAL</span> | <span class="type">NCNAME</span> - ,<span class="jde-java-font-lock-constant" id="HYPH_TYPE">HYPH_TYPE</span> = <span class="jde-java-font-lock-constant">COUNTRY_T</span> | <span class="jde-java-font-lock-constant">LANGUAGE_T</span> | <span class="type">SCRIPT_T</span> - ,<span class="jde-java-font-lock-constant" id="NAME_TYPE">NAME_TYPE</span> = <span class="jde-java-font-lock-constant">NCNAME</span> | <span class="jde-java-font-lock-constant">HYPH_TYPE</span> | <span class="type">ENUM_TYPE</span> - ,<span class="jde-java-font-lock-constant" id="STRING_TYPE">STRING_TYPE</span> = <span class="jde-java-font-lock-constant">STRING</span> | <span class="type">NAME_TYPE</span> - ,<span class="jde-java-font-lock-constant" id="ANY_TYPE">ANY_TYPE</span> = ~<span class="jde-java-font-lock-number">0</span> - ; - - <span class="comment">/** Constant specifying an initial data type. */</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="jde-java-font-lock-constant" id="NOTYPE_IT">NOTYPE_IT</span> = <span class="jde-java-font-lock-number">0</span> - ,<span class="jde-java-font-lock-constant" id="INTEGER_IT">INTEGER_IT</span> = <span class="jde-java-font-lock-number">1</span> - ,<span class="jde-java-font-lock-constant" id="NUMBER_IT">NUMBER_IT</span> = <span class="jde-java-font-lock-number">2</span> - ,<span class="jde-java-font-lock-constant" id="LENGTH_IT">LENGTH_IT</span> = <span class="jde-java-font-lock-number">4</span> - ,<span class="jde-java-font-lock-constant" id="ANGLE_IT">ANGLE_IT</span> = <span class="jde-java-font-lock-number">8</span> - ,<span class="jde-java-font-lock-constant" id="PERCENTAGE_IT">PERCENTAGE_IT</span> = <span class="jde-java-font-lock-number">16</span> - ,<span class="jde-java-font-lock-constant" id="CHARACTER_IT">CHARACTER_IT</span> = <span class="jde-java-font-lock-number">32</span> - ,<span class="jde-java-font-lock-constant" id="LITERAL_IT">LITERAL_IT</span> = <span class="jde-java-font-lock-number">64</span> - ,<span class="jde-java-font-lock-constant" id="NCNAME_IT">NCNAME_IT</span> = <span class="jde-java-font-lock-number">128</span> - ,<span class="jde-java-font-lock-constant" id="COLOR_IT">COLOR_IT</span> = <span class="jde-java-font-lock-number">256</span> - ,<span class="jde-java-font-lock-constant" id="COUNTRY_IT">COUNTRY_IT</span> = <span class="jde-java-font-lock-number">512</span> - ,<span class="jde-java-font-lock-constant" id="URI_SPECIFICATION_IT">URI_SPECIFICATION_IT</span> = <span class="jde-java-font-lock-number">1024</span> - ,<span class="jde-java-font-lock-constant" id="BOOL_IT">BOOL_IT</span> = <span class="jde-java-font-lock-number">2048</span> - ,<span class="jde-java-font-lock-constant" id="ENUM_IT">ENUM_IT</span> = <span class="jde-java-font-lock-number">4096</span> - ,<span class="jde-java-font-lock-constant" id="AUTO_IT">AUTO_IT</span> = <span class="jde-java-font-lock-number">8192</span> - ,<span class="jde-java-font-lock-constant" id="NONE_IT">NONE_IT</span> = <span class="jde-java-font-lock-number">16384</span> - ,<span class="jde-java-font-lock-constant" id="AURAL_IT">AURAL_IT</span> = <span class="jde-java-font-lock-number">32768</span> - ,<span class="jde-java-font-lock-constant" id="TEXT_DECORATION_IT">TEXT_DECORATION_IT</span> = <span class="jde-java-font-lock-number">65536</span> - <span class="comment">// Unused ,FONTSET_IT = 131072 -</span> ; - - <span class="comment">/** - * Bitmap set of initial data types for which getInitialType() must be - * overriden. - */</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="jde-java-font-lock-constant" id="USE_GET_IT_FUNCTION">USE_GET_IT_FUNCTION</span> = <span class="comment">//NOTYPE_IT performed in Property -</span> <span class="type">INTEGER_IT</span> - | <span class="type">NUMBER_IT</span> - | <span class="type">LENGTH_IT</span> - | <span class="type">ANGLE_IT</span> - | <span class="type">PERCENTAGE_IT</span> - | <span class="type">CHARACTER_IT</span> - | <span class="type">LITERAL_IT</span> - | <span class="type">NCNAME_IT</span> - | <span class="type">COLOR_IT</span> - | <span class="type">COUNTRY_IT</span> - | <span class="type">URI_SPECIFICATION_IT</span> - | <span class="type">BOOL_IT</span> - | <span class="type">ENUM_IT</span> - <span class="comment">//AUTO_IT performed in Property -</span> <span class="comment">//NONE_IT performed in Property -</span> <span class="comment">//AURAL_IT performed in Property -</span> | <span class="type">TEXT_DECORATION_IT</span> - ; - - <span class="comment">/** Constant specifying mapping of property to 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="jde-java-font-lock-constant" id="NO_TRAIT">NO_TRAIT</span> = <span class="jde-java-font-lock-number">0</span> - ,<span class="jde-java-font-lock-constant" id="RENDERING">RENDERING</span> = <span class="jde-java-font-lock-number">1</span> - ,<span class="jde-java-font-lock-constant" id="DISAPPEARS">DISAPPEARS</span> = <span class="jde-java-font-lock-number">2</span> - ,<span class="jde-java-font-lock-constant" id="SHORTHAND_MAP">SHORTHAND_MAP</span> = <span class="jde-java-font-lock-number">4</span> - ,<span class="jde-java-font-lock-constant" id="REFINE">REFINE</span> = <span class="jde-java-font-lock-number">8</span> - ,<span class="jde-java-font-lock-constant" id="FORMATTING">FORMATTING</span> = <span class="jde-java-font-lock-number">16</span> - ,<span class="jde-java-font-lock-constant" id="SPECIFICATION">SPECIFICATION</span> = <span class="jde-java-font-lock-number">32</span> - ,<span class="jde-java-font-lock-constant" id="NEW_TRAIT">NEW_TRAIT</span> = <span class="jde-java-font-lock-number">64</span> - ,<span class="jde-java-font-lock-constant" id="FONT_SELECTION">FONT_SELECTION</span> = <span class="jde-java-font-lock-number">128</span> - ,<span class="jde-java-font-lock-constant" id="VALUE_CHANGE">VALUE_CHANGE</span> = <span class="jde-java-font-lock-number">256</span> - ,<span class="jde-java-font-lock-constant" id="REFERENCE">REFERENCE</span> = <span class="jde-java-font-lock-number">512</span> - ,<span class="jde-java-font-lock-constant" id="ACTION">ACTION</span> = <span class="jde-java-font-lock-number">1024</span> - ,<span class="jde-java-font-lock-constant" id="MAGIC">MAGIC</span> = <span class="jde-java-font-lock-number">2048</span> - ; - - <span class="comment">/* - * Constant specifying inheritance type. Special cases (only line-height - * specified as a &lt;number&gt;, so far) must be handled close to the - * usage point of the property. For line-height, the number is retained - * as the specified and as the computed property value. Because the - * current font-size will always be present in the property set for any - * FONode which requires line-height, the actual length value of the - * line-height can always be calculated at the point of application. - */</span> - <span class="comment">/** Constant specifying inheritance type. */</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="jde-java-font-lock-constant" id="NO">NO</span> = <span class="jde-java-font-lock-number">0</span> - ,<span class="jde-java-font-lock-constant" id="COMPUTED">COMPUTED</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="dataTypes">dataTypes</span> = <span class="jde-java-font-lock-constant">NOTYPE</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">NOTYPE_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">NO</span>; - - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">Map</span> <span class="variable-name" id="enumHash">enumHash</span> = <span class="jde-java-font-lock-constant" id="null">null</span>; - - <span class="jde-java-font-lock-modifier">public</span> <span class="function-name" id="Property">Property</span>() {} - - <span class="comment">/** - * Form a string representation of bitmap of datatypes. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="datatypes">datatypes</span><span class="comment"> - a bitmap of datatype(s). - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>String</tt> containing a list of text names of datatypes - * found in the bitmap. Individual names are enclosed in angle brackets - * and separated by a vertical bar. Psuedo-datatypes are in upper case. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">PropertyException</span><span class="comment"> if no matches are found. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">String</span> <span class="function-name" id="listDataTypes">listDataTypes</span>(<span class="type">int</span> <span class="variable-name">datatypes</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="type">String</span> <span class="variable-name" id="typeNames">typeNames</span> = ""; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">ANY_TYPE</span>) == <span class="type">ANY_TYPE</span>) <span class="keyword">return</span> "<span class="string"><ALL-TYPES></span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">INTEGER</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><integer>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">NUMBER</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><number>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">LENGTH</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><length>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">ANGLE</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><angle>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">PERCENTAGE</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><percentage>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">CHARACTER_T</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><character>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">STRING</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><string>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">NCNAME</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><ncname>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">COLOR_T</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><color>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">COUNTRY_T</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><country>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">LANGUAGE_T</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><language>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">SCRIPT_T</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><script>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">URI_SPECIFICATION</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames - += "<span class="string"><uri-specification>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">TIME</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><time>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">FREQUENCY</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><frequency>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">BOOL</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><BOOL>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">INHERIT</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><INHERIT>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">ENUM</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><ENUM>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">MAPPED_LENGTH</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames - += "<span class="string"><MAPPED_LENGTH>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">SHORTHAND</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><SHORTHAND>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">COMPLEX</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><COMPLEX>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">AUTO</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><AUTO>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">NONE</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><NONE>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">AURAL</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><AURAL>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">COLOR_TRANS</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><COLOR_TRANS>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">MIMETYPE</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><MIMETYPE>|</span>"; - <span class="keyword">if</span> ((datatypes & <span class="jde-java-font-lock-constant">FONTSET</span>) != <span class="jde-java-font-lock-number">0</span>) typeNames += "<span class="string"><FONTSET>|</span>"; - - <span class="keyword">if</span> (typeNames == "") <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">No valid data type in </span>" + datatypes); - <span class="keyword">return</span> typeNames.substring(<span class="jde-java-font-lock-number">0</span>, typeNames.length() - <span class="jde-java-font-lock-number">1</span>); - } - - <span class="comment">/** - * Derive inherited value for the given property. - * This method must be overriden by properties with special requirements. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="foTree">foTree</span><span class="comment"> the <tt>FOTree</tt> being built - * </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"> the <tt>int</tt> property index - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>PropertyValue</tt> the inherited property value for the - * property. It contains the inherited <i></span><span class="jde-java-font-lock-italic">computed</span><span class="comment"></i> value, and no - * <i></span><span class="jde-java-font-lock-italic">specified</span><span class="comment"></i> value. - * </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="comment">/* - public static PropertyValue inheritance(FOTree foTree, int property) - throws PropertyException - { - // Is it inherited? This question is not asked here. Should it be - // determined in here or outside? - return foTree.getCurrentInherited(property); - } - */</span> - - <span class="comment">/** Constant for nested <tt>refineParsing</tt> methods. */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">boolean</span> <span class="variable-name" id="IS_NESTED">IS_NESTED</span> = <span class="jde-java-font-lock-constant" id="true">true</span>; - - <span class="comment">/** Constant for non-nested <tt>refineParsing</tt> methods. */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">boolean</span> <span class="variable-name" id="NOT_NESTED">NOT_NESTED</span> = <span class="jde-java-font-lock-constant" id="false">false</span>; - - <span class="comment">/** - * The final stage of property expression parsing. - * <ol> - * <li>PropertyTokenizer</li> - * <li>PropertyParser - returns context-free <tt>PropertyValue</tt>s - * recognizable by the parser</li> - * <li>refineParsing - verifies results from parser, translates - * property types like NCName into more specific value types, - * resolves enumeration types, etc.</li> - * </ol> - * - * <p>This method is overriden by individual property classes which - * require specific processing. - * </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"> - the <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="foNode">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" id="value">value</span><span class="comment"> - <tt>PropertyValue</tt> returned by the parser - */</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="keyword">return</span> refineParsing(propindex, foNode, value, <span class="jde-java-font-lock-constant">NOT_NESTED</span>); - } - - <span class="comment">/** - * Do the work for the three argument refineParsing method. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">property</span><span class="comment"> - the <tt>int</tt> property index. - * </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">value</span><span class="comment"> - <tt>PropertyValue</tt> returned by the parser - * </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">(int,FOTree,PropertyValue) - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">PropertyValue</span> <span class="function-name">refineParsing</span>(<span class="type">int</span> <span class="variable-name">property</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">nested</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="comment">//int property = value.getProperty(); -</span> <span class="keyword">if</span> (property != value.getProperty()) <span class="comment">// DEBUG -</span> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">Mismatched property and value.property.</span>"); - <span class="type">String</span> <span class="variable-name" id="propName">propName</span> = PropNames.getPropertyName(property); - <span class="type">int</span> <span class="variable-name" id="proptype">proptype</span> = value.getType(); - <span class="type">int</span> <span class="variable-name">dataTypes</span> = PropertyConsts.pconsts.getDataTypes(property); - <span class="type">PropertyValue</span> <span class="variable-name" id="pv">pv</span>; - <span class="keyword">if</span> ((dataTypes & <span class="jde-java-font-lock-constant">AURAL</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyNotImplementedException</span> - ("<span class="string">AURAL properties are not supported</span>"); - <span class="keyword">switch</span> (proptype) { - <span class="keyword">case</span> <span class="reference">PropertyValue.NUMERIC</span>: - <span class="comment">// Can be any of -</span> <span class="comment">// INTEGER, FLOAT, LENGTH, PERCENTAGE, ANGLE, FREQUENCY or TIME -</span> <span class="keyword">if</span> ((dataTypes & (<span class="jde-java-font-lock-constant">INTEGER</span> | <span class="jde-java-font-lock-constant">FLOAT</span> | <span class="jde-java-font-lock-constant">LENGTH</span> | <span class="type">PERCENTAGE</span> - | <span class="jde-java-font-lock-constant">ANGLE</span> | <span class="jde-java-font-lock-constant">FREQUENCY</span> | <span class="jde-java-font-lock-constant">TIME</span>)) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> value; - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">Numeric value invalid for </span>" + propName); - <span class="keyword">case</span> <span class="reference">PropertyValue.INTEGER</span>: - <span class="keyword">if</span> ((dataTypes & <span class="jde-java-font-lock-constant">NUMBER</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> value; - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">IntegerType value invalid for </span>" + propName); - <span class="keyword">case</span> <span class="reference">PropertyValue.NCNAME</span>: - <span class="type">String</span> <span class="variable-name" id="ncname">ncname</span> = ((<span class="type">NCName</span>)value).getNCName(); - <span class="comment">// Can by any of -</span> <span class="comment">// NCNAME, COUNTRY_T, LANGUAGE_T, SCRIPT_T, ENUM -</span> <span class="comment">// MAPPED_LENGTH or CHARACTER_T -</span> <span class="keyword">if</span> ((dataTypes & (<span class="jde-java-font-lock-constant">NCNAME</span> | <span class="jde-java-font-lock-constant">CHARACTER_T</span>)) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> value; - <span class="keyword">if</span> ((dataTypes & <span class="jde-java-font-lock-constant">COUNTRY_T</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> <span class="keyword">new</span> <span class="type">CountryType</span>(property, ncname); - <span class="keyword">if</span> ((dataTypes & <span class="jde-java-font-lock-constant">LANGUAGE_T</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> <span class="keyword">new</span> <span class="type">LanguageType</span>(property, ncname); - <span class="keyword">if</span> ((dataTypes & <span class="jde-java-font-lock-constant">SCRIPT_T</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> <span class="keyword">new</span> <span class="type">ScriptType</span>(property, ncname); - <span class="keyword">if</span> ((dataTypes & <span class="jde-java-font-lock-constant">ENUM</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> <span class="keyword">new</span> <span class="type">EnumType</span>(property, ncname); - <span class="keyword">if</span> ((dataTypes & <span class="jde-java-font-lock-constant">MAPPED_LENGTH</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> (<span class="keyword">new</span> <span class="type">MappedNumeric</span> - (foNode, property, ncname)).getMappedNumValue(); - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">NCName value invalid for </span>" + propName); - <span class="keyword">case</span> <span class="reference">PropertyValue.ENUM</span>: - <span class="keyword">if</span> ((dataTypes & <span class="jde-java-font-lock-constant">ENUM</span>) != <span class="jde-java-font-lock-number">0</span>) <span class="keyword">return</span> value; - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ( "<span class="string">Enumerated value invalid for </span>" + propName); - <span class="keyword">case</span> <span class="reference">PropertyValue.LITERAL</span>: - <span class="comment">// Can be LITERAL or CHARACTER_T -</span> <span class="keyword">if</span> ((dataTypes & (<span class="jde-java-font-lock-constant">LITERAL</span> | <span class="jde-java-font-lock-constant">CHARACTER_T</span>)) != <span class="jde-java-font-lock-number">0</span>) <span class="keyword">return</span> value; - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">Literal value invalid for </span>" + propName); - <span class="keyword">case</span> <span class="reference">PropertyValue.AUTO</span>: - <span class="keyword">if</span> ((dataTypes & <span class="jde-java-font-lock-constant">AUTO</span>) != <span class="jde-java-font-lock-number">0</span>) <span class="keyword">return</span> value; - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">'auto' invalid for </span>" + propName); - <span class="keyword">case</span> <span class="reference">PropertyValue.BOOL</span>: - <span class="keyword">if</span> ((dataTypes & <span class="jde-java-font-lock-constant">BOOL</span>) != <span class="jde-java-font-lock-number">0</span>) <span class="keyword">return</span> value; - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">Boolean value invalid for </span>" + propName); - <span class="keyword">case</span> <span class="reference">PropertyValue.COLOR_TYPE</span>: - <span class="comment">// Can be COLOR_T or COLOR_TRANS -</span> <span class="keyword">if</span> ((dataTypes & (<span class="jde-java-font-lock-constant">COLOR_T</span> | <span class="jde-java-font-lock-constant">COLOR_TRANS</span>)) != <span class="jde-java-font-lock-number">0</span>) <span class="keyword">return</span> value; - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">'none' invalid for </span>" + propName); - <span class="keyword">case</span> <span class="reference">PropertyValue.NONE</span>: - <span class="comment">// Some instances of 'none' are part of an enumeration, but -</span> <span class="comment">// the parser will find and return 'none' as a None -</span> <span class="comment">// PropertyValue. -</span> <span class="comment">// In these cases, the individual property's refineParsing -</span> <span class="comment">// method must override this method. -</span> <span class="keyword">if</span> ((dataTypes & <span class="jde-java-font-lock-constant">NONE</span>) != <span class="jde-java-font-lock-number">0</span>) <span class="keyword">return</span> value; - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">'none' invalid for </span>" + propName); - <span class="keyword">case</span> <span class="reference">PropertyValue.URI_TYPE</span>: - <span class="keyword">if</span> ((dataTypes & <span class="jde-java-font-lock-constant">URI_SPECIFICATION</span>) != <span class="jde-java-font-lock-number">0</span>) <span class="keyword">return</span> value; - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">uri invalid for </span>" + propName); - <span class="keyword">case</span> <span class="reference">PropertyValue.MIME_TYPE</span>: - <span class="keyword">if</span> ((dataTypes & <span class="jde-java-font-lock-constant">MIMETYPE</span>) != <span class="jde-java-font-lock-number">0</span>) <span class="keyword">return</span> value; - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">mimetype invalid for </span>" + propName); - <span class="comment">// The following types cannot have their values validated in advance. -</span> <span class="comment">// The result must be validated from within the property type. -</span> <span class="keyword">case</span> <span class="reference">PropertyValue.FROM_PARENT</span>: - pv = ((<span class="type">FromParent</span>)value).resolve(foNode); - <span class="keyword">if</span> (pv == value) <span class="keyword">return</span> value; <span class="comment">// unable to resolve -</span> <span class="comment">// TODO: validate here -</span> <span class="keyword">return</span> pv; - <span class="keyword">case</span> <span class="reference">PropertyValue.FROM_NEAREST_SPECIFIED</span>: - pv = ((<span class="type">FromNearestSpecified</span>)value).resolve(foNode); - <span class="keyword">if</span> (pv == value) <span class="keyword">return</span> value; <span class="comment">// unable to resolve -</span> <span class="comment">// TODO: validate here -</span> <span class="keyword">return</span> pv; - <span class="keyword">case</span> <span class="reference">PropertyValue.INHERITED_VALUE</span>: - pv = ((<span class="type">InheritedValue</span>)value).resolve(foNode); - <span class="keyword">if</span> (pv == value) <span class="keyword">return</span> value; <span class="comment">// unable to resolve -</span> <span class="comment">// TODO: validate here -</span> <span class="keyword">return</span> pv; - <span class="keyword">case</span> <span class="reference">PropertyValue.LIST</span>: - System.out.println((<span class="type">PropertyValueList</span>)value); - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">PropertyValueList passed to Property.refineParsing for </span>" - + propName); - <span class="keyword">default</span>: - <span class="keyword">if</span> ( ! nested) { - <span class="keyword">if</span> ((dataTypes & <span class="jde-java-font-lock-constant">COMPOUND</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> ShorthandPropSets.expandCompoundProperty - (foNode.getFOTree(), value); - <span class="keyword">if</span> (proptype == PropertyValue.<span class="jde-java-font-lock-constant">INHERIT</span>) { - <span class="keyword">if</span> ((dataTypes & <span class="jde-java-font-lock-constant">INHERIT</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">return</span> ((<span class="type">Inherit</span>)value).resolve(foNode); - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">'inherit' invalid for </span>" + propName); - } - } - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">Inappropriate dataTypes passed to Property.refineParsing: </span>" - + value.getClass().getName()); - } - } - - <span class="comment">/** - * Refine a list of property values against their properties. - * Expansion lists are generated by shorthand and compound expansion. - * The set of properties will, in general, be different from the - * generating property, which will be the one associated with the list - * itself. - * </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> property index. - * </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> for which the properties are - * being processed. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="list">list</span><span class="comment"> - the list of <tt>PropertyValues</tt> to be refined. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a <tt>PropertyValueList>/tt> containing the refined property - * values. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">PropertyValueList</span> <span class="variable-name" id="refineExpansionList">refineExpansionList</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">PropertyValueList</span> <span class="variable-name">list</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="keyword">if</span> (propindex != list.getProperty()) <span class="comment">// DEBUG -</span> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">Mismatch between propindex and list property.</span>"); - <span class="type">PropertyValueList</span> <span class="variable-name" id="newlist">newlist</span> = <span class="keyword">new</span> <span class="type">PropertyValueList</span>(list.getProperty()); - <span class="type">Iterator</span> <span class="variable-name" id="properties">properties</span> = list.iterator(); - <span class="keyword">while</span> (properties.hasNext()) { - <span class="comment">// refine the next element -</span> <span class="type">PropertyValue</span> <span class="variable-name">pv</span> = (<span class="type">PropertyValue</span>)(properties.next()); - pv = PropertyConsts.pconsts.refineParsing - (pv.getProperty(), foNode, pv); - <span class="comment">// if it's a list, recursively refine. This will return a list -</span> <span class="keyword">if</span> (pv.getType() == PropertyValue.<span class="jde-java-font-lock-constant" id="LIST">LIST</span>) { - <span class="type">PropertyValueList</span> <span class="variable-name" id="pvl">pvl</span> = refineExpansionList - (pv.getProperty(), foNode, (<span class="type">PropertyValueList</span>)pv); - newlist.addAll(pvl); - } <span class="keyword">else</span> { <span class="comment">// single element -</span> newlist.add(pv); - } - } - <span class="keyword">return</span> newlist; - } - - <span class="comment">/** - * Determine whether argument <i></span><span class="jde-java-font-lock-italic">list</span><span class="comment"></i> contains a space-separated list - * from the parser. - * A space-separated list will be represented by a - * <tt>PropertyValueList</tt> as the only element of the argument - * <tt>PropertyValueList</tt>. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">list</span><span class="comment"> - the containing list. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the contained space-separated list. - * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type"><tt>PropertyException</tt></span><span class="comment"> if <i></span><span class="jde-java-font-lock-italic">list</span><span class="comment"></i> contains more than - * one element or if the contained element is not a list. - */</span> - <span class="jde-java-font-lock-modifier">protected</span> <span class="type">PropertyValueList</span> <span class="variable-name" id="spaceSeparatedList">spaceSeparatedList</span> - (<span class="type">PropertyValueList</span> <span class="variable-name">list</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="keyword">if</span> (list.size() != <span class="jde-java-font-lock-number">1</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - (list.getClass().getName() + "<span class="string"> list is not a </span>" - + "<span class="string">single list of space-separated values</span>"); - <span class="type">PropertyValue</span> <span class="variable-name" id="val2">val2</span> = (<span class="type">PropertyValue</span>)(list.getFirst()); - <span class="keyword">if</span> ( ! (val2.getType() == PropertyValue.<span class="jde-java-font-lock-constant">LIST</span>)) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - (list.getClass().getName() + "<span class="string"> list is not a </span>" - + "<span class="string">single list of space-separated values</span>"); - <span class="keyword">return</span> (<span class="type">PropertyValueList</span>)val2; - } - - <span class="comment">/** - * Return the EnumType derived from the argument. - * The argument must be an NCName whose string value is a - * valid Enum for the property associated with the NCName. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">value</span><span class="comment"> <tt>PropertyValue</tt> - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">property</span><span class="comment"> <tt>int</tt> the target property index - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="type">type</span><span class="comment"> <tt>String</tt> type of expected enum - for - * exception messages only - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>EnumValue</tt> equivalent of the argument - * </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">protected</span> <span class="type">EnumType</span> <span class="function-name" id="getEnum">getEnum</span>(<span class="type">PropertyValue</span> <span class="variable-name">value</span>, - <span class="type">int</span> <span class="variable-name">property</span>, <span class="type">String</span> <span class="variable-name">type</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="keyword">if</span> (value.getType() != PropertyValue.<span class="jde-java-font-lock-constant">NCNAME</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - (value.getClass().getName() - + "<span class="string"> instead of </span>" + type + "<span class="string"> for </span>" - + PropNames.getPropertyName(property)); - - <span class="type">NCName</span> <span class="variable-name">ncname</span> = (<span class="type">NCName</span>)value; - <span class="keyword">try</span> { - <span class="keyword">return</span> <span class="keyword">new</span> <span class="type">EnumType</span>(property, ncname.getNCName()); - } <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">PropertyException</span> - (ncname.getNCName() - + "<span class="string"> instead of </span>" + type + "<span class="string"> for </span>" - + PropNames.getPropertyName(property)); - } - } - - <span class="comment">/** - * Get the <tt>int</tt> index corresponding to an enumeration keyword - * for this 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"> - a <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">String</span> <span class="variable-name">enum</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">ENUM not supported.</span>"); - } - - <span class="comment">/** - * </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">enumIndex</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">ENUM not supported.</span>"); - } - - <span class="comment">/** - * Map the String value of an enum to its integer equivalent. - * </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 enum text - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="values">values</span><span class="comment"> an <tt>ROStringArray</tt> of all of the enum text values. - * This array is effectively 1-based. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the integer equivalent of the enum text - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">PropertyException</span><span class="comment"> if the enum text is not valid. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="enumValueToIndex">enumValueToIndex</span>(<span class="type">String</span> <span class="variable-name">value</span>, <span class="type">String</span>[] <span class="variable-name">values</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <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 < values.length; i++) { - <span class="keyword">if</span> (value.equals(values[i])) { - <span class="keyword">return</span> i; - } - } - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">Enum text </span>" + value +"<span class="string"> not found.</span>"); - } - - <span class="comment">/** - * Convert an enumeration index value to a length. This is the - * fallback implementation of this function for properties which do not - * support a MAPPED_LENGTH type. Those which do must override this - * method. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">enum</span><span class="comment"> - the <tt>int</tt> enumeration index. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a <tt>Numeric</tt>. This implementation never returns. - * </span><span class="jde-java-font-lock-doc-tag">@throws</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">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">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">MAPPED_LENGTH not supported.</span>"); - } - - <span class="comment">/** - * Fallback getInitialValue function. This function only handles - * those initial value types NOT in the set USE_GET_IT_FUNCTION. It - * should be overriden by all properties whose initial values come from - * that set. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">property</span><span class="comment"> <tt>int</tt> property index - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>PropertyValue</tt> - * </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-doc-tag">@exception</span><span class="comment"> </span><span class="type"><tt>PropertyNotImplementedException</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">property</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="type">int</span> <span class="variable-name">initialValueType</span> = - PropertyConsts.pconsts.getInitialValueType(property); - <span class="comment">//System.out.println("In Property getInitialValue property " -</span> <span class="comment">//+ property); -</span> <span class="keyword">if</span> ((initialValueType & Property.<span class="jde-java-font-lock-constant">USE_GET_IT_FUNCTION</span>) != <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">Property.getInitialValue() called for property with </span>" - + "<span class="string">initial value type in USE_GET_IT_FUNCTION : </span>" - + property + "<span class="string"> </span>" - + PropNames.getPropertyName(property)); - <span class="keyword">switch</span> (initialValueType) { - <span class="keyword">case</span> <span class="reference">NOTYPE_IT</span>: - <span class="keyword">return</span> <span class="keyword">new</span> <span class="type">NoType</span>(property); - <span class="keyword">case</span> <span class="reference">AUTO_IT</span>: - <span class="keyword">return</span> <span class="keyword">new</span> <span class="type">Auto</span>(property); - <span class="keyword">case</span> <span class="reference">NONE_IT</span>: - <span class="keyword">return</span> <span class="keyword">new</span> <span class="type">None</span>(property); - <span class="keyword">case</span> <span class="reference">AURAL_IT</span>: - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyNotImplementedException</span> - ("<span class="string">Aural properties not implemented: </span>" - + PropNames.getPropertyName(property)); - <span class="keyword">default</span>: - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">Unexpected initial value type </span>" + initialValueType - + "<span class="string"> for </span>" + PropNames.getPropertyName(property)); - } - } - - <span class="comment">/** - * 'value' is a PropertyValueList or an individual PropertyValue. - * If 'value' is a PropertyValueList, it must contain a single - * PropertyValueList, which in turn contains the individual elements. - * - * 'value' can contain a parsed Inherit value, - * parsed FromParent value, parsed FromNearestSpecified value, - * or, in any order; - * border-width - * a parsed NCName value containing a standard border width - * or a Numeric length value (including a percentage) - * border-style - * a parsed NCName value containing a standard border style - * border-color - * a parsed ColorType value, or an NCName containing one of - * the standard colors - * - * <p>The value(s) provided, if valid, are converted into a list - * containing the expansion of the shorthand. The elements may - * be in any order. A minimum of one value will be present. - * - * a border-EDGE-color ColorType or inheritance value - * a border-EDGE-style EnumType or inheritance value - * a border-EDGE-width MappedNumeric or inheritance value - * - * N.B. this is the order of elements defined in - * ShorthandPropSets.borderRightExpansion - */</span> - <span class="jde-java-font-lock-modifier">protected</span> <span class="type">PropertyValue</span> <span class="variable-name" id="borderEdge">borderEdge</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">int</span> <span class="variable-name" id="styleProp">styleProp</span>, <span class="type">int</span> <span class="variable-name">colorProp</span>, <span class="type">int</span> <span class="variable-name">widthProp</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="keyword">return</span> borderEdge(propindex, foNode, value, styleProp, - colorProp, widthProp, <span class="jde-java-font-lock-constant">NOT_NESTED</span>); - } - - <span class="jde-java-font-lock-modifier">protected</span> <span class="type">PropertyValue</span> <span class="variable-name">borderEdge</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">int</span> <span class="variable-name">styleProp</span>, - <span class="type">int</span> <span class="variable-name" id="colorProp">colorProp</span>, <span class="type">int</span> <span class="variable-name">widthProp</span>, <span class="type">boolean</span> <span class="variable-name">nested</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="keyword">if</span> (value.getType() != PropertyValue.<span class="jde-java-font-lock-constant">LIST</span>) { - <span class="keyword">return</span> processEdgeValue(propindex, foNode, value, - styleProp, colorProp, widthProp, nested); - } <span class="keyword">else</span> { - <span class="keyword">return</span> processEdgeList(propindex, foNode, - spaceSeparatedList((<span class="type">PropertyValueList</span>)value), - styleProp, colorProp, widthProp); - } - } - - <span class="jde-java-font-lock-modifier">private</span> <span class="type">PropertyValueList</span> <span class="variable-name" id="processEdgeValue">processEdgeValue</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">int</span> <span class="variable-name">styleProp</span>, - <span class="type">int</span> <span class="variable-name">colorProp</span>, <span class="type">int</span> <span class="variable-name">widthProp</span>, <span class="type">boolean</span> <span class="variable-name">nested</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="keyword">if</span> ( ! nested) { - <span class="type">int</span> <span class="variable-name">type</span> = value.getType(); - <span class="keyword">if</span> (type == PropertyValue.<span class="jde-java-font-lock-constant">INHERIT</span> || - type == PropertyValue.<span class="jde-java-font-lock-constant" id="FROM_PARENT">FROM_PARENT</span> || - type == PropertyValue.<span class="jde-java-font-lock-constant" id="FROM_NEAREST_SPECIFIED">FROM_NEAREST_SPECIFIED</span>) - { - <span class="comment">// Copy the value to each member of the shorthand expansion -</span> <span class="keyword">return</span> refineExpansionList(propindex, foNode, - ShorthandPropSets.expandAndCopySHand(value)); - } - } - <span class="comment">// Make a list and pass to processList -</span> <span class="type">PropertyValueList</span> <span class="variable-name" id="tmpList">tmpList</span> = <span class="keyword">new</span> <span class="type">PropertyValueList</span>(propindex); - tmpList.add(value); - <span class="keyword">return</span> processEdgeList - (propindex, foNode, tmpList, styleProp, colorProp, widthProp); - } - - <span class="jde-java-font-lock-modifier">private</span> <span class="type">PropertyValueList</span> <span class="variable-name" id="processEdgeList">processEdgeList</span> - (<span class="type">int</span> <span class="variable-name">property</span>, <span class="type">FONode</span> <span class="variable-name">foNode</span>, <span class="type">PropertyValueList</span> <span class="variable-name">value</span>, - <span class="type">int</span> <span class="variable-name">styleProp</span>, <span class="type">int</span> <span class="variable-name">colorProp</span>, <span class="type">int</span> <span class="variable-name">widthProp</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="comment">//int property = value.getProperty(); -</span> <span class="type">String</span> <span class="variable-name">propName</span> = PropNames.getPropertyName(property); - <span class="type">PropertyValue</span> <span class="variable-name" id="color">color</span>= <span class="jde-java-font-lock-constant">null</span>, - style = <span class="jde-java-font-lock-constant">null</span>, - width = <span class="jde-java-font-lock-constant">null</span>; - - <span class="type">PropertyValueList</span> <span class="variable-name">newlist</span> = <span class="keyword">new</span> <span class="type">PropertyValueList</span>(property); - <span class="comment">// This is a list -</span> <span class="keyword">if</span> (value.size() == <span class="jde-java-font-lock-number">0</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">Empty list for </span>" + propName); - <span class="type">Iterator</span> <span class="variable-name" id="elements">elements</span> = ((<span class="type">PropertyValueList</span>)value).iterator(); - - <span class="reference">scanning_elements</span>: <span class="keyword">while</span> (elements.hasNext()) { - <span class="type">PropertyValue</span> <span class="variable-name" id="pval">pval</span> = (<span class="type">PropertyValue</span>)(elements.next()); - <span class="type">int</span> <span class="variable-name">type</span> = pval.getType(); - <span class="keyword">switch</span> (type) { - <span class="keyword">case</span> <span class="reference">PropertyValue.COLOR_TYPE</span>: - <span class="keyword">if</span> (color != <span class="jde-java-font-lock-constant">null</span>) MessageHandler.logln(propName + - "<span class="string">: duplicate color overrides previous color</span>"); - color = pval; - color.setProperty(colorProp); - <span class="keyword">continue</span> <span class="reference">scanning_elements</span>; - <span class="keyword">case</span> <span class="reference">PropertyValue.NUMERIC</span>: - <span class="keyword">if</span> (width != <span class="jde-java-font-lock-constant">null</span>) MessageHandler.logln(propName + - "<span class="string">: duplicate width overrides previous width</span>"); - width = pval; - width.setProperty(widthProp); - <span class="keyword">continue</span> <span class="reference">scanning_elements</span>; - <span class="keyword">case</span> <span class="reference">PropertyValue.NCNAME</span>: - <span class="comment">// Could be standard color, style Enum or width MappedNumeric -</span> <span class="type">PropertyValue</span> <span class="variable-name" id="colorFound">colorFound</span> = <span class="jde-java-font-lock-constant">null</span>; - <span class="type">PropertyValue</span> <span class="variable-name" id="styleFound">styleFound</span> = <span class="jde-java-font-lock-constant">null</span>; - <span class="type">PropertyValue</span> <span class="variable-name" id="widthFound">widthFound</span> = <span class="jde-java-font-lock-constant">null</span>; - - <span class="type">String</span> <span class="variable-name">ncname</span> = ((<span class="type">NCName</span>)pval).getNCName(); - <span class="keyword">try</span> { - styleFound = <span class="keyword">new</span> <span class="type">EnumType</span>(styleProp, ncname); - } <span class="keyword">catch</span> (<span class="type">PropertyException</span> <span class="variable-name">e</span>) {} - <span class="keyword">if</span> (styleFound != <span class="jde-java-font-lock-constant">null</span>) { - <span class="keyword">if</span> (style != <span class="jde-java-font-lock-constant">null</span>) MessageHandler.logln(propName + - "<span class="string">: duplicate style overrides previous style</span>"); - style = styleFound; - <span class="keyword">continue</span> <span class="reference">scanning_elements</span>; - } - - <span class="keyword">try</span> { - widthFound = - (<span class="keyword">new</span> <span class="type">MappedNumeric</span> - (foNode, widthProp, ncname)).getMappedNumValue(); - } <span class="keyword">catch</span> (<span class="type">PropertyException</span> <span class="variable-name">e</span>) {} - <span class="keyword">if</span> (widthFound != <span class="jde-java-font-lock-constant">null</span>) { - <span class="keyword">if</span> (width != <span class="jde-java-font-lock-constant">null</span>) MessageHandler.logln(propName + - "<span class="string">: duplicate width overrides previous width</span>"); - width = widthFound; - <span class="keyword">continue</span> <span class="reference">scanning_elements</span>; - } - - <span class="keyword">try</span> { - colorFound = <span class="keyword">new</span> <span class="type">ColorType</span>(colorProp, ncname); - } <span class="keyword">catch</span> (<span class="type">PropertyException</span> <span class="variable-name">e</span>) {}; - <span class="keyword">if</span> (colorFound != <span class="jde-java-font-lock-constant">null</span>) { - <span class="keyword">if</span> (color != <span class="jde-java-font-lock-constant">null</span>) MessageHandler.logln(propName + - "<span class="string">: duplicate color overrides previous color</span>"); - color = colorFound; - <span class="keyword">continue</span> <span class="reference">scanning_elements</span>; - } - - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">Unknown NCName value for </span>" + propName + "<span class="string">: </span>" + ncname); - <span class="keyword">default</span>: - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">Invalid </span>" + pval.getClass().getName() + - "<span class="string"> property value for </span>" + propName); - } <span class="comment">// end of switch -</span> } - - <span class="comment">// Now construct the list of PropertyValues with their -</span> <span class="comment">// associated property indices, as expanded from the -</span> <span class="comment">// border-right shorthand. -</span> <span class="keyword">if</span> (style != <span class="jde-java-font-lock-constant">null</span>) newlist.add(style); - <span class="keyword">if</span> (color != <span class="jde-java-font-lock-constant">null</span>) newlist.add(color); - <span class="keyword">if</span> (width != <span class="jde-java-font-lock-constant">null</span>) newlist.add(width); - <span class="keyword">return</span> newlist; - } - -} -</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 deleted file mode 100644 index c3454512e..000000000 --- a/src/documentation/content/design/alt.design/properties/PropertyConsts.html +++ /dev/null @@ -1,621 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- - Copyright 2001-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- $Id$ --> -<!-- 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">/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */</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-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-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/PropertyParser.html b/src/documentation/content/design/alt.design/properties/PropertyParser.html deleted file mode 100644 index 5bdd53bb1..000000000 --- a/src/documentation/content/design/alt.design/properties/PropertyParser.html +++ /dev/null @@ -1,1063 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- - Copyright 2001-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- $Id$ --> -<!-- Created by htmlize-0.67 in css mode. --> -<html> - <head> - <title>PropertyParser.java</title> - <style type="text/css"> - <!-- - body { - color: #000000; - background-color: #faf0e6; - } /* default */ - .jde-java-font-lock-number { - color: #bc8f8f; - background-color: #faf0e6; - } /* jde-java-font-lock-number-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 */ - .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 */ - .reference { - color: #cd0000; - background-color: #faf0e6; - } /* font-lock-reference-face */ - a { - color: inherit; - background-color: inherit; - font: inherit; - text-decoration: inherit; - } - a:hover { - text-decoration: underline; - } - --> - </style> - </head> - <body> - <pre> -<span class="comment">/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */</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="jde-java-font-lock-package">expr</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">PropertyConsts</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="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">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="jde-java-font-lock-package">expr</span>.<span class="type">SystemFontFunction</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">PropertyValueList</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">Literal</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">NCName</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">Percentage</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">Ems</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">IntegerType</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">Time</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">Frequency</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">Angle</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">Bool</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">Auto</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">None</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">Slash</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">ColorType</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">StringType</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">MimeType</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">UriType</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="jde-java-font-lock-package">indirect</span>.<span class="type">Inherit</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="jde-java-font-lock-package">indirect</span>.<span class="type">InheritedValue</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="jde-java-font-lock-package">indirect</span>.<span class="type">FromParent</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="jde-java-font-lock-package">indirect</span>.<span class="type">FromNearestSpecified</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">/** - * Class to parse XSL FO property expression. - * This class is heavily based on the expression parser in James Clark's - * XT, an XSLT processor. - * - * PropertyParser objects are re-usable. The constructor simply creates the - * object. To parse an expression, the public method <i></span><span class="jde-java-font-lock-italic">Parse</span><span class="comment"></i> is - * called. - */</span> -<span class="jde-java-font-lock-modifier">public</span> <span class="keyword">class</span> <span class="function-name" id="PropertyParserClass">PropertyParser</span> <span class="keyword">extends</span> <span class="type">PropertyTokenizer</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="comment">/** The FO tree which has initiated this parser */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">FOTree</span> <span class="variable-name" id="foTree">foTree</span>; - <span class="comment">/** The FONode which has initiated this parser */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">FONode</span> <span class="variable-name" id="node">node</span>; - - <span class="jde-java-font-lock-modifier">public</span> <span class="function-name" id="PropertyParser">PropertyParser</span>(<span class="type">FOTree</span> <span class="variable-name">foTree</span>) { - <span class="keyword">super</span>(); - <span class="keyword">this</span>.foTree = foTree; - } - - <span class="comment">/** - * Parse the property expression described in the instance variables. - * - * <p>The <tt>PropertyValue</tt> returned by this function has the - * following characteristics: - * If the expression resolves to a single element that object is returned - * directly in an object which implements <PropertyValue</tt>. - * - * <p>If the expression cannot be resolved into a single object, the set - * to which it resolves is returned in a <tt>PropertyValueList</tt> object - * (which itself implements <tt>PropertyValue</tt>). - * - * <p>The <tt>PropertyValueList</tt> contains objects whose corresponding - * elements in the original expression were separated by <em></span><span class="jde-java-font-lock-italic">commas</span><span class="comment"></em>. - * - * <p>Objects whose corresponding elements in the original expression - * were separated by spaces are composed into a sublist contained in - * another <tt>PropertyValueList</tt>. If all of the elements in the - * expression were separated by spaces, the returned - * <tt>PropertyValueList</tt> will contain one element, a - * <tt>PropertyValueList</tt> containing objects representing each of - * the space-separated elements in the original expression. - * - * <p>E.g., if a <b></span><span class="jde-java-font-lock-bold">font-family</span><span class="comment"></b> property is assigned the string - * <em></span><span class="jde-java-font-lock-italic">Palatino, New Century Schoolbook, serif</span><span class="comment"></em>, the returned value - * will look like this: - * <pre> - * PropertyValueList(NCName('Palatino') - * PropertyValueList(NCName('New') - * NCName('Century') - * NCName('Schoolbook') ) - * NCName('serif') ) - * </pre> - * <p>If the property had been assigned the string - * <em></span><span class="jde-java-font-lock-italic">Palatino, "New Century Schoolbook", serif</span><span class="comment"></em>, the returned value - * would look like this: - * <pre> - * PropertyValueList(NCName('Palatino') - * NCName('New Century Schoolbook') - * NCName('serif') ) - * </pre> - * <p>If a <b></span><span class="jde-java-font-lock-bold">background-position</span><span class="comment"></b> property is assigned the string - * <em></span><span class="jde-java-font-lock-italic">top center</span><span class="comment"></em>, the returned value will look like this: - * <pre> - * PropertyValueList(PropertyValueList(NCName('top') - * NCName('center') ) ) - * </pre> - * - * <p>Note: If the property expression String is empty, a StringProperty - * object holding an empty String is returned. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">node</span><span class="comment"> - the <tt>FONode</tt> for which the property expression - * is being resolved. - * </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"> - an <tt>int</tt> containing the property index. - * which the property expression is to be evaluated. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="expr">expr</span><span class="comment"> - the specified value (attribute on the xml element). - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a PropertyValue holding the parsed result. - * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException</span><span class="comment"> if the "expr" cannot be parsed as a - * PropertyValue. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">PropertyValue</span> <span class="function-name" id="parse">parse</span>(<span class="type">FONode</span> <span class="variable-name">node</span>, <span class="type">int</span> <span class="variable-name">property</span>, <span class="type">String</span> <span class="variable-name">expr</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="comment">//System.out.println("-----Entering parse:" -</span> <span class="comment">// + PropNames.getPropertyName(property) + " " + expr); -</span> <span class="jde-java-font-lock-modifier">synchronized</span> (<span class="keyword">this</span>) { - <span class="comment">// make sure this parser is available -</span> <span class="keyword">if</span> (getExpr() != <span class="jde-java-font-lock-constant" id="null">null</span>) <span class="comment">// the parser is currently active -</span> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">PropertyParser is currently active: </span>" + getExpr()); - initialize(property, expr); - <span class="keyword">this</span>.node = node; - } - - next(); - <span class="keyword">if</span> (currentToken == <span class="jde-java-font-lock-constant" id="EOF">EOF</span>) - <span class="comment">// prop value is empty -</span> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">No token recognized in :</span>" + expr + "<span class="string">:</span>"); - - <span class="type">PropertyValueList</span> <span class="variable-name" id="propList">propList</span> = <span class="keyword">new</span> <span class="type">PropertyValueList</span>(property); - <span class="keyword">while</span> (<span class="jde-java-font-lock-constant" id="true">true</span>) { - <span class="type">PropertyValue</span> <span class="variable-name" id="prop">prop</span> = parseAdditiveExpr(); - <span class="keyword">if</span> (currentToken == <span class="jde-java-font-lock-constant">EOF</span>) { - <span class="comment">// end of the expression - add to list and go -</span> <span class="keyword">if</span> (propList.size() != <span class="jde-java-font-lock-number">0</span>) { - propList.add(prop); - reset(); - <span class="keyword">return</span> propList; - } <span class="keyword">else</span> { <span class="comment">// list is empty -</span> reset(); - <span class="keyword">return</span> prop; - } - } - <span class="comment">// throw away commas separating arguments. These can occur -</span> <span class="comment">// in font-family and voice-family. Commas are regarded here -</span> <span class="comment">// as separators of list and sublist elements. -</span> <span class="comment">// See 7.16.5 "text-shadow" in the 1.0 Recommendation for an -</span> <span class="comment">// example of sublists. -</span> <span class="keyword">if</span> (currentToken == <span class="jde-java-font-lock-constant" id="COMMA">COMMA</span>) { - next(); - propList.add(prop); - } <span class="keyword">else</span> { <span class="comment">// whitespace separates list elements; make a sublist -</span> propList.add(parseSublist(prop)); - <span class="keyword">if</span> (currentToken == <span class="jde-java-font-lock-constant">EOF</span>) { - reset(); - <span class="keyword">return</span> propList; - } - } - } - } - - <span class="comment">/** - * <p>Parse a property values sublist - a list of whitespace separated - * <tt>PropertyValue</tt>s. - * <p> - * Property value expressions for various properties may contain lists - * of values, which may be separated by whitespace or by commas. See, - * e.g., 7.6.17 "voice-family" and 7.8.2 "font-family". The shorthands - * may also contain lists of elements, generally (or exclusively) - * whitespace separated. 7.16.5 "text-shadow" allows whitespace - * separated length doubles or triples to be specified for individual - * shadow effects, with multiple shadow effects, each separated by - * commmas. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="initialValue">initialValue</span><span class="comment"> a <tt>PropertyValue</tt> to assign as the initial - * value of the sublist. The detection of this value, which is - * whitespace separated from a subsequent value, has been the - * trigger for the creation of the sublist. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a <tt>PropertyValueList</tt> containing the sublist. The - * indicatior for the end of the sublist is the end of the expression, - * or a comma. - */</span> - <span class="type">PropertyValueList</span> <span class="function-name" id="parseSublist">parseSublist</span>(<span class="type">PropertyValue</span> <span class="variable-name">initialValue</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="type">PropertyValueList</span> <span class="variable-name" id="sublist">sublist</span> = <span class="keyword">new</span> <span class="type">PropertyValueList</span>(property); - sublist.add(initialValue); - <span class="keyword">while</span> (<span class="jde-java-font-lock-constant">true</span>) { - <span class="type">PropertyValue</span> <span class="variable-name">prop</span> = parseAdditiveExpr(); - <span class="keyword">if</span> (currentToken == <span class="jde-java-font-lock-constant">EOF</span>) { - <span class="comment">// end of the expression - add to sublist and go -</span> sublist.add(prop); - <span class="keyword">return</span> sublist; - } - <span class="comment">// Comma separates next element - end of sublist -</span> <span class="keyword">if</span> (currentToken == <span class="jde-java-font-lock-constant">COMMA</span>) { - next(); - sublist.add(prop); - <span class="keyword">return</span> sublist; - } <span class="keyword">else</span> { <span class="comment">// whitespace separates next elements; add to sublist -</span> sublist.add(prop); - } - } - } - - <span class="comment">/** - * Reset the parser by resetting the tokenizer to null (or equivalent) - * values. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">void</span> <span class="function-name" id="resetParser">resetParser</span>() { - <span class="jde-java-font-lock-modifier">synchronized</span> (<span class="keyword">this</span>) { - <span class="comment">//elementsSeen = 0; -</span> <span class="comment">//restrictedValueFunctSeen = null; -</span> reset(); - } - } - - <span class="comment">/** - * Generate an arithmetic error string. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> arithmetic error message. - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">String</span> <span class="function-name" id="arithErrorStr">arithErrorStr</span>() { - <span class="keyword">return</span> "<span class="string">Arithmetic operator not followed by Numeric or integer: </span>" - + getExpr(); - } - - - <span class="comment">/** - * Generate an function numeric argument error string. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> function numeric argument error message. - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">String</span> <span class="function-name" id="funcNumericErrorStr">funcNumericErrorStr</span>() { - <span class="keyword">return</span> "<span class="string">Function requires Numeric or integer argument: </span>" - + getExpr(); - } - - <span class="comment">/** - * Try to parse an addition or subtraction expression and return the - * resulting PropertyValue. - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">PropertyValue</span> <span class="function-name" id="parseAdditiveExpr">parseAdditiveExpr</span>() <span class="keyword">throws</span> <span class="type">PropertyException</span> { - <span class="comment">// Evaluate and put result on the operand stack -</span> <span class="comment">//System.out.println("parseAdd"); -</span> <span class="type">PropertyValue</span> <span class="variable-name">prop</span> = parseMultiplicativeExpr(); - <span class="type">PropertyValue</span> <span class="variable-name" id="pv">pv</span>; - <span class="reference">outer</span>: - <span class="keyword">for</span> (; ; ) { - <span class="reference">inner</span>: - <span class="keyword">switch</span> (prop.getType()) { - <span class="keyword">case</span> <span class="reference">PropertyValue.NUMERIC</span>: { - <span class="keyword">switch</span> (currentToken) { - <span class="keyword">case</span> <span class="reference">PLUS</span>: - next(); - pv = parseMultiplicativeExpr(); - <span class="keyword">switch</span> (pv.getType()) { - <span class="keyword">case</span> <span class="reference">PropertyValue.NUMERIC</span>: - ((<span class="type">Numeric</span>)prop).add((<span class="type">Numeric</span>)pv); - <span class="keyword">break</span> <span class="reference">inner</span>; - <span class="keyword">case</span> <span class="reference">PropertyValue.INTEGER</span>: - ((<span class="type">Numeric</span>)prop).add((<span class="type">double</span>) - (((<span class="type">IntegerType</span>)pv).getInt())); - <span class="keyword">break</span> <span class="reference">inner</span>; - <span class="keyword">default</span>: - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>(arithErrorStr()); - } - <span class="keyword">case</span> <span class="reference">MINUS</span>: - next(); - pv = parseMultiplicativeExpr(); - <span class="keyword">switch</span> (pv.getType()) { - <span class="keyword">case</span> <span class="reference">PropertyValue.NUMERIC</span>: - ((<span class="type">Numeric</span>)prop).subtract((<span class="type">Numeric</span>)pv); - <span class="keyword">break</span> <span class="reference">inner</span>; - <span class="keyword">case</span> <span class="reference">PropertyValue.INTEGER</span>: - ((<span class="type">Numeric</span>)prop).subtract((<span class="type">double</span>) - (((<span class="type">IntegerType</span>)pv).getInt())); - <span class="keyword">break</span> <span class="reference">inner</span>; - <span class="keyword">default</span>: - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>(arithErrorStr()); - } - <span class="keyword">default</span>: - <span class="keyword">break</span> <span class="reference">outer</span>; - } - } - <span class="keyword">case</span> <span class="reference">PropertyValue.INTEGER</span>: { - <span class="type">int</span> <span class="variable-name" id="intVal">intVal</span> = ((<span class="type">IntegerType</span>)prop).getInt(); - <span class="keyword">switch</span> (currentToken) { - <span class="keyword">case</span> <span class="reference">PLUS</span>: - next(); - pv = parseMultiplicativeExpr(); - <span class="keyword">switch</span> (pv.getType()) { - <span class="keyword">case</span> <span class="reference">PropertyValue.NUMERIC</span>: - prop = ((<span class="type">Numeric</span>)pv).add((<span class="type">double</span>)intVal); - <span class="keyword">break</span> <span class="reference">inner</span>; - <span class="keyword">case</span> <span class="reference">PropertyValue.INTEGER</span>: - ((<span class="type">IntegerType</span>)prop).setInt(intVal + - ((<span class="type">IntegerType</span>)pv).getInt()); - <span class="keyword">break</span> <span class="reference">inner</span>; - <span class="keyword">default</span>: - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>(arithErrorStr()); - } - <span class="keyword">case</span> <span class="reference">MINUS</span>: - next(); - pv = parseMultiplicativeExpr(); - <span class="keyword">switch</span> (pv.getType()) { - <span class="keyword">case</span> <span class="reference">PropertyValue.NUMERIC</span>: - ((<span class="type">Numeric</span>)pv).add((<span class="type">double</span>)(-intVal)); - prop = ((<span class="type">Numeric</span>)pv).negate(); - <span class="keyword">break</span> <span class="reference">inner</span>; - <span class="keyword">case</span> <span class="reference">PropertyValue.INTEGER</span>: - ((<span class="type">IntegerType</span>)prop).setInt(intVal + - ((<span class="type">IntegerType</span>)pv).getInt()); - <span class="keyword">break</span> <span class="reference">inner</span>; - <span class="keyword">default</span>: - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>(arithErrorStr()); - } - <span class="keyword">default</span>: - <span class="keyword">break</span> <span class="reference">outer</span>; - } - } - <span class="keyword">default</span>: - <span class="keyword">break</span> <span class="reference">outer</span>; - } - } - <span class="keyword">return</span> prop; - } - - <span class="comment">/** - * Try to parse a multiply, divide or modulo expression and return - * the resulting PropertyValue. - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">PropertyValue</span> <span class="function-name" id="parseMultiplicativeExpr">parseMultiplicativeExpr</span>() <span class="keyword">throws</span> <span class="type">PropertyException</span> { - <span class="comment">//System.out.println("parseMult"); -</span> <span class="type">PropertyValue</span> <span class="variable-name">prop</span> = parseUnaryExpr(); - <span class="type">PropertyValue</span> <span class="variable-name">pv</span>; - <span class="reference">outer</span>: - <span class="comment">// Outer loop exists to handle a sequence of multiplicative operations -</span> <span class="comment">// e.g. 5 * 4 / 2 -</span> <span class="comment">// break outer; will terminate the multiplicative expression parsing -</span> <span class="comment">// break inner; will look for another trailing multiplicative -</span> <span class="comment">// operator. -</span> <span class="keyword">for</span> (; ; ) { - <span class="reference">inner</span>: - <span class="keyword">switch</span> (prop.getType()) { - <span class="keyword">case</span> <span class="reference">PropertyValue.NUMERIC</span>: - <span class="keyword">switch</span> (currentToken) { - <span class="keyword">case</span> <span class="reference">DIV</span>: - next(); - pv = parseUnaryExpr(); - <span class="keyword">switch</span> (pv.getType()) { - <span class="keyword">case</span> <span class="reference">PropertyValue.INTEGER</span>: - ((<span class="type">Numeric</span>)prop).divide - ((<span class="type">double</span>)(((<span class="type">IntegerType</span>)pv).getInt())); - <span class="keyword">break</span> <span class="reference">inner</span>; - <span class="keyword">case</span> <span class="reference">PropertyValue.NUMERIC</span>: - ((<span class="type">Numeric</span>)prop).divide((<span class="type">Numeric</span>)pv); - <span class="keyword">break</span> <span class="reference">inner</span>; - <span class="keyword">default</span>: - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>(arithErrorStr()); - } - <span class="keyword">case</span> <span class="reference">MOD</span>: - next(); - pv = parseUnaryExpr(); - <span class="keyword">switch</span> (pv.getType()) { - <span class="keyword">case</span> <span class="reference">PropertyValue.INTEGER</span>: - ((<span class="type">Numeric</span>)prop).mod - ((<span class="type">double</span>)(((<span class="type">IntegerType</span>)pv).getInt())); - <span class="keyword">break</span> <span class="reference">inner</span>; - <span class="keyword">case</span> <span class="reference">PropertyValue.NUMERIC</span>: - ((<span class="type">Numeric</span>)prop).mod((<span class="type">Numeric</span>)pv); - <span class="keyword">break</span> <span class="reference">inner</span>; - <span class="keyword">default</span>: - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>(arithErrorStr()); - } - <span class="keyword">case</span> <span class="reference">MULTIPLY</span>: - next(); - pv = parseUnaryExpr(); - <span class="keyword">switch</span> (pv.getType()) { - <span class="keyword">case</span> <span class="reference">PropertyValue.INTEGER</span>: - ((<span class="type">Numeric</span>)prop).multiply - ((<span class="type">double</span>)(((<span class="type">IntegerType</span>)pv).getInt())); - <span class="keyword">break</span> <span class="reference">inner</span>; - <span class="keyword">case</span> <span class="reference">PropertyValue.NUMERIC</span>: - ((<span class="type">Numeric</span>)prop).multiply((<span class="type">Numeric</span>)pv); - <span class="keyword">break</span> <span class="reference">inner</span>; - <span class="keyword">default</span>: - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>(arithErrorStr()); - } - <span class="keyword">default</span>: - <span class="keyword">break</span> <span class="reference">outer</span>; - } - <span class="comment">// N.B. The above case cannot fall through to here -</span> <span class="keyword">case</span> <span class="reference">PropertyValue.INTEGER</span>: - <span class="comment">// This code treats all multiplicative operations as implicit -</span> <span class="comment">// operations on doubles. It might be reasonable to allow -</span> <span class="comment">// an integer multiply. -</span> <span class="type">int</span> <span class="variable-name">intVal</span> = ((<span class="type">IntegerType</span>)prop).getInt(); - <span class="keyword">switch</span> (currentToken) { - <span class="keyword">case</span> <span class="reference">DIV</span>: - next(); - pv = parseUnaryExpr(); - <span class="keyword">switch</span> (pv.getType()) { - <span class="keyword">case</span> <span class="reference">PropertyValue.INTEGER</span>: - prop = <span class="keyword">new</span> <span class="type">Numeric</span>(property, - (<span class="type">double</span>)intVal / ((<span class="type">IntegerType</span>)pv).getInt()); - <span class="keyword">break</span> <span class="reference">inner</span>; - <span class="keyword">case</span> <span class="reference">PropertyValue.NUMERIC</span>: - prop = (<span class="keyword">new</span> <span class="type">Numeric</span>(property, (<span class="type">double</span>)intVal)) - .divide((<span class="type">Numeric</span>)pv); - <span class="keyword">break</span> <span class="reference">inner</span>; - <span class="keyword">default</span>: - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>(arithErrorStr()); - } - <span class="keyword">case</span> <span class="reference">MOD</span>: - next(); - pv = parseUnaryExpr(); - <span class="keyword">switch</span> (pv.getType()) { - <span class="keyword">case</span> <span class="reference">PropertyValue.INTEGER</span>: - prop = <span class="keyword">new</span> <span class="type">Numeric</span>(property, - ((<span class="type">double</span>)intVal) % ((<span class="type">IntegerType</span>)pv).getInt()); - <span class="keyword">break</span> <span class="reference">inner</span>; - <span class="keyword">case</span> <span class="reference">PropertyValue.NUMERIC</span>: - prop = (<span class="keyword">new</span> <span class="type">Numeric</span>(property, (<span class="type">double</span>)intVal)) - .mod((<span class="type">Numeric</span>)pv); - <span class="keyword">break</span> <span class="reference">inner</span>; - <span class="keyword">default</span>: - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>(arithErrorStr()); - } - <span class="keyword">case</span> <span class="reference">MULTIPLY</span>: - next(); - pv = parseUnaryExpr(); - <span class="keyword">switch</span> (pv.getType()) { - <span class="keyword">case</span> <span class="reference">PropertyValue.INTEGER</span>: - prop = <span class="keyword">new</span> <span class="type">Numeric</span>(property, - ((<span class="type">double</span>)intVal) * ((<span class="type">IntegerType</span>)pv).getInt()); - <span class="keyword">break</span> <span class="reference">inner</span>; - <span class="keyword">case</span> <span class="reference">PropertyValue.NUMERIC</span>: - prop = (<span class="keyword">new</span> <span class="type">Numeric</span>(property, (<span class="type">double</span>)intVal)) - .multiply((<span class="type">Numeric</span>)pv); - <span class="keyword">break</span> <span class="reference">inner</span>; - <span class="keyword">default</span>: - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>(arithErrorStr()); - } - <span class="keyword">default</span>: - <span class="keyword">break</span> <span class="reference">outer</span>; - } - <span class="keyword">default</span>: - <span class="keyword">break</span> <span class="reference">outer</span>; - } - } - <span class="keyword">return</span> prop; - } - - <span class="comment">/** - * Try to parse a unary minus expression and return the - * resulting PropertyValue. - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">PropertyValue</span> <span class="function-name" id="parseUnaryExpr">parseUnaryExpr</span>() <span class="keyword">throws</span> <span class="type">PropertyException</span> { - <span class="comment">//System.out.println("Unary entry"); -</span> <span class="keyword">if</span> (currentToken == <span class="jde-java-font-lock-constant" id="MINUS">MINUS</span>) { - next(); - <span class="type">PropertyValue</span> <span class="variable-name">pv</span> = parseUnaryExpr(); - <span class="keyword">switch</span> (pv.getType()) { - <span class="keyword">case</span> <span class="reference">PropertyValue.NUMERIC</span>: - <span class="keyword">return</span> ((<span class="type">Numeric</span>)pv).negate(); - <span class="keyword">case</span> <span class="reference">PropertyValue.INTEGER</span>: - ((<span class="type">IntegerType</span>)pv).setInt( -((<span class="type">IntegerType</span>)pv).getInt()); - <span class="keyword">return</span> pv; - <span class="keyword">default</span>: - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>(arithErrorStr()); - } - } - <span class="keyword">return</span> parsePrimaryExpr(); - } - - - <span class="comment">/** - * Checks that the current token is a right parenthesis - * and throws an exception if this isn't the case. - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">void</span> <span class="function-name" id="expectRpar">expectRpar</span>() <span class="keyword">throws</span> <span class="type">PropertyException</span> { - <span class="keyword">if</span> (currentToken != <span class="jde-java-font-lock-constant" id="RPAR">RPAR</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">expected )</span>"); - next(); - } - - <span class="comment">/** - * Try to parse a primary expression and return the - * resulting PropertyValue. - * A primary expression is either a parenthesized expression or an - * expression representing a primitive PropertyValue datatype, such as a - * string literal, an NCname, a number or a unit expression, or a - * function call expression. - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">PropertyValue</span> <span class="function-name" id="parsePrimaryExpr">parsePrimaryExpr</span>() <span class="keyword">throws</span> <span class="type">PropertyException</span> { - <span class="type">PropertyValue</span> <span class="variable-name">prop</span>; - <span class="comment">//System.out.println("Primary currentToken:" + currentToken + " " -</span> <span class="comment">// + currentTokenValue); -</span> <span class="keyword">switch</span> (currentToken) { - <span class="keyword">case</span> <span class="reference">LPAR</span>: - next(); - prop = parseAdditiveExpr(); - expectRpar(); - <span class="comment">// Do this here, rather than breaking, because expectRpar() -</span> <span class="comment">// consumes the right parenthesis and calls next(). -</span> <span class="keyword">return</span> prop; - - <span class="keyword">case</span> <span class="reference">LITERAL</span>: - prop = <span class="keyword">new</span> <span class="type">Literal</span>(property, currentTokenValue); - <span class="keyword">break</span>; - - <span class="keyword">case</span> <span class="reference">NCNAME</span>: - <span class="comment">// Interpret this in context of the property or do it later? -</span> prop = <span class="keyword">new</span> <span class="type">NCName</span>(property, currentTokenValue); - <span class="keyword">break</span>; - - <span class="keyword">case</span> <span class="reference">FLOAT</span>: - <span class="comment">// Do I need to differentiate here between floats and integers? -</span> prop = <span class="keyword">new</span> <span class="type">Numeric</span> - (property, Double.parseDouble(currentTokenValue)); - <span class="keyword">break</span>; - - <span class="keyword">case</span> <span class="reference">INTEGER</span>: - prop = <span class="keyword">new</span> <span class="type">IntegerType</span> - (property, Integer.parseInt(currentTokenValue)); - <span class="keyword">break</span>; - - <span class="keyword">case</span> <span class="reference">PERCENT</span>: - <span class="comment">/* - * Generate a Percentage object with the percentage number. - * The constructor converts this to a straight multiplicative - * factor by dividing by 100. - */</span> - prop = Percentage.makePercentage - (property, Double.parseDouble(currentTokenValue)); - <span class="keyword">break</span>; - - <span class="keyword">case</span> <span class="reference">ABSOLUTE_LENGTH</span>: - prop = Length.makeLength(property, - Double.parseDouble(currentTokenValue), - currentUnit); - <span class="keyword">break</span>; - <span class="keyword">case</span> <span class="reference">TIME</span>: - prop = <span class="keyword">new</span> <span class="type">Time</span>(property, currentUnit, - Double.parseDouble(currentTokenValue)); - <span class="keyword">break</span>; - <span class="keyword">case</span> <span class="reference">FREQ</span>: - prop = <span class="keyword">new</span> <span class="type">Frequency</span>(property, currentUnit, - Double.parseDouble(currentTokenValue)); - <span class="keyword">break</span>; - <span class="keyword">case</span> <span class="reference">ANGLE</span>: - prop = <span class="keyword">new</span> <span class="type">Angle</span>(property, currentUnit, - Double.parseDouble(currentTokenValue)); - <span class="keyword">break</span>; - <span class="keyword">case</span> <span class="reference">RELATIVE_LENGTH</span>: - prop = Ems.makeEms(node, property, - Double.parseDouble(currentTokenValue)); - <span class="keyword">break</span>; - - <span class="keyword">case</span> <span class="reference">COLORSPEC</span>: - prop = <span class="keyword">new</span> <span class="type">ColorType</span>(property, currentTokenValue); - <span class="keyword">break</span>; - - <span class="keyword">case</span> <span class="reference">BOOL</span>: - prop = <span class="keyword">new</span> <span class="type">Bool</span>(property, currentTokenValue); - <span class="keyword">break</span>; - - <span class="keyword">case</span> <span class="reference">AUTO</span>: - prop = <span class="keyword">new</span> <span class="type">Auto</span>(property); - <span class="keyword">break</span>; - - <span class="keyword">case</span> <span class="reference">NONE</span>: - prop = <span class="keyword">new</span> <span class="type">None</span>(property); - <span class="keyword">break</span>; - - <span class="keyword">case</span> <span class="reference">INHERIT</span>: - prop = <span class="keyword">new</span> <span class="type">Inherit</span>(property); - <span class="comment">//throw new PropertyException("INHERIT not supported"); -</span> <span class="keyword">break</span>; - - <span class="keyword">case</span> <span class="reference">URI</span>: - prop = <span class="keyword">new</span> <span class="type">UriType</span>(property, currentTokenValue); - <span class="keyword">break</span>; - - <span class="keyword">case</span> <span class="reference">MIMETYPE</span>: - prop = <span class="keyword">new</span> <span class="type">MimeType</span>(property, currentTokenValue); - <span class="keyword">break</span>; - - <span class="keyword">case</span> <span class="reference">SLASH</span>: - prop = <span class="keyword">new</span> <span class="type">Slash</span>(property); - <span class="keyword">break</span>; - - <span class="keyword">case</span> <span class="reference">FUNCTION_LPAR</span>: { - <span class="comment">// N.B. parseArgs() invokes expectRpar at the end of argument -</span> <span class="comment">// processing, so, like LPAR processing, next() is not called -</span> <span class="comment">// and the return from this method must be premature -</span> prop = <span class="jde-java-font-lock-constant">null</span>; - <span class="type">int</span> <span class="variable-name" id="funcType">funcType</span> = PropertyValue.<span class="jde-java-font-lock-constant" id="NO_TYPE">NO_TYPE</span>; - <span class="type">String</span> <span class="variable-name" id="function">function</span> = currentTokenValue; - next(); - <span class="keyword">do</span> { - <span class="comment">// Numeric functions -</span> <span class="keyword">if</span> (function.equals("<span class="string">floor</span>")) { - <span class="type">PropertyValue</span>[] <span class="variable-name" id="args">args</span> = parseArgs(<span class="jde-java-font-lock-number">1</span>); - <span class="keyword">switch</span> (args[<span class="jde-java-font-lock-number">0</span>].getType()) { - <span class="keyword">case</span> <span class="reference">PropertyValue.INTEGER</span>: - args[<span class="jde-java-font-lock-number">0</span>] = - <span class="keyword">new</span> <span class="type">Numeric</span> - (property, ((<span class="type">IntegerType</span>)args[<span class="jde-java-font-lock-number">0</span>]).getInt()); - <span class="keyword">case</span> <span class="reference">PropertyValue.NUMERIC</span>: - prop = <span class="keyword">new</span> <span class="type">Numeric</span> - (property, ((<span class="type">Numeric</span>)args[<span class="jde-java-font-lock-number">0</span>]).floor()); - <span class="keyword">break</span>; - <span class="keyword">default</span>: - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>(funcNumericErrorStr()); - } - <span class="keyword">break</span>; - } - <span class="keyword">if</span> (function.equals("<span class="string">ceiling</span>")) { - <span class="type">PropertyValue</span>[] <span class="variable-name">args</span> = parseArgs(<span class="jde-java-font-lock-number">1</span>); - <span class="keyword">switch</span> (args[<span class="jde-java-font-lock-number">0</span>].getType()) { - <span class="keyword">case</span> <span class="reference">PropertyValue.INTEGER</span>: - args[<span class="jde-java-font-lock-number">0</span>] = - <span class="keyword">new</span> <span class="type">Numeric</span> - (property, ((<span class="type">IntegerType</span>)args[<span class="jde-java-font-lock-number">0</span>]).getInt()); - <span class="keyword">case</span> <span class="reference">PropertyValue.NUMERIC</span>: - prop = <span class="keyword">new</span> <span class="type">Numeric</span> - (property, ((<span class="type">Numeric</span>)args[<span class="jde-java-font-lock-number">0</span>]).ceiling()); - <span class="keyword">break</span>; - <span class="keyword">default</span>: - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>(funcNumericErrorStr()); - } - <span class="keyword">break</span>; - } - <span class="keyword">if</span> (function.equals("<span class="string">round</span>")) { - <span class="type">PropertyValue</span>[] <span class="variable-name">args</span> = parseArgs(<span class="jde-java-font-lock-number">1</span>); - <span class="keyword">switch</span> (args[<span class="jde-java-font-lock-number">0</span>].getType()) { - <span class="keyword">case</span> <span class="reference">PropertyValue.INTEGER</span>: - args[<span class="jde-java-font-lock-number">0</span>] = - <span class="keyword">new</span> <span class="type">Numeric</span> - (property, ((<span class="type">IntegerType</span>)args[<span class="jde-java-font-lock-number">0</span>]).getInt()); - <span class="keyword">case</span> <span class="reference">PropertyValue.NUMERIC</span>: - prop = <span class="keyword">new</span> <span class="type">Numeric</span> - (property, ((<span class="type">Numeric</span>)args[<span class="jde-java-font-lock-number">0</span>]).round()); - <span class="keyword">break</span>; - <span class="keyword">default</span>: - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>(funcNumericErrorStr()); - } - <span class="keyword">break</span>; - } - <span class="keyword">if</span> (function.equals("<span class="string">min</span>")) { - <span class="type">PropertyValue</span>[] <span class="variable-name">args</span> = parseArgs(<span class="jde-java-font-lock-number">2</span>); - <span class="keyword">switch</span> (args[<span class="jde-java-font-lock-number">0</span>].getType()) { - <span class="keyword">case</span> <span class="reference">PropertyValue.INTEGER</span>: - args[<span class="jde-java-font-lock-number">0</span>] = - <span class="keyword">new</span> <span class="type">Numeric</span> - (property, ((<span class="type">IntegerType</span>)args[<span class="jde-java-font-lock-number">0</span>]).getInt()); - <span class="keyword">case</span> <span class="reference">PropertyValue.NUMERIC</span>: - prop = ((<span class="type">Numeric</span>)args[<span class="jde-java-font-lock-number">0</span>]).min((<span class="type">Numeric</span>)args[<span class="jde-java-font-lock-number">1</span>]); - <span class="keyword">break</span>; - <span class="keyword">default</span>: - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>(funcNumericErrorStr()); - } - <span class="keyword">break</span>; - } - <span class="keyword">if</span> (function.equals("<span class="string">max</span>")) { - <span class="type">PropertyValue</span>[] <span class="variable-name">args</span> = parseArgs(<span class="jde-java-font-lock-number">2</span>); - <span class="keyword">switch</span> (args[<span class="jde-java-font-lock-number">0</span>].getType()) { - <span class="keyword">case</span> <span class="reference">PropertyValue.INTEGER</span>: - args[<span class="jde-java-font-lock-number">0</span>] = - <span class="keyword">new</span> <span class="type">Numeric</span> - (property, ((<span class="type">IntegerType</span>)args[<span class="jde-java-font-lock-number">0</span>]).getInt()); - <span class="keyword">case</span> <span class="reference">PropertyValue.NUMERIC</span>: - prop = ((<span class="type">Numeric</span>)args[<span class="jde-java-font-lock-number">0</span>]).max((<span class="type">Numeric</span>)args[<span class="jde-java-font-lock-number">1</span>]); - <span class="keyword">break</span>; - <span class="keyword">default</span>: - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>(funcNumericErrorStr()); - } - <span class="keyword">break</span>; - } - <span class="keyword">if</span> (function.equals("<span class="string">abs</span>")) { - <span class="type">PropertyValue</span>[] <span class="variable-name">args</span> = parseArgs(<span class="jde-java-font-lock-number">1</span>); - <span class="keyword">switch</span> (args[<span class="jde-java-font-lock-number">0</span>].getType()) { - <span class="keyword">case</span> <span class="reference">PropertyValue.INTEGER</span>: - args[<span class="jde-java-font-lock-number">0</span>] = - <span class="keyword">new</span> <span class="type">Numeric</span> - (property, ((<span class="type">IntegerType</span>)args[<span class="jde-java-font-lock-number">0</span>]).getInt()); - <span class="keyword">case</span> <span class="reference">PropertyValue.NUMERIC</span>: - prop = ((<span class="type">Numeric</span>)args[<span class="jde-java-font-lock-number">0</span>]).abs(); - <span class="keyword">break</span>; - <span class="keyword">default</span>: - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>(funcNumericErrorStr()); - } - <span class="keyword">break</span>; - } - - <span class="comment">// Color functions -</span> <span class="keyword">if</span> (function.equals("<span class="string">rgb</span>")) { - <span class="comment">// Currently arguments must all be integers. -</span> <span class="type">PropertyValue</span>[] <span class="variable-name">args</span> = parseArgs(<span class="jde-java-font-lock-number">3</span>); - <span class="keyword">switch</span> (args[<span class="jde-java-font-lock-number">0</span>].getType()) { - <span class="keyword">case</span> <span class="reference">PropertyValue.INTEGER</span>: - prop = <span class="keyword">new</span> <span class="type">ColorType</span> - (property, ((<span class="type">IntegerType</span>)args[<span class="jde-java-font-lock-number">0</span>]).getInt(), - ((<span class="type">IntegerType</span>)args[<span class="jde-java-font-lock-number">1</span>]).getInt(), - ((<span class="type">IntegerType</span>)args[<span class="jde-java-font-lock-number">2</span>]).getInt()); - <span class="keyword">break</span>; - <span class="keyword">case</span> <span class="reference">PropertyValue.NUMERIC</span>: - prop = <span class="keyword">new</span> <span class="type">ColorType</span> - (property, ((<span class="type">Numeric</span>)args[<span class="jde-java-font-lock-number">0</span>]).asInt(), - ((<span class="type">Numeric</span>)args[<span class="jde-java-font-lock-number">1</span>]).asInt(), - ((<span class="type">Numeric</span>)args[<span class="jde-java-font-lock-number">2</span>]).asInt()); - <span class="keyword">break</span>; - <span class="keyword">default</span>: - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>(funcNumericErrorStr()); - } - <span class="keyword">break</span>; - } - <span class="keyword">if</span> (function.equals("<span class="string">rgb-icc</span>")) { - <span class="type">PropertyValue</span>[] <span class="variable-name">args</span> = parseArgs(<span class="jde-java-font-lock-number">6</span>); - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">FunctionNotImplementedException</span>("<span class="string">rgb-icc</span>"); - <span class="comment">//break; -</span> } - <span class="keyword">if</span> (function.equals("<span class="string">system-color</span>")) { - <span class="type">PropertyValue</span>[] <span class="variable-name">args</span> = parseArgs(<span class="jde-java-font-lock-number">1</span>); - prop = <span class="keyword">new</span> <span class="type">ColorType</span> - (property, ((<span class="type">StringType</span>)args[<span class="jde-java-font-lock-number">0</span>]).getString()); - <span class="keyword">break</span>; - } - - <span class="comment">// Font function -</span> <span class="keyword">if</span> (function.equals("<span class="string">system-font</span>")) { - <span class="type">PropertyValue</span>[] <span class="variable-name">args</span> = parseArgs(<span class="jde-java-font-lock-number">1</span>, <span class="jde-java-font-lock-number">2</span>); - <span class="keyword">if</span> (args.length == <span class="jde-java-font-lock-number">1</span>) { - prop = SystemFontFunction.systemFontCharacteristic - (property, - ((<span class="type">StringType</span>)args[<span class="jde-java-font-lock-number">0</span>]).getString()); - } <span class="keyword">else</span> { - <span class="comment">// 2 args -</span> prop = SystemFontFunction.systemFontCharacteristic - (property, - ((<span class="type">StringType</span>)args[<span class="jde-java-font-lock-number">0</span>]).getString(), - ((<span class="type">StringType</span>)args[<span class="jde-java-font-lock-number">1</span>]).getString()); - } - <span class="keyword">break</span>; - } - - <span class="comment">// Property value functions -</span> <span class="keyword">if</span> (function.equals("<span class="string">label-end</span>")) { - <span class="type">PropertyValue</span>[] <span class="variable-name">args</span> = parseArgs(<span class="jde-java-font-lock-number">0</span>); - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">FunctionNotImplementedException</span>("<span class="string">label-end</span>"); - <span class="comment">//break; -</span> } - <span class="keyword">if</span> (function.equals("<span class="string">body-start</span>")) { - <span class="type">PropertyValue</span>[] <span class="variable-name">args</span> = parseArgs(<span class="jde-java-font-lock-number">0</span>); - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">FunctionNotImplementedException</span>("<span class="string">body-start</span>"); - <span class="comment">//break; -</span> } - <span class="keyword">if</span> (function.equals("<span class="string">inherited-property-value</span>")) { - <span class="type">int</span> <span class="variable-name" id="propindex">propindex</span> = property; - <span class="type">PropertyValue</span>[] <span class="variable-name">args</span> = parseArgs(<span class="jde-java-font-lock-number">0</span>, <span class="jde-java-font-lock-number">1</span>); - <span class="keyword">if</span> (args.length != <span class="jde-java-font-lock-number">0</span>) - propindex = PropNames.getPropertyIndex( - ((<span class="type">StringType</span>)args[<span class="jde-java-font-lock-number">0</span>]).getString()); - - <span class="comment">// If it's a compound, return an InheritedValue object -</span> <span class="keyword">if</span> (PropertyConsts.pconsts.isCompound(propindex)) { - prop = <span class="keyword">new</span> <span class="type">InheritedValue</span>(property, propindex); - <span class="keyword">break</span>; - } - <span class="comment">// Is it an inherited property? -</span> <span class="keyword">if</span> (PropertyConsts.pconsts.inheritance(propindex) - == Property.<span class="jde-java-font-lock-constant" id="NO">NO</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">inherited-property-value: </span>" - + PropNames.getPropertyName(propindex) - + "<span class="string"> is not inherited.</span>"); - <span class="comment">// Not a compound, and inherited - try to resolve it -</span> prop = node.fromParent(property, propindex); - <span class="keyword">break</span>; - } - <span class="comment">// N.B. see comments on classes FromNearestSpecified and -</span> <span class="comment">// FromParent for explanation of this section -</span> <span class="keyword">if</span> (function.equals("<span class="string">from-parent</span>")) - funcType = PropertyValue.<span class="jde-java-font-lock-constant" id="FROM_PARENT">FROM_PARENT</span>; - <span class="keyword">if</span> (function.equals("<span class="string">from-nearest-specified-value</span>")) - funcType = PropertyValue.<span class="jde-java-font-lock-constant" id="FROM_NEAREST_SPECIFIED">FROM_NEAREST_SPECIFIED</span>; - <span class="keyword">if</span> (funcType == <span class="reference">PropertyValue</span>.<span class="type">FROM_PARENT</span> - || funcType == PropertyValue.<span class="jde-java-font-lock-constant">FROM_NEAREST_SPECIFIED</span>) - { - <span class="comment">// Preset the return value in case of a shorthand property -</span> <span class="keyword">switch</span> (funcType) { - <span class="keyword">case</span> <span class="reference">PropertyValue.FROM_PARENT</span>: - prop = <span class="keyword">new</span> <span class="type">FromParent</span>(property); - <span class="keyword">case</span> <span class="reference">PropertyValue.FROM_NEAREST_SPECIFIED</span>: - prop = <span class="keyword">new</span> <span class="type">FromNearestSpecified</span>(property); - } - - <span class="type">PropertyValue</span>[] <span class="variable-name">args</span> = parseArgs(<span class="jde-java-font-lock-number">0</span>, <span class="jde-java-font-lock-number">1</span>); - <span class="keyword">if</span> (args.length == <span class="jde-java-font-lock-number">0</span>) { - <span class="keyword">if</span> (! (PropertyConsts.pconsts.isShorthand(property) - || PropertyConsts.pconsts.isCompound(property))) { - <span class="comment">// develop the function value and return it as -</span> <span class="comment">// a property. -</span> <span class="keyword">switch</span> (funcType) { - <span class="keyword">case</span> <span class="reference">PropertyValue.FROM_PARENT</span>: - prop = node.fromParent(property); - <span class="keyword">case</span> <span class="reference">PropertyValue.FROM_NEAREST_SPECIFIED</span>: - prop = node.fromNearestSpecified(property); - } - } - <span class="comment">// else a shorthand/compound - do nothing; -</span> <span class="comment">// prop has been -</span> <span class="comment">// set to the appropriate pseudo-propertyValue -</span> } <span class="keyword">else</span> { <span class="comment">// one argument - it must be a property name -</span> <span class="keyword">if</span> ( ! (args[<span class="jde-java-font-lock-number">0</span>] <span class="keyword">instanceof</span> <span class="type">NCName</span>)) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - (function + "<span class="string"> function requires</span>" - + "<span class="string"> property name arg.</span>"); - <span class="comment">// else arg[0] is an NCName -</span> <span class="type">NCName</span> <span class="variable-name" id="ncname">ncname</span> = (<span class="type">NCName</span>)args[<span class="jde-java-font-lock-number">0</span>]; - <span class="type">String</span> <span class="variable-name" id="propname">propname</span> = ncname.getNCName(); - <span class="type">int</span> <span class="variable-name" id="nameindex">nameindex</span> = - PropNames.getPropertyIndex(propname); - <span class="keyword">if</span> (PropertyConsts.pconsts.isShorthand(nameindex) - || PropertyConsts.pconsts.isCompound(nameindex)) { - <span class="comment">// the argument is a shorthand/compound property - -</span> <span class="comment">// it must be the same as the property being -</span> <span class="comment">// assigned to. -</span> <span class="comment">// see 5.10.4 Property Value Functions -</span> <span class="keyword">if</span> ( ! (nameindex == property)) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - (function + - "<span class="string"> argument </span>" + propname + - "<span class="string"> does not match property </span>" + - PropNames.getPropertyName(property)); - <span class="comment">// else perform shorthand/compound processing -</span> <span class="comment">// i.e. do nothing; -</span> <span class="comment">// prop has been set to the correct -</span> <span class="comment">// pseudo-propertyValue -</span> } - <span class="keyword">else</span> { <span class="comment">// An NCName but not a shorthand/compound -</span> <span class="comment">// Perform normal from-? processing -</span> <span class="keyword">switch</span> (funcType) { - <span class="keyword">case</span> <span class="reference">PropertyValue.FROM_PARENT</span>: - prop = node.fromParent(property, nameindex); - <span class="keyword">case</span> <span class="reference">PropertyValue.FROM_NEAREST_SPECIFIED</span>: - prop = node.fromNearestSpecified - (property, nameindex); - } - } - } - <span class="keyword">break</span>; - } - <span class="keyword">if</span> (function.equals("<span class="string">from-table-column</span>")) { - <span class="type">PropertyValue</span>[] <span class="variable-name">args</span> = parseArgs(<span class="jde-java-font-lock-number">0</span>, <span class="jde-java-font-lock-number">1</span>); - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">FunctionNotImplementedException</span> - ("<span class="string">from-table-column</span>"); - <span class="comment">//break; -</span> } - <span class="keyword">if</span> (function.equals("<span class="string">proportional-column-width</span>")) { - <span class="type">PropertyValue</span>[] <span class="variable-name">args</span> = parseArgs(<span class="jde-java-font-lock-number">1</span>); - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">FunctionNotImplementedException</span> - ("<span class="string">proportional-column-width</span>"); - <span class="comment">//break; -</span> } - <span class="keyword">if</span> (function.equals("<span class="string">merge-property-values</span>")) { - <span class="type">PropertyValue</span>[] <span class="variable-name">args</span> = parseArgs(<span class="jde-java-font-lock-number">0</span>, <span class="jde-java-font-lock-number">1</span>); - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">FunctionNotImplementedException</span> - ("<span class="string">merge-property-values</span>"); - <span class="comment">//break; -</span> } - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">no such function: </span>" - + function); - } <span class="keyword">while</span> (<span class="jde-java-font-lock-constant" id="false">false</span>); - <span class="keyword">return</span> prop; - } - <span class="keyword">default</span>: - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">syntax error</span>"); - } - next(); - <span class="keyword">return</span> prop; - } - - <span class="comment">/** - * Parse a comma separated list of function arguments. Each argument - * may itself be an expression. This method consumes the closing right - * parenthesis of the argument list. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="nbArgs">nbArgs</span><span class="comment"> The number of arguments expected by the function. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>PropertyValueList</tt> of <tt>PropertyValue</tt> objects - * representing the arguments found. - * </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="type">PropertyValue</span>[] <span class="function-name" id="parseArgs">parseArgs</span>(<span class="type">int</span> <span class="variable-name">nbArgs</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> { - <span class="keyword">return</span> parseArgs(nbArgs, nbArgs); - } - - <span class="comment">/** - * Parse a comma separated list of function arguments. Each argument - * may itself be an expression. This method consumes the closing right - * parenthesis of the argument list. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="minArgs">minArgs</span><span class="comment"> The minimum number of arguments expected by the function. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="maxArgs">maxArgs</span><span class="comment"> The maximum number of arguments expected by the function. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>PropertyValueList</tt> of <tt>PropertyValue</tt> objects - * representing the arguments found. N.B. The actual number of arguments - * returned is guaranteed to be between minArgs and maxArgs, inclusive, - * but the actual list of args found is terminated by the end of the - * array, or the first null element. - * </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="type">PropertyValue</span>[] <span class="function-name">parseArgs</span>(<span class="type">int</span> <span class="variable-name">minArgs</span>, <span class="type">int</span> <span class="variable-name">maxArgs</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="type">PropertyValue</span>[] <span class="variable-name">args</span> = <span class="keyword">new</span> <span class="type">PropertyValue</span>[maxArgs]; - <span class="type">PropertyValue</span> <span class="variable-name">prop</span>; - <span class="type">int</span> <span class="variable-name" id="i">i</span> = <span class="jde-java-font-lock-number">0</span>; - <span class="keyword">if</span> (currentToken == <span class="jde-java-font-lock-constant">RPAR</span>) { - <span class="comment">// No args: func() -</span> next(); - } <span class="keyword">else</span> { - <span class="keyword">while</span> (<span class="jde-java-font-lock-constant">true</span>) { - prop = parseAdditiveExpr(); - <span class="keyword">if</span> (i < maxArgs) { - args[i++] = prop; - } - <span class="comment">// ignore extra args -</span> <span class="keyword">if</span> (currentToken != <span class="jde-java-font-lock-constant">COMMA</span>) - <span class="keyword">break</span>; - next(); - } - expectRpar(); - } - <span class="keyword">if</span> (minArgs > i || i > maxArgs) { - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">Wrong number of args for function</span>"); - } - <span class="keyword">return</span> args; - } - -} -</pre> - </body> -</html> diff --git a/src/documentation/content/design/alt.design/properties/PropertySets.html b/src/documentation/content/design/alt.design/properties/PropertySets.html deleted file mode 100644 index 95eea3af1..000000000 --- a/src/documentation/content/design/alt.design/properties/PropertySets.html +++ /dev/null @@ -1,442 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- - Copyright 2001-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- $Id$ --> -<!-- Created by htmlize-0.67 in css mode. --> -<html> - <head> - <title>PropertySets.java</title> - <style type="text/css"> - <!-- - body { - color: #000000; - background-color: #faf0e6; - } /* default */ - .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 */ - .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="comment">/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */</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">util</span>.<span class="type">BitSet</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">datastructs</span>.<span class="type">ROBitSet</span>; - -<span class="comment">/** - * This class contains <tt>ROBitSet</tt>s which encode the various sets of - * properties which are defined to apply to each of the Flow Objects. These - * <tt>ROBitSet</tt>s provide a convenient means of specifying the - * relationship between FOs and properties. - * </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-modifier">public</span> <span class="keyword">class</span> <span class="function-name" id="PropertySetsClass">PropertySets</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="comment">/** - * <tt>BitSet</tt> of the <tt>Integer</tt> objects corresponding to the - * constant index of each property in the set of - * <b></span><span class="jde-java-font-lock-bold">Common Accessibility Properties</span><span class="comment"></b>. - */</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">BitSet</span> <span class="variable-name" id="accessibilityProps">accessibilityProps</span> = <span class="keyword">new</span> <span class="type">BitSet</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">ROBitSet</span> <span class="variable-name" id="accessibilitySet">accessibilitySet</span>; - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">BitSet</span> <span class="function-name" id="accessibilitySetClone">accessibilitySetClone</span>() { - <span class="keyword">return</span> (<span class="type">BitSet</span>)(accessibilityProps.clone()); - } - - <span class="jde-java-font-lock-modifier">static</span> { - accessibilityProps.set(PropNames.<span class="jde-java-font-lock-constant" id="ROLE">ROLE</span>); - accessibilityProps.set(PropNames.<span class="jde-java-font-lock-constant" id="SOURCE_DOCUMENT">SOURCE_DOCUMENT</span>); - accessibilitySet = <span class="keyword">new</span> <span class="type">ROBitSet</span>(accessibilityProps); - } - <span class="comment">/** - * <tt>BitSet</tt> of the <tt>Integer</tt> objects corresponding to the - * constant index of each property in the set of - * <b></span><span class="jde-java-font-lock-bold">Common Absolute Position Properties</span><span class="comment"></b>. - */</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">BitSet</span> <span class="variable-name" id="absolutePositionProps">absolutePositionProps</span> = <span class="keyword">new</span> <span class="type">BitSet</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">ROBitSet</span> <span class="variable-name" id="absolutePositionSet">absolutePositionSet</span>; - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">BitSet</span> <span class="function-name" id="absolutePositionSetClone">absolutePositionSetClone</span>() { - <span class="keyword">return</span> (<span class="type">BitSet</span>)(absolutePositionProps.clone()); - } - - <span class="jde-java-font-lock-modifier">static</span> { - absolutePositionProps.set(PropNames.<span class="jde-java-font-lock-constant" id="ABSOLUTE_POSITION">ABSOLUTE_POSITION</span>); - absolutePositionProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BOTTOM">BOTTOM</span>); - absolutePositionProps.set(PropNames.<span class="jde-java-font-lock-constant" id="LEFT">LEFT</span>); - absolutePositionProps.set(PropNames.<span class="jde-java-font-lock-constant" id="RIGHT">RIGHT</span>); - absolutePositionProps.set(PropNames.<span class="jde-java-font-lock-constant" id="TOP">TOP</span>); - absolutePositionSet = <span class="keyword">new</span> <span class="type">ROBitSet</span>(absolutePositionProps); - } - <span class="comment">/** - * <tt>BitSet</tt> of the <tt>Integer</tt> objects corresponding to the - * constant index of each property in the set of - * <b></span><span class="jde-java-font-lock-bold">Common Aural Properties</span><span class="comment"></b>. - */</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">BitSet</span> <span class="variable-name" id="auralProps">auralProps</span> = <span class="keyword">new</span> <span class="type">BitSet</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">ROBitSet</span> <span class="variable-name" id="auralSet">auralSet</span>; - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">BitSet</span> <span class="function-name" id="auralSetClone">auralSetClone</span>() { - <span class="keyword">return</span> (<span class="type">BitSet</span>)(auralProps.clone()); - } - - <span class="jde-java-font-lock-modifier">static</span> { - auralProps.set(PropNames.<span class="jde-java-font-lock-constant" id="AZIMUTH">AZIMUTH</span>); - auralProps.set(PropNames.<span class="jde-java-font-lock-constant" id="CUE_AFTER">CUE_AFTER</span>); - auralProps.set(PropNames.<span class="jde-java-font-lock-constant" id="CUE_BEFORE">CUE_BEFORE</span>); - auralProps.set(PropNames.<span class="jde-java-font-lock-constant" id="ELEVATION">ELEVATION</span>); - auralProps.set(PropNames.<span class="jde-java-font-lock-constant" id="PAUSE_AFTER">PAUSE_AFTER</span>); - auralProps.set(PropNames.<span class="jde-java-font-lock-constant" id="PAUSE_BEFORE">PAUSE_BEFORE</span>); - auralProps.set(PropNames.<span class="jde-java-font-lock-constant" id="PITCH">PITCH</span>); - auralProps.set(PropNames.<span class="jde-java-font-lock-constant" id="PITCH_RANGE">PITCH_RANGE</span>); - auralProps.set(PropNames.<span class="jde-java-font-lock-constant" id="PLAY_DURING">PLAY_DURING</span>); - auralProps.set(PropNames.<span class="jde-java-font-lock-constant" id="RICHNESS">RICHNESS</span>); - auralProps.set(PropNames.<span class="jde-java-font-lock-constant" id="SPEAK">SPEAK</span>); - auralProps.set(PropNames.<span class="jde-java-font-lock-constant" id="SPEAK_HEADER">SPEAK_HEADER</span>); - auralProps.set(PropNames.<span class="jde-java-font-lock-constant" id="SPEAK_NUMERAL">SPEAK_NUMERAL</span>); - auralProps.set(PropNames.<span class="jde-java-font-lock-constant" id="SPEAK_PUNCTUATION">SPEAK_PUNCTUATION</span>); - auralProps.set(PropNames.<span class="jde-java-font-lock-constant" id="SPEECH_RATE">SPEECH_RATE</span>); - auralProps.set(PropNames.<span class="jde-java-font-lock-constant" id="STRESS">STRESS</span>); - auralProps.set(PropNames.<span class="jde-java-font-lock-constant" id="VOICE_FAMILY">VOICE_FAMILY</span>); - auralProps.set(PropNames.<span class="jde-java-font-lock-constant" id="VOLUME">VOLUME</span>); - auralSet = <span class="keyword">new</span> <span class="type">ROBitSet</span>(auralProps); - } - <span class="comment">/** - * <tt>BitSet</tt> of the <tt>Integer</tt> objects corresponding to the - * constant index of each property in the set of - * <b></span><span class="jde-java-font-lock-bold">Common Background Properties</span><span class="comment"></b>. - */</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">BitSet</span> <span class="variable-name" id="backgroundProps">backgroundProps</span> = <span class="keyword">new</span> <span class="type">BitSet</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">ROBitSet</span> <span class="variable-name" id="backgroundSet">backgroundSet</span>; - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">BitSet</span> <span class="function-name" id="backgroundSetClone">backgroundSetClone</span>() { - <span class="keyword">return</span> (<span class="type">BitSet</span>)(backgroundProps.clone()); - } - - <span class="jde-java-font-lock-modifier">static</span> { - backgroundProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BACKGROUND">BACKGROUND</span>); - backgroundProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BACKGROUND_ATTACHMENT">BACKGROUND_ATTACHMENT</span>); - backgroundProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BACKGROUND_COLOR">BACKGROUND_COLOR</span>); - backgroundProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BACKGROUND_IMAGE">BACKGROUND_IMAGE</span>); - backgroundProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BACKGROUND_POSITION">BACKGROUND_POSITION</span>); - backgroundProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BACKGROUND_POSITION_HORIZONTAL">BACKGROUND_POSITION_HORIZONTAL</span>); - backgroundProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BACKGROUND_POSITION_VERTICAL">BACKGROUND_POSITION_VERTICAL</span>); - backgroundProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BACKGROUND_REPEAT">BACKGROUND_REPEAT</span>); - backgroundSet = <span class="keyword">new</span> <span class="type">ROBitSet</span>(backgroundProps); - } - <span class="comment">/** - * <tt>BitSet</tt> of the <tt>Integer</tt> objects corresponding to the - * constant index of each property in the set of - * <b></span><span class="jde-java-font-lock-bold">Common Border Properties</span><span class="comment"></b>. - */</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">BitSet</span> <span class="variable-name" id="borderProps">borderProps</span> = <span class="keyword">new</span> <span class="type">BitSet</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">ROBitSet</span> <span class="variable-name" id="borderSet">borderSet</span>; - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">BitSet</span> <span class="function-name" id="borderSetClone">borderSetClone</span>() { - <span class="keyword">return</span> (<span class="type">BitSet</span>)(borderProps.clone()); - } - - <span class="jde-java-font-lock-modifier">static</span> { - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER">BORDER</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_AFTER_COLOR">BORDER_AFTER_COLOR</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_AFTER_STYLE">BORDER_AFTER_STYLE</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_AFTER_WIDTH">BORDER_AFTER_WIDTH</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_AFTER_WIDTH_LENGTH">BORDER_AFTER_WIDTH_LENGTH</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_AFTER_WIDTH_CONDITIONALITY">BORDER_AFTER_WIDTH_CONDITIONALITY</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_BEFORE_COLOR">BORDER_BEFORE_COLOR</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_BEFORE_STYLE">BORDER_BEFORE_STYLE</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_BEFORE_WIDTH">BORDER_BEFORE_WIDTH</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_BEFORE_WIDTH_LENGTH">BORDER_BEFORE_WIDTH_LENGTH</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_BEFORE_WIDTH_CONDITIONALITY">BORDER_BEFORE_WIDTH_CONDITIONALITY</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_BOTTOM">BORDER_BOTTOM</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_BOTTOM_COLOR">BORDER_BOTTOM_COLOR</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_BOTTOM_STYLE">BORDER_BOTTOM_STYLE</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_BOTTOM_WIDTH">BORDER_BOTTOM_WIDTH</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_COLOR">BORDER_COLOR</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_END_COLOR">BORDER_END_COLOR</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_END_STYLE">BORDER_END_STYLE</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_END_WIDTH">BORDER_END_WIDTH</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_END_WIDTH_LENGTH">BORDER_END_WIDTH_LENGTH</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_END_WIDTH_CONDITIONALITY">BORDER_END_WIDTH_CONDITIONALITY</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_LEFT">BORDER_LEFT</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_LEFT_COLOR">BORDER_LEFT_COLOR</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_LEFT_STYLE">BORDER_LEFT_STYLE</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_LEFT_WIDTH">BORDER_LEFT_WIDTH</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_RIGHT">BORDER_RIGHT</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_RIGHT_COLOR">BORDER_RIGHT_COLOR</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_RIGHT_STYLE">BORDER_RIGHT_STYLE</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_RIGHT_WIDTH">BORDER_RIGHT_WIDTH</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_START_COLOR">BORDER_START_COLOR</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_START_STYLE">BORDER_START_STYLE</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_START_WIDTH">BORDER_START_WIDTH</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_START_WIDTH_LENGTH">BORDER_START_WIDTH_LENGTH</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_START_WIDTH_CONDITIONALITY">BORDER_START_WIDTH_CONDITIONALITY</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_STYLE">BORDER_STYLE</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_TOP">BORDER_TOP</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_TOP_COLOR">BORDER_TOP_COLOR</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_TOP_STYLE">BORDER_TOP_STYLE</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_TOP_WIDTH">BORDER_TOP_WIDTH</span>); - borderProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_WIDTH">BORDER_WIDTH</span>); - borderSet = <span class="keyword">new</span> <span class="type">ROBitSet</span>(borderProps); - } - <span class="comment">/** - * <tt>BitSet</tt> of the <tt>Integer</tt> objects corresponding to the - * constant index of each property in the set of - * <b></span><span class="jde-java-font-lock-bold">Common Font Properties</span><span class="comment"></b>. - */</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">BitSet</span> <span class="variable-name" id="fontProps">fontProps</span> = <span class="keyword">new</span> <span class="type">BitSet</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">ROBitSet</span> <span class="variable-name" id="fontSet">fontSet</span>; - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">BitSet</span> <span class="function-name" id="fontSetClone">fontSetClone</span>() { - <span class="keyword">return</span> (<span class="type">BitSet</span>)(fontProps.clone()); - } - - <span class="jde-java-font-lock-modifier">static</span> { - fontProps.set(PropNames.<span class="jde-java-font-lock-constant" id="FONT">FONT</span>); - fontProps.set(PropNames.<span class="jde-java-font-lock-constant" id="FONT_FAMILY">FONT_FAMILY</span>); - fontProps.set(PropNames.<span class="jde-java-font-lock-constant" id="FONT_SELECTION_STRATEGY">FONT_SELECTION_STRATEGY</span>); - fontProps.set(PropNames.<span class="jde-java-font-lock-constant" id="FONT_SIZE">FONT_SIZE</span>); - fontProps.set(PropNames.<span class="jde-java-font-lock-constant" id="FONT_SIZE_ADJUST">FONT_SIZE_ADJUST</span>); - fontProps.set(PropNames.<span class="jde-java-font-lock-constant" id="FONT_STRETCH">FONT_STRETCH</span>); - fontProps.set(PropNames.<span class="jde-java-font-lock-constant" id="FONT_STYLE">FONT_STYLE</span>); - fontProps.set(PropNames.<span class="jde-java-font-lock-constant" id="FONT_VARIANT">FONT_VARIANT</span>); - fontProps.set(PropNames.<span class="jde-java-font-lock-constant" id="FONT_WEIGHT">FONT_WEIGHT</span>); - fontSet = <span class="keyword">new</span> <span class="type">ROBitSet</span>(fontProps); - } - <span class="comment">/** - * <tt>BitSet</tt> of the <tt>Integer</tt> objects corresponding to the - * constant index of each property in the set of - * <b></span><span class="jde-java-font-lock-bold">Common Hyphenation Properties</span><span class="comment"></b>. - */</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">BitSet</span> <span class="variable-name" id="hyphenationProps">hyphenationProps</span> = <span class="keyword">new</span> <span class="type">BitSet</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">ROBitSet</span> <span class="variable-name" id="hyphenationSet">hyphenationSet</span>; - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">BitSet</span> <span class="function-name" id="hyphenationSetClone">hyphenationSetClone</span>() { - <span class="keyword">return</span> (<span class="type">BitSet</span>)(hyphenationProps.clone()); - } - - <span class="jde-java-font-lock-modifier">static</span> { - hyphenationProps.set(PropNames.<span class="jde-java-font-lock-constant" id="COUNTRY">COUNTRY</span>); - hyphenationProps.set(PropNames.<span class="jde-java-font-lock-constant" id="LANGUAGE">LANGUAGE</span>); - hyphenationProps.set(PropNames.<span class="jde-java-font-lock-constant" id="SCRIPT">SCRIPT</span>); - hyphenationProps.set(PropNames.<span class="jde-java-font-lock-constant" id="HYPHENATE">HYPHENATE</span>); - hyphenationProps.set(PropNames.<span class="jde-java-font-lock-constant" id="HYPHENATION_CHARACTER">HYPHENATION_CHARACTER</span>); - hyphenationProps.set(PropNames.<span class="jde-java-font-lock-constant" id="HYPHENATION_PUSH_CHARACTER_COUNT">HYPHENATION_PUSH_CHARACTER_COUNT</span>); - hyphenationProps.set(PropNames.<span class="jde-java-font-lock-constant" id="HYPHENATION_REMAIN_CHARACTER_COUNT">HYPHENATION_REMAIN_CHARACTER_COUNT</span>); - hyphenationSet = <span class="keyword">new</span> <span class="type">ROBitSet</span>(hyphenationProps); - } - <span class="comment">/** - * <tt>BitSet</tt> of the <tt>Integer</tt> objects corresponding to the - * constant index of each property in the set of - * <b></span><span class="jde-java-font-lock-bold">Common Margin-Block Properties</span><span class="comment"></b>. - */</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">BitSet</span> <span class="variable-name" id="marginBlockProps">marginBlockProps</span> = <span class="keyword">new</span> <span class="type">BitSet</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">ROBitSet</span> <span class="variable-name" id="marginBlockSet">marginBlockSet</span>; - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">BitSet</span> <span class="function-name" id="marginBlockSetClone">marginBlockSetClone</span>() { - <span class="keyword">return</span> (<span class="type">BitSet</span>)(marginBlockProps.clone()); - } - - <span class="jde-java-font-lock-modifier">static</span> { - marginBlockProps.set(PropNames.<span class="jde-java-font-lock-constant" id="MARGIN">MARGIN</span>); - marginBlockProps.set(PropNames.<span class="jde-java-font-lock-constant" id="MARGIN_BOTTOM">MARGIN_BOTTOM</span>); - marginBlockProps.set(PropNames.<span class="jde-java-font-lock-constant" id="MARGIN_LEFT">MARGIN_LEFT</span>); - marginBlockProps.set(PropNames.<span class="jde-java-font-lock-constant" id="MARGIN_RIGHT">MARGIN_RIGHT</span>); - marginBlockProps.set(PropNames.<span class="jde-java-font-lock-constant" id="MARGIN_TOP">MARGIN_TOP</span>); - marginBlockSet = <span class="keyword">new</span> <span class="type">ROBitSet</span>(marginBlockProps); - } - <span class="comment">/** - * <tt>BitSet</tt> of the <tt>Integer</tt> objects corresponding to the - * constant index of each property in the set of - * <b></span><span class="jde-java-font-lock-bold">Common Margin-Inline Properties</span><span class="comment"></b>. - */</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">BitSet</span> <span class="variable-name" id="marginInlineProps">marginInlineProps</span> = <span class="keyword">new</span> <span class="type">BitSet</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">ROBitSet</span> <span class="variable-name" id="marginInlineSet">marginInlineSet</span>; - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">BitSet</span> <span class="function-name" id="marginInlineSetClone">marginInlineSetClone</span>() { - <span class="keyword">return</span> (<span class="type">BitSet</span>)(marginInlineProps.clone()); - } - - <span class="jde-java-font-lock-modifier">static</span> { - marginInlineProps.set(PropNames.<span class="jde-java-font-lock-constant" id="SPACE_END">SPACE_END</span>); - marginInlineProps.set(PropNames.<span class="jde-java-font-lock-constant" id="SPACE_START">SPACE_START</span>); - marginInlineSet = <span class="keyword">new</span> <span class="type">ROBitSet</span>(marginInlineProps); - } - <span class="comment">/** - * <tt>BitSet</tt> of the <tt>Integer</tt> objects corresponding to the - * constant index of each property in the set of - * <b></span><span class="jde-java-font-lock-bold">Common Padding Properties</span><span class="comment"></b>. - */</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">BitSet</span> <span class="variable-name" id="paddingProps">paddingProps</span> = <span class="keyword">new</span> <span class="type">BitSet</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">ROBitSet</span> <span class="variable-name" id="paddingSet">paddingSet</span>; - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">BitSet</span> <span class="function-name" id="paddingSetClone">paddingSetClone</span>() { - <span class="keyword">return</span> (<span class="type">BitSet</span>)(paddingProps.clone()); - } - - <span class="jde-java-font-lock-modifier">static</span> { - paddingProps.set(PropNames.<span class="jde-java-font-lock-constant" id="PADDING">PADDING</span>); - paddingProps.set(PropNames.<span class="jde-java-font-lock-constant" id="PADDING_AFTER">PADDING_AFTER</span>); - paddingProps.set(PropNames.<span class="jde-java-font-lock-constant" id="PADDING_AFTER_LENGTH">PADDING_AFTER_LENGTH</span>); - paddingProps.set(PropNames.<span class="jde-java-font-lock-constant" id="PADDING_AFTER_CONDITIONALITY">PADDING_AFTER_CONDITIONALITY</span>); - paddingProps.set(PropNames.<span class="jde-java-font-lock-constant" id="PADDING_BEFORE">PADDING_BEFORE</span>); - paddingProps.set(PropNames.<span class="jde-java-font-lock-constant" id="PADDING_BEFORE_LENGTH">PADDING_BEFORE_LENGTH</span>); - paddingProps.set(PropNames.<span class="jde-java-font-lock-constant" id="PADDING_BEFORE_CONDITIONALITY">PADDING_BEFORE_CONDITIONALITY</span>); - paddingProps.set(PropNames.<span class="jde-java-font-lock-constant" id="PADDING_BOTTOM">PADDING_BOTTOM</span>); - paddingProps.set(PropNames.<span class="jde-java-font-lock-constant" id="PADDING_END">PADDING_END</span>); - paddingProps.set(PropNames.<span class="jde-java-font-lock-constant" id="PADDING_END_LENGTH">PADDING_END_LENGTH</span>); - paddingProps.set(PropNames.<span class="jde-java-font-lock-constant" id="PADDING_END_CONDITIONALITY">PADDING_END_CONDITIONALITY</span>); - paddingProps.set(PropNames.<span class="jde-java-font-lock-constant" id="PADDING_LEFT">PADDING_LEFT</span>); - paddingProps.set(PropNames.<span class="jde-java-font-lock-constant" id="PADDING_RIGHT">PADDING_RIGHT</span>); - paddingProps.set(PropNames.<span class="jde-java-font-lock-constant" id="PADDING_START">PADDING_START</span>); - paddingProps.set(PropNames.<span class="jde-java-font-lock-constant" id="PADDING_START_LENGTH">PADDING_START_LENGTH</span>); - paddingProps.set(PropNames.<span class="jde-java-font-lock-constant" id="PADDING_START_CONDITIONALITY">PADDING_START_CONDITIONALITY</span>); - paddingProps.set(PropNames.<span class="jde-java-font-lock-constant" id="PADDING_TOP">PADDING_TOP</span>); - paddingSet = <span class="keyword">new</span> <span class="type">ROBitSet</span>(paddingProps); - } - <span class="comment">/** - * <tt>BitSet</tt> of the <tt>Integer</tt> objects corresponding to the - * constant index of each property in the set of - * <b></span><span class="jde-java-font-lock-bold">Common Relative Position Properties</span><span class="comment"></b>. - */</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">BitSet</span> <span class="variable-name" id="relativePositionProps">relativePositionProps</span> = <span class="keyword">new</span> <span class="type">BitSet</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">ROBitSet</span> <span class="variable-name" id="relativePositionSet">relativePositionSet</span>; - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">BitSet</span> <span class="function-name" id="relativePositionSetClone">relativePositionSetClone</span>() { - <span class="keyword">return</span> (<span class="type">BitSet</span>)(relativePositionProps.clone()); - } - - <span class="jde-java-font-lock-modifier">static</span> { - relativePositionProps.set(PropNames.<span class="jde-java-font-lock-constant" id="RELATIVE_POSITION">RELATIVE_POSITION</span>); - relativePositionProps.set(PropNames.<span class="jde-java-font-lock-constant">BOTTOM</span>); - relativePositionProps.set(PropNames.<span class="jde-java-font-lock-constant">LEFT</span>); - relativePositionProps.set(PropNames.<span class="jde-java-font-lock-constant">RIGHT</span>); - relativePositionProps.set(PropNames.<span class="jde-java-font-lock-constant">TOP</span>); - relativePositionSet = - <span class="keyword">new</span> <span class="type">ROBitSet</span>(relativePositionProps); - } - <span class="comment">/** - * <tt>BitSet</tt> of the <tt>Integer</tt> objects corresponding to the - * constant index of each property in the set of - * <b></span><span class="jde-java-font-lock-bold">Common Table Properties</span><span class="comment"></b>. - */</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">BitSet</span> <span class="variable-name" id="tableProps">tableProps</span> = <span class="keyword">new</span> <span class="type">BitSet</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">ROBitSet</span> <span class="variable-name" id="tableSet">tableSet</span>; - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">BitSet</span> <span class="function-name" id="tableSetClone">tableSetClone</span>() { - <span class="keyword">return</span> (<span class="type">BitSet</span>)(tableProps.clone()); - } - - <span class="jde-java-font-lock-modifier">static</span> { - tableProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_AFTER_PRECEDENCE">BORDER_AFTER_PRECEDENCE</span>); - tableProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_BEFORE_PRECEDENCE">BORDER_BEFORE_PRECEDENCE</span>); - tableProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_COLLAPSE">BORDER_COLLAPSE</span>); - tableProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_END_PRECEDENCE">BORDER_END_PRECEDENCE</span>); - tableProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_SEPARATION">BORDER_SEPARATION</span>); - tableProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_SEPARATION_BLOCK_PROGRESSION_DIRECTION">BORDER_SEPARATION_BLOCK_PROGRESSION_DIRECTION</span>); - tableProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_SEPARATION_INLINE_PROGRESSION_DIRECTION">BORDER_SEPARATION_INLINE_PROGRESSION_DIRECTION</span>); - tableProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_SPACING">BORDER_SPACING</span>); - tableProps.set(PropNames.<span class="jde-java-font-lock-constant" id="BORDER_START_PRECEDENCE">BORDER_START_PRECEDENCE</span>); - tableProps.set(PropNames.<span class="jde-java-font-lock-constant" id="CAPTION_SIDE">CAPTION_SIDE</span>); - tableProps.set(PropNames.<span class="jde-java-font-lock-constant" id="COLUMN_NUMBER">COLUMN_NUMBER</span>); - tableProps.set(PropNames.<span class="jde-java-font-lock-constant" id="COLUMN_WIDTH">COLUMN_WIDTH</span>); - tableProps.set(PropNames.<span class="jde-java-font-lock-constant" id="EMPTY_CELLS">EMPTY_CELLS</span>); - tableProps.set(PropNames.<span class="jde-java-font-lock-constant" id="ENDS_ROW">ENDS_ROW</span>); - tableProps.set(PropNames.<span class="jde-java-font-lock-constant" id="NUMBER_COLUMNS_REPEATED">NUMBER_COLUMNS_REPEATED</span>); - tableProps.set(PropNames.<span class="jde-java-font-lock-constant" id="NUMBER_COLUMNS_SPANNED">NUMBER_COLUMNS_SPANNED</span>); - tableProps.set(PropNames.<span class="jde-java-font-lock-constant" id="NUMBER_ROWS_SPANNED">NUMBER_ROWS_SPANNED</span>); - tableProps.set(PropNames.<span class="jde-java-font-lock-constant" id="STARTS_ROW">STARTS_ROW</span>); - tableProps.set(PropNames.<span class="jde-java-font-lock-constant" id="TABLE_LAYOUT">TABLE_LAYOUT</span>); - tableProps.set(PropNames.<span class="jde-java-font-lock-constant" id="TABLE_OMIT_FOOTER_AT_BREAK">TABLE_OMIT_FOOTER_AT_BREAK</span>); - tableProps.set(PropNames.<span class="jde-java-font-lock-constant" id="TABLE_OMIT_HEADER_AT_BREAK">TABLE_OMIT_HEADER_AT_BREAK</span>); - tableSet = <span class="keyword">new</span> <span class="type">ROBitSet</span>(tableProps); - } - - <span class="jde-java-font-lock-modifier">private</span> <span class="function-name" id="PropertySets">PropertySets</span> (){} - -} -</pre> - </body> -</html> diff --git a/src/documentation/content/design/alt.design/properties/PropertyTokenizer.html b/src/documentation/content/design/alt.design/properties/PropertyTokenizer.html deleted file mode 100644 index 26a5ac4a0..000000000 --- a/src/documentation/content/design/alt.design/properties/PropertyTokenizer.html +++ /dev/null @@ -1,674 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- - Copyright 2001-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- $Id$ --> -<!-- Created by htmlize-0.67 in css mode. --> -<html> - <head> - <title>PropertyTokenizer.java</title> - <style type="text/css"> - <!-- - body { - color: #000000; - background-color: #faf0e6; - } /* default */ - .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 */ - .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-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">/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */</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="jde-java-font-lock-package">expr</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">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">Frequency</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">Time</span>; - -<span class="comment">/** - * Class to tokenize XSL FO property expression. - * This class is heavily based on the epxression tokenizer in James Clark's - * XT, an XSLT processor. - */</span> -<span class="keyword">class</span> <span class="function-name" id="PropertyTokenizerClass">PropertyTokenizer</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="comment">/* - * Maintain the numbering of this list in (X)Emacs by issuing - * a shell command on the region with replacement (M-1 M-|). Use - * the perl command: - * perl -p -e 'BEGIN{$n=0};$n++ if s/= [0-9]+/= $n/' - * - * in vi, set mark `</span><span class="jde-java-font-lock-doc-tag">a</span><span class="comment">' at the last line and - * !'aperl... etc - */</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="jde-java-font-lock-constant" id="EOF">EOF</span> = <span class="jde-java-font-lock-number">0</span> - ,<span class="jde-java-font-lock-constant" id="NCNAME">NCNAME</span> = <span class="jde-java-font-lock-number">1</span> - ,<span class="jde-java-font-lock-constant" id="MULTIPLY">MULTIPLY</span> = <span class="jde-java-font-lock-number">2</span> - ,<span class="jde-java-font-lock-constant" id="LPAR">LPAR</span> = <span class="jde-java-font-lock-number">3</span> - ,<span class="jde-java-font-lock-constant" id="RPAR">RPAR</span> = <span class="jde-java-font-lock-number">4</span> - ,<span class="jde-java-font-lock-constant" id="LITERAL">LITERAL</span> = <span class="jde-java-font-lock-number">5</span> - ,<span class="jde-java-font-lock-constant" id="FUNCTION_LPAR">FUNCTION_LPAR</span> = <span class="jde-java-font-lock-number">6</span> - ,<span class="jde-java-font-lock-constant" id="PLUS">PLUS</span> = <span class="jde-java-font-lock-number">7</span> - ,<span class="jde-java-font-lock-constant" id="MINUS">MINUS</span> = <span class="jde-java-font-lock-number">8</span> - ,<span class="jde-java-font-lock-constant" id="MOD">MOD</span> = <span class="jde-java-font-lock-number">9</span> - ,<span class="jde-java-font-lock-constant" id="DIV">DIV</span> = <span class="jde-java-font-lock-number">10</span> - ,<span class="jde-java-font-lock-constant" id="COMMA">COMMA</span> = <span class="jde-java-font-lock-number">11</span> - ,<span class="jde-java-font-lock-constant" id="PERCENT">PERCENT</span> = <span class="jde-java-font-lock-number">12</span> - ,<span class="jde-java-font-lock-constant" id="COLORSPEC">COLORSPEC</span> = <span class="jde-java-font-lock-number">13</span> - ,<span class="jde-java-font-lock-constant" id="FLOAT">FLOAT</span> = <span class="jde-java-font-lock-number">14</span> - ,<span class="jde-java-font-lock-constant" id="INTEGER">INTEGER</span> = <span class="jde-java-font-lock-number">15</span> - ,<span class="jde-java-font-lock-constant" id="ABSOLUTE_LENGTH">ABSOLUTE_LENGTH</span> = <span class="jde-java-font-lock-number">16</span> - ,<span class="jde-java-font-lock-constant" id="RELATIVE_LENGTH">RELATIVE_LENGTH</span> = <span class="jde-java-font-lock-number">17</span> - ,<span class="jde-java-font-lock-constant" id="TIME">TIME</span> = <span class="jde-java-font-lock-number">18</span> - ,<span class="jde-java-font-lock-constant" id="FREQ">FREQ</span> = <span class="jde-java-font-lock-number">19</span> - ,<span class="jde-java-font-lock-constant" id="ANGLE">ANGLE</span> = <span class="jde-java-font-lock-number">20</span> - ,<span class="jde-java-font-lock-constant" id="INHERIT">INHERIT</span> = <span class="jde-java-font-lock-number">21</span> - ,<span class="jde-java-font-lock-constant" id="AUTO">AUTO</span> = <span class="jde-java-font-lock-number">22</span> - ,<span class="jde-java-font-lock-constant" id="NONE">NONE</span> = <span class="jde-java-font-lock-number">23</span> - ,<span class="jde-java-font-lock-constant" id="BOOL">BOOL</span> = <span class="jde-java-font-lock-number">24</span> - ,<span class="jde-java-font-lock-constant" id="URI">URI</span> = <span class="jde-java-font-lock-number">25</span> - ,<span class="jde-java-font-lock-constant" id="MIMETYPE">MIMETYPE</span> = <span class="jde-java-font-lock-number">26</span> - ,<span class="jde-java-font-lock-constant" id="SLASH">SLASH</span> = <span class="jde-java-font-lock-number">27</span> - <span class="comment">// NO_UNIT is a transient token for internal use only. It is -</span> <span class="comment">// never set as the end result of parsing a token. -</span> ,<span class="jde-java-font-lock-constant" id="NO_UNIT">NO_UNIT</span> = <span class="jde-java-font-lock-number">28</span> - <span class="comment">//,NSPREFIX = 29 -</span> <span class="comment">//,WHITESPACE = 30 -</span> ; - - <span class="comment">/* - * Absolute unit type constants - */</span> - <span class="type">int</span> <span class="variable-name" id="currentToken">currentToken</span> = <span class="jde-java-font-lock-constant">EOF</span>; - <span class="type">String</span> <span class="variable-name" id="currentTokenValue">currentTokenValue</span> = <span class="jde-java-font-lock-constant" id="null">null</span>; - <span class="jde-java-font-lock-modifier">protected</span> <span class="type">int</span> <span class="variable-name" id="currentUnitIndex">currentUnitIndex</span> = <span class="jde-java-font-lock-number">0</span>; - <span class="jde-java-font-lock-modifier">protected</span> <span class="type">int</span> <span class="variable-name" id="currentUnit">currentUnit</span>; - <span class="jde-java-font-lock-modifier">protected</span> <span class="type">String</span> <span class="variable-name" id="unitString">unitString</span>; - <span class="jde-java-font-lock-modifier">protected</span> <span class="type">String</span> <span class="variable-name" id="uri">uri</span>; - - <span class="jde-java-font-lock-modifier">private</span> <span class="type">int</span> <span class="variable-name" id="currentTokenStartIndex">currentTokenStartIndex</span> = <span class="jde-java-font-lock-number">0</span>; - <span class="jde-java-font-lock-modifier">private</span> <span class="type">String</span> <span class="variable-name" id="expr">expr</span> = <span class="jde-java-font-lock-constant">null</span>; - <span class="jde-java-font-lock-modifier">private</span> <span class="type">int</span> <span class="variable-name" id="exprIndex">exprIndex</span> = <span class="jde-java-font-lock-number">0</span>; - <span class="jde-java-font-lock-modifier">private</span> <span class="type">int</span> <span class="variable-name" id="exprLength">exprLength</span>; - <span class="jde-java-font-lock-modifier">protected</span> <span class="type">int</span> <span class="variable-name" id="property">property</span>; - - <span class="jde-java-font-lock-modifier">protected</span> <span class="function-name" id="PropertyTokenizer">PropertyTokenizer</span>() {} - - <span class="comment">/** - * Initialize this tokenizer to tokenize the passed - * String as a value of the passed property. - * It is assumed that the subclass has made any necessary - * synchronization arrangements. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">property</span><span class="comment"> an <tt>int</tt> containing the property index. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="s">s</span><span class="comment"> The Property expression to tokenize. - */</span> - <span class="jde-java-font-lock-modifier">protected</span> <span class="type">void</span> <span class="function-name" id="initialize">initialize</span>(<span class="type">int</span> <span class="variable-name">property</span>, <span class="type">String</span> <span class="variable-name">s</span>) { - expr = s; - exprLength = s.length(); - <span class="keyword">this</span>.property = property; - <span class="comment">//System.out.println("-----Tokenizer initialized: " + expr); -</span> } - - <span class="comment">/** - * Reset the tokenizer to null (or equivalent) values. - * Synchronization is achieved in the subclass. - */</span> - <span class="jde-java-font-lock-modifier">protected</span> <span class="type">void</span> <span class="function-name" id="reset">reset</span>() { - expr = <span class="jde-java-font-lock-constant">null</span>; - exprIndex = <span class="jde-java-font-lock-number">0</span>; - exprLength = <span class="jde-java-font-lock-number">0</span>; - currentToken = <span class="jde-java-font-lock-constant">EOF</span>; - currentTokenValue = <span class="jde-java-font-lock-constant">null</span>; - property = <span class="jde-java-font-lock-number">0</span>; - <span class="comment">//System.out.println("-----Tokenizer reset."); -</span> } - - <span class="comment">/** - * Get the current expression - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> - the expression. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">String</span> <span class="function-name" id="getExpr">getExpr</span>() { - <span class="keyword">return</span> expr; - } - - <span class="comment">/** - * Return the next token in the expression string. - * This sets the following package visible variables: - * currentToken An enumerated value identifying the recognized token - * currentTokenValue A String containing the token contents - * currentUnit If currentToken = ABSOLUTE_LENGTH, TIME or FREQUENCY, - * an enumerated value identifying the unit. - * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException</span><span class="comment"> If un unrecognized token is encountered. - */</span> - <span class="type">void</span> <span class="function-name" id="next">next</span>() <span class="keyword">throws</span> <span class="type">PropertyException</span> { - <span class="comment">//System.out.println("expr:" + expr + ": exprIndex: " + exprIndex); -</span> currentTokenValue = <span class="jde-java-font-lock-constant">null</span>; - currentTokenStartIndex = exprIndex; - <span class="type">boolean</span> <span class="variable-name" id="bSawDecimal">bSawDecimal</span>; - <span class="keyword">for</span> (; ; ) { - <span class="keyword">if</span> (exprIndex >= exprLength) { - currentToken = <span class="jde-java-font-lock-constant">EOF</span>; - <span class="keyword">return</span>; - } - <span class="type">char</span> <span class="variable-name" id="c">c</span> = expr.charAt(exprIndex++); - <span class="keyword">switch</span> (c) { - <span class="keyword">case</span> '<span class="string"> </span>': - <span class="keyword">case</span> '<span class="string">\t</span>': - <span class="keyword">case</span> '<span class="string">\r</span>': - <span class="keyword">case</span> '<span class="string">\n</span>': - <span class="comment">// Whitespace characters are valid within strings. -</span> <span class="comment">// in font family names, sequences of whitespace are -</span> <span class="comment">// compressed into a single space. (Rec 7.8.2) -</span> <span class="comment">//scanWhitespace(); -</span> <span class="comment">//currentToken = WHITESPACE; -</span> <span class="comment">//currentTokenValue = expr.substring(currentTokenStartIndex, -</span> <span class="comment">// exprIndex); -</span> <span class="comment">//return; -</span> currentTokenStartIndex = exprIndex; - <span class="keyword">break</span>; - <span class="keyword">case</span> '<span class="string">,</span>': - currentToken = <span class="jde-java-font-lock-constant">COMMA</span>; - <span class="keyword">return</span>; - <span class="keyword">case</span> '<span class="string">+</span>': - currentToken = <span class="jde-java-font-lock-constant">PLUS</span>; - <span class="keyword">return</span>; - <span class="keyword">case</span> '<span class="string">-</span>': - currentToken = <span class="jde-java-font-lock-constant">MINUS</span>; - <span class="keyword">return</span>; - <span class="keyword">case</span> '<span class="string">(</span>': - currentToken = <span class="jde-java-font-lock-constant">LPAR</span>; - <span class="keyword">return</span>; - <span class="keyword">case</span> '<span class="string">)</span>': - currentToken = <span class="jde-java-font-lock-constant">RPAR</span>; - <span class="keyword">return</span>; - <span class="keyword">case</span> '<span class="string">"</span>': - <span class="keyword">case</span> '<span class="string">\'</span>': - exprIndex = expr.indexOf(c, exprIndex); - <span class="keyword">if</span> (exprIndex < <span class="jde-java-font-lock-number">0</span>) { - exprIndex = currentTokenStartIndex + <span class="jde-java-font-lock-number">1</span>; - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">missing quote</span>"); - } - currentTokenValue = expr.substring(currentTokenStartIndex - + <span class="jde-java-font-lock-number">1</span>, exprIndex++); - currentToken = <span class="jde-java-font-lock-constant">LITERAL</span>; - <span class="keyword">return</span>; - <span class="keyword">case</span> '<span class="string">*</span>': - currentToken = <span class="jde-java-font-lock-constant">MULTIPLY</span>; - <span class="keyword">return</span>; - <span class="keyword">case</span> '<span class="string">0</span>': - <span class="keyword">case</span> '<span class="string">1</span>': - <span class="keyword">case</span> '<span class="string">2</span>': - <span class="keyword">case</span> '<span class="string">3</span>': - <span class="keyword">case</span> '<span class="string">4</span>': - <span class="keyword">case</span> '<span class="string">5</span>': - <span class="keyword">case</span> '<span class="string">6</span>': - <span class="keyword">case</span> '<span class="string">7</span>': - <span class="keyword">case</span> '<span class="string">8</span>': - <span class="keyword">case</span> '<span class="string">9</span>': - scanDigits(); - <span class="keyword">if</span> (exprIndex < exprLength && expr.charAt(exprIndex) == '<span class="string">.</span>') { - exprIndex++; - bSawDecimal = <span class="jde-java-font-lock-constant" id="true">true</span>; - <span class="keyword">if</span> (exprIndex < exprLength - && isDigit(expr.charAt(exprIndex))) { - exprIndex++; - scanDigits(); - } - } <span class="keyword">else</span> - bSawDecimal = <span class="jde-java-font-lock-constant" id="false">false</span>; - currentUnitIndex = exprIndex; - <span class="keyword">if</span> (exprIndex < exprLength && expr.charAt(exprIndex) == '<span class="string">%</span>') { - currentToken = <span class="jde-java-font-lock-constant">PERCENT</span>; - unitString = "<span class="string">%</span>"; - exprIndex++; - } <span class="keyword">else</span> { - <span class="comment">// Check for possible unit name following number -</span> currentToken = scanUnitName(); - <span class="keyword">if</span> (currentToken == <span class="jde-java-font-lock-constant">NO_UNIT</span>) - currentToken = bSawDecimal ? <span class="jde-java-font-lock-constant">FLOAT</span> : <span class="jde-java-font-lock-constant">INTEGER</span>; - } - currentTokenValue = expr.substring(currentTokenStartIndex, - currentUnitIndex); - <span class="keyword">return</span>; - - <span class="keyword">case</span> '<span class="string">.</span>': - <span class="keyword">if</span> (exprIndex < exprLength - && isDigit(expr.charAt(exprIndex))) { - ++exprIndex; - scanDigits(); - currentUnitIndex = exprIndex; - <span class="keyword">if</span> (exprIndex < exprLength - && expr.charAt(exprIndex) == '<span class="string">%</span>') { - exprIndex++; - currentToken = <span class="jde-java-font-lock-constant">PERCENT</span>; - } <span class="keyword">else</span> { - <span class="comment">// Check for possible unit name following number -</span> currentToken = scanUnitName(); - <span class="keyword">if</span> (currentToken == <span class="jde-java-font-lock-constant">NO_UNIT</span>) - currentToken = <span class="jde-java-font-lock-constant">FLOAT</span>; - } - currentTokenValue = expr.substring(currentTokenStartIndex, - currentUnitIndex); - <span class="keyword">return</span>; - } - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">illegal character '.'</span>"); - - <span class="keyword">case</span> '<span class="string">#</span>': <span class="comment">// Start of color value -</span> <span class="keyword">if</span> (exprIndex < exprLength - && isHexDigit(expr.charAt(exprIndex))) { - <span class="type">int</span> <span class="variable-name" id="len">len</span>; - ++exprIndex; - scanHexDigits(); - currentToken = <span class="jde-java-font-lock-constant">COLORSPEC</span>; - currentTokenValue = expr.substring(currentTokenStartIndex, - exprIndex); - <span class="comment">// Probably should have some multiple of 3 for length! -</span> len = exprIndex - currentTokenStartIndex; - <span class="keyword">if</span> (len == <span class="jde-java-font-lock-number">4</span> || len == <span class="jde-java-font-lock-number">7</span>) <span class="keyword">return</span>; - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">color not 3 or 6 hex digits</span>"); - } <span class="keyword">else</span> { - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">illegal character '#'</span>"); - } - - <span class="keyword">case</span> '<span class="string">/</span>': - currentToken = <span class="jde-java-font-lock-constant">SLASH</span>; - <span class="keyword">return</span>; - - <span class="keyword">default</span>: - --exprIndex; - scanName(); - <span class="keyword">if</span> (exprIndex == currentTokenStartIndex) - <span class="comment">// Not a name - must be a <string> -</span> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">illegal character '</span>" - + expr.charAt(exprIndex) + "<span class="string">'</span>"); - currentTokenValue = expr.substring(currentTokenStartIndex, - exprIndex); - <span class="keyword">if</span> (currentTokenValue.equals("<span class="string">mod</span>")) { - currentToken = <span class="jde-java-font-lock-constant">MOD</span>; - <span class="keyword">return</span>; - } - <span class="keyword">if</span> (currentTokenValue.equals("<span class="string">div</span>")) { - currentToken = <span class="jde-java-font-lock-constant">DIV</span>; - <span class="keyword">return</span>; - } - <span class="keyword">if</span> (currentTokenValue.equals("<span class="string">inherit</span>")) { - currentToken = <span class="jde-java-font-lock-constant">INHERIT</span>; - <span class="keyword">return</span>; - } - <span class="keyword">if</span> (currentTokenValue.equals("<span class="string">auto</span>")) { - currentToken = <span class="jde-java-font-lock-constant">AUTO</span>; - <span class="keyword">return</span>; - } - <span class="keyword">if</span> (currentTokenValue.equals("<span class="string">none</span>")) { - currentToken = <span class="jde-java-font-lock-constant">NONE</span>; - <span class="keyword">return</span>; - } - <span class="keyword">if</span> (currentTokenValue.equals("<span class="string">true</span>") - || currentTokenValue.equals("<span class="string">false</span>")) { - currentToken = <span class="jde-java-font-lock-constant">BOOL</span>; - <span class="keyword">return</span>; - } - <span class="comment">// Quick and dirty url "parsing". Assume that a -</span> <span class="comment">// URI-SPECIFICATION must be the only component of a -</span> <span class="comment">// property value expression -</span> <span class="keyword">if</span> (currentTokenValue.equals("<span class="string">url</span>") - && expr.charAt(exprIndex) == '<span class="string">(</span>') { - <span class="keyword">if</span> (! scanUrl()) { - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">Invalid url expression :</span>" + - expr.substring(exprIndex)); - } - currentToken = <span class="jde-java-font-lock-constant">URI</span>; - <span class="keyword">return</span>; - } - <span class="keyword">if</span> (currentTokenValue.equals("<span class="string">content-type</span>")) { - <span class="comment">// content-type attribute value. Must be followed -</span> <span class="comment">// by a mime type -</span> <span class="keyword">if</span> (expr.charAt(exprIndex) == '<span class="string">:</span>') { - <span class="type">int</span> <span class="variable-name" id="mimeptr">mimeptr</span> = ++exprIndex; - scanMimeType(); - currentToken = <span class="jde-java-font-lock-constant">MIMETYPE</span>; - currentTokenValue = - expr.substring(mimeptr, exprIndex); - <span class="keyword">return</span>; - } - <span class="comment">// else it's just a name -</span> } - <span class="keyword">if</span> (currentTokenValue.equals("<span class="string">namespace-prefix</span>")) { - <span class="comment">// content-type attribute value. Must be followed -</span> <span class="comment">// by a declared namespace-prefix or null -</span> <span class="keyword">if</span> (expr.charAt(exprIndex) == '<span class="string">:</span>') { - <span class="type">int</span> <span class="variable-name" id="nsptr">nsptr</span> = ++exprIndex; - scanName(); <span class="comment">// Allowed to be empty -</span> currentToken = <span class="jde-java-font-lock-constant">NCNAME</span>; - currentTokenValue = - expr.substring(nsptr, exprIndex); - <span class="keyword">return</span>; - } - <span class="comment">// else it's just a name -</span> } - <span class="keyword">if</span> (followingParen()) { - currentToken = <span class="jde-java-font-lock-constant">FUNCTION_LPAR</span>; - } <span class="keyword">else</span> { - currentToken = <span class="jde-java-font-lock-constant">NCNAME</span>; - } - <span class="keyword">return</span>; - } - } - } - - <span class="comment">/** - * Attempt to recognize a valid UnitName token in the input expression. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> token value appropriate to UnitName: ABSOLUTE_LENGTH, - * RELATIVE_LENGTH or NO_UNIT. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">PropertyException</span><span class="comment"> if an NCName not a UnitName recognized. - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">int</span> <span class="function-name" id="scanUnitName">scanUnitName</span>() <span class="keyword">throws</span> <span class="type">PropertyException</span> { - currentUnitIndex = exprIndex; - scanName(); - <span class="keyword">if</span> (currentUnitIndex < exprIndex) { - unitString = expr.substring(currentUnitIndex, exprIndex); - <span class="keyword">if</span> (unitString.equals("<span class="string">em</span>")) <span class="keyword">return</span> <span class="jde-java-font-lock-constant">RELATIVE_LENGTH</span>; - <span class="keyword">if</span> (unitString.equals("<span class="string">cm</span>")) { - currentUnit = Length.<span class="jde-java-font-lock-constant" id="CM">CM</span>; - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">ABSOLUTE_LENGTH</span>; - } - <span class="keyword">if</span> (unitString.equals("<span class="string">mm</span>")) { - currentUnit = Length.<span class="jde-java-font-lock-constant" id="MM">MM</span>; - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">ABSOLUTE_LENGTH</span>; - } - <span class="keyword">if</span> (unitString.equals("<span class="string">in</span>")) { - currentUnit = Length.<span class="jde-java-font-lock-constant" id="IN">IN</span>; - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">ABSOLUTE_LENGTH</span>; - } - <span class="keyword">if</span> (unitString.equals("<span class="string">pt</span>")) { - currentUnit = Length.<span class="jde-java-font-lock-constant" id="PT">PT</span>; - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">ABSOLUTE_LENGTH</span>; - } - <span class="keyword">if</span> (unitString.equals("<span class="string">pc</span>")) { - currentUnit = Length.<span class="jde-java-font-lock-constant" id="PC">PC</span>; - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">ABSOLUTE_LENGTH</span>; - } - <span class="keyword">if</span> (unitString.equals("<span class="string">px</span>")) { - currentUnit = Length.<span class="jde-java-font-lock-constant" id="PX">PX</span>; - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">ABSOLUTE_LENGTH</span>; - } - <span class="keyword">if</span> (unitString.equals("<span class="string">s</span>")) { - currentUnit = Time.<span class="jde-java-font-lock-constant" id="SEC">SEC</span>; - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">TIME</span>; - } - <span class="keyword">if</span> (unitString.equals("<span class="string">ms</span>")) { - currentUnit = Time.<span class="jde-java-font-lock-constant" id="MSEC">MSEC</span>; - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">TIME</span>; - } - <span class="keyword">if</span> (unitString.equals("<span class="string">Hz</span>")) { - currentUnit = Frequency.<span class="jde-java-font-lock-constant" id="HZ">HZ</span>; - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">FREQ</span>; - } - <span class="keyword">if</span> (unitString.equals("<span class="string">kHz</span>")) { - currentUnit = Frequency.<span class="jde-java-font-lock-constant" id="KHZ">KHZ</span>; - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">FREQ</span>; - } - <span class="comment">// Not a UnitName -</span> <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">NCName following a number is not a UnitName</span>"); - } <span class="keyword">else</span> { <span class="comment">// No NCName found -</span> <span class="keyword">return</span> <span class="jde-java-font-lock-constant">NO_UNIT</span>; - } - } - - <span class="comment">/** - * Attempt to recognize a valid NAME token in the input expression. - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">void</span> <span class="function-name" id="scanName">scanName</span>() { - <span class="keyword">if</span> (exprIndex < exprLength && isNameStartChar(expr.charAt(exprIndex))) - <span class="keyword">while</span> (++exprIndex < exprLength - && isNameChar(expr.charAt(exprIndex))); - } - - <span class="comment">/** - * Attempt to recognize a valid sequence of decimal digits in the - * input expression. - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">void</span> <span class="function-name" id="scanDigits">scanDigits</span>() { - <span class="keyword">while</span> (exprIndex < exprLength && isDigit(expr.charAt(exprIndex))) - exprIndex++; - } - - <span class="comment">/** - * Scan to the end of a sequence of whitespace characters in the - * input expression. - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">void</span> <span class="function-name" id="scanWhitespace">scanWhitespace</span>() { - <span class="keyword">while</span> (exprIndex < exprLength && isSpace(expr.charAt(exprIndex))) - exprIndex++; - } - - <span class="comment">/** - * Attempt to recognize a valid sequence of hexadecimal digits in the - * input expression. - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">void</span> <span class="function-name" id="scanHexDigits">scanHexDigits</span>() { - <span class="keyword">while</span> (exprIndex < exprLength && isHexDigit(expr.charAt(exprIndex))) - exprIndex++; - } - - <span class="comment">/** - * Attempt to recognize a mime-type. Working definition here: - * NCName/NCName (NCName as recognized by scanName()). - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">void</span> <span class="function-name" id="scanMimeType">scanMimeType</span>() <span class="keyword">throws</span> <span class="type">PropertyException</span> { - <span class="type">int</span> <span class="variable-name" id="part1">part1</span> = exprIndex; - scanName(); - <span class="keyword">if</span> (part1 != exprIndex) { - <span class="keyword">if</span> (expr.charAt(exprIndex) == '<span class="string">/</span>') { - <span class="type">int</span> <span class="variable-name" id="part2">part2</span> = ++exprIndex; - scanName(); - <span class="keyword">if</span> (part2 != exprIndex) - <span class="keyword">return</span>; - } - } - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">Mime type expected; found:</span>" + - expr.substring(part1)); - } - - <span class="comment">/** - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a boolean value indicating whether the following non-whitespace - * character is an opening parenthesis. - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">boolean</span> <span class="function-name" id="followingParen">followingParen</span>() { - <span class="keyword">for</span> (<span class="type">int</span> <span class="variable-name" id="i">i</span> = exprIndex; i < exprLength; i++) { - <span class="keyword">switch</span> (expr.charAt(i)) { - <span class="keyword">case</span> '<span class="string">(</span>': - exprIndex = i + <span class="jde-java-font-lock-number">1</span>; - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">true</span>; - <span class="keyword">case</span> '<span class="string"> </span>': - <span class="keyword">case</span> '<span class="string">\r</span>': - <span class="keyword">case</span> '<span class="string">\n</span>': - <span class="keyword">case</span> '<span class="string">\t</span>': - <span class="keyword">break</span>; - <span class="keyword">default</span>: - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">false</span>; - } - } - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">false</span>; - } - - <span class="comment">/** - * Primitive URI extractor. Assumes that the only contents of a - * URI-SPECIFICATION property type is a complete uri-specification. - * No checking is done on the syntactical validity of the URI. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a boolean indicating whether the remainder of the - * characters form the body of a <tt>url(...)</tt> specification. - * As a side-effect, sets the <tt>protected</tt> field <i></span><span class="jde-java-font-lock-italic">uri</span><span class="comment"></i> - * and sets <i></span><span class="jde-java-font-lock-italic">exprIndex</span><span class="comment"></i> past the end of the expression, when - * returning a <tt>true</tt> value. - */</span> - <span class="jde-java-font-lock-modifier">private</span> <span class="type">boolean</span> <span class="function-name" id="scanUrl">scanUrl</span>() { - <span class="type">char</span> <span class="variable-name" id="ch">ch</span>; - <span class="type">String</span> <span class="variable-name" id="str">str</span> = expr.substring(exprIndex).trim(); - <span class="keyword">if</span> (str.charAt(str.length() - <span class="jde-java-font-lock-number">1</span>) != '<span class="string">)</span>') <span class="keyword">return</span> <span class="jde-java-font-lock-constant">false</span>; - <span class="comment">// Remove closing parenthesis and trim -</span> str = str.substring(<span class="jde-java-font-lock-number">0</span>, str.length() - <span class="jde-java-font-lock-number">1</span>).trim(); - <span class="keyword">if</span> ((ch = str.charAt(<span class="jde-java-font-lock-number">0</span>)) == '<span class="string">"</span>' || ch == '<span class="string">\'</span>') { - <span class="keyword">if</span> (str.charAt(str.length() - <span class="jde-java-font-lock-number">1</span>) != ch) <span class="keyword">return</span> <span class="jde-java-font-lock-constant">false</span>; - str = str.substring(<span class="jde-java-font-lock-number">1</span>, str.length() - <span class="jde-java-font-lock-number">1</span>); - } - uri = str.trim(); - exprIndex = expr.length(); - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">true</span>; - } - - <span class="jde-java-font-lock-modifier">static</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="nameStartChars">nameStartChars</span> = - "<span class="string">_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</span>"; - <span class="jde-java-font-lock-modifier">static</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="nameChars">nameChars</span> = "<span class="string">.-0123456789</span>"; - <span class="jde-java-font-lock-modifier">static</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="digits">digits</span> = "<span class="string">0123456789</span>"; - <span class="jde-java-font-lock-modifier">static</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="hexchars">hexchars</span> = digits + "<span class="string">abcdefABCDEF</span>"; - - <span class="comment">/** - * Return a boolean value indicating whether the argument is a - * decimal digit (0-9). - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">c</span><span class="comment"> The character to check - */</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">boolean</span> <span class="function-name" id="isDigit">isDigit</span>(<span class="type">char</span> <span class="variable-name">c</span>) { - <span class="keyword">return</span> digits.indexOf(c) >= <span class="jde-java-font-lock-number">0</span>; - } - - <span class="comment">/** - * Return a boolean value indicating whether the argument is a - * hexadecimal digit (0-9, A-F, a-f). - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">c</span><span class="comment"> The character to check - */</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">boolean</span> <span class="function-name" id="isHexDigit">isHexDigit</span>(<span class="type">char</span> <span class="variable-name">c</span>) { - <span class="keyword">return</span> hexchars.indexOf(c) >= <span class="jde-java-font-lock-number">0</span>; - } - - <span class="comment">/** - * Return a boolean value indicating whether the argument is whitespace - * as defined by XSL (space, newline, CR, tab). - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">c</span><span class="comment"> The character to check - */</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">boolean</span> <span class="function-name" id="isSpace">isSpace</span>(<span class="type">char</span> <span class="variable-name">c</span>) { - <span class="keyword">switch</span> (c) { - <span class="keyword">case</span> '<span class="string"> </span>': - <span class="keyword">case</span> '<span class="string">\r</span>': - <span class="keyword">case</span> '<span class="string">\n</span>': - <span class="keyword">case</span> '<span class="string">\t</span>': - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">true</span>; - } - <span class="keyword">return</span> <span class="jde-java-font-lock-constant">false</span>; - } - - <span class="comment">/** - * Return a boolean value indicating whether the argument is a valid name - * start character, ie. can start a NAME as defined by XSL. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">c</span><span class="comment"> The character to check - */</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">boolean</span> <span class="function-name" id="isNameStartChar">isNameStartChar</span>(<span class="type">char</span> <span class="variable-name">c</span>) { - <span class="keyword">return</span> nameStartChars.indexOf(c) >= <span class="jde-java-font-lock-number">0</span> || c >= <span class="jde-java-font-lock-number">0x80</span>; - } - - <span class="comment">/** - * Return a boolean value indicating whether the argument is a valid name - * character, ie. can occur in a NAME as defined by XSL. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">c</span><span class="comment"> The character to check - */</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">boolean</span> <span class="function-name" id="isNameChar">isNameChar</span>(<span class="type">char</span> <span class="variable-name">c</span>) { - <span class="keyword">return</span> nameStartChars.indexOf(c) >= <span class="jde-java-font-lock-number">0</span> || nameChars.indexOf(c) >= <span class="jde-java-font-lock-number">0</span> - || c >= <span class="jde-java-font-lock-number">0x80</span>; - } - -} -</pre> - </body> -</html> diff --git a/src/documentation/content/design/alt.design/properties/PropertyValue.html b/src/documentation/content/design/alt.design/properties/PropertyValue.html deleted file mode 100644 index b6c6d7bb2..000000000 --- a/src/documentation/content/design/alt.design/properties/PropertyValue.html +++ /dev/null @@ -1,220 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- - Copyright 2001-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- $Id$ --> -<!-- Created by htmlize-0.67 in css mode. --> -<html> - <head> - <title>PropertyValue.java</title> - <style type="text/css"> - <!-- - body { - color: #000000; - background-color: #faf0e6; - } /* default */ - .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 */ - .jde-java-font-lock-number { - color: #bc8f8f; - background-color: #faf0e6; - } /* jde-java-font-lock-number-face */ - .jde-java-font-lock-italic { - background-color: #faf0e6; - font-style: italic; - } /* jde-java-font-lock-italic-face */ - .string { - color: #008b00; - background-color: #faf0e6; - } /* font-lock-string-face */ - .variable-name { - color: #8b008b; - background-color: #faf0e6; - } /* font-lock-variable-name-face */ - .jde-java-font-lock-modifier { - color: #da70d6; - background-color: #faf0e6; - } /* jde-java-font-lock-modifier-face */ - .type { - color: #4682b4; - background-color: #faf0e6; - } /* font-lock-type-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="comment">/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */</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">datatypes</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="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">datastructs</span>.<span class="type">ROStringArray</span>; - -<span class="comment">/** - * Base interface for all property value types. - * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a> - */</span> - -<span class="jde-java-font-lock-modifier">public</span> <span class="keyword">interface</span> <span class="function-name" id="PropertyValueInterface">PropertyValue</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="jde-java-font-lock-constant" id="NO_TYPE">NO_TYPE</span> = <span class="jde-java-font-lock-number">0</span> - ,<span class="jde-java-font-lock-constant" id="ANGLE">ANGLE</span> = <span class="jde-java-font-lock-number">1</span> - ,<span class="jde-java-font-lock-constant" id="AUTO">AUTO</span> = <span class="jde-java-font-lock-number">2</span> - ,<span class="jde-java-font-lock-constant" id="BOOL">BOOL</span> = <span class="jde-java-font-lock-number">3</span> - ,<span class="jde-java-font-lock-constant" id="COLOR_TYPE">COLOR_TYPE</span> = <span class="jde-java-font-lock-number">4</span> - ,<span class="jde-java-font-lock-constant" id="COUNTRY">COUNTRY</span> = <span class="jde-java-font-lock-number">5</span> - ,<span class="jde-java-font-lock-constant" id="ENUM">ENUM</span> = <span class="jde-java-font-lock-number">6</span> - ,<span class="jde-java-font-lock-constant" id="FONT_FAMILY">FONT_FAMILY</span> = <span class="jde-java-font-lock-number">7</span> - ,<span class="jde-java-font-lock-constant" id="FREQUENCY">FREQUENCY</span> = <span class="jde-java-font-lock-number">8</span> - ,<span class="jde-java-font-lock-constant" id="FROM_NEAREST_SPECIFIED">FROM_NEAREST_SPECIFIED</span> = <span class="jde-java-font-lock-number">9</span> - ,<span class="jde-java-font-lock-constant" id="FROM_PARENT">FROM_PARENT</span> = <span class="jde-java-font-lock-number">10</span> - ,<span class="jde-java-font-lock-constant" id="INHERIT">INHERIT</span> = <span class="jde-java-font-lock-number">11</span> - ,<span class="jde-java-font-lock-constant" id="INHERITED_VALUE">INHERITED_VALUE</span> = <span class="jde-java-font-lock-number">12</span> - ,<span class="jde-java-font-lock-constant" id="INTEGER">INTEGER</span> = <span class="jde-java-font-lock-number">13</span> - ,<span class="jde-java-font-lock-constant" id="LANGUAGE">LANGUAGE</span> = <span class="jde-java-font-lock-number">14</span> - ,<span class="jde-java-font-lock-constant" id="LITERAL">LITERAL</span> = <span class="jde-java-font-lock-number">15</span> - ,<span class="jde-java-font-lock-constant" id="MAPPED_NUMERIC">MAPPED_NUMERIC</span> = <span class="jde-java-font-lock-number">16</span> - ,<span class="jde-java-font-lock-constant" id="MIME_TYPE">MIME_TYPE</span> = <span class="jde-java-font-lock-number">17</span> - ,<span class="jde-java-font-lock-constant" id="NCNAME">NCNAME</span> = <span class="jde-java-font-lock-number">18</span> - ,<span class="jde-java-font-lock-constant" id="NONE">NONE</span> = <span class="jde-java-font-lock-number">19</span> - ,<span class="jde-java-font-lock-constant" id="NUMERIC">NUMERIC</span> = <span class="jde-java-font-lock-number">20</span> - ,<span class="jde-java-font-lock-constant" id="SCRIPT">SCRIPT</span> = <span class="jde-java-font-lock-number">21</span> - ,<span class="jde-java-font-lock-constant" id="SHADOW_EFFECT">SHADOW_EFFECT</span> = <span class="jde-java-font-lock-number">22</span> - ,<span class="jde-java-font-lock-constant" id="SLASH">SLASH</span> = <span class="jde-java-font-lock-number">23</span> - ,<span class="jde-java-font-lock-constant" id="TEXT_DECORATIONS">TEXT_DECORATIONS</span> = <span class="jde-java-font-lock-number">24</span> - ,<span class="jde-java-font-lock-constant" id="TEXT_DECORATOR">TEXT_DECORATOR</span> = <span class="jde-java-font-lock-number">25</span> - ,<span class="jde-java-font-lock-constant" id="TIME">TIME</span> = <span class="jde-java-font-lock-number">26</span> - ,<span class="jde-java-font-lock-constant" id="URI_TYPE">URI_TYPE</span> = <span class="jde-java-font-lock-number">27</span> - ,<span class="jde-java-font-lock-constant" id="LIST">LIST</span> = <span class="jde-java-font-lock-number">28</span> - - ,<span class="jde-java-font-lock-constant" id="LAST_PROPERTY_TYPE">LAST_PROPERTY_TYPE</span> = <span class="jde-java-font-lock-constant">LIST</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">ROStringArray</span> <span class="variable-name" id="propertyTypes">propertyTypes</span> = - <span class="keyword">new</span> <span class="type">ROStringArray</span>(<span class="keyword">new</span> <span class="type">String</span>[] { - "<span class="string">NO_TYPE</span>" - ,"<span class="string">ANGLE</span>" - ,"<span class="string">AUTO</span>" - ,"<span class="string">BOOL</span>" - ,"<span class="string">COLOR_TYPE</span>" - ,"<span class="string">COUNTRY</span>" - ,"<span class="string">ENUM</span>" - ,"<span class="string">FONT_FAMILY</span>" - ,"<span class="string">FREQUENCY</span>" - ,"<span class="string">FROM_NEAREST_SPECIFIED</span>" - ,"<span class="string">FROM_PARENT</span>" - ,"<span class="string">INHERIT</span>" - ,"<span class="string">INHERITED_VALUE</span>" - ,"<span class="string">INTEGER</span>" - ,"<span class="string">LANGUAGE</span>" - ,"<span class="string">LITERAL</span>" - ,"<span class="string">MAPPED_NUMERIC</span>" - ,"<span class="string">MIME_TYPE</span>" - ,"<span class="string">NCNAME</span>" - ,"<span class="string">NONE</span>" - ,"<span class="string">NUMERIC</span>" - ,"<span class="string">SCRIPT</span>" - ,"<span class="string">SHADOW_EFFECT</span>" - ,"<span class="string">SLASH</span>" - ,"<span class="string">TEXT_DECORATIONS</span>" - ,"<span class="string">TEXT_DECORATOR</span>" - ,"<span class="string">TIME</span>" - ,"<span class="string">URI_LIST</span>" - ,"<span class="string">LIST</span>" - }); - - <span class="comment">/** - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>int</tt> property index. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="getProperty">getProperty</span>(); - <span class="jde-java-font-lock-modifier">public</span> <span class="type">void</span> <span class="function-name" id="setProperty">setProperty</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="comment">/** - * Get the <tt>int</tt> type of property value. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> type field of the <tt>PropertyValue</tt>. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="getType">getType</span>(); - - <span class="comment">/** - * In some circumstances, the property against which a type is to be - * validated may not be the same as the property against which this - * <i></span><span class="jde-java-font-lock-italic">PropertyValue</span><span class="comment"></i> is defined. A specific property argument is - * then required. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="testProperty">testProperty</span><span class="comment"> <tt>int</tt> property index of the property - * for which the type is to be validated. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="type">type</span><span class="comment"> <tt>int</tt> bitmap of data types to check for - * validity against this property. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">void</span> <span class="function-name" id="validate">validate</span>(<span class="type">int</span> <span class="variable-name">testProperty</span>, <span class="type">int</span> <span class="variable-name">type</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span>; - - <span class="comment">/** - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">type</span><span class="comment"> <tt>int</tt> bitmap of data types to check for - * validity against this property. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">void</span> <span class="function-name">validate</span>(<span class="type">int</span> <span class="variable-name">type</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span>; - <span class="jde-java-font-lock-modifier">public</span> <span class="type">Object</span> <span class="function-name" id="clone">clone</span>() <span class="keyword">throws</span> <span class="type">CloneNotSupportedException</span>; - -} -</pre> - </body> -</html> diff --git a/src/documentation/content/design/alt.design/properties/PropertyValueList.html b/src/documentation/content/design/alt.design/properties/PropertyValueList.html deleted file mode 100644 index 1876bb543..000000000 --- a/src/documentation/content/design/alt.design/properties/PropertyValueList.html +++ /dev/null @@ -1,374 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- - Copyright 2001-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- $Id$ --> -<!-- Created by htmlize-0.67 in css mode. --> -<html> - <head> - <title>PropertyValueList.java</title> - <style type="text/css"> - <!-- - body { - color: #000000; - background-color: #faf0e6; - } /* default */ - .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 */ - .jde-java-font-lock-number { - color: #bc8f8f; - background-color: #faf0e6; - } /* jde-java-font-lock-number-face */ - .jde-java-font-lock-italic { - background-color: #faf0e6; - font-style: italic; - } /* jde-java-font-lock-italic-face */ - .string { - color: #008b00; - background-color: #faf0e6; - } /* font-lock-string-face */ - .variable-name { - color: #8b008b; - background-color: #faf0e6; - } /* font-lock-variable-name-face */ - .jde-java-font-lock-modifier { - color: #da70d6; - background-color: #faf0e6; - } /* jde-java-font-lock-modifier-face */ - .type { - color: #4682b4; - background-color: #faf0e6; - } /* font-lock-type-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="comment">/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */</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">datatypes</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">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">Collection</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">Iterator</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="jde-java-font-lock-number">*</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">PropertyConsts</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">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="jde-java-font-lock-package">expr</span>.<span class="type">PropertyException</span>; - -<span class="comment">/** - * A list of <tt>PropertyValue</tt> elements. - * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a> - */</span> - -<span class="jde-java-font-lock-modifier">public</span> <span class="keyword">class</span> <span class="function-name" id="PropertyValueListClass">PropertyValueList</span> <span class="keyword">extends</span> <span class="type">LinkedList</span> <span class="keyword">implements</span> <span class="type">PropertyValue</span> { - - <span class="comment">/** - * An integer index to the type of property of which this is a value. - */</span> - <span class="jde-java-font-lock-modifier">protected</span> <span class="type">int</span> <span class="variable-name" id="property">property</span>; - - <span class="comment">/** - * An integer property type. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="type">type</span>; - - <span class="comment">/** - * The PropertyConsts singleton. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">PropertyConsts</span> <span class="variable-name" id="propertyConsts">propertyConsts</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"> <tt>int</tt> index of the property. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="function-name" id="PropertyValueList">PropertyValueList</span>(<span class="type">int</span> <span class="variable-name">property</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> { - <span class="keyword">super</span>(); - <span class="keyword">if</span> (property < <span class="jde-java-font-lock-number">1</span> || property > PropNames.<span class="jde-java-font-lock-constant" id="LAST_PROPERTY_INDEX">LAST_PROPERTY_INDEX</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">Invalid property index: </span>" + property); - <span class="keyword">this</span>.property = property; - type = PropertyValue.<span class="jde-java-font-lock-constant" id="LIST">LIST</span>; - propertyConsts = PropertyConsts.getPropertyConsts(); - } - - <span class="comment">/** - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="propertyName">propertyName</span><span class="comment"> a <tt>String</tt> containing the property name. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="function-name">PropertyValueList</span>(<span class="type">String</span> <span class="variable-name">propertyName</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="keyword">super</span>(); - property = PropNames.getPropertyIndex(propertyName); - <span class="keyword">if</span> (property < <span class="jde-java-font-lock-number">1</span> || property > PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">Invalid property index: </span>" + property); - type = PropertyValue.<span class="jde-java-font-lock-constant">LIST</span>; - propertyConsts = PropertyConsts.getPropertyConsts(); - } - - <span class="comment">/** - * Constructor with a <tt>Collection</tt>. Pass through to superclass - * only if the collection is another instance of a PropertyValueList. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">property</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="c">c</span><span class="comment"> a <tt>Collection</tt>, which must be another - * <i></span><span class="jde-java-font-lock-italic">PropertyValueList</span><span class="comment"></i>. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">IllegalArgumentException</span><span class="comment"> if the <tt>Collection</tt> is - * not a <i></span><span class="jde-java-font-lock-italic">PropertyValueList</span><span class="comment"></i>. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="function-name">PropertyValueList</span>(<span class="type">int</span> <span class="variable-name">property</span>, <span class="type">Collection</span> <span class="variable-name">c</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="keyword">super</span>(c); - <span class="comment">// This test only follows the super() call because that call must -</span> <span class="comment">// be the first in a constructor. -</span> <span class="keyword">if</span> (! (c <span class="keyword">instanceof</span> <span class="type">PropertyValueList</span>)) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">IllegalArgumentException</span> - ("<span class="string">Collection is not a PropertyValueList.</span>"); - <span class="keyword">if</span> (property < <span class="jde-java-font-lock-number">1</span> || property > PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">Invalid property index: </span>" + property); - <span class="keyword">this</span>.property = property; - type = PropertyValue.<span class="jde-java-font-lock-constant">LIST</span>; - propertyConsts = PropertyConsts.getPropertyConsts(); - } - - <span class="comment">/** - * Constructor with a <tt>Collection</tt>. Pass through to superclass - * only if the collection is another instance of a PropertyValueList. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">propertyName</span><span class="comment"> a <tt>String</tt> containing the property name. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">c</span><span class="comment"> a <tt>Collection</tt>, which must be another - * <i></span><span class="jde-java-font-lock-italic">PropertyValueList</span><span class="comment"></i>. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">IllegalArgumentException</span><span class="comment"> if the <tt>Collection</tt> is - * not a <i></span><span class="jde-java-font-lock-italic">PropertyValueList</span><span class="comment"></i>. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="function-name">PropertyValueList</span>(<span class="type">String</span> <span class="variable-name">propertyName</span>, <span class="type">Collection</span> <span class="variable-name">c</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="keyword">super</span>(c); - <span class="comment">// This test only follows the super() call because that call must -</span> <span class="comment">// be the first in a constructor. -</span> <span class="keyword">if</span> (! (c <span class="keyword">instanceof</span> <span class="type">PropertyValueList</span>)) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">IllegalArgumentException</span> - ("<span class="string">Collection is not a PropertyValueList.</span>"); - property = PropNames.getPropertyIndex(propertyName); - <span class="keyword">if</span> (property < <span class="jde-java-font-lock-number">1</span> || property > PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">Invalid property index: </span>" + property); - type = PropertyValue.<span class="jde-java-font-lock-constant">LIST</span>; - propertyConsts = PropertyConsts.getPropertyConsts(); - } - - <span class="comment">/** - * Append a PropertyValue or PropertyValueList to the end of the list. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="o">o</span><span class="comment"> a <tt>PropertyValue</tt> or a <PropertyValueList</tt>; - * the element to add. Defined as an - * <tt>Object</tt> to override the definition in <tt>LinkedList</tt>. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a <tt>boolean</tt> success or failure(?). - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">IllegalArgumentException</span><span class="comment"> if the object is not a - * <tt>PropertyValue</tt> or <tt>PropertyValueList</tt>. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">boolean</span> <span class="function-name" id="add">add</span>(<span class="type">Object</span> <span class="variable-name">o</span>) { - <span class="keyword">if</span> (! (o <span class="keyword">instanceof</span> <span class="type">PropertyValue</span> || o <span class="keyword">instanceof</span> <span class="type">PropertyValueList</span>)) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">IllegalArgumentException</span> - ("<span class="string">Object is not a PropertyValue or a PropertyValueList.</span>"); - <span class="keyword">return</span> <span class="keyword">super</span>.add(o); - } - - <span class="comment">/** - * Insert a <tt>PropertyValue</tt> or <tt>PropertyValueList</tt> - * at the beginning of the list. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">o</span><span class="comment"> a <tt>PropertyValue</tt> or a <PropertyValueList</tt>; - * the element to add. Defined as an - * <tt>Object</tt> to override the definition in <tt>LinkedList</tt>. - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">IllegalArgumentException</span><span class="comment"> if the object is not a - * <tt>PropertyValue</tt> or <tt>PropertyValueList</tt>. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">void</span> <span class="function-name" id="addFirst">addFirst</span>(<span class="type">Object</span> <span class="variable-name">o</span>) { - <span class="keyword">if</span> (! (o <span class="keyword">instanceof</span> <span class="type">PropertyValue</span> || o <span class="keyword">instanceof</span> <span class="type">PropertyValueList</span>)) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">IllegalArgumentException</span> - ("<span class="string">Object is not a PropertyValue or a PropertyValueList.</span>"); - <span class="keyword">super</span>.addFirst(o); - } - - <span class="comment">/** - * Append a PropertyValue to the end of the list. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">o</span><span class="comment"> a <tt>PropertyValue</tt>; the element to add. Defined as an - * <tt>Object</tt> to override the definition in <tt>LinkedList</tt>. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a <tt>boolean</tt> success or failure(?). - * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">IllegalArgumentException</span><span class="comment"> if the object is not a - * <tt>PropertyValue</tt>. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">void</span> <span class="function-name" id="addLast">addLast</span>(<span class="type">Object</span> <span class="variable-name">o</span>) { - add(o); - } - - <span class="comment">/* - * Following fields and methods implement the PropertyValue interface - */</span> - - <span class="comment">/** - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>int</tt> property index. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="getProperty">getProperty</span>() { - <span class="keyword">return</span> property; - } - - <span class="jde-java-font-lock-modifier">public</span> <span class="type">void</span> <span class="function-name" id="setProperty">setProperty</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">0</span> || index > PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">Invalid property index: </span>" + index); - property = index; - } - - <span class="comment">/** - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> type field of the <tt>PropertyValue</tt>. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="getType">getType</span>() { - <span class="keyword">return</span> type; - } - - <span class="comment">/** - * In some circumstances, the property against which a type is to be - * validated may not be the same as the property against which this - * <i></span><span class="jde-java-font-lock-italic">AbstractPropertyValue</span><span class="comment"></i> is defined. - * A specific property argument is then required. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="testProperty">testProperty</span><span class="comment"> <tt>int</tt> property index of the property - * for which the type is to be validated. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">type</span><span class="comment"> <tt>int</tt> bitmap of data types to check for - * validity against this property. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">void</span> <span class="function-name" id="validate">validate</span>(<span class="type">int</span> <span class="variable-name">testProperty</span>, <span class="type">int</span> <span class="variable-name">type</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="comment">// N.B. PROPERTY_SPECIFIC inheritance may require more specialized -</span> <span class="comment">// checks. Only line-height comes into this category. -</span> - <span class="comment">// N.B. The first commented-out condition means that I cannot validate -</span> <span class="comment">// unless the property is NOT inherited. -</span> <span class="comment">// I can't remember why I put this -</span> <span class="comment">// condition in here. Removing it. pbw 2002/02/18 -</span> <span class="comment">//if (propertyConsts.inherited.get(testProperty) == Property.NO -</span> <span class="comment">//&& (propertyConsts.getDataTypes(testProperty) & type) == 0) { -</span> - <span class="keyword">if</span> ((propertyConsts.getDataTypes(testProperty) & type) == <span class="jde-java-font-lock-number">0</span>) { - <span class="type">String</span> <span class="variable-name" id="pname">pname</span> = PropNames.getPropertyName(testProperty); - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">Datatype(s) </span>" + - Property.listDataTypes(type) + - "<span class="string"> not defined on </span>" + pname); - } - } - - <span class="comment">/** - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">type</span><span class="comment"> <tt>int</tt> bitmap of data types to check for - * validity against this property. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="type">void</span> <span class="function-name">validate</span>(<span class="type">int</span> <span class="variable-name">type</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> { - <span class="comment">// N.B. PROPERTY_SPECIFIC inheritance may require more specialized -</span> <span class="comment">// checks. Only line-height comes into this category. -</span> validate(property, type); - } - - <span class="jde-java-font-lock-modifier">public</span> <span class="type">String</span> <span class="function-name" id="toString">toString</span>() { - <span class="type">String</span> <span class="variable-name" id="str">str</span>, <span class="variable-name">cstr</span>; - <span class="keyword">try</span> { - str = "<span class="string">Property: </span>" + PropNames.getPropertyName(property) - + "<span class="string"> Index: </span>" + property + "<span class="string"> List contents:\n</span>"; - <span class="type">Iterator</span> <span class="variable-name" id="contents">contents</span> = iterator(); - <span class="keyword">while</span> (contents.hasNext()) { - <span class="type">int</span> <span class="variable-name" id="i">i</span> = <span class="jde-java-font-lock-number">0</span>, <span class="variable-name">j</span> = <span class="jde-java-font-lock-number">0</span>; - <span class="type">Object</span> <span class="variable-name" id="obj">obj</span> = contents.next(); - <span class="keyword">try</span> { - cstr = (<span class="type">String</span>)(obj.getClass() - .getMethod("<span class="string">toString</span>", <span class="jde-java-font-lock-constant" id="null">null</span>) - .invoke(obj, <span class="jde-java-font-lock-constant">null</span>)); - } <span class="keyword">catch</span> (<span class="type">IllegalAccessException</span> <span class="variable-name" id="e">e</span>) { - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> (e); - } <span class="keyword">catch</span> (<span class="type">NoSuchMethodException</span> <span class="variable-name">e</span>) { - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> (e); - } <span class="keyword">catch</span> (<span class="type">InvocationTargetException</span> <span class="variable-name">e</span>) { - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> (e); - } - <span class="keyword">while</span> (i < cstr.length() && j >= <span class="jde-java-font-lock-number">0</span>) { - j = cstr.indexOf('<span class="string">\n</span>', j); - <span class="keyword">if</span> (j >= <span class="jde-java-font-lock-number">0</span>) { - str = str + "<span class="string">></span>" + cstr.substring(i, ++j); - i = j; - } <span class="keyword">else</span> { - str = str + "<span class="string">></span>" + cstr.substring(i); - i = cstr.length(); - } - } - } - <span class="keyword">return</span> str; - - } <span class="keyword">catch</span> (<span class="type">PropertyException</span> <span class="variable-name">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="type">Object</span> <span class="function-name" id="clone">clone</span>() { - <span class="keyword">return</span> <span class="keyword">super</span>.clone(); - } - -}<span class="comment">// PropertyValueList -</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 deleted file mode 100644 index 450ee67aa..000000000 --- a/src/documentation/content/design/alt.design/properties/RenderingIntent.html +++ /dev/null @@ -1,149 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- - Copyright 2001-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- $Id$ --> -<!-- 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="comment">/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */</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="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> diff --git a/src/documentation/content/design/alt.design/properties/ShorthandPropSets.html b/src/documentation/content/design/alt.design/properties/ShorthandPropSets.html deleted file mode 100644 index 1a355fc09..000000000 --- a/src/documentation/content/design/alt.design/properties/ShorthandPropSets.html +++ /dev/null @@ -1,1093 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- - Copyright 2001-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- $Id$ --> -<!-- Created by htmlize-0.67 in css mode. --> -<html> - <head> - <title>ShorthandPropSets.java</title> - <style type="text/css"> - <!-- - body { - color: #000000; - background-color: #faf0e6; - } /* default */ - .reference { - color: #cd0000; - background-color: #faf0e6; - } /* font-lock-reference-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">/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */</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">CloneNotSupportedException</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">Set</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">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">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">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">ListIterator</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">Iterator</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">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">PropertyValueList</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">PropertyConsts</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">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">Ints</span>; - -<span class="comment">/** - * This class contains <tt>ROIntArray</tt>s which encode the various sets of - * properties into which the shorthand and compound properties expand, and - * utility methods for manipulating these expansions. - * </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-modifier">public</span> <span class="keyword">class</span> <span class="function-name" id="ShorthandPropSetsClass">ShorthandPropSets</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="comment">// My preference here for shorthands which expand to compound properties -</span> <span class="comment">// would be to expand only to the compound, and allow compounds to be -</span> <span class="comment">// "normally" expanded in a second step. Unfortunately, the shorthand -</span> <span class="comment">// border-spacing expands (potentially) into both of the elements of -</span> <span class="comment">// the border-separation compound. However, other compound expansions -</span> <span class="comment">// are defined with only a single value for the compound, so I will -</span> <span class="comment">// treat border-separation as a special case in the event that two -</span> <span class="comment">// values are provided. -</span> <span class="comment">// I''m not sure whether a shorthand specification which sets a compound -</span> <span class="comment">// property with a single top-level value should be regarded as a -</span> <span class="comment">// specification for the purposes of inheritance, but I will assume so -</span> <span class="comment">// until further notice. -</span> <span class="comment">// pbw -</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">int</span>[] <span class="variable-name" id="backgroundPosition">backgroundPosition</span> = { - <span class="reference">PropNames</span>.<span class="type">BACKGROUND_POSITION_HORIZONTAL</span> - ,<span class="reference">PropNames</span>.<span class="type">BACKGROUND_POSITION_VERTICAL</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">int</span>[] <span class="variable-name" id="borderColor">borderColor</span> = { - <span class="reference">PropNames</span>.<span class="type">BORDER_TOP_COLOR</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_RIGHT_COLOR</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_BOTTOM_COLOR</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_LEFT_COLOR</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">int</span>[] <span class="variable-name" id="borderStyle">borderStyle</span> = { - <span class="reference">PropNames</span>.<span class="type">BORDER_TOP_STYLE</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_RIGHT_STYLE</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_BOTTOM_STYLE</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_LEFT_STYLE</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">int</span>[] <span class="variable-name" id="borderWidth">borderWidth</span> = { - <span class="reference">PropNames</span>.<span class="type">BORDER_TOP_WIDTH</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_RIGHT_WIDTH</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_BOTTOM_WIDTH</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_LEFT_WIDTH</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">ROIntArray</span> <span class="variable-name" id="backgroundExpansion">backgroundExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[][] { - <span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">BACKGROUND_COLOR</span> - ,<span class="reference">PropNames</span>.<span class="type">BACKGROUND_IMAGE</span> - ,<span class="reference">PropNames</span>.<span class="type">BACKGROUND_REPEAT</span> - ,<span class="reference">PropNames</span>.<span class="type">BACKGROUND_ATTACHMENT</span> - ,<span class="reference">PropNames</span>.<span class="type">BACKGROUND_POSITION_HORIZONTAL</span> - ,<span class="reference">PropNames</span>.<span class="type">BACKGROUND_POSITION_VERTICAL</span> - }, backgroundPosition}); - - <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">ROIntArray</span> <span class="variable-name" id="backgroundPositionExpansion">backgroundPositionExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(backgroundPosition); - - <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">ROIntArray</span> <span class="variable-name" id="borderExpansion">borderExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[][] { borderStyle, borderColor, borderWidth }); - - <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">ROIntArray</span> <span class="variable-name" id="borderStyleExpansion">borderStyleExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(borderStyle); - - <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">ROIntArray</span> <span class="variable-name" id="borderColorExpansion">borderColorExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(borderColor); - - <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">ROIntArray</span> <span class="variable-name" id="borderWidthExpansion">borderWidthExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(borderWidth); - - <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">ROIntArray</span> <span class="variable-name" id="borderTopExpansion">borderTopExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">BORDER_TOP_STYLE</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_TOP_COLOR</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_TOP_WIDTH</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">ROIntArray</span> <span class="variable-name" id="borderRightExpansion">borderRightExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">BORDER_RIGHT_STYLE</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_RIGHT_COLOR</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_RIGHT_WIDTH</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">ROIntArray</span> <span class="variable-name" id="borderBottomExpansion">borderBottomExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">BORDER_BOTTOM_STYLE</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_BOTTOM_COLOR</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_BOTTOM_WIDTH</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">ROIntArray</span> <span class="variable-name" id="borderLeftExpansion">borderLeftExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">BORDER_LEFT_STYLE</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_LEFT_COLOR</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_LEFT_WIDTH</span> - }); - - <span class="comment">/** - * Watch this one. <i></span><span class="jde-java-font-lock-italic">border-spacing</span><span class="comment"></i> is a shorthand which expands - * into the components of the <tt>&lt;border-separation&gt;</tt> compound - * 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">ROIntArray</span> <span class="variable-name" id="borderSpacingExpansion">borderSpacingExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">BORDER_SEPARATION</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">ROIntArray</span> <span class="variable-name" id="cueExpansion">cueExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">CUE_BEFORE</span> - ,<span class="reference">PropNames</span>.<span class="type">CUE_AFTER</span> - }); - - <span class="comment">/** - * Another nasty one. <i></span><span class="jde-java-font-lock-italic">font</span><span class="comment"></i> expands, in part, into - * <i></span><span class="jde-java-font-lock-italic">line-height</span><span class="comment"></i>, which is itself a compound property with a - * <tt>&lt;space&gt;</tt> value. - */</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">ROIntArray</span> <span class="variable-name" id="fontExpansion">fontExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">FONT_FAMILY</span> - ,<span class="reference">PropNames</span>.<span class="type">FONT_STYLE</span> - ,<span class="reference">PropNames</span>.<span class="type">FONT_VARIANT</span> - ,<span class="reference">PropNames</span>.<span class="type">FONT_WEIGHT</span> - ,<span class="reference">PropNames</span>.<span class="type">FONT_SIZE</span> - ,<span class="reference">PropNames</span>.<span class="type">LINE_HEIGHT</span> - ,<span class="reference">PropNames</span>.<span class="type">FONT_SIZE_ADJUST</span> - ,<span class="reference">PropNames</span>.<span class="type">FONT_STRETCH</span> - ,<span class="reference">PropNames</span>.<span class="type">FONT_SELECTION_STRATEGY</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">ROIntArray</span> <span class="variable-name" id="marginExpansion">marginExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">MARGIN_TOP</span> - ,<span class="reference">PropNames</span>.<span class="type">MARGIN_RIGHT</span> - ,<span class="reference">PropNames</span>.<span class="type">MARGIN_BOTTOM</span> - ,<span class="reference">PropNames</span>.<span class="type">MARGIN_LEFT</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">ROIntArray</span> <span class="variable-name" id="paddingExpansion">paddingExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">PADDING_TOP</span> - ,<span class="reference">PropNames</span>.<span class="type">PADDING_RIGHT</span> - ,<span class="reference">PropNames</span>.<span class="type">PADDING_BOTTOM</span> - ,<span class="reference">PropNames</span>.<span class="type">PADDING_LEFT</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">ROIntArray</span> <span class="variable-name" id="pageBreakAfterExpansion">pageBreakAfterExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">BREAK_AFTER</span> - ,<span class="reference">PropNames</span>.<span class="type">KEEP_WITH_NEXT</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">ROIntArray</span> <span class="variable-name" id="pageBreakBeforeExpansion">pageBreakBeforeExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">BREAK_BEFORE</span> - ,<span class="reference">PropNames</span>.<span class="type">KEEP_WITH_PREVIOUS</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">ROIntArray</span> <span class="variable-name" id="pageBreakInsideExpansion">pageBreakInsideExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">KEEP_TOGETHER</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">ROIntArray</span> <span class="variable-name" id="pauseExpansion">pauseExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">PAUSE_BEFORE</span> - ,<span class="reference">PropNames</span>.<span class="type">PAUSE_AFTER</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">ROIntArray</span> <span class="variable-name" id="positionExpansion">positionExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">RELATIVE_POSITION</span> - ,<span class="reference">PropNames</span>.<span class="type">ABSOLUTE_POSITION</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">ROIntArray</span> <span class="variable-name" id="sizeExpansion">sizeExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">PAGE_HEIGHT</span> - ,<span class="reference">PropNames</span>.<span class="type">PAGE_WIDTH</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">ROIntArray</span> <span class="variable-name" id="verticalAlignExpansion">verticalAlignExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">ALIGNMENT_BASELINE</span> - ,<span class="reference">PropNames</span>.<span class="type">ALIGNMENT_ADJUST</span> - ,<span class="reference">PropNames</span>.<span class="type">BASELINE_SHIFT</span> - ,<span class="reference">PropNames</span>.<span class="type">DOMINANT_BASELINE</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">ROIntArray</span> <span class="variable-name" id="whiteSpaceExpansion">whiteSpaceExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">LINEFEED_TREATMENT</span> - ,<span class="reference">PropNames</span>.<span class="type">WHITE_SPACE_COLLAPSE</span> - ,<span class="reference">PropNames</span>.<span class="type">WHITE_SPACE_TREATMENT</span> - ,<span class="reference">PropNames</span>.<span class="type">WRAP_OPTION</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">ROIntArray</span> <span class="variable-name" id="xmlLangExpansion">xmlLangExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">COUNTRY</span> - ,<span class="reference">PropNames</span>.<span class="type">LANGUAGE</span> - }); - - <span class="comment">/** - * Shorthand properties. Where properties interact, they are listed - * in increasing precision. - */</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">int</span>[] <span class="variable-name" id="shorthands">shorthands</span> = { - <span class="reference">PropNames</span>.<span class="type">BACKGROUND</span> - ,<span class="reference">PropNames</span>.<span class="type">BACKGROUND_POSITION</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_STYLE</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_COLOR</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_WIDTH</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_TOP</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_RIGHT</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_BOTTOM</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_LEFT</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_SPACING</span> - ,<span class="reference">PropNames</span>.<span class="type">CUE</span> - ,<span class="reference">PropNames</span>.<span class="type">FONT</span> - ,<span class="reference">PropNames</span>.<span class="type">MARGIN</span> - ,<span class="reference">PropNames</span>.<span class="type">PADDING</span> - ,<span class="reference">PropNames</span>.<span class="type">PAGE_BREAK_AFTER</span> - ,<span class="reference">PropNames</span>.<span class="type">PAGE_BREAK_BEFORE</span> - ,<span class="reference">PropNames</span>.<span class="type">PAGE_BREAK_INSIDE</span> - ,<span class="reference">PropNames</span>.<span class="type">PAUSE</span> - ,<span class="reference">PropNames</span>.<span class="type">POSITION</span> - ,<span class="reference">PropNames</span>.<span class="type">SIZE</span> - ,<span class="reference">PropNames</span>.<span class="type">VERTICAL_ALIGN</span> - ,<span class="reference">PropNames</span>.<span class="type">WHITE_SPACE</span> - ,<span class="reference">PropNames</span>.<span class="type">XML_LANG</span> - }; - - <span class="comment">/** - * Array of <i></span><span class="jde-java-font-lock-italic">ROIntArray</i><b></span><span class="jde-java-font-lock-bold"> in same order as <i>shorthands</i></span><span class="comment"></b> - * <i></span><span class="jde-java-font-lock-italic">ROIntArray</span><span class="comment"></i>. - * If a public view of this is required, use - * Collections.unmodifiableList(Arrays.asList(shorthandExpansions)) - */</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">ROIntArray</span>[] <span class="variable-name" id="shorthandExpansions">shorthandExpansions</span> = { - backgroundExpansion - ,backgroundPositionExpansion - ,borderExpansion - ,borderStyleExpansion - ,borderColorExpansion - ,borderWidthExpansion - ,borderTopExpansion - ,borderRightExpansion - ,borderBottomExpansion - ,borderLeftExpansion - ,borderSpacingExpansion - ,cueExpansion - ,fontExpansion - ,marginExpansion - ,paddingExpansion - ,pageBreakAfterExpansion - ,pageBreakBeforeExpansion - ,pageBreakInsideExpansion - ,pauseExpansion - ,positionExpansion - ,sizeExpansion - ,verticalAlignExpansion - ,whiteSpaceExpansion - ,xmlLangExpansion - }; - - <span class="comment">/** - * Map property index to shorthand array index - */</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="shorthandMap">shorthandMap</span>; - <span class="jde-java-font-lock-modifier">static</span> { - shorthandMap = <span class="keyword">new</span> <span class="type">HashMap</span>(shorthands.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">0</span>; i < shorthands.length; i++) { - shorthandMap.put - ((<span class="type">Object</span>)(Ints.consts.get(shorthands[i])), - (<span class="type">Object</span>)(Ints.consts.get(i))); - } - } - - <span class="comment">/** - * RO Shorthand properties. - */</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">ROIntArray</span> <span class="variable-name" id="roShorthands">roShorthands</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(shorthands); - - <span class="comment">/** - * A <tt>ROBitSet</tt> of the shorthand properties. - */</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">ROBitSet</span> <span class="variable-name" id="shorthandPropSet">shorthandPropSet</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">BitSet</span> <span class="variable-name" id="shorthandpropset">shorthandpropset</span>; - <span class="jde-java-font-lock-modifier">static</span> { - shorthandpropset = <span class="keyword">new</span> <span class="type">BitSet</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="keyword">for</span> (<span class="type">int</span> <span class="variable-name">i</span> = <span class="jde-java-font-lock-number">0</span>; i < shorthands.length; i++) - shorthandpropset.set(shorthands[i]); - shorthandPropSet = <span class="keyword">new</span> <span class="type">ROBitSet</span>(shorthandpropset); - } - - <span class="comment">/** - * </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"> <tt>int</tt> property index - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>ROIntArray</tt> containing the expansion list for - * this shorthand. - * </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"> if this is not a valid - * shorthand property - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">ROIntArray</span> <span class="function-name" id="getSHandExpansionSet">getSHandExpansionSet</span>(<span class="type">int</span> <span class="variable-name">property</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="comment">// Is the property of the argument a shorthand? -</span> <span class="type">Integer</span> <span class="variable-name" id="sHIndex">sHIndex</span> = - (<span class="type">Integer</span>)(shorthandMap.get(Ints.consts.get(property))); - <span class="keyword">if</span> (sHIndex == <span class="jde-java-font-lock-constant" id="null">null</span>) { - <span class="type">String</span> <span class="variable-name" id="propname">propname</span> = PropNames.getPropertyName(property); - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - (propname + "<span class="string"> not a shorthand property</span>"); - } - <span class="comment">// Get the array of indices of the properties in the -</span> <span class="comment">// expansion of this shorthand -</span> <span class="keyword">return</span> shorthandExpansions[sHIndex.intValue()]; - } - - <span class="comment">/** - * Expand the shorthand property associated with the - * <tt>PropertyValue</tt> argument by copying the given value for each - * property in the expansion. The <em></span><span class="jde-java-font-lock-italic">property</span><span class="comment"></em> field of each - * <tt>PropertyValue</tt> will be set to one of the proeprties in the - * shorthand expansion. - * </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"> a <tt>propertyValue</tt> whose <em></span><span class="jde-java-font-lock-italic">property</span><span class="comment"></em> field - * is assumed to be set to a shorthand property. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>PropertyValueList</tt> containing a list of - * <tt>PropertyValue</tt>s, one for each property in the expansion of - * the shorthand property. - * </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="jde-java-font-lock-modifier">static</span> <span class="type">PropertyValueList</span> <span class="function-name" id="expandAndCopySHand">expandAndCopySHand</span>(<span class="type">PropertyValue</span> <span class="variable-name">value</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="comment">// The property associated with this PropertyValue -</span> <span class="type">int</span> <span class="variable-name">property</span> = value.getProperty(); - <span class="type">ROIntArray</span> <span class="variable-name" id="expansion">expansion</span> = getSHandExpansionSet(property); - <span class="type">PropertyValueList</span> <span class="variable-name" id="list">list</span> = <span class="keyword">new</span> <span class="type">PropertyValueList</span>(property); - <span class="keyword">return</span> copyValueToSet(value, expansion, list); - } - - <span class="comment">/** - * Generate a list of the intial values of each property in a - * shorthand expansion. Note that this will be a list of - * <b></span><span class="jde-java-font-lock-bold">references</span><span class="comment"></b> to the initial values. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="foTree">foTree</span><span class="comment"> the <tt>FOTree</tt> for which properties are being - * processed - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">property</span><span class="comment"> <tt>int</tt> property index - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>PropertyValueList</tt> containing the intial value - * expansions for the (shorthand) 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="comment">/* - Don't do this. Shorthands should not expand initial values, because - a distinction is needed between those properties which are given - a specified value and those which are set by normal inheritance or from - their initial values. This so that fromSpecifiedValue() will work. - - public static PropertyValueList initialValueSHandExpansion - (FOTree foTree, int property) - throws PropertyException - { - ROIntArray expansion = getSHandExpansionSet(property); - PropertyValueList list = new PropertyValueList(property); - for (int i = 0; i < expansion.length; i++) { - int expandedProp = expansion.get(i); - PropertyValue specified - = foTree.getInitialSpecifiedValue(expandedProp); - list.add(specified); - } - return list; - } - */</span> - - <span class="comment">/** - * Given a shorthand expansion list and a <tt>PropertyValue</tt>, - * override the list element corresponding to the <tt>PropertyValue</tt>. - * Correspondence is based on the <em></span><span class="jde-java-font-lock-italic">property</span><span class="comment"></em> field of the - * <tt>PropertyValue</tt>. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="expansionList">expansionList</span><span class="comment"> the expansion <tt>PropertyValueList</tt> - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="element">element</span><span class="comment"> the overriding <tt>PropertyValue</tt> - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>PropertyValueList</tt> the expansion list with the - * appropriate element reset - * </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="jde-java-font-lock-modifier">static</span> <span class="type">PropertyValueList</span> <span class="variable-name" id="overrideSHandElement">overrideSHandElement</span> - (<span class="type">PropertyValueList</span> <span class="variable-name">expansionList</span>, <span class="type">PropertyValue</span> <span class="variable-name">element</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="type">int</span> <span class="variable-name" id="elementProp">elementProp</span> = element.getProperty(); - <span class="type">ListIterator</span> <span class="variable-name" id="elements">elements</span> = expansionList.listIterator(); - <span class="keyword">while</span> (elements.hasNext()) { - <span class="type">PropertyValue</span> <span class="variable-name" id="next">next</span> = (<span class="type">PropertyValue</span>)(elements.next()); - <span class="keyword">if</span> (next.getProperty() == elementProp) { - elements.set(element); - <span class="keyword">return</span> expansionList; - } - } - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">Unmatched property </span>" + elementProp + - "<span class="string"> in expansion list for </span>" + expansionList.getProperty()); - } - - <span class="comment">/** - * Given a shorthand expansion list and a <tt>PropertyValueList</tt>, - * override the expansion list elements corresponding to the elements - * of the <tt>PropertyValueList</tt>. - * Correspondence is based on the <em></span><span class="jde-java-font-lock-italic">property</span><span class="comment"></em> field of the - * <tt>PropertyValue</tt>. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">expansionList</span><span class="comment"> the expansion <tt>PropertyValueList</tt> - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">list</span><span class="comment"> the overriding <tt>PropertyValueList</tt> - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>PropertyValueList</tt> the new expansion list with - * appropriate elements reset - * </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="jde-java-font-lock-modifier">static</span> <span class="type">PropertyValueList</span> <span class="variable-name" id="overrideSHandElements">overrideSHandElements</span> - (<span class="type">PropertyValueList</span> <span class="variable-name">expansionList</span>, <span class="type">PropertyValueList</span> <span class="variable-name">list</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="comment">// From the overriding list, form an array of PropertyValue references -</span> <span class="comment">// an array of property indices and an array of booleans, -</span> <span class="type">int</span> <span class="variable-name" id="listsize">listsize</span> = list.size(); - <span class="type">Object</span>[] <span class="variable-name" id="listrefs">listrefs</span> = <span class="keyword">new</span> <span class="type">Object</span>[listsize]; - <span class="type">int</span>[] <span class="variable-name" id="listprops">listprops</span> = <span class="keyword">new</span> <span class="type">int</span>[listsize]; - <span class="type">boolean</span>[] <span class="variable-name" id="propseen">propseen</span> = <span class="keyword">new</span> <span class="type">boolean</span>[listsize]; - <span class="type">Iterator</span> <span class="variable-name" id="listels">listels</span> = list.iterator(); - <span class="type">int</span> <span class="variable-name">i</span> = <span class="jde-java-font-lock-number">0</span>; - <span class="keyword">while</span> (listels.hasNext()) { - listrefs[i] = listels.next(); - listprops[i] = ((<span class="type">PropertyValue</span>)listrefs[i]).getProperty(); - i++; - } - - <span class="type">ListIterator</span> <span class="variable-name">elements</span> = expansionList.listIterator(); - <span class="keyword">while</span> (elements.hasNext()) { - <span class="type">PropertyValue</span> <span class="variable-name">next</span> = (<span class="type">PropertyValue</span>)(elements.next()); - <span class="type">int</span> <span class="variable-name" id="expprop">expprop</span> = next.getProperty(); - <span class="keyword">for</span> (i = <span class="jde-java-font-lock-number">0</span>; i < listsize; i++) { - <span class="keyword">if</span> (expprop != listprops[i]) <span class="keyword">continue</span>; - elements.set(listrefs[i]); - propseen[i] = <span class="jde-java-font-lock-constant" id="true">true</span>; - } - } - <span class="comment">// Check for unmatched override elements -</span> <span class="type">String</span> <span class="variable-name" id="unmatched">unmatched</span> = ""; - <span class="type">boolean</span> <span class="variable-name" id="someunmatched">someunmatched</span> = <span class="jde-java-font-lock-constant" id="false">false</span>; - <span class="keyword">for</span> (i = <span class="jde-java-font-lock-number">0</span>; i < listsize; i++) { - <span class="keyword">if</span> ( ! propseen[i]) { - someunmatched = <span class="jde-java-font-lock-constant">true</span>; - unmatched = unmatched + "<span class="string"> </span>" + - PropNames.getPropertyName(listprops[i]); - } - } - <span class="keyword">if</span> (someunmatched) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - ("<span class="string">Unmatched properties:</span>" + unmatched + - "<span class="string"> : in expansion list for </span>" + expansionList.getProperty()); - <span class="keyword">return</span> expansionList; - } - - <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">ROIntArray</span> <span class="variable-name" id="blockProgressionDimensionCopyExpansion">blockProgressionDimensionCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">BLOCK_PROGRESSION_DIMENSION_MINIMUM</span> - ,<span class="reference">PropNames</span>.<span class="type">BLOCK_PROGRESSION_DIMENSION_OPTIMUM</span> - ,<span class="reference">PropNames</span>.<span class="type">BLOCK_PROGRESSION_DIMENSION_MAXIMUM</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">ROIntArray</span> <span class="variable-name" id="blockProgressionDimensionNonCopyExpansion">blockProgressionDimensionNonCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</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">ROIntArray</span> <span class="variable-name" id="borderAfterWidthCopyExpansion">borderAfterWidthCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">BORDER_AFTER_WIDTH_LENGTH</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">ROIntArray</span> <span class="variable-name" id="borderAfterWidthNonCopyExpansion">borderAfterWidthNonCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">BORDER_AFTER_WIDTH_CONDITIONALITY</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">ROIntArray</span> <span class="variable-name" id="borderBeforeWidthCopyExpansion">borderBeforeWidthCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">BORDER_BEFORE_WIDTH_LENGTH</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">ROIntArray</span> <span class="variable-name" id="borderBeforeWidthNonCopyExpansion">borderBeforeWidthNonCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">BORDER_BEFORE_WIDTH_CONDITIONALITY</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">ROIntArray</span> <span class="variable-name" id="borderEndWidthCopyExpansion">borderEndWidthCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">BORDER_END_WIDTH_LENGTH</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">ROIntArray</span> <span class="variable-name" id="borderEndWidthNonCopyExpansion">borderEndWidthNonCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">BORDER_END_WIDTH_CONDITIONALITY</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">ROIntArray</span> <span class="variable-name" id="borderStartWidthCopyExpansion">borderStartWidthCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">BORDER_START_WIDTH_LENGTH</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">ROIntArray</span> <span class="variable-name" id="borderStartWidthNonCopyExpansion">borderStartWidthNonCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">BORDER_START_WIDTH_CONDITIONALITY</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">ROIntArray</span> <span class="variable-name" id="borderSeparationCopyExpansion">borderSeparationCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">BORDER_SEPARATION_BLOCK_PROGRESSION_DIRECTION</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_SEPARATION_INLINE_PROGRESSION_DIRECTION</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">ROIntArray</span> <span class="variable-name" id="borderSeparationNonCopyExpansion">borderSeparationNonCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</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">ROIntArray</span> <span class="variable-name" id="inlineProgressionDimensionCopyExpansion">inlineProgressionDimensionCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">INLINE_PROGRESSION_DIMENSION_MINIMUM</span> - ,<span class="reference">PropNames</span>.<span class="type">INLINE_PROGRESSION_DIMENSION_OPTIMUM</span> - ,<span class="reference">PropNames</span>.<span class="type">INLINE_PROGRESSION_DIMENSION_MAXIMUM</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">ROIntArray</span> <span class="variable-name" id="inlineProgressionDimensionNonCopyExpansion">inlineProgressionDimensionNonCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</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">ROIntArray</span> <span class="variable-name" id="keepTogetherCopyExpansion">keepTogetherCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">KEEP_TOGETHER_WITHIN_LINE</span> - ,<span class="reference">PropNames</span>.<span class="type">KEEP_TOGETHER_WITHIN_COLUMN</span> - ,<span class="reference">PropNames</span>.<span class="type">KEEP_TOGETHER_WITHIN_PAGE</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">ROIntArray</span> <span class="variable-name" id="keepTogetherNonCopyExpansion">keepTogetherNonCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</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">ROIntArray</span> <span class="variable-name" id="keepWithNextCopyExpansion">keepWithNextCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">KEEP_WITH_NEXT_WITHIN_LINE</span> - ,<span class="reference">PropNames</span>.<span class="type">KEEP_WITH_NEXT_WITHIN_COLUMN</span> - ,<span class="reference">PropNames</span>.<span class="type">KEEP_WITH_NEXT_WITHIN_PAGE</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">ROIntArray</span> <span class="variable-name" id="keepWithNextNonCopyExpansion">keepWithNextNonCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</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">ROIntArray</span> <span class="variable-name" id="keepWithPreviousCopyExpansion">keepWithPreviousCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">KEEP_WITH_PREVIOUS_WITHIN_LINE</span> - ,<span class="reference">PropNames</span>.<span class="type">KEEP_WITH_PREVIOUS_WITHIN_COLUMN</span> - ,<span class="reference">PropNames</span>.<span class="type">KEEP_WITH_PREVIOUS_WITHIN_PAGE</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">ROIntArray</span> <span class="variable-name" id="keepWithPreviousNonCopyExpansion">keepWithPreviousNonCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</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">ROIntArray</span> <span class="variable-name" id="leaderLengthCopyExpansion">leaderLengthCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">LEADER_LENGTH_MINIMUM</span> - ,<span class="reference">PropNames</span>.<span class="type">LEADER_LENGTH_OPTIMUM</span> - ,<span class="reference">PropNames</span>.<span class="type">LEADER_LENGTH_MAXIMUM</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">ROIntArray</span> <span class="variable-name" id="leaderLengthNonCopyExpansion">leaderLengthNonCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</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">ROIntArray</span> <span class="variable-name" id="letterSpacingCopyExpansion">letterSpacingCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">LETTER_SPACING_MINIMUM</span> - ,<span class="reference">PropNames</span>.<span class="type">LETTER_SPACING_OPTIMUM</span> - ,<span class="reference">PropNames</span>.<span class="type">LETTER_SPACING_MAXIMUM</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">ROIntArray</span> <span class="variable-name" id="letterSpacingNonCopyExpansion">letterSpacingNonCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">LETTER_SPACING_CONDITIONALITY</span> - ,<span class="reference">PropNames</span>.<span class="type">LETTER_SPACING_PRECEDENCE</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">ROIntArray</span> <span class="variable-name" id="lineHeightCopyExpansion">lineHeightCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">LINE_HEIGHT_MINIMUM</span> - ,<span class="reference">PropNames</span>.<span class="type">LINE_HEIGHT_OPTIMUM</span> - ,<span class="reference">PropNames</span>.<span class="type">LINE_HEIGHT_MAXIMUM</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">ROIntArray</span> <span class="variable-name" id="lineHeightNonCopyExpansion">lineHeightNonCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">LINE_HEIGHT_CONDITIONALITY</span> - ,<span class="reference">PropNames</span>.<span class="type">LINE_HEIGHT_PRECEDENCE</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">ROIntArray</span> <span class="variable-name" id="paddingAfterCopyExpansion">paddingAfterCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">PADDING_AFTER_LENGTH</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">ROIntArray</span> <span class="variable-name" id="paddingAfterNonCopyExpansion">paddingAfterNonCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">PADDING_AFTER_CONDITIONALITY</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">ROIntArray</span> <span class="variable-name" id="paddingBeforeCopyExpansion">paddingBeforeCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">PADDING_BEFORE_LENGTH</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">ROIntArray</span> <span class="variable-name" id="paddingBeforeNonCopyExpansion">paddingBeforeNonCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">PADDING_BEFORE_CONDITIONALITY</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">ROIntArray</span> <span class="variable-name" id="paddingEndCopyExpansion">paddingEndCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">PADDING_END_LENGTH</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">ROIntArray</span> <span class="variable-name" id="paddingEndNonCopyExpansion">paddingEndNonCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">PADDING_END_CONDITIONALITY</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">ROIntArray</span> <span class="variable-name" id="paddingStartCopyExpansion">paddingStartCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">PADDING_START_LENGTH</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">ROIntArray</span> <span class="variable-name" id="paddingStartNonCopyExpansion">paddingStartNonCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">PADDING_START_CONDITIONALITY</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">ROIntArray</span> <span class="variable-name" id="spaceAfterCopyExpansion">spaceAfterCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">SPACE_AFTER_MINIMUM</span> - ,<span class="reference">PropNames</span>.<span class="type">SPACE_AFTER_OPTIMUM</span> - ,<span class="reference">PropNames</span>.<span class="type">SPACE_AFTER_MAXIMUM</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">ROIntArray</span> <span class="variable-name" id="spaceAfterNonCopyExpansion">spaceAfterNonCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">SPACE_AFTER_CONDITIONALITY</span> - ,<span class="reference">PropNames</span>.<span class="type">SPACE_AFTER_PRECEDENCE</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">ROIntArray</span> <span class="variable-name" id="spaceBeforeCopyExpansion">spaceBeforeCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">SPACE_BEFORE_MINIMUM</span> - ,<span class="reference">PropNames</span>.<span class="type">SPACE_BEFORE_OPTIMUM</span> - ,<span class="reference">PropNames</span>.<span class="type">SPACE_BEFORE_MAXIMUM</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">ROIntArray</span> <span class="variable-name" id="spaceBeforeNonCopyExpansion">spaceBeforeNonCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">SPACE_BEFORE_CONDITIONALITY</span> - ,<span class="reference">PropNames</span>.<span class="type">SPACE_BEFORE_PRECEDENCE</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">ROIntArray</span> <span class="variable-name" id="spaceEndCopyExpansion">spaceEndCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">SPACE_END_MINIMUM</span> - ,<span class="reference">PropNames</span>.<span class="type">SPACE_END_OPTIMUM</span> - ,<span class="reference">PropNames</span>.<span class="type">SPACE_END_MAXIMUM</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">ROIntArray</span> <span class="variable-name" id="spaceEndNonCopyExpansion">spaceEndNonCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">SPACE_END_CONDITIONALITY</span> - ,<span class="reference">PropNames</span>.<span class="type">SPACE_END_PRECEDENCE</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">ROIntArray</span> <span class="variable-name" id="spaceStartCopyExpansion">spaceStartCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">SPACE_START_MINIMUM</span> - ,<span class="reference">PropNames</span>.<span class="type">SPACE_START_OPTIMUM</span> - ,<span class="reference">PropNames</span>.<span class="type">SPACE_START_MAXIMUM</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">ROIntArray</span> <span class="variable-name" id="spaceStartNonCopyExpansion">spaceStartNonCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">SPACE_START_CONDITIONALITY</span> - ,<span class="reference">PropNames</span>.<span class="type">SPACE_START_PRECEDENCE</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">ROIntArray</span> <span class="variable-name" id="wordSpacingCopyExpansion">wordSpacingCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">WORD_SPACING_MINIMUM</span> - ,<span class="reference">PropNames</span>.<span class="type">WORD_SPACING_OPTIMUM</span> - ,<span class="reference">PropNames</span>.<span class="type">WORD_SPACING_MAXIMUM</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">ROIntArray</span> <span class="variable-name" id="wordSpacingNonCopyExpansion">wordSpacingNonCopyExpansion</span> = - <span class="keyword">new</span> <span class="type">ROIntArray</span>(<span class="keyword">new</span> <span class="type">int</span>[] { - <span class="reference">PropNames</span>.<span class="type">WORD_SPACING_CONDITIONALITY</span> - ,<span class="reference">PropNames</span>.<span class="type">WORD_SPACING_PRECEDENCE</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">int</span>[] <span class="variable-name" id="compounds">compounds</span> = { - <span class="reference">PropNames</span>.<span class="type">BLOCK_PROGRESSION_DIMENSION</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_AFTER_WIDTH</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_BEFORE_WIDTH</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_END_WIDTH</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_START_WIDTH</span> - ,<span class="reference">PropNames</span>.<span class="type">BORDER_SEPARATION</span> - ,<span class="reference">PropNames</span>.<span class="type">INLINE_PROGRESSION_DIMENSION</span> - ,<span class="reference">PropNames</span>.<span class="type">KEEP_TOGETHER</span> - ,<span class="reference">PropNames</span>.<span class="type">KEEP_WITH_NEXT</span> - ,<span class="reference">PropNames</span>.<span class="type">KEEP_WITH_PREVIOUS</span> - ,<span class="reference">PropNames</span>.<span class="type">LEADER_LENGTH</span> - ,<span class="reference">PropNames</span>.<span class="type">LETTER_SPACING</span> - ,<span class="reference">PropNames</span>.<span class="type">LINE_HEIGHT</span> - ,<span class="reference">PropNames</span>.<span class="type">PADDING_AFTER</span> - ,<span class="reference">PropNames</span>.<span class="type">PADDING_BEFORE</span> - ,<span class="reference">PropNames</span>.<span class="type">PADDING_END</span> - ,<span class="reference">PropNames</span>.<span class="type">PADDING_START</span> - ,<span class="reference">PropNames</span>.<span class="type">SPACE_AFTER</span> - ,<span class="reference">PropNames</span>.<span class="type">SPACE_BEFORE</span> - ,<span class="reference">PropNames</span>.<span class="type">SPACE_END</span> - ,<span class="reference">PropNames</span>.<span class="type">SPACE_START</span> - ,<span class="reference">PropNames</span>.<span class="type">WORD_SPACING</span> - }; - - <span class="comment">/** - * Map property index to compound array index - */</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="compoundMap">compoundMap</span>; - <span class="jde-java-font-lock-modifier">static</span> { - compoundMap = <span class="keyword">new</span> <span class="type">HashMap</span>(compounds.length); - <span class="keyword">for</span> (<span class="type">int</span> <span class="variable-name">i</span> = <span class="jde-java-font-lock-number">0</span>; i < compounds.length; i++) { - compoundMap.put - ((<span class="type">Object</span>)(Ints.consts.get(compounds[i])), - (<span class="type">Object</span>)(Ints.consts.get(i))); - } - } - - <span class="comment">/** - * RO compound properties. - */</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">ROIntArray</span> <span class="variable-name" id="roCompounds">roCompounds</span>; - <span class="jde-java-font-lock-modifier">static</span> { - roCompounds = <span class="keyword">new</span> <span class="type">ROIntArray</span>(compounds); - } - - <span class="comment">/** - * A <tt>ROBitSet</tt> of the compound properties. - */</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">ROBitSet</span> <span class="variable-name" id="compoundPropSet">compoundPropSet</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">BitSet</span> <span class="variable-name" id="compoundpropset">compoundpropset</span>; - - <span class="comment">/** - * a <tt>ROBitSet of shorthand and compound properties. - */</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">ROBitSet</span> <span class="variable-name" id="shorthandCompoundProps">shorthandCompoundProps</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">BitSet</span> <span class="variable-name" id="shorthandcompoundprops">shorthandcompoundprops</span>; - - <span class="jde-java-font-lock-modifier">static</span> { - compoundpropset = <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="keyword">for</span> (<span class="type">int</span> <span class="variable-name">i</span> = <span class="jde-java-font-lock-number">0</span>; i < compounds.length; i++) - compoundpropset.set(compounds[i]); - compoundPropSet = <span class="keyword">new</span> <span class="type">ROBitSet</span>(compoundpropset); - shorthandcompoundprops = <span class="keyword">new</span> <span class="type">BitSet</span>(); - shorthandcompoundprops.or(compoundpropset); - shorthandcompoundprops.or(shorthandpropset); - shorthandCompoundProps = <span class="keyword">new</span> <span class="type">ROBitSet</span>(shorthandcompoundprops); - } - - <span class="comment">/** - * Array of <i></span><span class="jde-java-font-lock-italic">ROIntArray</span><span class="comment"></i><b> of the copy expansion properties of - * compounds in same order as <i></span><span class="jde-java-font-lock-italic">compounds</span><span class="comment"></i></b> - * <i></span><span class="jde-java-font-lock-italic">ROIntArray</span><span class="comment"></i>. - * If a public view of this is required, use - * Collections.unmodifiableList(Arrays.asList(compoundCopyExpansions)) - */</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">ROIntArray</span>[] <span class="variable-name" id="compoundCopyExpansions">compoundCopyExpansions</span> = { - blockProgressionDimensionCopyExpansion - ,borderAfterWidthCopyExpansion - ,borderBeforeWidthCopyExpansion - ,borderEndWidthCopyExpansion - ,borderStartWidthCopyExpansion - ,borderSeparationCopyExpansion - ,inlineProgressionDimensionCopyExpansion - ,keepTogetherCopyExpansion - ,keepWithNextCopyExpansion - ,keepWithPreviousCopyExpansion - ,leaderLengthCopyExpansion - ,letterSpacingCopyExpansion - ,lineHeightCopyExpansion - ,paddingAfterCopyExpansion - ,paddingBeforeCopyExpansion - ,paddingEndCopyExpansion - ,paddingStartCopyExpansion - ,spaceAfterCopyExpansion - ,spaceBeforeCopyExpansion - ,spaceEndCopyExpansion - ,spaceStartCopyExpansion - ,wordSpacingCopyExpansion - }; - - <span class="comment">/** - * Array of <i></span><span class="jde-java-font-lock-italic">ROIntArray</span><span class="comment"></i><b> of the non-copy expansion properties of - * compounds in same order as <i></span><span class="jde-java-font-lock-italic">compounds</span><span class="comment"></i></b> - * <i></span><span class="jde-java-font-lock-italic">ROIntArray</span><span class="comment"></i>. - * If a public view of this is required, use - * Collections.unmodifiableList(Arrays.asList(compoundNonCopyExpansions)) - */</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">ROIntArray</span>[] <span class="variable-name" id="compoundNonCopyExpansions">compoundNonCopyExpansions</span> = { - blockProgressionDimensionNonCopyExpansion - ,borderAfterWidthNonCopyExpansion - ,borderBeforeWidthNonCopyExpansion - ,borderEndWidthNonCopyExpansion - ,borderStartWidthNonCopyExpansion - ,borderSeparationNonCopyExpansion - ,inlineProgressionDimensionNonCopyExpansion - ,keepTogetherNonCopyExpansion - ,keepWithNextNonCopyExpansion - ,keepWithPreviousNonCopyExpansion - ,leaderLengthNonCopyExpansion - ,letterSpacingNonCopyExpansion - ,lineHeightNonCopyExpansion - ,paddingAfterNonCopyExpansion - ,paddingBeforeNonCopyExpansion - ,paddingEndNonCopyExpansion - ,paddingStartNonCopyExpansion - ,spaceAfterNonCopyExpansion - ,spaceBeforeNonCopyExpansion - ,spaceEndNonCopyExpansion - ,spaceStartNonCopyExpansion - ,wordSpacingNonCopyExpansion - }; - - <span class="comment">/** - * Expand the <tt>PropertyValue</tt> assigned to a compound property - * into <tt>propertyValues</tt> for the individual property components. - * N.B. This method assumes that the set of expansion properties is - * comprised of a copy and a non-copy set. For example, &lt;space&gt; - * compounds have a copy set of .minimum, .optimum and .maximum, and a - * non-copy set of .precedence and .conditionality. For each element of - * the copy set, the given value is cloned. For each member of the - * non-copy set, a reference to the initial value is taken. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">foTree</span><span class="comment"> - the <tt>FOTree</tt> for which properties are being - * developed. - * </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> to be cloned for the copy - * set members. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a <tt>PropertyValueList</tt> containing the copy set - * expansions followed by the non-copy set expansions, in the order - * they are defined in appropriate <tt>ROIntArray</tt>s in this class. - */</span> - <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">PropertyValueList</span> <span class="variable-name" id="expandCompoundProperty">expandCompoundProperty</span> - (<span class="type">FOTree</span> <span class="variable-name">foTree</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">int</span> <span class="variable-name">property</span> = value.getProperty(); - <span class="type">Integer</span> <span class="variable-name" id="compoundX">compoundX</span> = - (<span class="type">Integer</span>)(compoundMap.get(Ints.consts.get(property))); - <span class="keyword">if</span> (compoundX == <span class="jde-java-font-lock-constant">null</span>) - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span> - (PropNames.getPropertyName(property) + "<span class="string"> (</span>" + property + "<span class="string">) </span>" - + "<span class="string"> is not a compound property.</span>"); - <span class="type">int</span> <span class="variable-name" id="compoundIdx">compoundIdx</span> = compoundX.intValue(); - <span class="type">PropertyValueList</span> <span class="variable-name">list</span> = <span class="keyword">new</span> <span class="type">PropertyValueList</span>(property); - <span class="type">ROIntArray</span> <span class="variable-name">expansion</span>; - <span class="comment">// Expand the copy components -</span> list = copyValueToSet - (value, compoundCopyExpansions[compoundIdx], list); - <span class="comment">// Expand the non-copy components -</span> <span class="keyword">return</span> initialValueCompoundExpansion - (foTree, compoundNonCopyExpansions[compoundIdx], list); - } - - <span class="comment">/** - * Clone the given property value for each property in the given - * expansion set. Append the new property values to the given list. - * </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 property value to clone. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="expansionSet">expansionSet</span><span class="comment"> - the set of indices of the expansion properties. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">list</span><span class="comment"> - the list to which to append the expansion elements. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the original <tt>PropertyValueList</tt> containing the - * appended expansions. - * </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">private</span> <span class="jde-java-font-lock-modifier">static</span> <span class="type">PropertyValueList</span> <span class="function-name" id="copyValueToSet">copyValueToSet</span>(<span class="type">PropertyValue</span> <span class="variable-name">value</span>, - <span class="type">ROIntArray</span> <span class="variable-name">expansionSet</span>, <span class="type">PropertyValueList</span> <span class="variable-name">list</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="keyword">for</span> (<span class="type">int</span> <span class="variable-name">i</span> = <span class="jde-java-font-lock-number">0</span>; i < expansionSet.length; i++) { - <span class="type">int</span> <span class="variable-name" id="expandedProp">expandedProp</span> = expansionSet.get(i); - <span class="type">PropertyValue</span> <span class="variable-name" id="expandedPropValue">expandedPropValue</span>; - <span class="comment">// The PropertyValue must be cloneable -</span> <span class="comment">// The property associated with each PV in the expansion will -</span> <span class="comment">// necessarily be different. -</span> <span class="keyword">try</span> { - expandedPropValue = (<span class="type">PropertyValue</span>)(value.clone()); - } <span class="keyword">catch</span> (<span class="type">CloneNotSupportedException</span> <span class="variable-name" id="e">e</span>) { - <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>(e.getMessage()); - } - - expandedPropValue.setProperty(expandedProp); - list.add(expandedPropValue); - } - <span class="keyword">return</span> list; - } - - <span class="comment">/** - * Append the initial values of each non-copy property in a - * compound expansion to a list. Note that these elements will be - * <b></span><span class="jde-java-font-lock-bold">references</span><span class="comment"></b> to the initial values. Note also that, in the - * expansion of a compound value, the initial value comonents are - * regarded as having been specified. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">foTree</span><span class="comment"> - the <tt>FOTree</tt> of the node whose properties are - * being processed. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">expansion</span><span class="comment"> - the set of indices of the expansion properties. - * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">list</span><span class="comment"> - the list to which to append the expansion elements. - * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the original <tt>PropertyValueList</tt> containing the - * appended initial value expansions for the (compound) 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="jde-java-font-lock-modifier">static</span> <span class="type">PropertyValueList</span> <span class="variable-name" id="initialValueCompoundExpansion">initialValueCompoundExpansion</span> - (<span class="type">FOTree</span> <span class="variable-name">foTree</span>, <span class="type">ROIntArray</span> <span class="variable-name">expansion</span>, <span class="type">PropertyValueList</span> <span class="variable-name">list</span>) - <span class="keyword">throws</span> <span class="type">PropertyException</span> - { - <span class="keyword">for</span> (<span class="type">int</span> <span class="variable-name">i</span> = <span class="jde-java-font-lock-number">0</span>; i < expansion.length; i++) { - <span class="type">int</span> <span class="variable-name">expandedProp</span> = expansion.get(i); - <span class="type">PropertyValue</span> <span class="variable-name" id="specified">specified</span> - = PropertyConsts.pconsts.getInitialValue(expandedProp); - list.add(specified); - } - <span class="keyword">return</span> list; - } - - <span class="jde-java-font-lock-modifier">private</span> <span class="function-name" id="ShorthandPropSets">ShorthandPropSets</span> (){} - -} -</pre> - </body> -</html> diff --git a/src/documentation/content/design/alt.design/properties/codedisplay.js b/src/documentation/content/design/alt.design/properties/codedisplay.js deleted file mode 100644 index 8fd0ceb03..000000000 --- a/src/documentation/content/design/alt.design/properties/codedisplay.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 1999-2004 The Apache Software Foundation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// $Id$ -var showing = new Array(); -var x = new Array(); // scrollX -var y = new Array(); // scrollY - -function toggleCode(id, src, height, width) { - //alert('In toggleCode'); - if (showing[id]) { - hideCode(id); - } else { - showCode(id, src, height, width); - } -} - -function showCode(id, src, height, width) { - //alert('In showCode'); - if (showing[id]) { return; } - if (document.getElementById && document.createElement) { - if (window.scrollX != undefined) { - x[id] = window.scrollX; - y[id] = window.scrollY; - } - var parent = document.getElementById(id); - var span = document.createElement('SPAN'); - parent.appendChild(span); - var br = document.createElement('BR'); - var iframe = document.createElement('IFRAME'); - iframe.setAttribute('src', src); - iframe.setAttribute('height', height); - iframe.setAttribute('width', width); - span.appendChild(br); - span.appendChild(iframe); - //parent.replaceChild(iframe, parent.lastChild); - // window.scrollTo(x[id],y[id]); - showing[id] = true; - } else { - alert( - "Requires Navigator >= 7, Mozilla >= 1.2.1 or IE >= 6"); - return; - } -} - -function hideCode(id) { - //alert('In hideCode'); - if ( ! showing[id]) { return; } - if (document.getElementById && document.createElement) { - var parent = document.getElementById(id); - parent.removeChild(parent.lastChild); - if (x[id] != undefined) { - window.scrollTo(x[id],y[id]); - } - showing[id] = false; - } else { - alert( - "Requires Navigator >= 7, Mozilla >= 1.2.1 or IE >= 6"); - return; - } -} - diff --git a/src/documentation/content/dev/fo/embedding.fo b/src/documentation/content/xdocs/dev/fo/embedding.fo index f264d2c9f..f264d2c9f 100644 --- a/src/documentation/content/dev/fo/embedding.fo +++ b/src/documentation/content/xdocs/dev/fo/embedding.fo diff --git a/src/documentation/content/dev/fo/embedding.fo.pdf b/src/documentation/content/xdocs/dev/fo/embedding.fo.pdf Binary files differindex 6dd1b2f2a..6dd1b2f2a 100644 --- a/src/documentation/content/dev/fo/embedding.fo.pdf +++ b/src/documentation/content/xdocs/dev/fo/embedding.fo.pdf diff --git a/src/documentation/content/dev/svg/images.pdf b/src/documentation/content/xdocs/dev/svg/images.pdf Binary files differindex 01a34deed..01a34deed 100644 --- a/src/documentation/content/dev/svg/images.pdf +++ b/src/documentation/content/xdocs/dev/svg/images.pdf diff --git a/src/documentation/content/dev/svg/images.png b/src/documentation/content/xdocs/dev/svg/images.png Binary files differindex 0f3f76cf2..0f3f76cf2 100644 --- a/src/documentation/content/dev/svg/images.png +++ b/src/documentation/content/xdocs/dev/svg/images.png diff --git a/src/documentation/content/dev/svg/images.svg b/src/documentation/content/xdocs/dev/svg/images.svg index 4343feaed..4343feaed 100644 --- a/src/documentation/content/dev/svg/images.svg +++ b/src/documentation/content/xdocs/dev/svg/images.svg diff --git a/src/documentation/content/dev/svg/link.pdf b/src/documentation/content/xdocs/dev/svg/link.pdf index e0c01b6fa..e0c01b6fa 100644 --- a/src/documentation/content/dev/svg/link.pdf +++ b/src/documentation/content/xdocs/dev/svg/link.pdf diff --git a/src/documentation/content/dev/svg/link.png b/src/documentation/content/xdocs/dev/svg/link.png Binary files differindex 229050455..229050455 100644 --- a/src/documentation/content/dev/svg/link.png +++ b/src/documentation/content/xdocs/dev/svg/link.png diff --git a/src/documentation/content/dev/svg/link.svg b/src/documentation/content/xdocs/dev/svg/link.svg index cd5ee6b02..cd5ee6b02 100644 --- a/src/documentation/content/dev/svg/link.svg +++ b/src/documentation/content/xdocs/dev/svg/link.svg diff --git a/src/documentation/content/dev/svg/logo.jpg b/src/documentation/content/xdocs/dev/svg/logo.jpg Binary files differindex 05cc83cc2..05cc83cc2 100644 --- a/src/documentation/content/dev/svg/logo.jpg +++ b/src/documentation/content/xdocs/dev/svg/logo.jpg diff --git a/src/documentation/content/dev/svg/paints.pdf b/src/documentation/content/xdocs/dev/svg/paints.pdf Binary files differindex 0320df31e..0320df31e 100644 --- a/src/documentation/content/dev/svg/paints.pdf +++ b/src/documentation/content/xdocs/dev/svg/paints.pdf diff --git a/src/documentation/content/dev/svg/paints.png b/src/documentation/content/xdocs/dev/svg/paints.png Binary files differindex ec127ead5..ec127ead5 100644 --- a/src/documentation/content/dev/svg/paints.png +++ b/src/documentation/content/xdocs/dev/svg/paints.png diff --git a/src/documentation/content/dev/svg/paints.svg b/src/documentation/content/xdocs/dev/svg/paints.svg index 81ecce67c..81ecce67c 100644 --- a/src/documentation/content/dev/svg/paints.svg +++ b/src/documentation/content/xdocs/dev/svg/paints.svg diff --git a/src/documentation/content/dev/svg/text.pdf b/src/documentation/content/xdocs/dev/svg/text.pdf Binary files differindex 630d17056..630d17056 100644 --- a/src/documentation/content/dev/svg/text.pdf +++ b/src/documentation/content/xdocs/dev/svg/text.pdf diff --git a/src/documentation/content/dev/svg/text.png b/src/documentation/content/xdocs/dev/svg/text.png Binary files differindex 0a8e3ecf1..0a8e3ecf1 100644 --- a/src/documentation/content/dev/svg/text.png +++ b/src/documentation/content/xdocs/dev/svg/text.png diff --git a/src/documentation/content/dev/svg/text.svg b/src/documentation/content/xdocs/dev/svg/text.svg index e13177a81..e13177a81 100644 --- a/src/documentation/content/dev/svg/text.svg +++ b/src/documentation/content/xdocs/dev/svg/text.svg diff --git a/src/documentation/content/dev/svg/transparency.pdf b/src/documentation/content/xdocs/dev/svg/transparency.pdf Binary files differindex 1ae9e1128..1ae9e1128 100644 --- a/src/documentation/content/dev/svg/transparency.pdf +++ b/src/documentation/content/xdocs/dev/svg/transparency.pdf diff --git a/src/documentation/content/dev/svg/transparency.png b/src/documentation/content/xdocs/dev/svg/transparency.png Binary files differindex 652e5a759..652e5a759 100644 --- a/src/documentation/content/dev/svg/transparency.png +++ b/src/documentation/content/xdocs/dev/svg/transparency.png diff --git a/src/documentation/content/dev/svg/transparency.svg b/src/documentation/content/xdocs/dev/svg/transparency.svg index 8d546f917..8d546f917 100644 --- a/src/documentation/content/dev/svg/transparency.svg +++ b/src/documentation/content/xdocs/dev/svg/transparency.svg diff --git a/src/documentation/content/fo/align.fo b/src/documentation/content/xdocs/fo/align.fo index 0fb8a5e18..0fb8a5e18 100644 --- a/src/documentation/content/fo/align.fo +++ b/src/documentation/content/xdocs/fo/align.fo diff --git a/src/documentation/content/fo/align.fo.pdf b/src/documentation/content/xdocs/fo/align.fo.pdf Binary files differindex 9e5393e1e..9e5393e1e 100644 --- a/src/documentation/content/fo/align.fo.pdf +++ b/src/documentation/content/xdocs/fo/align.fo.pdf diff --git a/src/documentation/content/fo/align2.fo b/src/documentation/content/xdocs/fo/align2.fo index c05e024ba..c05e024ba 100644 --- a/src/documentation/content/fo/align2.fo +++ b/src/documentation/content/xdocs/fo/align2.fo diff --git a/src/documentation/content/fo/align2.fo.pdf b/src/documentation/content/xdocs/fo/align2.fo.pdf Binary files differindex f5a02666b..f5a02666b 100644 --- a/src/documentation/content/fo/align2.fo.pdf +++ b/src/documentation/content/xdocs/fo/align2.fo.pdf diff --git a/src/documentation/content/fo/blocks.ent b/src/documentation/content/xdocs/fo/blocks.ent index 5168f2c15..5168f2c15 100644 --- a/src/documentation/content/fo/blocks.ent +++ b/src/documentation/content/xdocs/fo/blocks.ent diff --git a/src/documentation/content/fo/embed.fo b/src/documentation/content/xdocs/fo/embed.fo index 2a36ce545..2a36ce545 100644 --- a/src/documentation/content/fo/embed.fo +++ b/src/documentation/content/xdocs/fo/embed.fo diff --git a/src/documentation/content/fo/embed.fo.pdf b/src/documentation/content/xdocs/fo/embed.fo.pdf index 6da06b559..6da06b559 100644 --- a/src/documentation/content/fo/embed.fo.pdf +++ b/src/documentation/content/xdocs/fo/embed.fo.pdf diff --git a/src/documentation/content/fo/fonts.fo b/src/documentation/content/xdocs/fo/fonts.fo index 997fc427e..997fc427e 100644 --- a/src/documentation/content/fo/fonts.fo +++ b/src/documentation/content/xdocs/fo/fonts.fo diff --git a/src/documentation/content/fo/fonts.fo.pdf b/src/documentation/content/xdocs/fo/fonts.fo.pdf index 85a37fd0e..85a37fd0e 100644 --- a/src/documentation/content/fo/fonts.fo.pdf +++ b/src/documentation/content/xdocs/fo/fonts.fo.pdf diff --git a/src/documentation/content/fo/images/fop.jpg b/src/documentation/content/xdocs/fo/images/fop.jpg Binary files differindex 8fe6ca9ff..8fe6ca9ff 100644 --- a/src/documentation/content/fo/images/fop.jpg +++ b/src/documentation/content/xdocs/fo/images/fop.jpg diff --git a/src/documentation/content/fo/size.fo b/src/documentation/content/xdocs/fo/size.fo index 1ad488655..1ad488655 100644 --- a/src/documentation/content/fo/size.fo +++ b/src/documentation/content/xdocs/fo/size.fo diff --git a/src/documentation/content/fo/size.fo.pdf b/src/documentation/content/xdocs/fo/size.fo.pdf Binary files differindex 177160580..177160580 100644 --- a/src/documentation/content/fo/size.fo.pdf +++ b/src/documentation/content/xdocs/fo/size.fo.pdf |