]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
WIP
authorPeter Bernard West <pbwest@apache.org>
Tue, 24 Dec 2002 01:25:18 +0000 (01:25 +0000)
committerPeter Bernard West <pbwest@apache.org>
Tue, 24 Dec 2002 01:25:18 +0000 (01:25 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195798 13f79535-47bb-0310-9956-ffa450edef68

src/documentation/content/xdocs/design/alt.design/properties/PropertyConsts-class.xml [new file with mode: 0644]
src/documentation/content/xdocs/design/alt.design/properties/book.xml [new file with mode: 0644]
src/documentation/content/xdocs/design/alt.design/properties/index.xml [new file with mode: 0644]
src/documentation/content/xdocs/design/alt.design/properties/property-data.xml [new file with mode: 0644]
src/documentation/content/xdocs/design/alt.design/properties/property-methods.xml [new file with mode: 0644]

diff --git a/src/documentation/content/xdocs/design/alt.design/properties/PropertyConsts-class.xml b/src/documentation/content/xdocs/design/alt.design/properties/PropertyConsts-class.xml
new file mode 100644 (file)
index 0000000..3ae5730
--- /dev/null
@@ -0,0 +1,30 @@
+<?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="pbwest@powerup.com.au"/>
+    </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 &lt;property&gt; 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>
+
diff --git a/src/documentation/content/xdocs/design/alt.design/properties/book.xml b/src/documentation/content/xdocs/design/alt.design/properties/book.xml
new file mode 100644 (file)
index 0000000..f3d677e
--- /dev/null
@@ -0,0 +1,20 @@
+<?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>
diff --git a/src/documentation/content/xdocs/design/alt.design/properties/index.xml b/src/documentation/content/xdocs/design/alt.design/properties/index.xml
new file mode 100644 (file)
index 0000000..6132f18
--- /dev/null
@@ -0,0 +1,27 @@
+<?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$ -->
+
+<document>
+  <header>
+    <title>FOP Alternative Design Properties Notes</title>
+    <version>$Revision$ $Name$</version>
+    <authors>
+      <person name="Peter B. West" email="pbwest@powerup.com.au"/>
+    </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>
+
diff --git a/src/documentation/content/xdocs/design/alt.design/properties/property-data.xml b/src/documentation/content/xdocs/design/alt.design/properties/property-data.xml
new file mode 100644 (file)
index 0000000..7258e3d
--- /dev/null
@@ -0,0 +1,142 @@
+<?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="pbwest@powerup.com.au"/>
+    </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 &lt;property&gt; 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 &lt;property&gt; 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 &lt;property&gt; 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>
diff --git a/src/documentation/content/xdocs/design/alt.design/properties/property-methods.xml b/src/documentation/content/xdocs/design/alt.design/properties/property-methods.xml
new file mode 100644 (file)
index 0000000..6c5f468
--- /dev/null
@@ -0,0 +1,68 @@
+<?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="pbwest@powerup.com.au"/>
+    </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
+        &lt;property&gt: classes.  This section discusses more complex
+        classes whose facilities are accessed only through various
+        methods.
+      </p>
+    </section>
+    <section>
+      <title>Generating &amp; 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 &lt;property&gt; 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
+        &lt;property&gt;.  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>