summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFinn Bock <bckfnn@apache.org>2004-10-20 11:50:04 +0000
committerFinn Bock <bckfnn@apache.org>2004-10-20 11:50:04 +0000
commitaecd6c8c0890ac8008a9938b20c4e7a7d5c3cb5a (patch)
tree6c305a3ed40529ff983e4ba08d77d35296e5a8e0 /src
parent3920b33fcc3928069bcf4c79cae789c0843462a7 (diff)
downloadxmlgraphics-fop-aecd6c8c0890ac8008a9938b20c4e7a7d5c3cb5a.tar.gz
xmlgraphics-fop-aecd6c8c0890ac8008a9938b20c4e7a7d5c3cb5a.zip
Third phase of performance improvement.
- Follow the spec for property types and names. PR: 31699 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198076 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/fop/fo/properties/CommonAccessibility.java26
-rw-r--r--src/java/org/apache/fop/fo/properties/CommonHyphenation.java54
-rw-r--r--src/java/org/apache/fop/fo/properties/CommonMarginBlock.java66
-rw-r--r--src/java/org/apache/fop/fo/properties/CommonRelativePosition.java47
4 files changed, 172 insertions, 21 deletions
diff --git a/src/java/org/apache/fop/fo/properties/CommonAccessibility.java b/src/java/org/apache/fop/fo/properties/CommonAccessibility.java
index e3ad66e43..333099b9f 100644
--- a/src/java/org/apache/fop/fo/properties/CommonAccessibility.java
+++ b/src/java/org/apache/fop/fo/properties/CommonAccessibility.java
@@ -18,16 +18,40 @@
package org.apache.fop.fo.properties;
+import org.apache.fop.fo.Constants;
+import org.apache.fop.fo.PropertyList;
+
/**
* Store all common accessibility properties.
* See Sec 7.4 of the XSL-FO Standard.
* Public "structure" allows direct member access.
*/
public class CommonAccessibility {
+ /**
+ * The "source-doc" property.
+ */
public String sourceDoc = null;
+
+ /**
+ * The "role" property.
+ */
public String role = null;
- public CommonAccessibility() {
+ /**
+ * Create a CommonAbsolutePosition object.
+ * @param pList The PropertyList with propery values.
+ */
+ public CommonAccessibility(PropertyList pList) {
+ sourceDoc = pList.get(Constants.PR_SOURCE_DOCUMENT).getString();
+ if ("none".equals(sourceDoc)) {
+ sourceDoc = null;
+ }
+ role = pList.get(Constants.PR_ROLE).getString();
+ if ("none".equals(role)) {
+ role = null;
+ }
+
}
+
}
diff --git a/src/java/org/apache/fop/fo/properties/CommonHyphenation.java b/src/java/org/apache/fop/fo/properties/CommonHyphenation.java
index 5a409adba..82b87059c 100644
--- a/src/java/org/apache/fop/fo/properties/CommonHyphenation.java
+++ b/src/java/org/apache/fop/fo/properties/CommonHyphenation.java
@@ -18,18 +18,64 @@
package org.apache.fop.fo.properties;
+import org.apache.fop.fo.Constants;
+import org.apache.fop.fo.PropertyList;
+
/**
* Store all common hyphenation properties.
* See Sec. 7.9 of the XSL-FO Standard.
* Public "structure" allows direct member access.
*/
public class CommonHyphenation {
+ /**
+ * The "language" property.
+ */
+ public String language;
+
+ /**
+ * The "country" property.
+ */
+ public String country;
+
+ /**
+ * The "script" property.
+ */
+ public String script;
+
+ /**
+ * The "hyphenate" property.
+ */
+ public int hyphenate;
- public int hyphenate; // Enum true or false: store as boolean!
- public char hyphenationChar;
+ /**
+ * The "hyphenation-character" property.
+ */
+ public char hyphenationCharacter;
+
+ /**
+ * The "hyphenation-push-character" property.
+ */
public int hyphenationPushCharacterCount;
+
+ /**
+ * The "hyphenation-remain-character-count" property.
+ */
public int hyphenationRemainCharacterCount;
- public String language; // Language code or enum "NONE"
- public String country; // Country code or enum "NONE"
+
+ /**
+ * Create a CommonHyphenation object.
+ * @param pList The PropertyList with propery values.
+ */
+ public CommonHyphenation(PropertyList pList) {
+ language = pList.get(Constants.PR_LANGUAGE).getString();
+ country = pList.get(Constants.PR_COUNTRY).getString();
+ hyphenate = pList.get(Constants.PR_HYPHENATE).getEnum();
+ hyphenationCharacter = pList.get(Constants.PR_HYPHENATION_CHARACTER).getCharacter();
+ hyphenationPushCharacterCount =
+ pList.get(Constants.PR_HYPHENATION_PUSH_CHARACTER_COUNT).getNumber().intValue();
+ hyphenationRemainCharacterCount =
+ pList.get(Constants.PR_HYPHENATION_REMAIN_CHARACTER_COUNT).getNumber().intValue();
+
+ }
}
diff --git a/src/java/org/apache/fop/fo/properties/CommonMarginBlock.java b/src/java/org/apache/fop/fo/properties/CommonMarginBlock.java
index 4832ae2d4..5c4fc16d8 100644
--- a/src/java/org/apache/fop/fo/properties/CommonMarginBlock.java
+++ b/src/java/org/apache/fop/fo/properties/CommonMarginBlock.java
@@ -18,20 +18,70 @@
package org.apache.fop.fo.properties;
+import org.apache.fop.datatypes.Length;
+import org.apache.fop.fo.Constants;
+import org.apache.fop.fo.PropertyList;
+
/**
* Store all common margin properties for blocks.
* See Sec. 7.10 of the XSL-FO Standard.
* Public "structure" allows direct member access.
*/
public class CommonMarginBlock {
+ /**
+ * The "margin-top" property.
+ */
+ public Length marginTop;
+
+ /**
+ * The "margin-bottom" property.
+ */
+ public Length marginBottom;
+
+ /**
+ * The "margin-left" property.
+ */
+ public Length marginLeft;
+
+ /**
+ * The "margin-right" property.
+ */
+ public Length marginRight;
+
+ /**
+ * The "space-before" property.
+ */
+ public SpaceProperty spaceBefore;
+
+ /**
+ * The "space-after" property.
+ */
+ public SpaceProperty spaceAfter;
+
+ /**
+ * The "start-indent" property.
+ */
+ public Length startIndent;
+
+ /**
+ * The "end-indent" property.
+ */
+ public Length endIndent;
+
+ /**
+ * Create a CommonMarginBlock object.
+ * @param pList The PropertyList with propery values.
+ */
+ public CommonMarginBlock(PropertyList pList) {
+ marginTop = pList.get(Constants.PR_MARGIN_TOP).getLength();
+ marginBottom = pList.get(Constants.PR_MARGIN_BOTTOM).getLength();
+ marginLeft = pList.get(Constants.PR_MARGIN_LEFT).getLength();
+ marginRight = pList.get(Constants.PR_MARGIN_RIGHT).getLength();
- public int marginTop;
- public int marginBottom;
- public int marginLeft;
- public int marginRight;
- public int spaceBefore;
- public int spaceAfter;
- public int startIndent;
- public int endIndent;
+ spaceBefore = pList.get(Constants.PR_SPACE_BEFORE).getSpace();
+ spaceAfter = pList.get(Constants.PR_SPACE_AFTER).getSpace();
+ startIndent = pList.get(Constants.PR_START_INDENT).getLength();
+ endIndent = pList.get(Constants.PR_END_INDENT).getLength();
+ }
}
diff --git a/src/java/org/apache/fop/fo/properties/CommonRelativePosition.java b/src/java/org/apache/fop/fo/properties/CommonRelativePosition.java
index ceea693a6..f400c8272 100644
--- a/src/java/org/apache/fop/fo/properties/CommonRelativePosition.java
+++ b/src/java/org/apache/fop/fo/properties/CommonRelativePosition.java
@@ -18,20 +18,51 @@
package org.apache.fop.fo.properties;
+import org.apache.fop.datatypes.Length;
+import org.apache.fop.fo.Constants;
+import org.apache.fop.fo.PropertyList;
+
/**
* Store all common relative position properties.
* See Sec 7.12 of the XSL-FO Standard.
* Public "structure" allows direct member access.
*/
public class CommonRelativePosition {
+ /**
+ * The "relative-position" property.
+ */
+ public int relativePosition;
+
+ /**
+ * The "top" property.
+ */
+ public Length top;
+
+ /**
+ * The "right" property.
+ */
+ public Length right;
+
+ /**
+ * The "bottom" property.
+ */
+ public Length bottom;
+
+ /**
+ * The "left" property.
+ */
+ public Length left;
- public int marginTop;
- public int marginBottom;
- public int marginLeft;
- public int marginRight;
- public int spaceBefore;
- public int spaceAfter;
- public int startIndent;
- public int endIndent;
+ /**
+ * Create a CommonRelativePosition object.
+ * @param pList The PropertyList with propery values.
+ */
+ public CommonRelativePosition(PropertyList pList) {
+ relativePosition = pList.get(Constants.PR_RELATIVE_POSITION).getEnum();
+ top = pList.get(Constants.PR_TOP).getLength();
+ bottom = pList.get(Constants.PR_BOTTOM).getLength();
+ left = pList.get(Constants.PR_LEFT).getLength();
+ right = pList.get(Constants.PR_RIGHT).getLength();
+ }
}