From ff2207dff9c1564adbf272f2d6f3e946af9b4b21 Mon Sep 17 00:00:00 2001 From: Peter Bernard West Date: Tue, 24 Dec 2002 01:25:18 +0000 Subject: [PATCH] WIP git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195798 13f79535-47bb-0310-9956-ffa450edef68 --- .../properties/PropertyConsts-class.xml | 30 ++++ .../design/alt.design/properties/book.xml | 20 +++ .../design/alt.design/properties/index.xml | 27 ++++ .../alt.design/properties/property-data.xml | 142 ++++++++++++++++++ .../properties/property-methods.xml | 68 +++++++++ 5 files changed, 287 insertions(+) create mode 100644 src/documentation/content/xdocs/design/alt.design/properties/PropertyConsts-class.xml create mode 100644 src/documentation/content/xdocs/design/alt.design/properties/book.xml create mode 100644 src/documentation/content/xdocs/design/alt.design/properties/index.xml create mode 100644 src/documentation/content/xdocs/design/alt.design/properties/property-data.xml create mode 100644 src/documentation/content/xdocs/design/alt.design/properties/property-methods.xml 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 index 000000000..3ae5730a1 --- /dev/null +++ b/src/documentation/content/xdocs/design/alt.design/properties/PropertyConsts-class.xml @@ -0,0 +1,30 @@ + + + +
+ PropertyConsts Description + + + +
+ +
+ Introduction +

+ This class, and the + singleton object which is generated by the static + initializer, is essentially a repository of the static + data from the <property> classes of + org.apache.fop.fo.property, and a common point of + access for the methods of those classes. +

+
+
+ Common static data +

+
+ +
+ 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 index 000000000..f3d677e15 --- /dev/null +++ b/src/documentation/content/xdocs/design/alt.design/properties/book.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + 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 index 000000000..6132f1884 --- /dev/null +++ b/src/documentation/content/xdocs/design/alt.design/properties/index.xml @@ -0,0 +1,27 @@ + + + + + + +
+ FOP Alternative Design Properties Notes + $Revision$ $Name$ + + + +
+ + +
+ Alt Design Properties Notes +

+ This section includes more detailed notes on the classes which + are involved in the implementation of FO properties. +

+
+ + +
+ 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 index 000000000..7258e3df6 --- /dev/null +++ b/src/documentation/content/xdocs/design/alt.design/properties/property-data.xml @@ -0,0 +1,142 @@ + + + +
+ Property Data Handling + + + +
+ +
+ Introduction +

+ An overview of the + properties and classes involved in handling properties + has already been given. This discussion will go in detail + into the way data are represented within properties. +

+
+
+ Common data + +

+ org.apache.fop.fo.properties.Character is an example + of a basic <property> class. The data fields common to + all properties are: +

+ +
+
+ final int dataTypes +
+
+ 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 org.apache.fop.fo.properties.Property, and may consist of more than one of those + constants, bit-ORed together. +
+
+ final int traitMapping +
+
+ This field defines the mapping of properties to traits in + the Area tree. The value is chosen from the + trait mapping constants defined in org.apache.fop.fo.properties.Property, and + may consist of more than one of those constants, bit-ORed + together. +
+
+ final int initialValueType +
+
+ 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 org.apache.fop.fo.properties.Property. In + the simplest <property> classes, such as + Character, + there is no defined initial value type. +
+
+ final int inherited +
+
+ This field defines the kind of inheritance applicable to the + property. The value is chosen from the inheritance + constants defined in org.apache.fop.fo.properties.Property. +
+
+
+
+ Accessing <property> Data Constants + +

+ The constants above are generally accessed through the arrays + maintained in the PropertyConsts singleton pconsts. The first invocation of the method setupProperty on the property generates a + Class instance for the class, and stores it in + the array classes. This Class object is + used, in turn, to instantiate the singleton instance of the + class, which is stored in the Property[] + properties array of pconsts. +

+ +

+ Reflection methods are then used, via the same + Class instance, to extract and store the static + data fields. These arrays and associated access methods are: +

+ +
+
+ int[] datatypes +
+
+ int getDataTypes(int) +
+
+ int[] traitMappings +
+
+ No access method yet defined. +
+
+ int[] initialValueTypes +
+
+ int getInitialValueTypes(int) +
+
+ int[] inherited +
+
+ int inheritance(int) +
+
+
+ +
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 index 000000000..6c5f46805 --- /dev/null +++ b/src/documentation/content/xdocs/design/alt.design/properties/property-methods.xml @@ -0,0 +1,68 @@ + + + +
+ Property Methods Access + + + +
+ +
+ Introduction +

+ The previous section + 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. +

+
+
+ Generating & Accessing Initial Values + +

+ org.apache.fop.fo.properties.AutoRestore 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. +

+ +

+ The method PropertyValue getInitialValue(int) + 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 PropertyConsts singleton pconsts.` As with the fields, the first invocation of the + method setupProperty on the property + instantiates the singleton instance of the class, and stores + that instance in the in the Property[] + properties array of pconsts. +

+ +

+ Unlike the static data fields, however, the initial value is + not immediately generated. It is generated by a call to PropertyValue getInitialValue(int) in pconsts. A side-effect of this call is to store the initial + value in PropertyValue[] initialValues. +

+ +
+ +
-- 2.39.5