[FOray-commit] SF.net SVN: foray: [9991] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2007-07-13 17:20:47
|
Revision: 9991
http://svn.sourceforge.net/foray/?rev=9991&view=rev
Author: victormote
Date: 2007-07-13 10:20:50 -0700 (Fri, 13 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving trait definitions to property-specific interfaces.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-13 16:55:25 UTC (rev 9990)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-13 17:20:50 UTC (rev 9991)
@@ -38,7 +38,6 @@
import org.axsl.common.value.Baseline;
import org.axsl.common.value.Conditionality;
import org.axsl.common.value.DisplayAlign;
-import org.axsl.common.value.Iso639;
import org.axsl.common.value.LineStackingStrategy;
import org.axsl.common.value.LinkType;
import org.axsl.common.value.ReferenceOrientation;
@@ -1279,15 +1278,6 @@
}
/**
- * Returns the language trait for this area.
- * @return The language trait for this area.
- * @see Fo#traitLanguage(FoContext)
- */
- public Iso639 traitLanguage() {
- return traitGeneratedBy().traitLanguage(this);
- }
-
- /**
* Returns the text-align trait for this area.
* @return The text-align trait for this area.
* @see Fo#traitTextAlign(FoContext)
@@ -1315,15 +1305,6 @@
}
/**
- * Returns the hyphenation-character trait for this area.
- * @return The hyphenation-character trait for this area.
- * @see Fo#traitWrapOption(FoContext)
- */
- public int traitHyphenationCharacter() {
- return traitGeneratedBy().traitHyphenationCharacter(this);
- }
-
- /**
* Returns the dominant-baseline trait for this area.
* @return The dominant-baseline trait for this area.
* @see Fo#traitWrapOption(FoContext)
@@ -1389,15 +1370,6 @@
}
/**
- * Returns the width of the hyphenation character.
- * @return The width, in millipoints, of the hyphenation character.
- */
- public int getHyphenWidth() {
- final int hyphenChar = traitHyphenationCharacter();
- return getCharWidth(hyphenChar);
- }
-
- /**
* Returns the content rectangle measured in points (1/72 of an inch).
* @return The content rectangle in points.
*/
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2007-07-13 16:55:25 UTC (rev 9990)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2007-07-13 17:20:50 UTC (rev 9991)
@@ -37,6 +37,7 @@
import org.axsl.fo.FoContext;
import org.axsl.fo.FoNode;
import org.axsl.fo.FoTextContent;
+import org.axsl.fo.fo.Block;
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.font.Font;
import org.axsl.font.FontUse;
@@ -834,4 +835,23 @@
return traitGeneratedBy().getSecondaryFont(this, codePoint);
}
+ /**
+ * Returns the hyphenation-character trait for this area.
+ * @return The hyphenation-character trait for this area.
+ * @see Fo#traitWrapOption(FoContext)
+ */
+ public int traitHyphenationCharacter() {
+ /* TODO: Clean this method up after we clean up the construction. */
+ final Fo generatedBy = this.traitGeneratedBy();
+ if (generatedBy instanceof org.axsl.fo.fo.Character) {
+ final org.axsl.fo.fo.Character character =
+ (org.axsl.fo.fo.Character) generatedBy;
+ return character.traitHyphenationCharacter(this);
+ } else {
+ final NormalBlockArea blockArea = this.ancestorNormalBlockArea();
+ final Block block = blockArea.traitGeneratedBy();
+ return block.traitHyphenationCharacter(blockArea);
+ }
+ }
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-13 16:55:25 UTC (rev 9990)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-13 17:20:50 UTC (rev 9991)
@@ -105,6 +105,7 @@
import org.axsl.fo.fo.prop.CommonAuralPa;
import org.axsl.fo.fo.prop.CommonBorderPaddingBgPa;
import org.axsl.fo.fo.prop.CommonFontPa;
+import org.axsl.fo.fo.prop.CommonHyphenationPa;
import org.axsl.fo.fo.prop.HyphenationLadderCountPa;
import org.axsl.font.Font;
import org.axsl.font.FontConsumer;
@@ -127,7 +128,7 @@
public abstract class FObj extends FONode implements org.axsl.fo.Fo,
CommonAccessibilityPa, CommonAbsolutePositionPa,
CommonAuralPa, CommonBorderPaddingBgPa, CommonFontPa,
- HyphenationLadderCountPa {
+ CommonHyphenationPa, HyphenationLadderCountPa {
/** A static empty and immutable list of children, suitable for return by
* objects that have no children. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|