pbwest 2002/12/23 17:25:18
Added: src/documentation/content/xdocs/design/alt.design/properties
book.xml index.xml PropertyConsts-class.xml
property-data.xml property-methods.xml
Log:
WIP
Revision Changes Path
1.1
xml-fop/src/documentation/content/xdocs/design/alt.design/properties/book.xml
Index: book.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//APACHE//DTD Cocoon Documentation Book V1.0//EN"
"http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-cocoon2/src/documentation/xdocs/dtd/book-cocoon-v10.dtd">
<book software="FOP"
title="FOP Alternative Design Properties Notes"
copyright="@year@ The Apache Software Foundation"
xmlns:xlink="http://www.w3.org/1999/xlink"
>
<menu label="Index">
<menu-item label="FOP Home" href="../../index.html"/>
<menu-item label="Alt Design" href="../index.html"/>
</menu>
<menu label="Alt properties">
<menu-item label="Introduction" href="index.html"/>
<menu-item label="PropertyConsts" href="PropertyConsts-class.html"/>
<menu-item label="Data Handling" href="property-data.html"/>
<menu-item label="Methods Access" href="property-methods.html"/>
</menu>
</book>
1.1
xml-fop/src/documentation/content/xdocs/design/alt.design/properties/index.xml
Index: index.xml
===================================================================
<?xml version="1.0" standalone="no"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN"
"http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/resources/schema/dtd/document-v11.dtd">
<!-- $Id: index.xml,v 1.1 2002/12/24 01:25:18 pbwest Exp $ -->
<document>
<header>
<title>FOP Alternative Design Properties Notes</title>
<version>$Revision: 1.1 $ $Name: $</version>
<authors>
<person name="Peter B. West" email="[EMAIL PROTECTED]"/>
</authors>
</header>
<body>
<section>
<title>Alt Design Properties Notes</title>
<p>
This section includes more detailed notes on the classes which
are involved in the implementation of FO properties.
</p>
</section>
</body>
</document>
1.1
xml-fop/src/documentation/content/xdocs/design/alt.design/properties/PropertyConsts-class.xml
Index: PropertyConsts-class.xml
===================================================================
<?xml version="1.0" standalone="no"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN"
"http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/resources/schema/dtd/document-v11.dtd">
<document>
<header>
<title>PropertyConsts Description</title>
<authors>
<person id="pbw" name="Peter B. West" email="[EMAIL PROTECTED]"/>
</authors>
</header>
<body>
<section>
<title>Introduction</title>
<p>
<fork href= "../PropertyConsts.html" >This class</fork>, and the
singleton object which is <fork href=
"../PropertyConsts.html#pconsts" >generated by the static
initializer</fork>, is essentially a repository of the static
data from the <property> classes of
<code>org.apache.fop.fo.property</code>, and a common point of
access for the methods of those classes.
</p>
</section>
<section>
<title>Common static data</title>
<p></p>
</section>
</body>
</document>
1.1
xml-fop/src/documentation/content/xdocs/design/alt.design/properties/property-data.xml
Index: property-data.xml
===================================================================
<?xml version="1.0" standalone="no"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN"
"http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/resources/schema/dtd/document-v11.dtd">
<document>
<header>
<title>Property Data Handling</title>
<authors>
<person id="pbw" name="Peter B. West" email="[EMAIL PROTECTED]"/>
</authors>
</header>
<body>
<section>
<title>Introduction</title>
<p>
An <link href= "../classes-overview.html" >overview of the
properties and classes</link> involved in handling properties
has already been given. This discussion will go in detail
into the way data are represented within properties.
</p>
</section>
<section>
<title>Common data</title>
<p>
<fork href= "Character.html"
>org.apache.fop.fo.properties.Character</fork> is an example
of a basic <property> class. The data fields common to
all properties are:
</p>
<dl>
<dt>
<code>final int dataTypes</code>
</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 <fork href= "Property.html#NOTYPE"
><code >org.apache.fop.fo.properties.Property</code
></fork>, and may consist of more than one of those
constants, bit-ORed together.
</dd>
<dt>
<code >final int traitMapping</code >
</dt>
<dd>
This field defines the mapping of properties to traits in
the <code>Area tree</code>. The value is chosen from the
trait mapping constants defined in <fork href=
"Property.html#NO_TRAIT" ><code
>org.apache.fop.fo.properties.Property</code ></fork>, and
may consist of more than one of those constants, bit-ORed
together.
</dd>
<dt>
<code >final int initialValueType</code >
</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 <fork href=
"Property.html#NOTYPE_IT" ><code
>org.apache.fop.fo.properties.Property</code ></fork>. In
the simplest <property> classes, such as
<code>Character</code>,
there is no defined initial value type.
</dd>
<dt>
<code >final int inherited</code >
</dt>
<dd>
This field defines the kind of inheritance applicable to the
property. The value is chosen from the inheritance
constants defined in <fork href= "Property.html#NO" ><code
>org.apache.fop.fo.properties.Property</code ></fork>.
</dd>
</dl>
</section>
<section>
<title>Accessing <property> Data Constants</title>
<p>
The constants above are generally accessed through the arrays
maintained in the <fork href= "../PropertyConsts.html" ><code
>PropertyConsts</code ></fork> singleton <fork href=
"../PropertyConsts.html#pconsts" ><code >pconsts</code
></fork>. The first invocation of the method <fork href=
"../PropertyConsts.html#setupProperty" ><code
>setupProperty</code ></fork> on the property generates a
<code >Class</code > instance for the class, and stores it in
the array <fork href= "../PropertyConsts.html#classes" ><code
>classes</code ></fork>. This <code>Class</code> object is
used, in turn, to instantiate the singleton instance of the
class, which is stored in the <fork href=
"../PropertyConsts.html#properties" ><code >Property[]
properties</code ></fork> array of <fork href=
"../PropertyConsts.html#pconsts" ><code >pconsts</code
></fork>.
</p>
<p>
<em>Reflection</em> methods are then used, via the same
<code>Class</code> instance, to extract and store the static
data fields. These arrays and associated access methods are:
</p>
<dl>
<dt>
<fork href= "../PropertyConsts.html#datatypes" ><code
>int[] datatypes</code ></fork>
</dt>
<dd>
<fork href= "../PropertyConsts.html#getDataTypes" ><code
>int getDataTypes(int)</code ></fork>
</dd>
<dt>
<fork href= "../PropertyConsts.html#traitMappings" ><code
>int[] traitMappings</code ></fork>
</dt>
<dd>
<em>No access method yet defined.</em>
</dd>
<dt>
<fork href= "../PropertyConsts.html#initialValueTypes" ><code
>int[] initialValueTypes</code ></fork>
</dt>
<dd>
<fork href= "../PropertyConsts.html#getInitialValueTypes" ><code
>int getInitialValueTypes(int)</code ></fork>
</dd>
<dt>
<fork href= "../PropertyConsts.html#inherited" ><code
>int[] inherited</code ></fork>
</dt>
<dd>
<fork href= "../PropertyConsts.html#inheritance" ><code
>int inheritance(int)</code ></fork>
</dd>
</dl>
</section>
</body>
</document>
1.1
xml-fop/src/documentation/content/xdocs/design/alt.design/properties/property-methods.xml
Index: property-methods.xml
===================================================================
<?xml version="1.0" standalone="no"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN"
"http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/resources/schema/dtd/document-v11.dtd">
<document>
<header>
<title>Property Methods Access</title>
<authors>
<person id="pbw" name="Peter B. West" email="[EMAIL PROTECTED]"/>
</authors>
</header>
<body>
<section>
<title>Introduction</title>
<p>
The <link href= "property-data.html" >previous section</link>
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>
</section>
<section>
<title>Generating & Accessing Initial Values</title>
<p>
<fork href= "AutoRestore.html"
>org.apache.fop.fo.properties.AutoRestore</fork> is an example
of a 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 <code >PropertyValue getInitialValue(int)</code >
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 <fork href= "../PropertyConsts.html" ><code
>PropertyConsts</code ></fork> singleton <fork href=
"../PropertyConsts.html#pconsts" ><code >pconsts</code
></fork>.` As with the fields, the first invocation of the
method <fork href= "../PropertyConsts.html#setupProperty"
><code >setupProperty</code ></fork> on the property
instantiates the singleton instance of the class, and stores
that instance in the in the <fork href=
"../PropertyConsts.html#properties" ><code >Property[]
properties</code ></fork> array of <fork href=
"../PropertyConsts.html#pconsts" ><code >pconsts</code
></fork>.
</p>
<p>
Unlike the static data fields, however, the initial value is
not immediately generated. It is generated by a call to <fork
href= "../PropertyConsts.html#getInitialValue" ><code
>PropertyValue getInitialValue(int)</code ></fork> in <fork
href= "../PropertyConsts.html#pconsts" ><code >pconsts</code
></fork>. A side-effect of this call is to store the initial
value in <fork
href="../PropertyConsts.html#initialValues"><code
>PropertyValue[] initialValues</code ></fork>.
</p>
</section>
</body>
</document>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]