--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<!-- 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="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">/*
+ * FOAttributes.java
+ * $Id$
+ *
+ * Created: Wed Nov 14 15:19:51 2001
+ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * For details on use and redistribution please refer to the
+ * LICENSE file included with these sources.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ * @version $Revision$ $Name$
+ */</span>
+<span class="comment">/**
+ * The FO Attributes data structures and methods needed to manage the
+ * Attributes associated with FO nodes.
+ */</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>
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<!-- 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">/*
+ * $Id$
+ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * For details on use and redistribution please refer to the
+ * LICENSE file included with these sources.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ * @version $Id$
+ */</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.
+ */</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>
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<!-- 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">/*
+ * $Id$
+ * Copyright (C) 2001-2002 The Apache Software Foundation. All rights reserved.
+ * For details on use and redistribution please refer to the
+ * LICENSE file included with these sources.
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ * @version $Revision$ $Name$
+ */</span>
+
+<span class="keyword">package</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>;
+
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">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.
+ */</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>
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<!-- Created by htmlize-0.67 in css mode. -->
+<html>
+ <head>
+ <title>PropertyConsts.java</title>
+ <style type="text/css">
+ <!--
+ body {
+ color: #000000;
+ background-color: #faf0e6;
+ } /* default */
+ .jde-java-font-lock-code {
+ background-color: #faf0e6;
+ } /* jde-java-font-lock-code-face */
+ .function-name {
+ color: #8b2323;
+ background-color: #faf0e6;
+ } /* font-lock-function-name-face */
+ .jde-java-font-lock-italic {
+ background-color: #faf0e6;
+ font-style: italic;
+ } /* jde-java-font-lock-italic-face */
+ .jde-java-font-lock-modifier {
+ color: #da70d6;
+ background-color: #faf0e6;
+ } /* jde-java-font-lock-modifier-face */
+ .keyword {
+ color: #8b0000;
+ background-color: #faf0e6;
+ } /* font-lock-keyword-face */
+ .jde-java-font-lock-link {
+ color: #0000ff;
+ background-color: #faf0e6;
+ text-decoration: underline;
+ } /* jde-java-font-lock-link-face */
+ .variable-name {
+ color: #8b008b;
+ background-color: #faf0e6;
+ } /* font-lock-variable-name-face */
+ .string {
+ color: #008b00;
+ background-color: #faf0e6;
+ } /* font-lock-string-face */
+ .jde-java-font-lock-package {
+ color: #0000cd;
+ background-color: #faf0e6;
+ } /* jde-java-font-lock-package-face */
+ .jde-java-font-lock-constant {
+ color: #5f9ea0;
+ background-color: #faf0e6;
+ } /* jde-java-font-lock-constant-face */
+ .type {
+ color: #4682b4;
+ background-color: #faf0e6;
+ } /* font-lock-type-face */
+ .jde-java-font-lock-bold {
+ background-color: #faf0e6;
+ font-weight: bold;
+ } /* jde-java-font-lock-bold-face */
+ .jde-java-font-lock-doc-tag {
+ color: #008b00;
+ background-color: #faf0e6;
+ } /* jde-java-font-lock-doc-tag-face */
+ .comment {
+ color: #00008b;
+ background-color: #faf0e6;
+ } /* font-lock-comment-face */
+ .jde-java-font-lock-number {
+ color: #bc8f8f;
+ background-color: #faf0e6;
+ } /* jde-java-font-lock-number-face */
+ a {
+ color: inherit;
+ background-color: inherit;
+ font: inherit;
+ text-decoration: inherit;
+ }
+ a:hover {
+ text-decoration: underline;
+ }
+ -->
+ </style>
+ </head>
+ <body>
+ <pre>
+<span class="comment">/**
+ * $Id$
+ * <br/>Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * <br/>For details on use and redistribution please refer to the
+ * <br/>LICENSE file included with these sources.
+ *
+ * </span><span class="jde-java-font-lock-doc-tag">@author</span><span class="comment"> <a href="mailto:pbwest@powerup.com.au"></span><span class="jde-java-font-lock-link">Peter B. West</span><span class="comment"></a>
+ * </span><span class="jde-java-font-lock-doc-tag">@version</span><span class="comment"> $Revision$ $Name$
+ */</span>
+
+<span class="keyword">package</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>;
+
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">lang</span>.<span class="type">Character</span>;
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">lang</span>.<span class="jde-java-font-lock-package">reflect</span>.<span class="type">Method</span>;
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">lang</span>.<span class="jde-java-font-lock-package">reflect</span>.<span class="type">InvocationTargetException</span>;
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">Arrays</span>;
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">Collections</span>;
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">HashMap</span>;
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">Map</span>;
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">List</span>;
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">HashSet</span>;
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">LinkedList</span>;
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">BitSet</span>;
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">StringTokenizer</span>;
+
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="type">FOTree</span>;
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="type">FONode</span>;
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="type">PropNames</span>;
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">properties</span>.<span class="type">Property</span>;
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">expr</span>.<span class="type">PropertyException</span>;
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">datatypes</span>.<span class="type">Numeric</span>;
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">datatypes</span>.<span class="type">Ints</span>;
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">datastructs</span>.<span class="type">ROIntArray</span>;
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">datastructs</span>.<span class="type">ROStringArray</span>;
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">datastructs</span>.<span class="type">ROBitSet</span>;
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">datatypes</span>.<span class="type">PropertyValue</span>;
+
+<span class="comment">/**
+ * This class contains a number of arrays containing values indexed by the
+ * property index value, determined from the PropNames class. These arrays
+ * provide a means of accessing information about the nature of a property
+ * through the property index value.
+ * <p>Most of these arrays are initialised piecemeal as information is
+ * required about a particular property.
+ * There are also <tt>HashMap</tt>s which encode the various sets of
+ * properties which are defined to apply to each of the Flow Objects,
+ * and a <tt>BitSet</tt> of those properties which are
+ * automatically inherited. The <tt>HashMap</tt>s provide a convenient
+ * means of specifying the relationship between FOs and properties.
+ */</span>
+<span class="jde-java-font-lock-modifier">public</span> <span class="keyword">class</span> <span class="function-name" id="PropertyConstsClass">PropertyConsts</span> {
+
+ <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">String</span> <span class="variable-name" id="tag">tag</span> = "<span class="string">$Name$</span>";
+ <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">String</span> <span class="variable-name" id="revision">revision</span> = "<span class="string">$Revision$</span>";
+
+ <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">String</span> <span class="variable-name" id="packageName">packageName</span> = "<span class="string">org.apache.fop.fo</span>";
+
+ <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">PropertyConsts</span> <span class="variable-name" id="pconsts">pconsts</span>;
+ <span class="jde-java-font-lock-modifier">static</span> {
+ <span class="keyword">try</span> {
+ pconsts = <span class="keyword">new</span> <span class="type">PropertyConsts</span>();
+ } <span class="keyword">catch</span> (<span class="type">PropertyException</span> <span class="variable-name" id="e">e</span>) {
+ <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">RuntimeException</span>(e.getMessage());
+ }
+ }
+
+ <span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">PropertyConsts</span> <span class="function-name" id="getPropertyConsts">getPropertyConsts</span>() {
+ <span class="keyword">return</span> pconsts;
+ }
+
+
+ <span class="comment">/**
+ * A Property[] array containing Property objects corresponding to each
+ * of the property indices in <tt>PropNames</tt>.
+ * Initially empty, entries are filled on demand as calls for details
+ * about individual properties are made.
+ */</span>
+ <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">Property</span>[] <span class="variable-name" id="properties">properties</span>
+ = <span class="keyword">new</span> <span class="type">Property</span>[PropNames.<span class="jde-java-font-lock-constant" id="LAST_PROPERTY_INDEX">LAST_PROPERTY_INDEX</span> + <span class="jde-java-font-lock-number">1</span>];
+
+ <span class="comment">/**
+ * A Class[] array containing Class objects corresponding to each of the
+ * class names in the classNames array. Elements are set
+ * in parallel to the creation of the class names in
+ * the classNames array. It can be indexed by the property name
+ * constants defined in this file.
+ */</span>
+ <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">Class</span>[] <span class="variable-name" id="classes">classes</span>
+ = <span class="keyword">new</span> <span class="type">Class</span>[PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span> + <span class="jde-java-font-lock-number">1</span>];
+
+ <span class="comment">/**
+ * A String[] array of the property class names. This array is
+ * effectively 1-based, with the first element being unused.
+ * The elements of this array are set by converting the FO
+ * property names from the array PropNames.propertyNames into class
+ * names by converting the first character of every component word to
+ * upper case, and removing all punctuation characters.
+ * It can be indexed by the property name constants defined in
+ * the PropNames class.
+ */</span>
+ <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">String</span>[] <span class="variable-name" id="classNames">classNames</span>
+ = <span class="keyword">new</span> <span class="type">String</span>[PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span> + <span class="jde-java-font-lock-number">1</span>];
+
+ <span class="comment">/**
+ * A HashMap whose elements are an integer index value keyed by the name
+ * of a property class. The index value is the index of the property
+ * class name in the classNames[] array.
+ */</span>
+ <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">HashMap</span> <span class="variable-name" id="classToIndex">classToIndex</span>
+ = <span class="keyword">new</span> <span class="type">HashMap</span>(PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span> + <span class="jde-java-font-lock-number">1</span>);
+
+ <span class="comment">/**
+ * An <tt>int[]</tt> containing the <i></span><span class="jde-java-font-lock-italic">inherited</span><span class="comment"></i> values from the
+ * <tt>Property</tt> classes.
+ */</span>
+ <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span>[] <span class="variable-name" id="inherited">inherited</span>
+ = <span class="keyword">new</span> <span class="type">int</span>[PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span> + <span class="jde-java-font-lock-number">1</span>];
+
+ <span class="comment">/**
+ * A <tt>BitSet</tt> of properties which are normally inherited
+ * (strictly, not not inherited).
+ * It is defined relative to the set of all properties; i.e. the
+ * inheritability of any property can be established by testing the
+ * bit in this set that corresponds to the queried property's index.
+ * <p>The <tt>BitSet</tt> is private and is the basis for
+ * <i></span><span class="jde-java-font-lock-italic">inheritedProperties</span><span class="comment"></i>.
+ */</span>
+ <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">BitSet</span> <span class="variable-name" id="inheritedprops">inheritedprops</span>
+ = <span class="keyword">new</span> <span class="type">BitSet</span>(PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span> + <span class="jde-java-font-lock-number">1</span>);
+
+ <span class="comment">/**
+ * An int[] array of the types of the <i></span><span class="jde-java-font-lock-italic">initialValue</span><span class="comment"></i> field of each
+ * property. The array is indexed by the index value constants that are
+ * defined in the PropNames class in parallel to the
+ * PropNames.propertyNames[] array.
+ */</span>
+ <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span>[] <span class="variable-name" id="initialValueTypes">initialValueTypes</span>
+ = <span class="keyword">new</span> <span class="type">int</span>[PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span> + <span class="jde-java-font-lock-number">1</span>];
+
+ <span class="comment">/**
+ * A <tt>PropertyValue</tt> array containing the initial values of
+ * each of the properties.
+ */</span>
+ <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">PropertyValue</span>[] <span class="variable-name" id="initialValues">initialValues</span>
+ = <span class="keyword">new</span> <span class="type">PropertyValue</span>[PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span> + <span class="jde-java-font-lock-number">1</span>];
+
+ <span class="comment">/**
+ * An int[] array of the values of the <i></span><span class="jde-java-font-lock-italic">dataTypes</span><span class="comment"></i> field of each
+ * property. The array is indexed by the index value constants that are
+ * defined in the PropNames class in parallel to the
+ * PropNames.propertyNames[] array.
+ * The array elements are set from the values of the
+ * <i></span><span class="jde-java-font-lock-italic">dataTypes</span><span class="comment"></i> field in each property class.
+ */</span>
+ <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span>[] <span class="variable-name" id="datatypes">datatypes</span>
+ = <span class="keyword">new</span> <span class="type">int</span>[PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span> + <span class="jde-java-font-lock-number">1</span>];
+
+ <span class="comment">/**
+ * An int[] array of the values of the <i></span><span class="jde-java-font-lock-italic">traitMapping</span><span class="comment"></i> field of each
+ * property. The array is indexed by the index value constants that are
+ * defined in the PropNames class in parallel to the
+ * PropNames.propertyNames[] array.
+ * The array elements are set from the values of the
+ * <i></span><span class="jde-java-font-lock-italic">traitMapping</span><span class="comment"></i> field in each property class.
+ */</span>
+ <span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span>[] <span class="variable-name" id="traitMappings">traitMappings</span>
+ = <span class="keyword">new</span> <span class="type">int</span>[PropNames.<span class="jde-java-font-lock-constant">LAST_PROPERTY_INDEX</span> + <span class="jde-java-font-lock-number">1</span>];
+
+ <span class="comment">/**
+ * Get the initial value type for a property name.
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="property">property</span><span class="comment"> String name of the FO property
+ * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> int enumerated initialValueType. These constants are defined
+ * as static final ints in this class. Note that an undefined property
+ * name will return the constant defined as NOTYPE_IT
+ */</span>
+ <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="getInitialValueType">getInitialValueType</span>(<span class="type">String</span> <span class="variable-name">property</span>)
+ <span class="keyword">throws</span> <span class="type">PropertyException</span>
+ {
+ <span class="comment">// Get the property index then index into the initialvaluetypes array
+</span> <span class="keyword">return</span> getInitialValueType(PropNames.getPropertyIndex(property));
+ }
+
+ <span class="comment">/**
+ * get the initial value type for a property index.
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="propindex">propindex</span><span class="comment"> int index of the FO property
+ * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> int enumerated initialValueType. These constants are defined
+ * as static final ints in the Property class.
+ * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException
+</span><span class="comment"> */</span>
+ <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name">getInitialValueType</span>(<span class="type">int</span> <span class="variable-name">propindex</span>)
+ <span class="keyword">throws</span> <span class="type">PropertyException</span>
+ {
+ setupProperty(propindex);
+ <span class="comment">//System.out.println("getInitialValueType: " + propindex + " "
+</span> <span class="comment">//+ initialValueTypes[propindex]);
+</span> <span class="keyword">return</span> initialValueTypes[propindex];
+ }
+
+ <span class="comment">/**
+ * Get the initial value <tt>PropertyValue</tt> for a given property.
+ * Note that this is a <b></span><span class="jde-java-font-lock-bold">raw</span><span class="comment"></b> value; if it is
+ * an unresolved percentage that value will be returned.
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="index">index</span><span class="comment"> - the property index.
+ * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a <tt>PropertyValue</tt> containing the initial property
+ * value element for the indexed property.
+ * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type"><tt>PropertyException</tt>
+</span><span class="comment"> */</span>
+ <span class="jde-java-font-lock-modifier">public</span> <span class="type">PropertyValue</span> <span class="function-name" id="getInitialValue">getInitialValue</span>(<span class="type">int</span> <span class="variable-name">propindex</span>)
+ <span class="keyword">throws</span> <span class="type">PropertyException</span>
+ {
+ <span class="keyword">if</span> (initialValues[propindex] != <span class="jde-java-font-lock-constant" id="null">null</span>)
+ <span class="keyword">return</span> initialValues[propindex];
+ <span class="comment">//System.out.println("PropertyConts.getInitialValue(" + propindex
+</span> <span class="comment">//+ ") " + PropNames.getPropertyName(propindex));
+</span> <span class="keyword">return</span>
+ (initialValues[propindex] =
+ setupProperty(propindex).getInitialValue(propindex));
+ }
+
+ <span class="comment">/**
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">propindex</span><span class="comment"> <tt>int</tt> index of the property
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="foNode">foNode</span><span class="comment"> the node whose properties are being constructed.
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="value">value</span><span class="comment"> the <tt>PropertyValue</tt> being refined.
+ * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>PropertyValue</tt> constructed by the property's
+ * <i></span><span class="jde-java-font-lock-italic">refineParsing</span><span class="comment"></i> method
+ * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type"><tt>PropertyException</tt>
+</span><span class="comment"> */</span>
+ <span class="jde-java-font-lock-modifier">public</span> <span class="type">PropertyValue</span> <span class="variable-name" id="refineParsing">refineParsing</span>
+ (<span class="type">int</span> <span class="variable-name">propindex</span>, <span class="type">FONode</span> <span class="variable-name">foNode</span>, <span class="type">PropertyValue</span> <span class="variable-name">value</span>)
+ <span class="keyword">throws</span> <span class="type">PropertyException</span>
+ {
+ <span class="type">Property</span> <span class="variable-name">property</span> = setupProperty(propindex);
+ <span class="keyword">return</span> property.refineParsing(propindex, foNode, value);
+ }
+
+ <span class="comment">/**
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">propindex</span><span class="comment"> <tt>int</tt> index of the property
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">foNode</span><span class="comment"> the node whose properties are being constructed.
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">value</span><span class="comment"> the <tt>PropertyValue</tt> being refined.
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="nested">nested</span><span class="comment"> - <tt>boolean</tt> indicating whether this method is
+ * called normally (false), or as part of another <i></span><span class="jde-java-font-lock-italic">refineParsing</span><span class="comment"></i>
+ * method.
+ * </span><span class="jde-java-font-lock-doc-tag">@see</span><span class="comment"> </span><span class="jde-java-font-lock-code">#refineParsing</span><span class="comment">(FOTree,PropertyValue)
+ * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>PropertyValue</tt> constructed by the property's
+ * <i></span><span class="jde-java-font-lock-italic">refineParsing</span><span class="comment"></i> method
+ * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type"><tt>PropertyException</tt>
+</span><span class="comment"> */</span>
+ <span class="jde-java-font-lock-modifier">public</span> <span class="type">PropertyValue</span> <span class="variable-name">refineParsing</span>
+ (<span class="type">int</span> <span class="variable-name">propindex</span>, <span class="type">FONode</span> <span class="variable-name">foNode</span>, <span class="type">PropertyValue</span> <span class="variable-name">value</span>, <span class="type">boolean</span> <span class="variable-name">isNested</span>)
+ <span class="keyword">throws</span> <span class="type">PropertyException</span>
+ {
+ <span class="type">Property</span> <span class="variable-name">property</span> = setupProperty(propindex);
+ <span class="keyword">return</span> property.refineParsing(propindex, foNode, value, isNested);
+ }
+
+ <span class="comment">/**
+ * Get the <tt>Numeric</tt> value corresponding to an enumerated value.
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">foNode</span><span class="comment"> the <tt>FONode</tt> being built
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">propindex</span><span class="comment"> int index of the FO property
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="enum">enum</span><span class="comment"> - the integer equivalent of the enumeration keyword.
+ * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> the <tt>Numeric</tt> result.
+ * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException.
+</span><span class="comment"> */</span>
+ <span class="jde-java-font-lock-modifier">public</span> <span class="type">Numeric</span> <span class="function-name" id="getMappedNumeric">getMappedNumeric</span>(<span class="type">FONode</span> <span class="variable-name">foNode</span>, <span class="type">int</span> <span class="variable-name">propindex</span>, <span class="type">int</span> <span class="variable-name">enum</span>)
+ <span class="keyword">throws</span> <span class="type">PropertyException</span>
+ {
+ <span class="type">Property</span> <span class="variable-name">property</span> = setupProperty(propindex);
+ <span class="keyword">if</span> ((datatypes[propindex] & Property.<span class="jde-java-font-lock-constant" id="MAPPED_LENGTH">MAPPED_LENGTH</span>) != <span class="jde-java-font-lock-number">0</span>)
+ <span class="keyword">return</span> property.getMappedLength(foNode, enum);
+ <span class="keyword">else</span>
+ <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>
+ ("<span class="string">MAPPED_LENGTH not valid in </span>"
+ + PropNames.getPropertyName(propindex));
+ }
+
+ <span class="comment">/**
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">propindex</span><span class="comment"> int index of the FO property
+ * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> int type of inheritance for this property
+ * (See constants defined in Properties.)
+ * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException.
+</span><span class="comment"> */</span>
+ <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="inheritance">inheritance</span>(<span class="type">String</span> <span class="variable-name">property</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> {
+ <span class="keyword">return</span> inheritance(PropNames.getPropertyIndex(property));
+ }
+
+ <span class="comment">/**
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">propindex</span><span class="comment"> int index of the FO property
+ * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> int type of inheritance for this property
+ * (See constants defined in Property.)
+ * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException.
+</span><span class="comment"> */</span>
+ <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name">inheritance</span>(<span class="type">int</span> <span class="variable-name">propindex</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> {
+ setupProperty(propindex);
+ <span class="keyword">return</span> inherited[propindex];
+ }
+
+ <span class="comment">/**
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">propindex</span><span class="comment"> int index of the FO property
+ * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>boolean</tt> is property inherited?
+ * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException.
+</span><span class="comment"> */</span>
+ <span class="jde-java-font-lock-modifier">public</span> <span class="type">boolean</span> <span class="function-name" id="isInherited">isInherited</span>(<span class="type">int</span> <span class="variable-name">propindex</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> {
+ <span class="type">Property</span> <span class="variable-name">property</span> = setupProperty(propindex);
+ <span class="keyword">return</span> inherited[propindex] != Property.<span class="jde-java-font-lock-constant" id="NO">NO</span>;
+ }
+
+ <span class="comment">/**
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">property</span><span class="comment"> String name of the FO property
+ * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>boolean</tt> is property inherited?
+ * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException.
+</span><span class="comment"> */</span>
+ <span class="jde-java-font-lock-modifier">public</span> <span class="type">boolean</span> <span class="function-name">isInherited</span>(<span class="type">String</span> <span class="variable-name">property</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> {
+ <span class="keyword">return</span> isInherited(PropNames.getPropertyIndex(property));
+ }
+
+ <span class="comment">/**
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">propindex</span><span class="comment"> int index of the FO property
+ * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>boolean</tt> is property a shorthand?
+ * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException.
+</span><span class="comment"> */</span>
+ <span class="jde-java-font-lock-modifier">public</span> <span class="type">boolean</span> <span class="function-name" id="isShorthand">isShorthand</span>(<span class="type">int</span> <span class="variable-name">propindex</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> {
+ <span class="type">Property</span> <span class="variable-name">property</span> = setupProperty(propindex);
+ <span class="keyword">return</span> (datatypes[propindex] & Property.<span class="jde-java-font-lock-constant" id="SHORTHAND">SHORTHAND</span>) != <span class="jde-java-font-lock-number">0</span>;
+ }
+
+ <span class="comment">/**
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">property</span><span class="comment"> String name of the FO property
+ * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>boolean</tt> is property a shorthand?
+ * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException.
+</span><span class="comment"> */</span>
+ <span class="jde-java-font-lock-modifier">public</span> <span class="type">boolean</span> <span class="function-name">isShorthand</span>(<span class="type">String</span> <span class="variable-name">property</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> {
+ <span class="keyword">return</span> isShorthand(PropNames.getPropertyIndex(property));
+ }
+
+ <span class="comment">/**
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="propertyIndex">propertyIndex</span><span class="comment"> int index of the FO property
+ * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>boolean</tt> is property a compound?
+ * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException.
+</span><span class="comment"> */</span>
+ <span class="jde-java-font-lock-modifier">public</span> <span class="type">boolean</span> <span class="function-name" id="isCompound">isCompound</span>(<span class="type">int</span> <span class="variable-name">propertyIndex</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> {
+ <span class="type">Property</span> <span class="variable-name">property</span> = setupProperty(propertyIndex);
+ <span class="keyword">return</span> (datatypes[propertyIndex] & Property.<span class="jde-java-font-lock-constant" id="COMPOUND">COMPOUND</span>) != <span class="jde-java-font-lock-number">0</span>;
+ }
+
+ <span class="comment">/**
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">property</span><span class="comment"> String name of the FO property
+ * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>boolean</tt> is property a compound?
+ * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException.
+</span><span class="comment"> */</span>
+ <span class="jde-java-font-lock-modifier">public</span> <span class="type">boolean</span> <span class="function-name">isCompound</span>(<span class="type">String</span> <span class="variable-name">property</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> {
+ <span class="keyword">return</span> isCompound(PropNames.getPropertyIndex(property));
+ }
+
+ <span class="comment">/**
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">propertyIndex</span><span class="comment"> int index of the FO property
+ * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>int</tt> dataTypes value.
+ * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException.
+</span><span class="comment"> */</span>
+ <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="getDataTypes">getDataTypes</span>(<span class="type">int</span> <span class="variable-name">propertyIndex</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> {
+ <span class="type">Property</span> <span class="variable-name">property</span> = setupProperty(propertyIndex);
+ <span class="keyword">return</span> datatypes[propertyIndex];
+ }
+
+ <span class="comment">/**
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">property</span><span class="comment"> String name of the FO property
+ * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>int</tt> dataTypes value.
+ * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type">PropertyException.
+</span><span class="comment"> */</span>
+ <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name">getDataTypes</span>(<span class="type">String</span> <span class="variable-name">property</span>) <span class="keyword">throws</span> <span class="type">PropertyException</span> {
+ <span class="keyword">return</span> getDataTypes(PropNames.getPropertyIndex(property));
+ }
+
+ <span class="comment">/**
+ * Map the integer value of an enum into its mapped value.
+ * Only valid when the datatype of the property includes MAPPED_ENUM.
+ * <p>Generally, the path will be enumText->enumIndex->mappedEnumText.
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">index</span><span class="comment"> <tt>int</tt> containing the enumeration index.
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="enumMap">enumMap</span><span class="comment"> an <tt>ROStringArray</tt> of the <tt>String</tt>s
+ * with the mapped enumeration values.
+ * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> a <tt>String</tt> with the mapped enumeration text.
+ */</span>
+ <span class="jde-java-font-lock-modifier">public</span> <span class="type">String</span> <span class="function-name" id="enumIndexToMapping">enumIndexToMapping</span>(<span class="type">int</span> <span class="variable-name">index</span>, <span class="type">ROStringArray</span> <span class="variable-name">enumMap</span>)
+ {
+ <span class="keyword">return</span> enumMap.get(index);
+ }
+
+ <span class="comment">/**
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">propindex</span><span class="comment"> <tt>int</tt> property index.
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">enum</span><span class="comment"> <tt>String</tt> containing the enumeration text.
+ * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>int</tt> constant representing the enumeration value.
+ * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">PropertyException
+</span><span class="comment"> */</span>
+ <span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="getEnumIndex">getEnumIndex</span>(<span class="type">int</span> <span class="variable-name">propindex</span>, <span class="type">String</span> <span class="variable-name">enum</span>)
+ <span class="keyword">throws</span> <span class="type">PropertyException</span>
+ {
+ <span class="type">Property</span> <span class="variable-name">property</span> = setupProperty(propindex);
+ <span class="keyword">return</span> property.getEnumIndex(enum);
+ }
+
+ <span class="comment">/**
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">propindex</span><span class="comment"> <tt>int</tt> property index.
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name" id="enumIndex">enumIndex</span><span class="comment"> <tt>int</tt> containing the enumeration index.
+ * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> <tt>String</tt> containing the enumeration text.
+ * </span><span class="jde-java-font-lock-doc-tag">@exception</span><span class="comment"> </span><span class="type">PropertyException
+</span><span class="comment"> */</span>
+ <span class="jde-java-font-lock-modifier">public</span> <span class="type">String</span> <span class="function-name" id="getEnumText">getEnumText</span>(<span class="type">int</span> <span class="variable-name">propindex</span>, <span class="type">int</span> <span class="variable-name">enumIndex</span>)
+ <span class="keyword">throws</span> <span class="type">PropertyException</span>
+ {
+ <span class="type">Property</span> <span class="variable-name">property</span> = setupProperty(propindex);
+ <span class="keyword">return</span> property.getEnumText(enumIndex);
+ }
+
+ <span class="comment">/**
+ * Set up the details of a single property and return the
+ * <tt>Property</tt> object. If the <tt>Property</tt> object
+ * corresponding to the property index has not been resolved before,
+ * derive the Class and Property objects, and extract certain field
+ * values from the Property.
+ * </span><span class="jde-java-font-lock-doc-tag">@param</span><span class="comment"> </span><span class="variable-name">propindex</span><span class="comment"> - the <tt>int</tt> index.
+ * </span><span class="jde-java-font-lock-doc-tag">@return</span><span class="comment"> - the <tt>Property</tt> corresponding to the index.
+ * </span><span class="jde-java-font-lock-doc-tag">@throws</span><span class="comment"> </span><span class="type"><tt>PropertyException.
+</span><span class="comment"> */</span>
+ <span class="jde-java-font-lock-modifier">public</span> <span class="type">Property</span> <span class="function-name" id="setupProperty">setupProperty</span>(<span class="type">int</span> <span class="variable-name">propindex</span>)
+ <span class="keyword">throws</span> <span class="type">PropertyException</span>
+ {
+ <span class="type">String</span> <span class="variable-name" id="cname">cname</span> = "";
+ <span class="type">Class</span> <span class="variable-name" id="pclass">pclass</span>;
+ <span class="type">Property</span> <span class="variable-name">property</span>;
+
+ <span class="comment">//System.out.println("setupProperty " + propindex + " "
+</span> <span class="comment">//+ PropNames.getPropertyName(propindex));
+</span> <span class="keyword">if</span> ((property = properties[propindex]) != <span class="jde-java-font-lock-constant">null</span>) <span class="keyword">return</span> property;
+
+ <span class="comment">// Get the property class name
+</span> <span class="type">StringTokenizer</span> <span class="variable-name" id="stoke">stoke</span>;
+ stoke = <span class="keyword">new</span> <span class="type">StringTokenizer</span>
+ (PropNames.getPropertyName(propindex), "<span class="string">-.:</span>");
+ <span class="keyword">while</span> (stoke.hasMoreTokens()) {
+ <span class="type">String</span> <span class="variable-name" id="token">token</span> = stoke.nextToken();
+ <span class="type">String</span> <span class="variable-name" id="pname">pname</span> = <span class="keyword">new</span> <span class="type">Character</span>(
+ Character.toUpperCase(token.charAt(<span class="jde-java-font-lock-number">0</span>))
+ ).toString() + token.substring(<span class="jde-java-font-lock-number">1</span>);
+ cname = cname + pname;
+ }
+ classNames[propindex] = cname;
+
+ <span class="comment">// Set up the classToIndex Hashmap with the name of the
+</span> <span class="comment">// property class as a key, and the integer index as a value
+</span> <span class="keyword">if</span> (classToIndex.put(cname, Ints.consts.get(propindex)) != <span class="jde-java-font-lock-constant">null</span>)
+ <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>
+ ("<span class="string">Duplicate values in classToIndex for key </span>" + cname);
+
+ <span class="comment">// Get the class for this property name
+</span> <span class="type">String</span> <span class="variable-name" id="name">name</span> = packageName + "<span class="string">.properties.</span>" + cname;
+ <span class="keyword">try</span> {
+ <span class="comment">//System.out.println("classes["+propindex+"] "+name);//DEBUG
+</span> pclass = Class.forName(name);
+ classes[propindex] = pclass;
+
+ <span class="comment">// Instantiate the class
+</span> property = (<span class="type">Property</span>)(pclass.newInstance());
+ properties[propindex] = property;
+ <span class="comment">//System.out.println
+</span> <span class="comment">//("property name "
+</span> <span class="comment">//+ property.getClass().getName());
+</span> <span class="comment">//System.out.println
+</span> <span class="comment">//("property name " +
+</span> <span class="comment">//properties[propindex].getClass().getName());
+</span>
+ <span class="comment">// Set inheritance value
+</span> <span class="keyword">if</span> ((inherited[propindex]
+ = pclass.getField("<span class="string">inherited</span>").getInt(<span class="jde-java-font-lock-constant">null</span>))
+ != Property.<span class="jde-java-font-lock-constant">NO</span>)
+ inheritedprops.set(propindex);
+ <span class="comment">// Set datatypes
+</span> datatypes[propindex] = pclass.getField("<span class="string">dataTypes</span>").getInt(<span class="jde-java-font-lock-constant">null</span>);
+ <span class="comment">//System.out.println("datatypes " + datatypes[propindex] + "\n"
+</span> <span class="comment">//+ Property.listDataTypes(datatypes[propindex]));
+</span>
+ <span class="comment">// Set initialValueTypes
+</span> initialValueTypes[propindex] =
+ pclass.getField("<span class="string">initialValueType</span>").getInt(<span class="jde-java-font-lock-constant">null</span>);
+ <span class="comment">//System.out.println("initialValueType "
+</span> <span class="comment">//+ initialValueTypes[propindex]);
+</span>
+ traitMappings[propindex] =
+ pclass.getField("<span class="string">traitMapping</span>").getInt(<span class="jde-java-font-lock-constant">null</span>);
+
+ } <span class="keyword">catch</span> (<span class="type">ClassNotFoundException</span> <span class="variable-name">e</span>) {
+ <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>
+ ("<span class="string">ClassNotFoundException</span>" + e.getMessage());
+ } <span class="keyword">catch</span> (<span class="type">IllegalAccessException</span> <span class="variable-name">e</span>) {
+ <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>
+ ("<span class="string">IllegalAccessException</span>" + e.getMessage());
+ } <span class="keyword">catch</span> (<span class="type">InstantiationException</span> <span class="variable-name">e</span>) {
+ <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>
+ ("<span class="string">InstantiationException</span>" + e.getMessage());
+ }
+ <span class="keyword">catch</span> (<span class="type">NoSuchFieldException</span> <span class="variable-name">e</span>) {
+ <span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>
+ ("<span class="string">NoSuchFieldException</span>" + e.getMessage());
+ }
+
+ <span class="keyword">return</span> property;
+ }
+
+
+ <span class="jde-java-font-lock-modifier">private</span> <span class="function-name" id="PropertyConsts">PropertyConsts</span> () <span class="keyword">throws</span> <span class="type">PropertyException</span> {}
+
+}
+</pre>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<!-- 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">/*
+ * $Id$
+ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * For details on use and redistribution please refer to the
+ * LICENSE file included with these sources.
+ */</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>
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<!-- 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">/**
+ * $Id$
+ * <br/>Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * <br/>For details on use and redistribution please refer to the
+ * <br/>LICENSE file included with these sources.
+ *
+ * </span><span class="jde-java-font-lock-doc-tag">@author</span><span class="comment"> <a href="mailto:pbwest@powerup.com.au"></span><span class="jde-java-font-lock-link">Peter B. West</span><span class="comment"></a>
+ * </span><span class="jde-java-font-lock-doc-tag">@version</span><span class="comment"> $Revision$ $Name$
+ */</span>
+
+<span class="keyword">package</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>;
+
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">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-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>
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<!-- 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">/*
+ * $Id$
+ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * For details on use and redistribution please refer to the
+ * LICENSE file included with these sources.
+ */</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>
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<!-- 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">/**
+ * $Id$
+ * <br/>Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * <br/>For details on use and redistribution please refer to the
+ * <br/>LICENSE file included with these sources.
+ *
+ * </span><span class="jde-java-font-lock-doc-tag">@author</span><span class="comment"> <a href="mailto:pbwest@powerup.com.au"></span><span class="jde-java-font-lock-link">Peter B. West</span><span class="comment"></a>
+ * </span><span class="jde-java-font-lock-doc-tag">@version</span><span class="comment"> $Revision$ $Name$
+ */</span>
+
+<span class="keyword">package</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>;
+
+<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">lang</span>.<span class="type">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-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>