+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
- <head>
- <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>PropertyConsts Description</title>
- <link type="text/css" href="../../../page.css" rel="stylesheet">
- </head>
- <body marginheight="0" marginwidth="0" topmargin="0" leftmargin="0"
- text="#000000" bgcolor="#FFFFFF">
- <div class="content">
- <h1>PropertyConsts Description</h1>
- <p>
- <font size="-2">by Peter B. West</font>
- </p>
- <ul class="minitoc">
- <li>
- <a href="#N10014">Introduction</a>
- </li>
- </ul>
-
- <a name="N10014"></a>
- <h3>Introduction</h3>
- <p>
-
- <a href="javascript:window.top.displayCode(
- 'PropertyConsts.html#PropertyConstsClass'
- )">This class</a>, and the singleton object which is <a
- href="javascript:window.top.displayCode(
- 'PropertyConsts.html#pconsts' )">generated by the static
- initializer</a>, is essentially a repository of
- <property> class instances and the static data from
- those classes of <span
- class="codefrag">org.apache.fop.fo.property</span>.
- The heart of this class is the method <a href=
- "javascript:window.top.displayCode(
- 'PropertyConsts.html#setupProperty' )"><span class="codefrag"
- >setupProperty</span ></a>. Whenever access to the data or
- methods of a property class is required, this method in the
- singleton must be called to ensure that an instance of the
- property exists and that the static data from that instance
- has been extracted.
- </p>
-
- <div class="frame note">
- <div class="label">Note</div>
- <div class="content">
- An alternative to this requirement would be to pre-load all
- of the individual property classes during the system
- initialization phase. This is not done currently because of
- the start-up expense of the required class loading for over
- three hundred classes, and the relatively low added expense
- of checking for the existence of a property instance before
- every access. Given that FOP is increasingly used in a
- server environment, it may prove acceptable in the long run
- to change to pre-loading.
- </div>
- </div>
-
- <p>
- The class name is generated and stored in the <a
- href="javascript:window.top.displayCode(
- 'PropertyConsts.html#classNames' )"><span class="codefrag"
- >classNames</span ></a> array; a class instance is generated
- from the name and stored in the <a
- href="javascript:window.top.displayCode(
- 'PropertyConsts.html#classes' )"><span class="codefrag"
- >classes</span ></a> array; and an instance of the class is
- generated from the class object and stored in the <a
- href="javascript:window.top.displayCode(
- 'PropertyConsts.html#properties' )"><span class="codefrag"
- >properties</span ></a> array.
- </p>
-
- <p>
- The other data gathering facilities and access methods of this
- class will be examined in conjunction with the various types
- of property classes.
- </p>
-
- <p>
- <strong>Previous:</strong> <a href = "classes-overview.html"
- >Property classes overview</a>
- </p>
- <p>
- <strong>Next:</strong> <a href= "simple-properties.html"
- >Simple property classes</a>
- </p>
- </div>
- <table summary="footer" cellspacing="0" cellpadding="0"
- width="100%" height="20" border="0">
- <tr>
- <td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1" width="1" alt="" src="../../skin/images/spacer.gif"><a href="../../skin/images/label.gif"></a><a href="../../skin/images/page.gif"></a><a href="../../skin/images/chapter.gif"></a><a href="../../skin/images/chapter_open.gif"></a><a href="../../skin/images/current.gif"></a><a href="../..//favicon.ico"></a></td>
- </tr>
- <tr>
- <td colspan="2" bgcolor="#CFDCED" class="copyright" align="center"><font size="2" face="Arial, Helvetica, Sans-Serif">Copyright ©
- 1999-2002 The Apache Software Foundation. All rights reserved.<script type="text/javascript" language="JavaScript"><!--
- document.write(" - "+"Last Published: " + document.lastModified);
- // --></script></font></td>
- </tr>
- <tr>
- <td align="left" bgcolor="#CFDCED" class="logos"></td><td align="right" bgcolor="#CFDCED" class="logos"></td>
- </tr>
- </table>
- </body>
-</html>
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >
-<html>
- <head>
- <META http-equiv= "Content-Type" content= "text/html; charset=ISO-8859-1" >
- <title>Property classes overview</title>
- <link type="text/css" href="../../../page.css" rel="stylesheet">
- </head>
- <body marginheight= "0" marginwidth= "0" topmargin= "0" leftmargin= "0" text= "#000000" bgcolor= "#FFFFFF" >
- <div class= "content" >
- <h1>Property classes overview</h1>
- <p>
- <font size= "-2" >by Peter B. West</font>
- </p>
- <ul class= "minitoc" >
- <li>
- <a href = "#N10014" >Properties: packages</a>
- <ul class= "minitoc" >
- <li>
- <a href = "#N10019" >org.apache.fop.fo</a>
- </li>
- <li>
- <a href = "#N100AC" >org.apache.fop.fo.properties</a>
- </li>
- <li>
- <a href = "#N100EE" >org.apache.fop.fo.expr</a>
- </li>
- <li>
- <a href = "#N10134" >org.apache.fop.datatypes</a>
- </li>
- <li>
- <a href = "#N101A2"
- >org.apache.fop.datatypes.indirect</a>
- </li>
- </ul>
- </li>
- </ul>
- <a name= "N10014" ></a> <h3>Properties: packages</h3> <a name=
- "N10019" ></a> <h4>org.apache.fop.fo</h4>
- <dl>
- <dt>
- <a href = "javascript:window.top.displayCode(
- 'PropNames.html#PropNamesClass'
- )" ><em>PropNames</em></a>
- </dt>
- <dd>
- This class maintains an array of <a href=
- "javascript:window.top.displayCode(
- 'PropNames.html#propertyNames' )" >property names</a>,
- synchronized to a complete set of property name <a href =
- "javascript:window.top.displayCode( 'PropNames.html#NO_PROPERTY'
- )" >constants</a> for indexing property-based arrays. It
- includes methods to <a href =
- "javascript:window.top.displayCode(
- 'PropNames.html#getPropertyName' )" >convert an index to a
- name</a> and to <a href = "javascript:window.top.displayCode(
- 'PropNames.html#getPropertyIndex' )" >convert a property
- name to an index</a>.
- </dd>
- <dt>
- <a href = "PropertyConsts-class.html" ><em>PropertyConsts</em></a>
- </dt>
- <dd>
- A singleton instance of <span class= "codefrag"
- >PropertyConsts</span> is created by the static initializer
- of the <a href = "javascript:window.top.displayCode(
- 'PropertyConsts.html#pconsts' )" >pconsts</a> field.
- Working from the property indices defined in PropNames, the
- methods in this class collect and supply the values of
- fields defined in property objects into arrays.<br> The
- heart of this class in the method <a href =
- "javascript:window.top.displayCode(
- 'PropertyConsts.html#setupProperty' )" >setupProperty</a>,
- which constructs the property name from the index,
- instantiates a singleton of the appropriate class, and
- extracts static fields by reflection from that instance into
- the arrays of field values.
- </dd>
- <dt>
- <a href = "javascript:window.top.displayCode(
- 'PropertySets.html#PropertySetsClass' )" ><em>PropertySets</em></a>
- </dt>
- <dd>
- This class provides a number of <span class= "codefrag"
- >ROBitSet</span>s representing many of the sets of
- properties defined in <em>Section 7</em> of the
- specification. Note that the <a
- href="javascript:window.top.displayCode(
- 'PropertySets.html#borderProps' )"><em>Border</em></a>, <a
- href="javascript:window.top.displayCode(
- 'PropertySets.html#paddingProps' )"><em>Padding</em></a> and
- <a href="javascript:window.top.displayCode(
- 'PropertySets.html#backgroundProps'
- )"><em>Background</em></a> sets are defined separately.
- </dd>
- <dt>
- <a href = "javascript:window.top.displayCode(
- '../FOPropertySets.html#FOPropertySetsClass' )"
- ><em>FOPropertySets</em></a>
- </dt>
- <dd>
- This class provides a number of <span class= "codefrag"
- >ROBitSet</span>s representing sets of properties which are
- applicable in particular subtrees of the FO tree. These
- sets are provided so that other properties can be ignored
- during processing of the subtrees.
- </dd>
- <dt>
- <a href = "javascript:window.top.displayCode(
- 'ShorthandPropSets.html#ShorthandPropSetsClass' )"
- ><em>ShorthandPropSets</em></a>
- </dt>
- <dd>
- This class contains arrays of <a href =
- "javascript:window.top.displayCode(
- 'ShorthandPropSets.html#shorthands' )" >shorthand property
- indices</a> and <a href = "javascript:window.top.displayCode(
- 'ShorthandPropSets.html#compounds' )" >compound property
- indices</a>, and <span class= "codefrag" >ROBitSet</span>s
- representing the expansion sets of these shorthands and
- compounds. Various methods useful in the expansion of these
- properties are also included.
- </dd>
- <dt>
- <a href = "javascript:window.top.displayCode(
- 'FOAttributes.html#FOAttributesClass' )"
- ><em>FOAttributes</em></a>
- </dt>
- <dd>
- This class manages the attribute set that is associated with
- a SAX <span class= "codefrag" >startElement</span> event.
- <em>fo:</em> namespace attributes are entered into a <a href
- = "javascript:window.top.displayCode(
- 'FOAttributes.html#foAttrMap' )"><span class= "codefrag"
- >HashMap</span></a>, indexed by the <em>fo:</em> property
- index. As other namespaces are encountered, the values are
- entered into namespace-specific <a href =
- "javascript:window.top.displayCode(
- 'FOAttributes.html#nSpaceAttrMaps' )"><span class=
- "codefrag" >HashMap</span>s</a>, indexed by the <em>local
- name</em> of the attribute.
- </dd>
- </dl>
- <a name= "N100AC" ></a><a name= "property-classes" ></a>
- <h4>org.apache.fop.fo.properties</h4>
- <dl>
- <dt>
- <a href="javascript:window.top.displayCode(
- 'Property.html#PropertyClass' )" ><em>Property</em></a>
- </dt>
- <dd>
- The base class for all individual property classes.
- There are 320 properties in all.
- </dd>
- <dt>
- <em>ColumnNumber</em>
- </dt>
- <dd>
- The actual property class with the lowest index
- number, followed in the index order by properties required
- for further processing, e.g. FontSize.
- </dd>
- <dt>
- <em>....</em>
- </dt>
- <dd>....</dd>
- <dt>
- <em>Background</em>
- </dt>
- <dd>
- First in index order of the remainining shorthand
- properties, followed in index order by all other remaining
- shorthands.
- </dd>
- <dt>
- <em>....</em>
- </dt>
- <dd>....</dd>
- <dt>
- <em>AbsolutePosition</em>
- </dt>
- <dd>
- First in index order of the remaining properties. Within
- this ordering, compound properties precede their expansion
- properties, and corresponding relative properties precede
- corresponding absolute properties.
- </dd>
- <dt>
- <em>....</em>
- </dt>
- <dd>....</dd>
- <dt>
- <em>ZIndex</em>
- </dt>
- <dd>
- The property class with the highest index
- number.
- </dd>
- </dl>
- <a name= "N100EE" ></a>
- <h4>org.apache.fop.fo.expr</h4>
- <dl>
- <dt>
- <a href = "javascript:window.top.displayCode(
- 'PropertyTokenizer.html#PropertyTokenizerClass' )"
- ><em>PropertyTokenizer</em></a>
- </dt>
- <dd>
- The tokenizer for the property expression parser. Defines a
- set of <a href = "javascript:window.top.displayCode(
- 'PropertyTokenizer.html#EOF' )" >token constants</a> and
- returns these with associated token values.
- </dd>
- <dt>
- <a href = "javascript:window.top.displayCode(
- 'PropertyParser.html#PropertyParserClass' )"
- ><em>PropertyParser</em></a>
- </dt>
- <dd>
- This extends <span class= "codefrag"
- >PropertyTokenizer</span>. It parses property
- expressions on the basis of the tokens passed to it by its
- superclass, generating <span class= "codefrag"
- >PropertyValue</span>s, including <span class= "codefrag"
- >PropertyValueList</span>s.
- </dd>
- <dt>
- <em>PropertyException</em>
- </dt>
- <dd>
- The basic class for all property-related exceptions.
- It extends <span class= "codefrag" >FOPException</span>. It
- is housed in this package by historical accident.
- </dd>
- <dt>
- <em>DataTypeNotImplementedException</em>
- <br>
- <em>FunctionNotImplementedException</em>
- <br>
- <em>PropertyNotImplementedException</em>
- </dt>
- <dd>
- A set of particular exceptions extending <span class=
- "codefrag" >PropertyException</span>. Also in this package
- by accident.
- </dd>
- </dl>
- <a name= "N10134" ></a>
- <h4>org.apache.fop.datatypes</h4>
- <dl>
- <dt>
- <a href = "javascript:window.top.displayCode(
- 'PropertyValue.html#PropertyValueInterface' )"
- ><em>PropertyValue</em></a>
- </dt>
- <dd>
- An <em>interface</em> which all <span class= "codefrag"
- >PropertyValue</span> classes must implement. In addition
- to a few methods, <span class= "codefrag"
- >PropertyValue</span> defines the set of <a href =
- "javascript:window.top.displayCode( 'PropertyValue.html#NO_TYPE'
- )" >constants</a> which the <span class= "codefrag"
- >getType()</span> method may return; i.e. the valid set of
- <span class= "codefrag" >PropertyValue</span> types.
- </dd>
- <dt>
- <a href = "javascript:window.top.displayCode(
- 'AbstractPropertyValue.html#AbstractPropertyValueClass' )"
- ><em>AbstractPropertyValue</em></a>
- </dt>
- <dd>
- An abstract implementation of the <span class= "codefrag"
- >PropertyValue</span> interface. Most actual property value
- classes extend <span class= "codefrag"
- >AbstractPropertyValue</span>.
- </dd>
- <dt>
- <a href = "javascript:window.top.displayCode(
- 'PropertyValueList.html#PropertyValueListClass' )"
- ><em>PropertyValueList</em></a>
- </dt>
- <dd>
- This class extends <span class= "codefrag"
- >LinkedList</span> and implements <span class= "codefrag"
- >PropertyValue</span>. It is used whenever the process of
- resolving a property expression yields a list of <span
- class= "codefrag" >PropertyValue</span> elements; notably
- during the processing of shorthands and "compound"
- properties.
- </dd>
- <dt>
- <em>StringType</em>
- </dt>
- <dd>
- A basic type extending <span class= "codefrag"
- >AbstractPropertyValue</span>. Extended by <span class=
- "codefrag" >NCName</span>.
- </dd>
- <dt>
- <em>NCName</em>
- </dt>
- <dd>
- Extends <span class= "codefrag" >StringType</span> to represent
- NCName strings.
- </dd>
- <dt>
- <em>EnumType</em>
- </dt>
- <dd>
- Extends <span class= "codefrag"
- >AbstractPropertyValue</span> to represented enumerated
- types.
- </dd>
- <dt>
- <em>Other types</em>
- </dt>
- <dd>
- All other types extend one of the above classes.
- </dd>
- </dl>
- <a name= "N101A2" ></a>
- <h4>org.apache.fop.datatypes.indirect</h4>
- <dl>
- <dt>
- <em>IndirectValue</em>
- </dt>
- <dd>
- The base type for all indirect value types; extends
- <span class= "codefrag" >AbstractPropertyValue</span>.
- </dd>
- </dl>
- <p>
- <strong>Previous:</strong> <a href = "introduction.html"
- >Introduction</a>
- </p>
- <p>
- <strong>Next:</strong> <a href= "PropertyConsts-class.html"
- >The PropertyConsts class</a>
- </p>
- </div>
-
- <table summary= "footer" cellspacing= "0" cellpadding= "0" width= "100%" height= "20" border= "0" >
- <tr>
- <td colspan= "2" height= "1" bgcolor= "#4C6C8F" ><img
- height= "1" width= "1" alt= "" src=
- "../../skin/images/spacer.gif" ><a href =
- "../../skin/images/label.gif" ></a><a href =
- "../../skin/images/page.gif" ></a><a href =
- "../../skin/images/chapter.gif" ></a><a href =
- "../../skin/images/chapter_open.gif" ></a><a href =
- "../../skin/images/current.gif" ></a><a href =
- "../..//favicon.ico" ></a></td>
- </tr>
- <tr>
- <td colspan= "2" bgcolor= "#CFDCED" class= "copyright"
- align= "center" ><font size= "2" face= "Arial, Helvetica,
- Sans-Serif" >Copyright © 1999-2002 The Apache
- Software Foundation. All rights reserved.<script type=
- "text/javascript" language= "JavaScript" ><!--
- document.write(" - "+"Last Published: " +
- document.lastModified); // --></script></font></td>
- </tr>
- <tr>
- <td align= "left" bgcolor= "#CFDCED" class= "logos"
- ></td><td align= "right" bgcolor= "#CFDCED" class= "logos"
- ></td>
- </tr>
- </table>
- </body>
-</html>
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
- <head>
- <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Enumerated Data Values</title>
- <link type="text/css" href="../../../page.css" rel="stylesheet">
- </head>
- <body marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" text="#000000" bgcolor="#FFFFFF">
- <div class="content">
- <h1>Enumerated Data Values</h1>
- <ul class="minitoc">
- <li>
- <a href="#N1000C">Enumerated Data Values</a>
- <ul class="minitoc">
- <li>
- <a href="#N10020">Array representation</a>
- </li>
- <li>
- <a href="#N1005C">HashMap representation</a>
- </li>
- <li>
- <a href="#N1009D">
- Factoring Out Common Enumeration Values
- </a>
- </li>
- <li>
- <a href="#N100DD">Mapped Numeric Values</a>
- </li>
- </ul>
- </li>
- </ul>
-
- <a name="N1000C"></a>
- <h3>Enumerated Data Values</h3>
- <p>
- Property classes which allow enumerated data types must encode
- integer constants representing the enumeration tokens, and
- must provide a way of translating between the tokens and the
- integers, and <em>vice versa</em>. Depending on the number of
- tokens in an enumeration set, the mapping from token to
- integer is maintained in an array or a <span
- class="codefrag">HashMap</span>. The switch-over point from
- array to <span class="codefrag">HashMap</span> was determined
- by some highly implementation-dependent testing to be in the
- region of four to five elements.
- </p>
- <p>
- Many properties share common sets of enumeration tokens,
- e.g. those which allow color values, and those applying to
- borders and padding. A special case of enumerated value is
- the mapped numeric enumeration, in which a token maps to a
- Numeric value. These situations are discussed below.
- </p>
- <a name="N10020"></a>
- <h4>Array representation</h4>
- <p>
-
- <a href= "javascript:window.top.displayCode(
- 'Direction.html#DirectionClass' )" ><span
- class="codefrag">org.apache.fop.fo.properties.Direction</span></a>
- is an example of a class which supports an enumerated value
- with a small set of tokens. The <a href=
- "javascript:window.top.displayCode( 'Direction.html#dataTypes' )"
- ><span class="codefrag">dataTypes</span></a> field contains
- the <a href= "javascript:window.top.displayCode(
- 'Property.html#NOTYPE' )" ><span class="codefrag">ENUM</span>
- data type constant, defined in <span
- class="codefrag">Property</span></a>. The enumeration integer
- constants are defined as <span class="codefrag">public static
- final int</span> values, <a href=
- "javascript:window.top.displayCode( 'Direction.html#LTR') "><span
- class="codefrag' )" >LTR</span> and <span
- class="codefrag">RTL</span></a>. Associating enumeration
- tokens with these integer constants occurs in the array <a
- href= "javascript:window.top.displayCode( 'Direction.html#rwEnums'
- )" ><span class="codefrag">String[] rwEnums</span></a>, which
- is initialized with the token strings. By convention, zero is
- never used to represent a valid enumeration constant, anywhere
- in this code. It is, of course, critical that synchronization
- between <span class="codefrag">rwEnums</span> and the
- enumeration constants be maintained.
- </p>
- <p>
- The publicly accessible mapping from enumeration token to
- enumeration constant is achieved through the method <a href=
- "javascript:window.top.displayCode( 'Direction.html#getEnumIndex'
- )" ><span class="codefrag">int
- getEnumIndex(String)</span></a>. The corresponding mapping
- from enumeration constant to enumeration token is achieved
- through the method <a href= "javascript:window.top.displayCode(
- 'Direction.html#getEnumText' )" ><span class="codefrag">String
- getEnumText(int)</span></a>.
- </p>
- <a name="N1005C"></a>
- <h4>HashMap representation</h4>
- <p>
-
- <a href= "javascript:window.top.displayCode(
- 'RenderingIntent.html#RenderingIntentClass' )" ><span
- class="codefrag"
- >org.apache.fop.fo.properties.RenderingIntent</span ></a> is
- an example of a class which supports an enumerated value with
- a larger set of tokens. The <a href=
- "javascript:window.top.displayCode(
- 'RenderingIntent.html#dataTypes' )" ><span
- class="codefrag">dataTypes</span></a> field contains the <a
- href= "javascript:window.top.displayCode( 'Property.html#NOTYPE'
- )" ><span class="codefrag">ENUM</span> data type constant,
- defined in <span class="codefrag">Property</span></a>.
- Enumeration integer constants are defined as <a href=
- "javascript:window.top.displayCode(
- 'RenderingIntent.html#PERCEPTUAL' )" ><span
- class="codefrag">public static final int</span></a> values.
- Zero is never used to represent a valid enumeration constant.
- The enumeration tokens are stored in the array <a href=
- "javascript:window.top.displayCode( 'RenderingIntent.html#rwEnums'
- )" ><span class="codefrag">String[] rwEnums</span></a>, which
- is initialized with the token strings. Association of
- enumeration tokens with the integer constants occurs in the
- <span class="codefrag">HashMap</span> <a href=
- "javascript:window.top.displayCode(
- 'RenderingIntent.html#rwEnumHash"><span class="codefrag' )" >
- rwEnumHash</span></a>, which is initialized from the token
- array in a <span class="codefrag">static {}</span>
- initializer. It is, of course, critical that synchronization
- between <span class="codefrag">rwEnums</span> and the
- enumeration constants be maintained.
- </p>
- <p>
- The publicly accessible mapping from enumeration token to
- enumeration constant is achieved through the method <a href=
- "javascript:window.top.displayCode(
- 'RenderingIntent.html#getEnumIndex' )" ><span
- class="codefrag">int getEnumIndex(String)</span></a>. The
- corresponding mapping from enumeration constant to enumeration
- token is achieved through the method <a href=
- "javascript:window.top.displayCode(
- 'RenderingIntent.html#getEnumText' )" ><span
- class="codefrag">String getEnumText(int)</span></a>.
- </p>
- <a name="N1009D"></a>
- <h4 id="common-enum-values">
- Factoring Out Common Enumeration Values
- </h4>
- <p>
- When a number of properties support a common enumerated value,
- that value and its associated access methods may be factored
- out to a new class, which each of the properties then extends.
- An example of such a common super-class is <a href=
- "javascript:window.top.displayCode(
- 'BorderCommonStyle.html#BorderCommonStyleClass' )" ><span
- class="codefrag">BorderCommonStyle</span></a>. Like a
- property with a normal HashMap representation of an enumerated
- value, BorderCommonStyle defines <a href=
- "javascript:window.top.displayCode(
- 'BorderCommonStyle.html#HIDDEN' )" ><span
- class="codefrag">public static final int</span></a>
- enumeration integer constants. Similarly, the enumeration
- tokens are stored in the array <a href=
- "javascript:window.top.displayCode(
- 'BorderCommonStyle.html#rwEnums' )" ><span
- class="codefrag">String[] rwEnums</span></a>, and the
- association of enumeration tokens with the integer constants
- occurs in the <span class="codefrag">HashMap</span> <a href=
- "javascript:window.top.displayCode(
- 'BorderCommonStyle.html#rwEnumHash' )" ><span
- class="codefrag"> rwEnumHash</span></a>, initialized in a
- <span class="codefrag">static {}</span> initializer. The
- mapping methods <a href= "javascript:window.top.displayCode(
- 'BorderCommonStyle.html#getEnumIndex' )" ><span
- class="codefrag">int getEnumIndex(String)</span></a> and <a
- href= "javascript:window.top.displayCode(
- 'BorderCommonStyle.html#getEnumText' )" ><span
- class="codefrag">String getEnumText(int)</span></a> are also
- present.
- </p>
- <p>
- Notice, however, that the class has none of the static data
- constants described in the discussion of <a
- href="simple-properties.html">simple properties</a>. These
- values are defined in the individual sub-classes of this
- class, e.g. <a href= "javascript:window.top.displayCode(
- 'BorderLeftStyle.html#BorderLeftStyleClass' )" ><span
- class="codefrag">BorderLeftStyle</span></a>. None of the
- above fields or methods occur, and <span
- class="codefrag">BorderLeftStyle</span> is left looking like
- an example of a simple property. The enumeration mapping
- methods are, however, available through the super-class <span
- class="codefrag">BorderCommonStyle</span>.
- </p>
- <a name="N100DD"></a>
- <h4>Mapped Numeric Values</h4>
- <p>
- In "normal" enumerated values, the token is, effectively,
- passed directly into the layout operation of the flow object
- to which the property is applied. Some enumerated values,
- however, generate a <span class="codefrag">Numeric</span>
- result. Their resolution involves mapping the token to the
- indicated <span class="codefrag">Numeric</span> value.
- </p>
- <p>
- An example is the <a href= "javascript:window.top.displayCode(
- 'BorderCommonWidth.html#BorderCommonWidthClass' )" ><span
- class="codefrag">BorderCommonWidth</span></a> property. This,
- like the example of <a href="#common-enum-values"><span
- class="codefrag">BorderCommonStyle</span></a> above, also
- represents common enumerated values which have been factored
- out to form a super-class for particular properties. <span
- class="codefrag">BorderCommonWidth</span>, therefore, also
- defines <a href= "javascript:window.top.displayCode(
- 'BorderCommonWidth.html#THIN' )" ><span
- class="codefrag">enumeration constant values</span></a> and an
- array of tokens. In this case, there is no <span
- class="codefrag">HashMap</span>, because of the limited number
- of tokens, but the mapping methods <a href=
- "javascript:window.top.displayCode(
- 'BorderCommonWidth.html#getEnumIndex' )" ><span
- class="codefrag">int getEnumIndex(String)</span></a> and <a
- href= "javascript:window.top.displayCode(
- 'BorderCommonWidth.html#getEnumText' )" ><span
- class="codefrag">String getEnumText(int)</span></a> are
- present.
- </p>
- <p>
- The added element in this property is the array <a href=
- "javascript:window.top.displayCode(
- 'BorderCommonWidth.html#mappedPoints' )" ><span
- class="codefrag">double[] mappedPoints</span></a>. The
- entries in this array must by maintained in syncronization
- with the <a href= "javascript:window.top.displayCode(
- 'BorderCommonWidth.html#rwEnums' )" ><span
- class="codefrag">String[] rwEnums</span></a> array of tokens
- and the set of <a href= "javascript:window.top.displayCode(
- 'BorderCommonWidth.html#THIN' )" >enumeration constants</a>.
- The mapping from token to Numeric value is achieved by the <a
- href= "javascript:window.top.displayCode(
- 'BorderCommonWidth.html#getMappedLength' )" ><span
- class="codefrag">Numeric getMappedLength(FONode, int,
- int)</span></a> method.
- </p>
- <p>
-
- <a href= "javascript:window.top.displayCode(
- 'BorderLeftWidth.html#BorderLeftWidthClass' )" ><span
- class="codefrag">BorderLeftWidth</span></a> extends <a href=
- "javascript:window.top.displayCode( 'BorderCommonWidth.html' )"
- ><span class="codefrag">BorderCommonWidth</span></a>. It
- includes the basic static data, like <a
- href="simple-properties.html">simple properties</a>, and, in
- this case, the <a href= "javascript:window.top.displayCode(
- 'BorderLeftWidth.html#getInitialValue' )" ><span
- class="codefrag">PropertyValue getInitialValue(int)</span></a>
- method to derive the initial value.
- </p>
- <a name="N10139"></a>
- <h4>Deriving Mapped Numeric Values</h4>
- <p>
- As usual with property values, the usual method of deriving a
- mapped numeric value is by calling the <a href=
- "javascript:window.top.displayCode(
- '../PropertyConsts.html#getMappedNumeric' )" ><span
- class="codefrag">Numeric getMappedNumeric(FONode, int,
- int)</span></a> method in <a href=
- "javascript:window.top.displayCode(
- '../PropertyConsts.html#pconsts' )" ><span
- class="codefrag">pconsts</span></a>. All properties which
- support a mapped numeric value must have a <span
- class="codefrag">Numeric getMappedNumeric(FONode, int)</span>
- method, which will be called through its singleton instance,
- stored in the <a href= "javascript:window.top.displayCode(
- 'PropertyConsts.html#properties' )" ><span class= "codefrag"
- >properties</span ></a> array, by the <span
- class="codefrag">PropertyConsts</span> method.
- </p>
-
- <p>
- <strong>Previous:</strong> <a href= "getInitialValue.html"
- >getInitialValue()</a>
- </p>
- <!--
- <p>
- <strong>Next:</strong> <a href= "getInitialValue.html"
- >getInitialValue()</a>
- </p>
--->
-
- </div>
- <table summary="footer" cellspacing="0" cellpadding="0" width="100%" height="20" border="0">
- <tr>
- <td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1"
- width="1" alt="" src="../../../skin/images/spacer.gif"><a
- href="../../../skin/images/label.gif"></a><a
- href="../../../skin/images/page.gif"></a><a
- href="../../../skin/images/chapter.gif"></a><a
- href="../../../skin/images/chapter_open.gif"></a><a
- href="../../../skin/images/current.gif"></a><a
- href="../../..//favicon.ico"></a></td>
- </tr>
- <tr>
- <td colspan="2" bgcolor="#CFDCED" class="copyright"
- align="center"><font size="2" face="Arial, Helvetica,
- Sans-Serif">Copyright © 1999-2002 The Apache
- Software Foundation. All rights reserved.<script
- type="text/javascript" language="JavaScript"><!--
- document.write(" - "+"Last Published: " +
- document.lastModified); // --></script></font></td>
- </tr>
- <tr>
- <td align="left" bgcolor="#CFDCED" class="logos"></td><td
- align="right" bgcolor="#CFDCED" class="logos"></td>
- </tr>
- </table>
- </body>
-</html>
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
- <head>
- <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Generating Initial Values</title>
- <link type="text/css" href="../../../page.css" rel="stylesheet">
- </head>
- <body marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" text="#000000" bgcolor="#FFFFFF">
- <div class="content">
- <h1>Generating Initial Values</h1>
- <p>
- <font size="-2">by Peter B. West</font>
- </p>
- <ul class="minitoc">
- <li>
- <a href="#N10014">Introduction</a>
- </li>
- <li>
- <a href="#N10021">
- Generating & Accessing Initial Values
- </a>
- <ul class="minitoc">
- <li>
- <a href="#N10062">Properties without
- getInitialValue()</a>
- </li>
- </ul>
- </li>
- </ul>
-
- <a name="N10014"></a>
- <h3>Introduction</h3>
- <p>
- The <a href="simple-properties.html">previous section</a>
- discussed the common data elements in the simplest examples of
- property classes. This section discusses more complex classes
- whose facilities are accessed only through various methods.
- </p>
-
- <a name="N10021"></a>
- <h3>
- Generating & Accessing Initial Values
- </h3>
- <p>
-
- <a href= "javascript:window.top.displayCode( 'AutoRestore.html' )"
- ><span class="codefrag"
- >org.apache.fop.fo.properties.AutoRestore</span></a> is an
- example of the next most complex property class. In
- addition to all of the common static fields, these classes
- have initial data value types which require the dynamic
- generation of a PropertyValue instance.
- </p>
- <p>
- The method <a href= "javascript:window.top.displayCode(
- 'AutoRestore.html#getInitialValue' )" ><span
- class="codefrag">PropertyValue getInitialValue(int)</span></a>
- returns an instance of PropertyValue of the appropriate
- subclass containing the initial value for this property. Like
- the static data fields, this value is, in turn, stored in the
- array of initial values maintained in the <a href=
- "javascript:window.top.displayCode(
- 'PropertyConsts.html#PropertyConstsClass' )" ><span
- class="codefrag">PropertyConsts</span></a> singleton <a href=
- "javascript:window.top.displayCode( 'PropertyConsts.html#pconsts'
- )" ><span class="codefrag">pconsts</span></a>.` As with the
- fields, the first invocation of the method <a href=
- "javascript:window.top.displayCode(
- 'PropertyConsts.html#setupProperty' )" ><span
- class="codefrag">setupProperty</span></a> on the property
- instantiates the singleton instance of the class, and stores
- that instance in the in the <a href=
- "javascript:window.top.displayCode(
- 'PropertyConsts.html#properties' )" ><span
- class="codefrag">Property[] properties</span></a> array of <a
- href= "javascript:window.top.displayCode(
- 'PropertyConsts.html#pconsts' )" ><span
- class="codefrag">pconsts</span></a>.
- </p>
- <p>
- Unlike the static data fields, however, the initial value is
- not immediately generated. It is generated by a call to <a
- href= "javascript:window.top.displayCode(
- 'PropertyConsts.html#getInitialValue' )" ><span
- class="codefrag">PropertyValue getInitialValue(int)</span></a>
- in <a href= "javascript:window.top.displayCode(
- 'PropertyConsts.html#pconsts' )" ><span
- class="codefrag">pconsts</span></a>. This call, in turn,
- locates the relevant instance of the particular property class
- in the <a href= "javascript:window.top.displayCode(
- 'PropertyConsts.html#properties' )" ><span class= "codefrag"
- >properties</span> array of <span class= "codefrag"
- >PropertyConsts</span></a>, and invokes the <span class=
- "codefrag" >getInitialValue()</span> of that instance. A
- side-effect of this call is to store the initial value in <a
- href= "javascript:window.top.displayCode(
- 'PropertyConsts.html#initialValues' )" ><span
- class="codefrag">PropertyValue[] initialValues</span></a>.
- </p>
- <a name="N10062"></a>
- <h4>Properties without
- getInitialValue()</h4>
- <p>
- What about property classes which have no <span
- class="codefrag">getInitialValue()</span> method? The
- simplest classes, e.g. <span
- class="codefrag">Character</span>, fall into this category.
- As <a href="classes-overview.html#property-classes">noted
- previously</a>, all of the property classes extend <span
- class="codefrag">org.apache.fop.fo.properties.Property</span>.
- <a href= "javascript:window.top.displayCode(
- 'Property.html#PropertyClass' )" ><span
- class="codefrag">Property</span></a> provides a base <a href=
- "javascript:window.top.displayCode(
- 'Property.html#getInitialValue' )" ><span
- class="codefrag">PropertyValue getInitialValue(int)</span></a>
- method to which the simple classes fall back. Note that it is
- only valid for <span class="codefrag">NOTYPE_IT</span>, <span
- class="codefrag">AUTO_IT</span>, <span
- class="codefrag">NONE_IT</span> and <span
- class="codefrag">AURAL_IT</span> initial value types, so all
- classes which have any other initial value type must override
- this method.
- </p>
-
- <p>
- <strong>Previous:</strong> <a href = "simple-properties.html"
- >Simple property classes</a>
- </p>
- <p>
- <strong>Next:</strong> <a href= "enumerated-values.html"
- >Enumerated values</a>
- </p>
-
- </div>
- <table summary="footer" cellspacing="0" cellpadding="0" width="100%" height="20" border="0">
- <tr>
- <td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1"
- width="1" alt="" src="../../../skin/images/spacer.gif"><a
- href="../../../skin/images/label.gif"></a><a
- href="../../../skin/images/page.gif"></a><a
- href="../../../skin/images/chapter.gif"></a><a
- href="../../../skin/images/chapter_open.gif"></a><a
- href="../../../skin/images/current.gif"></a><a
- href="../../..//favicon.ico"></a></td>
- </tr>
- <tr>
- <td colspan="2" bgcolor="#CFDCED" class="copyright"
- align="center"><font size="2" face="Arial, Helvetica,
- Sans-Serif">Copyright © 1999-2002 The Apache
- Software Foundation. All rights reserved.<script
- type="text/javascript" language="JavaScript"><!--
- document.write(" - "+"Last Published: " +
- document.lastModified); // --></script></font></td>
- </tr>
- <tr>
- <td align="left" bgcolor="#CFDCED" class="logos"></td><td
- align="right" bgcolor="#CFDCED" class="logos"></td>
- </tr>
- </table>
- </body>
-</html>
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
-<html>
- <head>
- <title>Alt Design Frameset</title>
- <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <script type="text/javascript">
- <!--
- var isHigh = true;
-
- function lengthenCol() {
- if (isHigh) { return; }
- fset = document.getElementById("altDesignFramesetRows");
- fset.setAttribute("rows", "95%,*");
- logowin = top.frames[0];
- if (logowin == null) {
- alert(
- "Requires Navigator >= 7, Mozilla >= 1.2.1 or IE >= 6");
- return;
- }
- logodoc = logowin.document;
- lbutton = logodoc.getElementById("lengthenButton");
- lbutton.setAttribute("value", "^");
- isHigh = true;
- }
-
- function shortenCol() {
- if ( ! isHigh) { return; }
- fset = document.getElementById("altDesignFramesetRows");
- fset.setAttribute("rows", "20%,*");
- logowin = top.frames[0];
- if (logowin == null) {
- alert(
- "Requires Navigator >= 7, Mozilla >= 1.2.1 or IE >= 6");
- return;
- }
- logodoc = logowin.document;
- lbutton = logodoc.getElementById("lengthenButton");
- lbutton.setAttribute("value", "v");
- isHigh = false;
- }
-
- function toggleColHeights() {
- if (isHigh) {
- shortenCol();
- } else {
- lengthenCol()
- }
- }
-
- function displayCode(src) {
- top.frames[2].location = src;
- shortenCol();
- }
-
- function displayHtml(src) {
- top.frames[1].location = src;
- lengthenCol();
- }
- -->
- </script>
- </head>
- <frameset id="altDesignFramesetCols" cols="180,*">
- <frame id="logoFrame" class="logo" style="padding: 0px; margin: 0px:
- border: 0px;" src="../logo.html" scrolling="no">
- <frameset id="altDesignFramesetRows" rows="95%,*">
- <frame id="contents" src="introduction.html">
- <frame id= "codeDisplayFrame"
- class= "codeDisplay"
- src= "../codeframe.html" >
- </frameset>
- </frameset>
-</html>
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
- <head>
- <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Implementing Properties</title>
- <link type="text/css" href="../../../page.css" rel="stylesheet">
- </head>
- <body marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" text="#000000" bgcolor="#FFFFFF">
- <div class="content">
- <h1>Implementing Properties</h1>
- <p>
- <font size="-2">by Peter B. West</font>
- </p>
- <ul class="minitoc">
- <li>
- <a href="#N10014">An alternative properties implementation</a>
- <ul class="minitoc">
- <li>
- <a href="#N10043">The history problem</a>
- </li>
- <li>
- <a href="#N10061">The construction hierarchy</a>
- </li>
- <li>
- <a href="#N10082">Representing properties: <property> classes</a>
- </li>
- </ul>
- </li>
- </ul>
-
- <a name="N10014"></a>
- <h3>An alternative properties implementation</h3>
- <div class="frame note">
- <div class="label">Note</div>
- <div class="content">
- The following discussion focusses on the relationship between
- Flow Objects in the Flow Object tree, and properties. There
- is no (or only passing) discussion of the relationship between
- properties and traits, and by extension, between properties
- and the Area tree.
- </div>
- </div>
- <p>
- Property handling is complex and expensive. Varying numbers of
- properties <strong>apply</strong> to individual Flow Objects
- <strong>(FOs)</strong> in the <strong>FO tree </strong> but
- any property may effectively be assigned a value on any
- element of the tree. If that property is inheritable, its
- defined value will then be available to any children of the
- defining FO.
- </p>
- <div class="frame note">
- <div class="label">Note</div>
- <div class="content">
-
- <em>(XSL 1.0 Rec)</em> <strong>5.1.4 Inheritance</strong>
- ...The inheritable properties can be placed on any formatting
- object.
- </div>
- </div>
- <p>
- Even if the value is not inheritable, it may be accessed by
- its children through the <span class="codefrag">inherit</span>
- keyword or the <span class="codefrag">from-parent()</span>
- core function, and potentially by any of its descendents
- through the <span
- class="codefrag">from-nearest-specified-value()</span> core
- function.
- </p>
- <p>
- In addition to the assigned values of properties, almost every
- property has an <strong>initial value</strong> which is used
- when no value has been assigned.
- </p>
- <a name="N10043"></a>
- <h4>The history problem</h4>
- <p>
- The difficulty and expense of handling properties comes from
- this univeral inheritance possibility. The list of properties
- which are assigned values on any particular <em>FO</em>
- element will not generally be large, but a current value is
- required for each property which applies to the <em>FO</em>
- being processed.
- </p>
- <p>
- The environment from which these values may be selected
- includes, for each <em>FO</em>, <strong>for each applicable
- property</strong>, the value assigned on this <em>FO</em>,
- the value which applied to the parent of this <em>FO</em>,
- the nearest value specified on an ancestor of this element,
- and the initial value of the property.
- </p>
- <a name="N10061"></a>
- <h4>The construction hierarchy</h4>
- <p>
- Properties are resoved in the <strong>FO tree</strong> in a
- strictly hierarchical manner. Nodes are detected in the
- input in a <strong>pre-order</strong> traversal, and are
- built in the same order. This imples that there are two
- phases, or states, of property resolution and construction.
- Any particular FO node is either in a state of constructing
- its own subtree, or in a stable state where the subtree
- construction is complete. These states have differenct data
- requirements.
- </p>
- <dl>
-
- <dt>Subtree building</dt>
-
- <dd>
- In this state, all properties defined on this node, or any
- of its ancestors must be available to the subtree. In
- effect, any property defined on this node must be
- available to its descendants, as all properties defined on
- any ancestor are available to this node.
- </dd>
-
- <dt>Stable: subtree building complete</dt>
-
- <dd>
- In this state, only the properties <strong>applicable to
- this node</strong> need be available.
- </dd>
-
- </dl>
- <a name="N10082"></a>
- <h4>Representing properties: <property> classes</h4>
- <a name="N10087"></a>
- <h4>Class vs instance</h4>
- <p>
- What information is required of property objects?
- More particularly, what information is particular to the
- property classes, and what to the instantiated
- objects? The answer to this question depend largely on
- how the property objects are used in the context
- of layout and Area tree construction. The approach taken
- in this implementation is that properties are simply flags
- on certain data values associated with FOs. The semantics
- of these flags are determined within the layout engine.
- </p>
- <p>
- Certain constant information attaches to individual
- property classes. This information is detailed in
- the descriptions of individual properties in <em>Section
- 7</em> of the specification. Such information is
- represented in <strong>class</strong> fields and data
- structures within the classes.
- </p>
- <p>
- The "instance" information content of a property
- is:
- </p>
- <ul>
-
- <li>
- explicitly, the <span class="codefrag">PropertyValue</span> datum of
- the property, and
- </li>
-
- <li>
- implicitly, the <strong>Flow Object</strong> to which
- the property is attached.
- </li>
-
- </ul>
- <p>
- Properties, then, serve essentially to link <em>FO
- instances</em> with <em>PropertyValue instances</em>,
- attaching certain invariant semantic markers to the
- PropertyValues in the process. In this implementation,
- these functions can be realised entirely within the
- property <strong>classes</strong> themselves,
- without the need to instantiate any objects. In practice,
- <strong>property singletons</strong> are
- instantiated to make access to some invariants simpler.
- </p>
- <p>
-
- <strong>Next:</strong> <a href= "classes-overview.html"
- >Property classes overview.</a>
-
- </p>
-
- </div>
- <table summary="footer" cellspacing="0" cellpadding="0" width="100%" height="20" border="0">
- <tr>
- <td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1"
- width="1" alt="" src="../../../skin/images/spacer.gif"><a
- href="../../../skin/images/label.gif"></a><a
- href="../../../skin/images/page.gif"></a><a
- href="../../../skin/images/chapter.gif"></a><a
- href="../../../skin/images/chapter_open.gif"></a><a
- href="../../../skin/images/current.gif"></a><a
- href="../../..//favicon.ico"></a></td>
- </tr>
- <tr>
- <td colspan="2" bgcolor="#CFDCED" class="copyright"
- align="center"><font size="2" face="Arial, Helvetica,
- Sans-Serif">Copyright © 1999-2002 The Apache
- Software Foundation. All rights reserved.<script
- type="text/javascript" language="JavaScript"><!--
- document.write(" - "+"Last Published: " +
- document.lastModified); // --></script></font></td>
- </tr>
- <tr>
- <td align="left" bgcolor="#CFDCED" class="logos"></td><td
- align="right" bgcolor="#CFDCED" class="logos"></td>
- </tr>
- </table>
- </body>
-</html>
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
- <head>
- <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Simple <property> Classes</title>
- <link type="text/css" href="../../../page.css" rel="stylesheet">
- </head>
- <body marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" text="#000000" bgcolor="#FFFFFF">
- <div class="content">
- <h1>Simple <property> Classes</h1>
- <p>
- <font size="-2">by Peter B. West</font>
- </p>
- <ul class="minitoc">
- <li>
- <a href="#N10014">Introduction</a>
- </li>
- <li>
- <a href="#N10026">Common data</a>
- </li>
- <li>
- <a href="#N10075">Accessing <property> Data Constants</a>
- </li>
- </ul>
-
- <a name="N10014"></a>
- <h3>Introduction</h3>
- <p>
- An <a href="classes-overview.html">overview of the properties
- and classes</a> involved in handling properties has already
- been given. This discussion will go in detail into the way
- data are represented within properties. Iit is important to
- keep in mind that the primary avenue of access to the data and
- the methods of property classes is the <a href=
- "javascript:window.top.displayCode(
- 'PropertyConsts.html#PropertyConstsClass' )" ><span
- class="codefrag">PropertyConsts</span></a> class and its
- singleton object.
- </p>
-
- <a name="N10026"></a>
- <h3>Common data</h3>
- <p>
-
- <a href= "javascript:window.top.displayCode( 'Character.html' )" ><span
- class="codefrag">org.apache.fop.fo.properties.Character</span></a>
- is an example of a basic property class. The data fields
- common to all properties are:
- </p>
- <dl>
-
- <dt>
-
- <span class="codefrag">final int dataTypes</span>
-
- </dt>
-
- <dd>
- This field defines the allowable data types which may be
- assigned to the property. The value is chosen from the data
- type constants defined in <a href=
- "javascript:window.top.displayCode( 'Property.html#NOTYPE' )"
- ><span
- class="codefrag">org.apache.fop.fo.properties.Property</span></a>,
- and may consist of more than one of those constants,
- bit-ORed together.
- </dd>
-
- <dt>
-
- <span class="codefrag">final int traitMapping</span>
-
- </dt>
-
- <dd>
- This field defines the mapping of properties to traits in
- the <span class="codefrag">Area tree</span>. The value is
- chosen from the trait mapping constants defined in <a href=
- "javascript:window.top.displayCode( 'Property.html#NO_TRAIT' )"
- ><span
- class="codefrag">org.apache.fop.fo.properties.Property</span></a>,
- and may consist of more than one of those constants,
- bit-ORed together.
- </dd>
-
- <dt>
-
- <span class="codefrag">final int initialValueType</span>
-
- </dt>
-
- <dd>
- This field defines the data type of the initial value
- assigned to the property. The value is chosen from the
- initial value type constants defined in <a href=
- "javascript:window.top.displayCode( 'Property.html#NOTYPE_IT' )"
- ><span
- class="codefrag">org.apache.fop.fo.properties.Property</span></a>.
- In the simplest property classes, such as <span
- class="codefrag">Character</span>, there is no defined
- initial value type.
- </dd>
-
- <dt>
-
- <span class="codefrag">final int inherited</span>
-
- </dt>
-
- <dd>
- This field defines the kind of inheritance applicable to the
- property. The value is chosen from the inheritance
- constants defined in <a href=
- "javascript:window.top.displayCode( 'Property.html#NO' )" ><span
- class="codefrag">org.apache.fop.fo.properties.Property</span></a>.
- </dd>
-
- </dl>
-
- <a name="N10075"></a>
- <h3>Accessing <property> Data Constants</h3>
- <p>
- The constants above are generally accessed through the arrays
- maintained in the <a href= "javascript:window.top.displayCode(
- 'PropertyConsts.html#PropertyConstsClass' )" ><span
- class="codefrag">PropertyConsts</span></a> singleton <a href=
- "javascript:window.top.displayCode( 'PropertyConsts.html#pconsts'
- )" ><span class="codefrag">pconsts</span></a>. The first
- invocation of the method <a href=
- "javascript:window.top.displayCode(
- 'PropertyConsts.html#setupProperty' )" ><span
- class="codefrag">setupProperty</span></a> on the property
- generates a <span class="codefrag">Class</span> instance for
- the class, and stores it in the array <a href=
- "javascript:window.top.displayCode( 'PropertyConsts.html#classes'
- )" ><span class="codefrag">classes</span></a>. This <span
- class="codefrag">Class</span> object is used, in turn, to
- instantiate the singleton instance of the class, which is
- stored in the <a href= "javascript:window.top.displayCode(
- 'PropertyConsts.html#properties' )" ><span
- class="codefrag">Property[] properties</span></a> array of <a
- href= "javascript:window.top.displayCode(
- '../PropertyConsts.html#pconsts' )" ><span
- class="codefrag">pconsts</span></a>.
- </p>
- <p>
-
- <em>Reflection</em> methods are then used, via the same <span
- class="codefrag">Class</span> instance, to extract and store
- the static data fields. These arrays and associated access
- methods are:
- </p>
- <dl>
-
- <dt>
-
- <a href= "javascript:window.top.displayCode(
- 'PropertyConsts.html#datatypes' )" ><span
- class="codefrag">int[] datatypes</span></a>
-
- </dt>
-
- <dd>
-
- <a href= "javascript:window.top.displayCode(
- 'PropertyConsts.html#getDataTypes' )" ><span
- class="codefrag">int getDataTypes(int)</span></a>
-
- </dd>
-
- <dt>
-
- <a href= "javascript:window.top.displayCode(
- 'PropertyConsts.html#traitMappings' )" ><span
- class="codefrag">int[] traitMappings</span></a>
-
- </dt>
-
- <dd>
-
- <em>No access method yet defined.</em>
-
- </dd>
-
- <dt>
-
- <a href= "javascript:window.top.displayCode(
- 'PropertyConsts.html#initialValueTypes' )" ><span
- class="codefrag">int[] initialValueTypes</span></a>
-
- </dt>
-
- <dd>
-
- <a href= "javascript:window.top.displayCode(
- 'PropertyConsts.html#getInitialValueType' )" ><span
- class="codefrag">int getInitialValueType(int)</span></a>
-
- </dd>
-
- <dt>
-
- <a href= "javascript:window.top.displayCode(
- 'PropertyConsts.html#inherited' )" ><span
- class="codefrag">int[] inherited</span></a>
-
- </dt>
-
- <dd>
-
- <a href= "javascript:window.top.displayCode(
- 'PropertyConsts.html#inheritance' )" ><span
- class="codefrag">int inheritance(int)</span></a>
-
- </dd>
-
- </dl>
-
- <p>
- <strong>Previous:</strong> <a href = "PropertyConsts-class.html"
- >PropertyConsts class</a>
- </p>
- <p>
- <strong>Next:</strong> <a href= "getInitialValue.html"
- >getInitialValue()</a>
- </p>
-
- </div>
- <table summary="footer" cellspacing="0" cellpadding="0" width="100%" height="20" border="0">
- <tr>
- <td colspan="2" height="1" bgcolor="#4C6C8F"><img height="1"
- width="1" alt="" src="../../../skin/images/spacer.gif"><a
- href="../../../skin/images/label.gif"></a><a
- href="../../../skin/images/page.gif"></a><a
- href="../../../skin/images/chapter.gif"></a><a
- href="../../../skin/images/chapter_open.gif"></a><a
- href="../../../skin/images/current.gif"></a><a
- href="../../..//favicon.ico"></a></td>
- </tr>
- <tr>
- <td colspan="2" bgcolor="#CFDCED" class="copyright"
- align="center"><font size="2" face="Arial, Helvetica,
- Sans-Serif">Copyright © 1999-2002 The Apache
- Software Foundation. All rights reserved.<script
- type="text/javascript" language="JavaScript"><!--
- document.write(" - "+"Last Published: " +
- document.lastModified); // --></script></font></td>
- </tr>
- <tr>
- <td align="left" bgcolor="#CFDCED" class="logos"></td><td
- align="right" bgcolor="#CFDCED" class="logos"></td>
- </tr>
- </table>
- </body>
-</html>