Thread: [FOray-commit] SF.net SVN: foray: [10025] trunk/foray (Page 19)
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2007-07-17 23:42:13
|
Revision: 10025
http://svn.sourceforge.net/foray/?rev=10025&view=rev
Author: victormote
Date: 2007-07-17 16:42:15 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new 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/PageRA.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-17 23:28:12 UTC (rev 10024)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-17 23:42:15 UTC (rev 10025)
@@ -858,24 +858,6 @@
}
/**
- * Returns the page-width trait of this area.
- * @return The page-width trait of this area.
- * @see Fo#traitPageWidth()
- */
- public int traitPageWidth() {
- return traitGeneratedBy().traitPageWidth();
- }
-
- /**
- * Returns the page-height trait of this area.
- * @return The page-height trait of this area.
- * @see Fo#traitPageHeight()
- */
- public int traitPageHeight() {
- return traitGeneratedBy().traitPageHeight();
- }
-
- /**
* Tells which axis (horizontal or vertical) is the block-progression axis.
* @return Either {@link AbsoluteAxis#HORIZONTAL} or
* {@link AbsoluteAxis#VERTICAL}, or null if writing-mode is invalid.
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2007-07-17 23:28:12 UTC (rev 10024)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2007-07-17 23:42:15 UTC (rev 10025)
@@ -890,4 +890,20 @@
return traitGeneratedBy().traitSpaceEndOptimum(this);
}
+ /**
+ * Returns the page-width trait of this area.
+ * @return The page-width trait of this area.
+ */
+ public int traitPageWidth() {
+ return traitGeneratedBy().traitPageWidth();
+ }
+
+ /**
+ * Returns the page-height trait of this area.
+ * @return The page-height trait of this area.
+ */
+ public int traitPageHeight() {
+ return traitGeneratedBy().traitPageHeight();
+ }
+
}
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-17 23:28:12 UTC (rev 10024)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-17 23:42:15 UTC (rev 10025)
@@ -132,8 +132,10 @@
import org.axsl.fo.fo.prop.IndicateDestinationPa;
import org.axsl.fo.fo.prop.InternalDestinationPa;
import org.axsl.fo.fo.prop.LeaderPa;
+import org.axsl.fo.fo.prop.ListBlockPa;
import org.axsl.fo.fo.prop.MediaUsagePa;
import org.axsl.fo.fo.prop.NumberColumnsRepeatedPa;
+import org.axsl.fo.fo.prop.PageDimensionPa;
import org.axsl.fo.fo.prop.TableBorderPrecedencePa;
import org.axsl.font.Font;
import org.axsl.font.FontConsumer;
@@ -163,9 +165,9 @@
DestinationPlacementOffsetPa, DirectionPa, EmptyCellsPa, ExtentPa,
ExternalDestinationPa, FloatPa, FlowNamePa, GlyphOrientationPa,
IndicateDestinationPa,
- InternalDestinationPa, LeaderPa,
+ InternalDestinationPa, LeaderPa, ListBlockPa,
MediaUsagePa, NumberColumnsRepeatedPa,
- TableBorderPrecedencePa {
+ PageDimensionPa, TableBorderPrecedencePa {
/** 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.
|
|
From: <vic...@us...> - 2007-07-18 16:08:01
|
Revision: 10032
http://svn.sourceforge.net/foray/?rev=10032&view=rev
Author: victormote
Date: 2007-07-18 09:07:58 -0700 (Wed, 18 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new property-specific interfaces.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.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-18 15:46:57 UTC (rev 10031)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-18 16:07:58 UTC (rev 10032)
@@ -38,7 +38,6 @@
import org.axsl.common.value.Baseline;
import org.axsl.common.value.DisplayAlign;
import org.axsl.common.value.LinkType;
-import org.axsl.common.value.ReferenceOrientation;
import org.axsl.common.value.RelativeAxis;
import org.axsl.common.value.TextAlign;
import org.axsl.common.value.WhiteSpaceTreatment;
@@ -1014,14 +1013,6 @@
}
/**
- * Returns the reference-orientation trait for this area.
- * @return The reference-orientation trait for this area.
- */
- public ReferenceOrientation traitReferenceOrientation() {
- return traitGeneratedBy().traitReferenceOrientation(this);
- }
-
- /**
* Returns the cumulative reference orientation for this area.
* @return The cumulative reference orientation for this area, in degrees.
*/
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-18 15:46:57 UTC (rev 10031)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-18 16:07:58 UTC (rev 10032)
@@ -108,6 +108,7 @@
import org.axsl.fo.fo.prop.CaptionSidePa;
import org.axsl.fo.fo.prop.CaseNamePa;
import org.axsl.fo.fo.prop.CaseTitlePa;
+import org.axsl.fo.fo.prop.ClearPa;
import org.axsl.fo.fo.prop.ClipPa;
import org.axsl.fo.fo.prop.ColorProfileNamePa;
import org.axsl.fo.fo.prop.ColumnCountPa;
@@ -134,6 +135,7 @@
import org.axsl.fo.fo.prop.MediaUsagePa;
import org.axsl.fo.fo.prop.NumberColumnsRepeatedPa;
import org.axsl.fo.fo.prop.PageDimensionPa;
+import org.axsl.fo.fo.prop.ReferenceOrientationPa;
import org.axsl.fo.fo.prop.RenderingIntentPa;
import org.axsl.fo.fo.prop.StartingStatePa;
import org.axsl.fo.fo.prop.SuppressAtLineBreakPa;
@@ -143,6 +145,7 @@
import org.axsl.fo.fo.prop.TextShadowPa;
import org.axsl.fo.fo.prop.TreatAsWordSpacePa;
import org.axsl.fo.fo.prop.UnicodeBidiPa;
+import org.axsl.fo.fo.prop.VisibilityPa;
import org.axsl.fo.fo.prop.ZIndexPa;
import org.axsl.font.Font;
import org.axsl.font.FontConsumer;
@@ -167,17 +170,16 @@
CommonAuralPa, CommonBorderPaddingBgPa, CommonFontPa,
CommonHyphenationPa, CommonMarginBlockPa, CommonMarginInlinePa,
CommonRelativePositionPa, ActiveStatePa, AutoRestorePa, BasicLinkPa,
- BlockPa,
- CaptionSidePa, CaseNamePa,
- CaseTitlePa, ClipPa, ColorProfileNamePa, ColumnCountPa, ColumnGapPa,
+ BlockPa, CaptionSidePa, CaseNamePa, CaseTitlePa, ClearPa, ClipPa,
+ ColorProfileNamePa, ColumnCountPa, ColumnGapPa,
DirectionPa, EmptyCellsPa, ExtentPa,
ExternalDestinationPa, FloatPa, FlowNamePa, GlyphOrientationPa,
InternalDestinationPa, LeaderPa, ListBlockPa,
MediaUsagePa, NumberColumnsRepeatedPa,
- PageDimensionPa, RenderingIntentPa,
+ PageDimensionPa, ReferenceOrientationPa, RenderingIntentPa,
StartingStatePa, SuppressAtLineBreakPa, SwitchToPa,
TableBorderPrecedencePa, TablePa, TextShadowPa, TreatAsWordSpacePa,
- UnicodeBidiPa,
+ UnicodeBidiPa, VisibilityPa,
ZIndexPa {
/** A static empty and immutable list of children, suitable for return by
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-18 16:35:40
|
Revision: 10033
http://svn.sourceforge.net/foray/?rev=10033&view=rev
Author: victormote
Date: 2007-07-18 09:35:40 -0700 (Wed, 18 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new 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/LineArea.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-18 16:07:58 UTC (rev 10032)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-18 16:35:40 UTC (rev 10033)
@@ -35,7 +35,6 @@
import org.axsl.common.value.AbsoluteAxis;
import org.axsl.common.value.AbsoluteDirection;
import org.axsl.common.value.AlignmentBaseline;
-import org.axsl.common.value.Baseline;
import org.axsl.common.value.DisplayAlign;
import org.axsl.common.value.LinkType;
import org.axsl.common.value.RelativeAxis;
@@ -1096,15 +1095,6 @@
}
/**
- * Returns the dominant-baseline trait for this area.
- * @return The dominant-baseline trait for this area.
- * @see Fo#traitWrapOption(FoContext)
- */
- public Baseline traitDominantBaseline() {
- return traitGeneratedBy().traitDominantBaseline(this);
- }
-
- /**
* {@inheritDoc}
*/
public String destinationName() {
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-07-18 16:07:58 UTC (rev 10032)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-07-18 16:35:40 UTC (rev 10033)
@@ -723,7 +723,12 @@
public int alignmentPointOffset() {
final AbsoluteAxis axis = this.getWritingMode().getAbsoluteAxis(
RelativeAxis.INLINE_PROGRESSION);
- final Baseline baseline = this.traitDominantBaseline();
+ /* TODO: The following line is commented out because it relied on logic
+ * that is no longer valid, that is, the idea that dominant-baseline
+ * could be set on a line or any other block or reference area. This
+ * whole issue needs to be revisited. */
+// final Baseline baseline = this.traitDominantBaseline();
+ final Baseline baseline = Baseline.ALPHABETIC;
final Font font = this.getPrimaryFont().getFont();
return font.baselineOffset(axis, baseline, this.traitFontSize());
}
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-18 16:07:58 UTC (rev 10032)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-18 16:35:40 UTC (rev 10033)
@@ -122,7 +122,9 @@
import org.axsl.fo.fo.prop.CommonMarginBlockPa;
import org.axsl.fo.fo.prop.CommonMarginInlinePa;
import org.axsl.fo.fo.prop.CommonRelativePositionPa;
+import org.axsl.fo.fo.prop.ContentTypePa;
import org.axsl.fo.fo.prop.DirectionPa;
+import org.axsl.fo.fo.prop.DominantBaselinePa;
import org.axsl.fo.fo.prop.EmptyCellsPa;
import org.axsl.fo.fo.prop.ExtentPa;
import org.axsl.fo.fo.prop.ExternalDestinationPa;
@@ -137,6 +139,7 @@
import org.axsl.fo.fo.prop.PageDimensionPa;
import org.axsl.fo.fo.prop.ReferenceOrientationPa;
import org.axsl.fo.fo.prop.RenderingIntentPa;
+import org.axsl.fo.fo.prop.ScoreSpacesPa;
import org.axsl.fo.fo.prop.StartingStatePa;
import org.axsl.fo.fo.prop.SuppressAtLineBreakPa;
import org.axsl.fo.fo.prop.SwitchToPa;
@@ -171,13 +174,13 @@
CommonHyphenationPa, CommonMarginBlockPa, CommonMarginInlinePa,
CommonRelativePositionPa, ActiveStatePa, AutoRestorePa, BasicLinkPa,
BlockPa, CaptionSidePa, CaseNamePa, CaseTitlePa, ClearPa, ClipPa,
- ColorProfileNamePa, ColumnCountPa, ColumnGapPa,
- DirectionPa, EmptyCellsPa, ExtentPa,
+ ColorProfileNamePa, ColumnCountPa, ColumnGapPa, ContentTypePa,
+ DirectionPa, DominantBaselinePa, EmptyCellsPa, ExtentPa,
ExternalDestinationPa, FloatPa, FlowNamePa, GlyphOrientationPa,
InternalDestinationPa, LeaderPa, ListBlockPa,
MediaUsagePa, NumberColumnsRepeatedPa,
PageDimensionPa, ReferenceOrientationPa, RenderingIntentPa,
- StartingStatePa, SuppressAtLineBreakPa, SwitchToPa,
+ ScoreSpacesPa, StartingStatePa, SuppressAtLineBreakPa, SwitchToPa,
TableBorderPrecedencePa, TablePa, TextShadowPa, TreatAsWordSpacePa,
UnicodeBidiPa, VisibilityPa,
ZIndexPa {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-18 17:00:47
|
Revision: 10034
http://svn.sourceforge.net/foray/?rev=10034&view=rev
Author: victormote
Date: 2007-07-18 10:00:49 -0700 (Wed, 18 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new 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/SpanRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.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-18 16:35:40 UTC (rev 10033)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-18 17:00:49 UTC (rev 10034)
@@ -35,12 +35,10 @@
import org.axsl.common.value.AbsoluteAxis;
import org.axsl.common.value.AbsoluteDirection;
import org.axsl.common.value.AlignmentBaseline;
-import org.axsl.common.value.DisplayAlign;
import org.axsl.common.value.LinkType;
import org.axsl.common.value.RelativeAxis;
import org.axsl.common.value.TextAlign;
import org.axsl.common.value.WhiteSpaceTreatment;
-import org.axsl.common.value.WrapOption;
import org.axsl.common.value.WritingMode;
import org.axsl.fo.Fo;
import org.axsl.fo.FoContext;
@@ -1059,15 +1057,6 @@
}
/**
- * Returns the wrap-option trait for this area.
- * @return The wrap-option trait for this area.
- * @see Fo#traitWrapOption(FoContext)
- */
- public WrapOption traitWrapOption() {
- return traitGeneratedBy().traitWrapOption(this);
- }
-
- /**
* Returns the text-align trait for this area.
* @return The text-align trait for this area.
* @see Fo#traitTextAlign(FoContext)
@@ -1219,14 +1208,6 @@
}
/**
- * Returns the display-align trait for this Area.
- * @return The display-align trait.
- */
- public DisplayAlign traitDisplayAlign() {
- return this.traitGeneratedBy().traitDisplayAlign(this);
- }
-
- /**
* Returns the area-class trait for this Area.
* @return The area-class trait for this Area.
* @see "XSL-FO 1.1, Section 4.2.5."
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java 2007-07-18 16:35:40 UTC (rev 10033)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java 2007-07-18 17:00:49 UTC (rev 10034)
@@ -31,8 +31,8 @@
import org.axsl.area.AreaTreeException;
import org.axsl.common.value.RelativeAxis;
import org.axsl.common.value.Span;
-import org.axsl.fo.Fo;
import org.axsl.fo.fo.RegionBody;
+import org.axsl.fo.fo.prop.SpanPa;
import org.axsl.galley.RenderVisitor;
import java.util.ArrayList;
@@ -231,7 +231,7 @@
* location in the AreaTree.
* @return SpanRA The SpanRA instance into which fo should be placed.
*/
- public SpanRA spanForNextFO(final Fo fo) {
+ public SpanRA spanForNextFO(final SpanPa fo) {
/*
* If the current page only intrinsically has one column, then there is
* only one span per page.
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java 2007-07-18 16:35:40 UTC (rev 10033)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java 2007-07-18 17:00:49 UTC (rev 10034)
@@ -709,4 +709,12 @@
return 0;
}
+ /**
+ * Returns the display-align trait for this Area.
+ * @return The display-align trait.
+ */
+ public DisplayAlign traitDisplayAlign() {
+ return this.traitGeneratedBy().traitDisplayAlign(this);
+ }
+
}
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-18 16:35:40 UTC (rev 10033)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2007-07-18 17:00:49 UTC (rev 10034)
@@ -838,7 +838,6 @@
/**
* 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. */
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-18 16:35:40 UTC (rev 10033)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-18 17:00:49 UTC (rev 10034)
@@ -124,6 +124,7 @@
import org.axsl.fo.fo.prop.CommonRelativePositionPa;
import org.axsl.fo.fo.prop.ContentTypePa;
import org.axsl.fo.fo.prop.DirectionPa;
+import org.axsl.fo.fo.prop.DisplayAlignPa;
import org.axsl.fo.fo.prop.DominantBaselinePa;
import org.axsl.fo.fo.prop.EmptyCellsPa;
import org.axsl.fo.fo.prop.ExtentPa;
@@ -140,6 +141,7 @@
import org.axsl.fo.fo.prop.ReferenceOrientationPa;
import org.axsl.fo.fo.prop.RenderingIntentPa;
import org.axsl.fo.fo.prop.ScoreSpacesPa;
+import org.axsl.fo.fo.prop.SpanPa;
import org.axsl.fo.fo.prop.StartingStatePa;
import org.axsl.fo.fo.prop.SuppressAtLineBreakPa;
import org.axsl.fo.fo.prop.SwitchToPa;
@@ -149,6 +151,7 @@
import org.axsl.fo.fo.prop.TreatAsWordSpacePa;
import org.axsl.fo.fo.prop.UnicodeBidiPa;
import org.axsl.fo.fo.prop.VisibilityPa;
+import org.axsl.fo.fo.prop.WrapOptionPa;
import org.axsl.fo.fo.prop.ZIndexPa;
import org.axsl.font.Font;
import org.axsl.font.FontConsumer;
@@ -175,14 +178,15 @@
CommonRelativePositionPa, ActiveStatePa, AutoRestorePa, BasicLinkPa,
BlockPa, CaptionSidePa, CaseNamePa, CaseTitlePa, ClearPa, ClipPa,
ColorProfileNamePa, ColumnCountPa, ColumnGapPa, ContentTypePa,
- DirectionPa, DominantBaselinePa, EmptyCellsPa, ExtentPa,
+ DirectionPa, DisplayAlignPa, DominantBaselinePa, EmptyCellsPa, ExtentPa,
ExternalDestinationPa, FloatPa, FlowNamePa, GlyphOrientationPa,
InternalDestinationPa, LeaderPa, ListBlockPa,
MediaUsagePa, NumberColumnsRepeatedPa,
PageDimensionPa, ReferenceOrientationPa, RenderingIntentPa,
- ScoreSpacesPa, StartingStatePa, SuppressAtLineBreakPa, SwitchToPa,
+ ScoreSpacesPa, SpanPa, StartingStatePa, SuppressAtLineBreakPa,
+ SwitchToPa,
TableBorderPrecedencePa, TablePa, TextShadowPa, TreatAsWordSpacePa,
- UnicodeBidiPa, VisibilityPa,
+ UnicodeBidiPa, VisibilityPa, WrapOptionPa,
ZIndexPa {
/** A static empty and immutable list of children, suitable for return by
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-18 17:30:59
|
Revision: 10036
http://svn.sourceforge.net/foray/?rev=10036&view=rev
Author: victormote
Date: 2007-07-18 10:31:01 -0700 (Wed, 18 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new 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/PageNumberCitationArea.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-18 17:16:03 UTC (rev 10035)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-18 17:31:01 UTC (rev 10036)
@@ -1075,15 +1075,6 @@
}
/**
- * Returns the ref-id trait for this area.
- * @return The ref-id trait for this area.
- * @see Fo#traitRefId(FoContext)
- */
- public String traitRefId() {
- return traitGeneratedBy().traitRefId(this);
- }
-
- /**
* {@inheritDoc}
*/
public String destinationName() {
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java 2007-07-18 17:16:03 UTC (rev 10035)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java 2007-07-18 17:31:01 UTC (rev 10036)
@@ -301,4 +301,12 @@
return traitGeneratedBy().traitSpaceEndOptimum(this);
}
+ /**
+ * Returns the ref-id trait for this area.
+ * @return The ref-id trait for this area.
+ */
+ public String traitRefId() {
+ return traitGeneratedBy().traitRefId(this);
+ }
+
}
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-18 17:16:03 UTC (rev 10035)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-18 17:31:01 UTC (rev 10036)
@@ -137,13 +137,16 @@
import org.axsl.fo.fo.prop.ListBlockPa;
import org.axsl.fo.fo.prop.MediaUsagePa;
import org.axsl.fo.fo.prop.NumberColumnsRepeatedPa;
+import org.axsl.fo.fo.prop.OverflowPa;
import org.axsl.fo.fo.prop.PageDimensionPa;
import org.axsl.fo.fo.prop.PageSequencePa;
+import org.axsl.fo.fo.prop.RefIdPa;
import org.axsl.fo.fo.prop.ReferenceOrientationPa;
import org.axsl.fo.fo.prop.RelativeAlignPa;
import org.axsl.fo.fo.prop.RenderingIntentPa;
import org.axsl.fo.fo.prop.ScoreSpacesPa;
import org.axsl.fo.fo.prop.SpanPa;
+import org.axsl.fo.fo.prop.SrcPa;
import org.axsl.fo.fo.prop.StartingStatePa;
import org.axsl.fo.fo.prop.SuppressAtLineBreakPa;
import org.axsl.fo.fo.prop.SwitchToPa;
@@ -183,10 +186,11 @@
DirectionPa, DisplayAlignPa, DominantBaselinePa, EmptyCellsPa, ExtentPa,
ExternalDestinationPa, FloatPa, FlowNamePa, GlyphOrientationPa,
InternalDestinationPa, LeaderPa, ListBlockPa,
- MediaUsagePa, NumberColumnsRepeatedPa, PageDimensionPa, PageSequencePa,
- ReferenceOrientationPa, RelativeAlignPa,
+ MediaUsagePa, NumberColumnsRepeatedPa, OverflowPa, PageDimensionPa,
+ PageSequencePa,
+ ReferenceOrientationPa, RefIdPa, RelativeAlignPa,
RenderingIntentPa,
- ScoreSpacesPa, SpanPa, StartingStatePa, SuppressAtLineBreakPa,
+ ScoreSpacesPa, SpanPa, SrcPa, StartingStatePa, SuppressAtLineBreakPa,
SwitchToPa,
TableBorderPrecedencePa, TablePa, TextShadowPa, TreatAsWordSpacePa,
UnicodeBidiPa, VisibilityPa, WrapOptionPa,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-18 18:48:52
|
Revision: 10037
http://svn.sourceforge.net/foray/?rev=10037&view=rev
Author: victormote
Date: 2007-07-18 11:48:55 -0700 (Wed, 18 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new property-specific interfaces.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java 2007-07-18 17:31:01 UTC (rev 10036)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java 2007-07-18 18:48:55 UTC (rev 10037)
@@ -30,6 +30,8 @@
import org.axsl.area.AreaTreeException;
import org.axsl.common.value.RelativeAxis;
+import org.axsl.fo.Fo;
+import org.axsl.fo.fo.prop.BaselineShiftPa;
import org.axsl.galley.GeneralInlineArea;
import java.awt.Color;
@@ -113,7 +115,15 @@
* @return The baseline shift, in millipoints.
*/
public int traitBaselineShift() {
- return traitGeneratedBy().traitBaselineShift(this);
+ /* TODO: Add an "Inline" super-interface to the aXSL FO Tree stuff so
+ * that this can be cleaned up. */
+ final Fo generatedBy = traitGeneratedBy();
+ if (generatedBy instanceof BaselineShiftPa) {
+ final BaselineShiftPa baselineShiftFo = (BaselineShiftPa)
+ generatedBy;
+ return baselineShiftFo.traitBaselineShift(this);
+ }
+ return 0;
}
/**
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-18 17:31:01 UTC (rev 10036)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-18 18:48:55 UTC (rev 10037)
@@ -34,7 +34,6 @@
import org.axsl.area.BlockContainerRefArea;
import org.axsl.common.value.AbsoluteAxis;
import org.axsl.common.value.AbsoluteDirection;
-import org.axsl.common.value.AlignmentBaseline;
import org.axsl.common.value.LinkType;
import org.axsl.common.value.RelativeAxis;
import org.axsl.common.value.TextAlign;
@@ -1066,15 +1065,6 @@
}
/**
- * Returns the alignment-baseline trait for this area.
- * @return The alignment-baseline trait for this area.
- * @see Fo#traitAlignmentBaseline(FoContext)
- */
- public AlignmentBaseline traitAlignmentBaseline() {
- return traitGeneratedBy().traitAlignmentBaseline(this);
- }
-
- /**
* {@inheritDoc}
*/
public String destinationName() {
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-18 17:31:01 UTC (rev 10036)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-18 18:48:55 UTC (rev 10037)
@@ -102,7 +102,10 @@
import org.axsl.fo.FoTreeException;
import org.axsl.fo.fo.Marker;
import org.axsl.fo.fo.prop.ActiveStatePa;
+import org.axsl.fo.fo.prop.AlignmentAdjustPa;
+import org.axsl.fo.fo.prop.AlignmentBaselinePa;
import org.axsl.fo.fo.prop.AutoRestorePa;
+import org.axsl.fo.fo.prop.BaselineShiftPa;
import org.axsl.fo.fo.prop.BasicLinkPa;
import org.axsl.fo.fo.prop.BlockPa;
import org.axsl.fo.fo.prop.CaptionSidePa;
@@ -180,7 +183,8 @@
CommonAccessibilityPa, CommonAbsolutePositionPa,
CommonAuralPa, CommonBorderPaddingBgPa, CommonFontPa,
CommonHyphenationPa, CommonMarginBlockPa, CommonMarginInlinePa,
- CommonRelativePositionPa, ActiveStatePa, AutoRestorePa, BasicLinkPa,
+ CommonRelativePositionPa, ActiveStatePa, AlignmentAdjustPa,
+ AlignmentBaselinePa, AutoRestorePa, BaselineShiftPa, BasicLinkPa,
BlockPa, CaptionSidePa, CaseNamePa, CaseTitlePa, ClearPa, ClipPa,
ColorProfileNamePa, ColumnCountPa, ColumnGapPa, ContentTypePa,
DirectionPa, DisplayAlignPa, DominantBaselinePa, EmptyCellsPa, ExtentPa,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-18 20:25:20
|
Revision: 10039
http://svn.sourceforge.net/foray/?rev=10039&view=rev
Author: victormote
Date: 2007-07-18 13:25:19 -0700 (Wed, 18 Jul 2007)
Log Message:
-----------
Conform to axsl changes rolling FoNode into Fo.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java
trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java
trunk/foray/foray-areatree/src/java/org/foray/area/BeforeFloatRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java
trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java
trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java
trunk/foray/foray-areatree/src/java/org/foray/area/FootnoteRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/NormalFlowRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTablePartPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockContainerPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FlowPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemBodyPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemLabelPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/NoLayoutPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/RetrieveMarkerPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/StaticContentPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2007-07-18 19:40:19 UTC (rev 10038)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2007-07-18 20:25:19 UTC (rev 10039)
@@ -33,7 +33,6 @@
import org.axsl.area.AreaTreeException;
import org.axsl.fo.Fo;
-import org.axsl.fo.FoNode;
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.fo.fo.Table;
import org.axsl.font.FontConsumer;
@@ -139,7 +138,7 @@
* @param graftingPoint The ancestor RetrieveMarker, if any.
* @return The linkage item.
*/
- public FOLinkage linkage(final FoNode foNode,
+ public FOLinkage linkage(final Fo foNode,
final GraftingPoint graftingPoint) {
if (foNode == null) {
return null;
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2007-07-18 19:40:19 UTC (rev 10038)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2007-07-18 20:25:19 UTC (rev 10039)
@@ -29,10 +29,9 @@
package org.foray.area;
import org.axsl.area.AreaTreeEvent;
-import org.axsl.area.AreaTreeListener;
import org.axsl.area.AreaTreeException;
+import org.axsl.area.AreaTreeListener;
import org.axsl.fo.Fo;
-import org.axsl.fo.FoNode;
import org.axsl.fo.fo.Bookmark;
import org.axsl.fo.fo.BookmarkTree;
import org.axsl.fo.fo.Marker;
@@ -410,7 +409,7 @@
* @param node The FONode whose linkage is needed.
* @return The FOLinkage for <code>node</code>, or null if there is none.
*/
- protected FOLinkage getFONodeLinkage(final FoNode node) {
+ protected FOLinkage getFONodeLinkage(final Fo node) {
final int index = node.getSequentialIndex();
if (index < 0) {
throw new IndexOutOfBoundsException("FONode has a negative "
@@ -427,7 +426,7 @@
* @param node The node whose linkage is to be set.
* @param linkage The linkage for <code>node</code>.
*/
- protected void setFONodeLinkage(final FoNode node,
+ protected void setFONodeLinkage(final Fo node,
final FOLinkage linkage) {
final int index = node.getSequentialIndex();
if (index < 0) {
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BeforeFloatRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/BeforeFloatRA.java 2007-07-18 19:40:19 UTC (rev 10038)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/BeforeFloatRA.java 2007-07-18 20:25:19 UTC (rev 10039)
@@ -198,7 +198,7 @@
* {@inheritDoc}
*/
public Fo traitGeneratedBy() {
- return (Fo) this.getLinkage().getFONode();
+ return this.getLinkage().getFONode();
}
/**
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkArea.java 2007-07-18 19:40:19 UTC (rev 10038)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/BookmarkArea.java 2007-07-18 20:25:19 UTC (rev 10039)
@@ -108,7 +108,7 @@
*/
public void makeChildren(final Bookmark bookmark) {
for (int i = 0; i < bookmark.getChildCount(); i++) {
- final Fo child = (Fo) bookmark.getChildAt(i);
+ final Fo child = bookmark.getChildAt(i);
if (child instanceof Bookmark) {
this.makeBookmarkArea((Bookmark) child);
} else if (child instanceof BookmarkTitle) {
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java 2007-07-18 19:40:19 UTC (rev 10038)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java 2007-07-18 20:25:19 UTC (rev 10039)
@@ -28,7 +28,7 @@
package org.foray.area;
-import org.axsl.fo.FoNode;
+import org.axsl.fo.Fo;
import org.axsl.fo.fo.GraftingPoint;
/**
@@ -38,13 +38,13 @@
public abstract class FOLinkage {
/** The FONode for which this linkage tracks Area generation. */
- private FoNode foGenerator;
+ private Fo foGenerator;
/**
* Constructor.
* @param foGenerator The FO node generating this linkage.
*/
- public FOLinkage(final FoNode foGenerator) {
+ public FOLinkage(final Fo foGenerator) {
this.foGenerator = foGenerator;
}
@@ -52,7 +52,7 @@
* Returns the FONode that generated this linkage.
* @return The node that generated this linkage.
*/
- public FoNode getFONode() {
+ public Fo getFONode() {
return this.foGenerator;
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java 2007-07-18 19:40:19 UTC (rev 10038)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java 2007-07-18 20:25:19 UTC (rev 10039)
@@ -28,9 +28,9 @@
package org.foray.area;
+import org.axsl.area.AreaTreeException;
import org.axsl.area.PageArea;
-import org.axsl.area.AreaTreeException;
-import org.axsl.fo.FoNode;
+import org.axsl.fo.Fo;
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.fo.fo.Marker;
import org.axsl.fo.fo.RetrieveMarker;
@@ -86,7 +86,7 @@
* @throws AreaTreeException If the <code>foGenerator</code> has no
* ancestor marker.
*/
- public FOLinkageMarker(final FoNode foGenerator)
+ public FOLinkageMarker(final Fo foGenerator)
throws AreaTreeException {
super(foGenerator);
final Marker marker = foGenerator.ancestorMarker();
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java 2007-07-18 19:40:19 UTC (rev 10038)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java 2007-07-18 20:25:19 UTC (rev 10039)
@@ -28,7 +28,7 @@
package org.foray.area;
-import org.axsl.fo.FoNode;
+import org.axsl.fo.Fo;
import org.axsl.fo.fo.RetrieveMarker;
import java.util.ArrayList;
@@ -53,7 +53,7 @@
* Constructor.
* @param foGenerator The FO node generating this linkage.
*/
- public FOLinkageNormal(final FoNode foGenerator) {
+ public FOLinkageNormal(final Fo foGenerator) {
super(foGenerator);
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FootnoteRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/FootnoteRA.java 2007-07-18 19:40:19 UTC (rev 10038)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/FootnoteRA.java 2007-07-18 20:25:19 UTC (rev 10039)
@@ -209,7 +209,7 @@
* {@inheritDoc}
*/
public Fo traitGeneratedBy() {
- return (Fo) this.getLinkage().getFONode();
+ return this.getLinkage().getFONode();
}
/**
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/NormalFlowRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/NormalFlowRA.java 2007-07-18 19:40:19 UTC (rev 10038)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/NormalFlowRA.java 2007-07-18 20:25:19 UTC (rev 10039)
@@ -296,7 +296,7 @@
* {@inheritDoc}
*/
public Fo traitGeneratedBy() {
- return (Fo) this.getLinkage().getFONode();
+ return this.getLinkage().getFONode();
}
/**
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-18 19:40:19 UTC (rev 10038)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2007-07-18 20:25:19 UTC (rev 10039)
@@ -35,7 +35,6 @@
import org.axsl.common.value.WhiteSpaceTreatment;
import org.axsl.fo.Fo;
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;
@@ -333,7 +332,7 @@
public FoTextContent getTextContent() {
/* Do NOT use the traitGeneratedBy() method here, because we need the
* raw value, and this class overrides that method. */
- final FoNode foNode = this.getLinkage().getFONode();
+ final Fo foNode = this.getLinkage().getFONode();
/* Cast verified at construction. */
return (FoTextContent) foNode;
}
@@ -752,17 +751,9 @@
/**
* {@inheritDoc}
- * Override the standard method so that, if this is not an FObj, an ancestor
- * FObj can be used instead.
*/
public Fo traitGeneratedBy() {
- final FoNode generatedBy = this.getLinkage().getFONode();
- if (generatedBy instanceof Fo) {
- /* If generated by Character. */
- return (Fo) generatedBy;
- }
- /* If generated by FOText. */
- return generatedBy.getParent();
+ return this.getLinkage().getFONode();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java 2007-07-18 19:40:19 UTC (rev 10038)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java 2007-07-18 20:25:19 UTC (rev 10039)
@@ -33,8 +33,8 @@
import org.foray.fotree.fo.obj.Marker;
import org.foray.fotree.fo.obj.Root;
+import org.axsl.fo.Fo;
import org.axsl.fo.FoContext;
-import org.axsl.fo.FoNode;
import org.axsl.fo.FoTreeException;
import org.axsl.fo.fo.GraftingPoint;
@@ -50,7 +50,7 @@
* Base class for nodes in the formatting object tree.
*/
public abstract class FONode extends AbstractOrderedTreeNode
- implements org.axsl.fo.FoNode {
+ implements org.axsl.fo.Fo {
/** The unique sequential index for this node.
* @see {@link org.axsl.fo.FONode#getSequentialIndex()} for a discussion
@@ -258,14 +258,14 @@
/**
* {@inheritDoc}
*/
- public Iterator<FoNode> iterator() {
+ public Iterator<Fo> iterator() {
return new ChildIterator();
}
/**
* Private inner class to provide an iterator over the children.
*/
- private class ChildIterator implements Iterator<FoNode> {
+ private class ChildIterator implements Iterator<Fo> {
/** Index to the next child element to be returned. */
private int nextIndex = 0;
@@ -280,7 +280,7 @@
/**
* {@inheritDoc}
*/
- public FoNode next() {
+ public Fo next() {
if (! hasNext()) {
throw new NoSuchElementException();
}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTablePartPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTablePartPL.java 2007-07-18 19:40:19 UTC (rev 10038)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/AbstractTablePartPL.java 2007-07-18 20:25:19 UTC (rev 10039)
@@ -32,7 +32,7 @@
import org.axsl.area.AreaNode;
import org.axsl.area.AreaTreeException;
import org.axsl.area.TableArea;
-import org.axsl.fo.FoNode;
+import org.axsl.fo.Fo;
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.fo.fo.Marker;
import org.axsl.fo.fo.Table;
@@ -87,7 +87,7 @@
*/
public Status layout(final AreaNode areaNode,
final GraftingPoint graftingPoint) throws AreaTreeException {
- final FoNode node = getFONode();
+ final Fo node = getFONode();
final TableArea tableArea = (TableArea) areaNode;
final Table table = tableArea.traitGeneratedBy();
if (getProgress() == FONodePL.BREAK_AFTER) {
@@ -131,10 +131,9 @@
TableRow lastRow = null;
boolean endKeepGroup = true;
for (int i = getProgress(); i < numChildren; i++) {
- final Object child = node.getChildAt(i);
+ final Fo child = node.getChildAt(i);
if (child instanceof Marker) {
- final MarkerPL markerPL = (MarkerPL) getLayoutProxy(
- (FoNode) child);
+ final MarkerPL markerPL = (MarkerPL) getLayoutProxy(child);
markerPL.layout(tableArea, graftingPoint);
continue;
}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockContainerPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockContainerPL.java 2007-07-18 19:40:19 UTC (rev 10038)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockContainerPL.java 2007-07-18 20:25:19 UTC (rev 10039)
@@ -29,10 +29,10 @@
package org.foray.pioneer;
import org.axsl.area.AreaNode;
+import org.axsl.area.AreaTreeException;
import org.axsl.area.BlockContainerRefArea;
import org.axsl.area.BlockContentFactory;
-import org.axsl.area.AreaTreeException;
-import org.axsl.fo.FoNode;
+import org.axsl.fo.Fo;
import org.axsl.fo.fo.BlockContainer;
import org.axsl.fo.fo.GraftingPoint;
@@ -74,7 +74,7 @@
bcArea.makeBlockContainerArea(this.node, graftingPoint);
for (int i = this.getProgress(); i < this.node.getChildCount(); i++) {
- final FoNode fo = this.node.getChildAt(i);
+ final Fo fo = this.node.getChildAt(i);
final FObjPL fobjPL = (FObjPL) getLayoutProxy(fo);
fobjPL.layout(blockContainer, graftingPoint);
}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java 2007-07-18 19:40:19 UTC (rev 10038)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java 2007-07-18 20:25:19 UTC (rev 10039)
@@ -29,11 +29,11 @@
package org.foray.pioneer;
import org.axsl.area.AreaNode;
+import org.axsl.area.AreaTreeException;
import org.axsl.area.BlockContentFactory;
import org.axsl.area.LineArea;
import org.axsl.area.NormalBlockArea;
-import org.axsl.area.AreaTreeException;
-import org.axsl.fo.FoNode;
+import org.axsl.fo.Fo;
import org.axsl.fo.fo.Block;
import org.axsl.fo.fo.GraftingPoint;
@@ -136,7 +136,7 @@
blockArea = bcArea.makeNormalBlockArea(node, graftingPoint);
for (int i = getProgress(); i < node.getChildCount(); i++) {
- final FoNode fo = node.getChildAt(i);
+ final Fo fo = node.getChildAt(i);
final FONodePL nodePL = this.getLayoutProxy(fo);
Status status = null;
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java 2007-07-18 19:40:19 UTC (rev 10038)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ContinuedLabelPL.java 2007-07-18 20:25:19 UTC (rev 10039)
@@ -29,9 +29,9 @@
package org.foray.pioneer;
import org.axsl.area.AreaNode;
+import org.axsl.area.AreaTreeException;
import org.axsl.area.TableArea;
-import org.axsl.area.AreaTreeException;
-import org.axsl.fo.FoNode;
+import org.axsl.fo.Fo;
import org.axsl.fo.extension.ContinuedLabel;
import org.axsl.fo.fo.GraftingPoint;
@@ -74,7 +74,7 @@
if (tableArea != null && tableArea.siblingIndex() != 0) {
final int numChildren = this.label.getChildCount();
for (int i = getProgress(); i < numChildren; i++) {
- final FoNode fo = this.label.getChildAt(i);
+ final Fo fo = this.label.getChildAt(i);
final Status status = getLayoutProxy(fo).layout(areaNode,
graftingPoint);
if (status.isIncomplete()) {
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2007-07-18 19:40:19 UTC (rev 10038)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FONodePL.java 2007-07-18 20:25:19 UTC (rev 10039)
@@ -29,16 +29,15 @@
package org.foray.pioneer;
import org.axsl.area.AreaNode;
+import org.axsl.area.AreaTreeException;
import org.axsl.area.LineArea;
import org.axsl.area.NormalBlockArea;
import org.axsl.area.TableCellArea;
import org.axsl.area.TableRowContainer;
-import org.axsl.area.AreaTreeException;
import org.axsl.fo.Fo;
import org.axsl.fo.FoContext;
import org.axsl.fo.FoLineNonText;
import org.axsl.fo.FoLineText;
-import org.axsl.fo.FoNode;
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.fo.fo.TableCell;
import org.axsl.text.TextException;
@@ -49,7 +48,7 @@
import java.util.List;
/**
- * Abstract Pioneer Layout superclass for all {@link FoNode} instances.
+ * Abstract Pioneer Layout superclass for all {@link Fo} instances.
*/
public abstract class FONodePL {
@@ -74,7 +73,7 @@
* @param realFObj The FO Tree object which is being laid out.
* @param layout The ancestor layout system.
*/
- public FONodePL(final FoNode realFObj, final PioneerLS layout) {
+ public FONodePL(final Fo realFObj, final PioneerLS layout) {
this.layout = layout;
this.layout.setLayoutProxy(realFObj, this);
}
@@ -134,7 +133,7 @@
* @param node The node for which the layout proxy is needed.
* @return The layout proxy for <code>node</code>
*/
- protected FONodePL getLayoutProxy(final FoNode node) {
+ protected FONodePL getLayoutProxy(final Fo node) {
return this.layout.getLayoutProxy(node);
}
@@ -173,12 +172,12 @@
*/
protected Status standardLayout(final AreaNode areaNode,
final GraftingPoint graftingPoint) throws AreaTreeException {
- final FoNode foNode = getFONode();
+ final Fo foNode = getFONode();
if (getProgress() == FONodePL.START) {
setProgress(0);
}
for (int i = getProgress(); i < foNode.getChildCount(); i++) {
- final FoNode fo = foNode.getChildAt(i);
+ final Fo fo = foNode.getChildAt(i);
final Status status = getLayoutProxy(fo).layout(areaNode,
graftingPoint);
if (status.isIncomplete()) {
@@ -288,12 +287,11 @@
foContext = new OverrideGraftingContext(inputLineArea,
graftingPoint);
}
- final FoNode node = this.getFONode();
+ final Fo node = this.getFONode();
LineArea lineArea = inputLineArea;
if (! (node instanceof FoLineNonText)) {
return Status.UNKNOWN;
}
- final Fo fobj = (Fo) node;
final FoLineNonText nonText = (FoLineNonText) node;
// this should start a new page
if (lineArea == null) {
@@ -316,7 +314,7 @@
if (addNonTextItemToLine(lineArea, nonText, foContext) == 1) {
return Status.OK;
}
- getLogger().error(fobj.getName() + " does not fit on line:\n"
+ getLogger().error(node.getName() + " does not fit on line:\n"
+ node.getContextMessage());
return Status.OK;
}
@@ -342,7 +340,7 @@
blockArea = areaNode.ancestorNormalBlockArea();
}
if (blockArea == null) {
- final FoNode foNode = this.getFONode();
+ final Fo foNode = this.getFONode();
throw new AreaTreeException("Layout of inline objects must be "
+ "inside a block:\n" + foNode.getContextMessage());
}
@@ -354,7 +352,7 @@
* Returns the FO Tree node that is being laid out by this layout item.
* @return The FO Tree node that is being laid out.
*/
- public abstract FoNode getFONode();
+ public abstract Fo getFONode();
/**
* Returns the layout strategy.
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjPL.java 2007-07-18 19:40:19 UTC (rev 10038)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FObjPL.java 2007-07-18 20:25:19 UTC (rev 10039)
@@ -31,7 +31,6 @@
import org.axsl.area.AreaNode;
import org.axsl.area.AreaTreeException;
import org.axsl.fo.Fo;
-import org.axsl.fo.FoNode;
import org.axsl.fo.fo.GraftingPoint;
import java.util.List;
@@ -55,9 +54,9 @@
*/
public void resetProgress() {
super.resetProgress();
- final FoNode thisNode = this.getFONode();
+ final Fo thisNode = this.getFONode();
for (int i = 0; i < thisNode.getChildCount(); i++) {
- final FoNode node = thisNode.getChildAt(i);
+ final Fo node = thisNode.getChildAt(i);
final FONodePL nodePL = getLayoutProxy(node);
nodePL.resetProgress();
}
@@ -77,11 +76,11 @@
if (getProgress() < 0) {
return snapshot;
}
- final FoNode thisNode = this.getFONode();
+ final Fo thisNode = this.getFONode();
if (thisNode.getChildCount() < 1) {
return snapshot;
}
- final FoNode node = thisNode.getChildAt(getProgress());
+ final Fo node = thisNode.getChildAt(getProgress());
final FONodePL proxy = getLayoutProxy(node);
return proxy.getProgressSnapshot(snapshot);
}
@@ -92,17 +91,17 @@
*/
public void rollback(final List<Integer> snapshot) {
super.rollback(snapshot);
- final FoNode thisNode = this.getFONode();
+ final Fo thisNode = this.getFONode();
if ((getProgress() == -1)
|| thisNode.getChildCount() < 1
|| getProgress() <= START) {
return;
}
for (int i = getProgress() + 1; i < thisNode.getChildCount(); i++) {
- final FoNode fo = thisNode.getChildAt(i);
+ final Fo fo = thisNode.getChildAt(i);
getLayoutProxy(fo).resetProgress();
}
- final FoNode node = thisNode.getChildAt(getProgress());
+ final Fo node = thisNode.getChildAt(getProgress());
getLayoutProxy(node).rollback(snapshot);
}
@@ -115,13 +114,13 @@
*/
protected Status layoutChildren(final AreaNode areaNode,
final GraftingPoint graftingPoint) throws AreaTreeException {
- final FoNode node = this.getFONode();
+ final Fo node = this.getFONode();
int start = getProgress();
if (start == FONodePL.START) {
start = 0;
}
for (int i = start; i < node.getChildCount(); i++) {
- final FoNode fo = node.getChildAt(i);
+ final Fo fo = node.getChildAt(i);
final FONodePL nodePL = this.getLayoutProxy(fo);
final Status status = nodePL.layout(areaNode, graftingPoint);
if (status.isIncomplete()) {
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FlowPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FlowPL.java 2007-07-18 19:40:19 UTC (rev 10038)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FlowPL.java 2007-07-18 20:25:19 UTC (rev 10039)
@@ -78,7 +78,7 @@
boolean prevChildMustKeepWithNext = false;
final int numChildren = getFONode().getChildCount();
for (int i = getProgress(); i < numChildren; i++) {
- final Fo fo = (Fo) getFONode().getChildAt(i);
+ final Fo fo = getFONode().getChildAt(i);
if (bac.getMainRefArea().isBalancingRequired(fo)) {
// reset the the just-done span area in preparation
@@ -104,8 +104,7 @@
if (prevChildMustKeepWithNext
&& (getStatus().laidOutNone())) {
setProgress(i - 1);
- final Fo prevChild =
- (Fo) getFONode().getChildAt(getProgress());
+ final Fo prevChild = getFONode().getChildAt(getProgress());
final FObjPL prevChildPL = (FObjPL) getLayoutProxy(
prevChild);
prevChildPL.resetProgress();
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java 2007-07-18 19:40:19 UTC (rev 10038)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java 2007-07-18 20:25:19 UTC (rev 10039)
@@ -29,12 +29,11 @@
package org.foray.pioneer;
import org.axsl.area.AreaNode;
+import org.axsl.area.AreaTreeException;
import org.axsl.area.FootnoteRefArea;
import org.axsl.area.PageArea;
import org.axsl.area.RegionBodyRefArea;
-import org.axsl.area.AreaTreeException;
-
-import org.axsl.fo.FoNode;
+import org.axsl.fo.Fo;
import org.axsl.fo.fo.FootnoteBody;
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.fo.fo.PageSequence;
@@ -70,7 +69,7 @@
final int numChildren = this.node.getChildCount();
for (int i = getProgress(); i < numChildren; i++) {
- final FoNode fo = this.node.getChildAt(i);
+ final Fo fo = this.node.getChildAt(i);
final FONodePL foNodePL = getLayoutProxy(fo);
final Status status = foNodePL.layout(referenceArea,
graftingPoint);
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemBodyPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemBodyPL.java 2007-07-18 19:40:19 UTC (rev 10038)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemBodyPL.java 2007-07-18 20:25:19 UTC (rev 10039)
@@ -75,7 +75,7 @@
final int numChildren = this.node.getChildCount();
for (int i = getProgress(); i < numChildren; i++) {
- final Fo fo = (Fo) this.node.getChildAt(i);
+ final Fo fo = this.node.getChildAt(i);
final Status status = getLayoutProxy(fo).layout(container,
graftingPoint);
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemLabelPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemLabelPL.java 2007-07-18 19:40:19 UTC (rev 10038)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/ListItemLabelPL.java 2007-07-18 20:25:19 UTC (rev 10039)
@@ -74,7 +74,7 @@
}
final int numChildren = this.node.getChildCount();
for (int i = getProgress(); i < numChildren; i++) {
- final Fo fo = (Fo) this.node.getChildAt(i);
+ final Fo fo = this.node.getChildAt(i);
final Status status = getLayoutProxy(fo).layout(container,
graftingPoint);
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/NoLayoutPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/NoLayoutPL.java 2007-07-18 19:40:19 UTC (rev 10038)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/NoLayoutPL.java 2007-07-18 20:25:19 UTC (rev 10039)
@@ -30,7 +30,7 @@
import org.axsl.area.AreaNode;
import org.axsl.area.AreaTreeException;
-import org.axsl.fo.F...
[truncated message content] |
|
From: <vic...@us...> - 2007-07-18 21:45:09
|
Revision: 10040
http://svn.sourceforge.net/foray/?rev=10040&view=rev
Author: victormote
Date: 2007-07-18 14:45:10 -0700 (Wed, 18 Jul 2007)
Log Message:
-----------
Roll up FONode into FObj. All FO Tree nodes are now subclasses of FObj.
Modified Paths:
--------------
trunk/foray/foray-app/src/javatest/org/foray/app/fo/AbstractFoTreeTest.java
trunk/foray/foray-app/src/javatest/org/foray/app/fo/TestFont.java
trunk/foray/foray-app/src/javatest/org/foray/app/fo/TestGraphic.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/DescendantIterator.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjMixed.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/ForeignXML.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/axsl/obj/Metadata.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/ObjectMakerFO.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractFlow.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractFolioDescriptor.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractIndexFormatting.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractPageMaster.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractTablePart.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BasicLink.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BidiOverride.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Block.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BlockContainer.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Bookmark.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BookmarkTitle.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BookmarkTree.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ChangeBarBegin.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ChangeBarEnd.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ColorProfile.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Declarations.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ExternalGraphic.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Float.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Flow.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowAssignment.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowMap.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowNameSpecifier.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowSourceList.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FlowTargetList.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Footnote.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FootnoteBody.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/IndexKeyReference.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/IndexPageCitationList.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/IndexRangeBegin.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/IndexRangeEnd.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/InitialPropertySet.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Inline.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/InlineContainer.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/InstreamForeignObject.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/LayoutMasterSet.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Leader.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ListBlock.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ListItem.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ListItemBody.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ListItemLabel.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Marker.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiCase.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiProperties.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiPropertySet.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiSwitch.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiToggle.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageNumber.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageNumberCitation.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageNumberCitationLast.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceMaster.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceWrapper.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Region.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionNameSpecifier.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RetrieveMarker.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RetrieveTableMarker.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Root.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ScalingValueCitation.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/StaticContent.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Table.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableAndCaption.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableCaption.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableCell.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableColumn.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableRow.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Title.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Wrapper.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/foray/obj/ContinuedLabel.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/obj/SVGElement.java
Removed Paths:
-------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java
Modified: trunk/foray/foray-app/src/javatest/org/foray/app/fo/AbstractFoTreeTest.java
===================================================================
--- trunk/foray/foray-app/src/javatest/org/foray/app/fo/AbstractFoTreeTest.java 2007-07-18 20:25:19 UTC (rev 10039)
+++ trunk/foray/foray-app/src/javatest/org/foray/app/fo/AbstractFoTreeTest.java 2007-07-18 21:45:10 UTC (rev 10040)
@@ -28,8 +28,8 @@
package org.foray.app.fo;
-import org.foray.fotree.FONode;
import org.foray.fotree.FOTreeBuilder;
+import org.foray.fotree.FObj;
import org.foray.fotree.fo.obj.Flow;
import org.foray.fotree.fo.obj.PageSequence;
import org.foray.fotree.fo.obj.Root;
@@ -48,7 +48,7 @@
*/
protected Flow getFlow(final FOTreeBuilder foTree) {
final Root root = foTree.getRootFo();
- FONode node = root.getChildAt(1);
+ FObj node = root.getChildAt(1);
assertTrue(node instanceof PageSequence);
final PageSequence sequence = (PageSequence) node;
node = sequence.getChildAt(0);
Modified: trunk/foray/foray-app/src/javatest/org/foray/app/fo/TestFont.java
===================================================================
--- trunk/foray/foray-app/src/javatest/org/foray/app/fo/TestFont.java 2007-07-18 20:25:19 UTC (rev 10039)
+++ trunk/foray/foray-app/src/javatest/org/foray/app/fo/TestFont.java 2007-07-18 21:45:10 UTC (rev 10040)
@@ -29,8 +29,8 @@
package org.foray.app.fo;
import org.foray.core.FOrayException;
-import org.foray.fotree.FONode;
import org.foray.fotree.FOTreeBuilder;
+import org.foray.fotree.FObj;
import org.foray.fotree.fo.obj.Block;
import org.foray.fotree.fo.obj.Flow;
@@ -49,7 +49,7 @@
"fo/font-family-001.fo");
final Flow flow = this.getFlow(foTree);
- FONode node = flow.getChildAt(0);
+ FObj node = flow.getChildAt(0);
assertTrue(node instanceof Block);
Block block = (Block) node;
String[] fontFamilies = block.traitFontFamily(null);
@@ -74,7 +74,7 @@
final FOTreeBuilder foTree = reader.buildFoTree("fo/font-size-001.fo");
final Flow flow = this.getFlow(foTree);
- FONode node = flow.getChildAt(0);
+ FObj node = flow.getChildAt(0);
assertTrue(node instanceof Block);
Block block = (Block) node;
int fontSize = block.traitFontSize(null);
Modified: trunk/foray/foray-app/src/javatest/org/foray/app/fo/TestGraphic.java
===================================================================
--- trunk/foray/foray-app/src/javatest/org/foray/app/fo/TestGraphic.java 2007-07-18 20:25:19 UTC (rev 10039)
+++ trunk/foray/foray-app/src/javatest/org/foray/app/fo/TestGraphic.java 2007-07-18 21:45:10 UTC (rev 10040)
@@ -29,8 +29,8 @@
package org.foray.app.fo;
import org.foray.core.FOrayException;
-import org.foray.fotree.FONode;
import org.foray.fotree.FOTreeBuilder;
+import org.foray.fotree.FObj;
import org.foray.fotree.fo.obj.Block;
import org.foray.fotree.fo.obj.Flow;
import org.foray.fotree.fo.obj.InstreamForeignObject;
@@ -53,7 +53,7 @@
final Flow flow = this.getFlow(foTree);
/* The second child should be a block ... */
- FONode node = flow.getChildAt(1);
+ FObj node = flow.getChildAt(1);
assertTrue(node instanceof Block);
final Block block = (Block) node;
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/DescendantIterator.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/DescendantIterator.java 2007-07-18 20:25:19 UTC (rev 10039)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/DescendantIterator.java 2007-07-18 21:45:10 UTC (rev 10040)
@@ -35,13 +35,13 @@
* Iterates over the descendants of an {@link FObj} instance, returning them
* in pre-traversal order.
*/
-public class DescendantIterator implements Iterator<FONode> {
+public class DescendantIterator implements Iterator<FObj> {
/** The FObj instance whose descendants are iterated. */
private FObj fobj;
/** The next node to be returned. */
- private FONode nextNode;
+ private FObj nextNode;
/**
* Constructor.
@@ -62,8 +62,8 @@
/**
* {@inheritDoc}
*/
- public FONode next() {
- final FONode returnNode = this.nextNode;
+ public FObj next() {
+ final FObj returnNode = this.nextNode;
if (returnNode == null) {
throw new NoSuchElementException(DescendantIterator.class.getName()
+ " hs no more elements.");
@@ -91,15 +91,14 @@
* Only descendants of this node may be returned.
* @return The next pre-order bounded node.
*/
- private FONode nextPreOrderBoundedNode(final FONode node,
- final FONode rootNode) {
+ private FObj nextPreOrderBoundedNode(final FObj node, final FObj rootNode) {
// Any children?
if (node.getChildCount() > 0) {
return node.getChildren().get(0);
}
- FONode currentNode = node;
+ FObj currentNode = node;
while (currentNode != rootNode) {
- currentNode = (FONode) currentNode.getNextSibling();
+ currentNode = (FObj) currentNode.getNextSibling();
if (currentNode != null) {
return currentNode;
}
Deleted: trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java 2007-07-18 20:25:19 UTC (rev 10039)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FONode.java 2007-07-18 21:45:10 UTC (rev 10040)
@@ -1,300 +0,0 @@
-/*
- * Copyright 2004 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.fotree;
-
-import org.foray.common.AbstractOrderedTreeNode;
-import org.foray.common.OrderedTreeNode;
-import org.foray.fotree.fo.obj.Marker;
-import org.foray.fotree.fo.obj.Root;
-
-import org.axsl.fo.Fo;
-import org.axsl.fo.FoContext;
-import org.axsl.fo.FoTreeException;
-import org.axsl.fo.fo.GraftingPoint;
-
-import org.apache.commons.logging.Log;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
-
-import javax.swing.tree.TreeNode;
-
-/**
- * Base class for nodes in the formatting object tree.
- */
-public abstract class FONode extends AbstractOrderedTreeNode
- implements org.axsl.fo.Fo {
-
- /** The unique sequential index for this node.
- * @see {@link org.axsl.fo.FONode#getSequentialIndex()} for a discussion
- * of this number. */
- private int sequentialIndex;
-
- /**
- * Constructor.
- * @param parent The parent of this node.
- */
- protected FONode(final FObj parent) {
- if (parent == null) {
- assert this instanceof Root : "Non-root FONode has null parent.";
- /* We reserve and hard-code zero for the root node. */
- this.sequentialIndex = 0;
- } else {
- final FOTreeBuilder builder = parent.getFOTreeBuilder();
- this.sequentialIndex = builder.getNextSequentialIndex();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public abstract FObj getParent();
-
- /**
- * Returns the parent that was parsed from the FO document.
- * This can be different from the parent, in cases where pseudo-objects are
- * placed in the tree to normalize it.
- * For example, table-cells that are direct children of a table-body
- * (instead of a table-row), are reparented with a pseudo table-row.
- * Subclasses should override this method as necessary.
- * @return The parent that was parsed from the FO tree.
- */
- public FObj getParsedParent() {
- return this.getParent();
- }
-
- /**
- * {@inheritDoc}
- */
- public OrderedTreeNode getOrderedParent() {
- return this.getParent();
- }
-
- /**
- * {@inheritDoc}
- */
- public abstract List<? extends FONode> getChildren();
-
- /**
- * Return this node's effective parent, cast as an FObj.
- * This differs from the value returned by
- * @param context An object that knows how to resolve FO Tree context
- * issues.
- * @return This node's effective parent.
- */
- public FObj effectiveParent(final FoContext context) {
- /* If either this or its parent is a Marker, we want to return that
- * Marker's surrogate RetrieveMarker's parent. */
- if (this instanceof Marker) {
- return effectiveMarkerParent(context);
- }
- final TreeNode parent = this.getParent();
- if (parent instanceof Marker) {
- return effectiveMarkerParent(context);
- }
- return getParent();
- }
-
- /**
- * Returns the effective parent of a Marker instance.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
- * @return The parent of the RetrieveMarker instance found in the context.
- */
- private FObj effectiveMarkerParent(final FoContext context) {
- if (context == null) {
- /* TODO: Consider throwing an Exception. This should NOT
- * happen. */
- return getParent();
- }
- final GraftingPoint graftingPoint = context.getGraftingPoint();
- if (graftingPoint == null) {
- /* TODO: Consider throwing an Exception. This should NOT
- * happen. */
- return getParent();
- }
- org.foray.fotree.FObj forayGraftingPoint = null;
- if (graftingPoint instanceof org.foray.fotree.FObj) {
- forayGraftingPoint = (org.foray.fotree.FObj) graftingPoint;
- } else {
- throw new IllegalStateException("Non-FOray object found in FO "
- + "Tree");
- }
- /* We don't want to return the GraftingPoint, but rather its parent. */
- return forayGraftingPoint.getParent();
- }
-
- /**
- * {@inheritDoc}
- */
- public List<? extends FONode> getSiblings() {
- if (this.getParent() == null) {
- return null;
- }
- return this.getParent().getChildren();
- }
-
- /**
- * {@inheritDoc}
- */
- public FONode getChildAt(final int childIndex) {
- if (childIndex < 0) {
- return null;
- }
- if (childIndex >= getChildren().size()) {
- return null;
- }
- return getChildren().get(childIndex);
- }
-
- /**
- * {@inheritDoc}
- */
- public String getContextMessage() {
- return getContextMessage(this.getSystemId(), this.getLine(),
- this.getColumn());
- }
-
- /**
- * Creates a context message from a given set of Locator information, which
- * is useful in user messages.
- * @param systemId The path to the document.
- * @param line The line number in systemId.
- * @param column The column number in line.
- * @return A String describing the location specified.
- */
- public static String getContextMessage(final String systemId,
- final int line, final int column) {
- return " Context: " + systemId + "\n"
- + " (Line " + line + ", Column " + column + ")";
- }
-
- /**
- * {@inheritDoc}
- */
- public org.axsl.fo.fo.Marker ancestorMarker() {
- final FObj parent = this.getParent();
- if (parent == null) {
- return null;
- }
- if (parent instanceof Marker) {
- return (Marker) parent;
- }
- return parent.ancestorMarker();
- }
-
- /**
- * Return the ancestor tree builder.
- * @return The ancestor tree builder.
- */
- public FOTreeBuilder getFOTreeBuilder() {
- return getParent().getFOTreeBuilder();
- }
-
- /**
- * Return the logger.
- * @return The logger.
- */
- public Log getLogger() {
- return getParent().getLogger();
- }
-
- /**
- * Convenience method handling some details of throwing a parsing exception.
- * @param message The message indicating the reason for the exception.
- * @throws FoTreeException Always, as that is the purpose of this method.
- */
- public void throwException(final String message) throws FoTreeException {
- throwException(getContextMessage(), message);
- }
-
- /**
- * Convenience method handling some details of throwing a parsing exception.
- * @param contextMessage The context portion of the exception message.
- * @param message The message indicating the reason for the exception.
- * @throws FoTreeException Always, as that is the purpose of this method.
- */
- public static void throwException(final String contextMessage,
- final String message) throws FoTreeException {
- final FoTreeException exception = new FoTreeException(message);
- exception.setContextMessage(contextMessage);
- throw exception;
- }
-
- /**
- * {@inheritDoc}
- */
- public int getSequentialIndex() {
- return this.sequentialIndex;
- }
-
- /**
- * {@inheritDoc}
- */
- public Iterator<Fo> iterator() {
- return new ChildIterator();
- }
-
- /**
- * Private inner class to provide an iterator over the children.
- */
- private class ChildIterator implements Iterator<Fo> {
-
- /** Index to the next child element to be returned. */
- private int nextIndex = 0;
-
- /**
- * {@inheritDoc}
- */
- public boolean hasNext() {
- return nextIndex < getChildCount();
- }
-
- /**
- * {@inheritDoc}
- */
- public Fo next() {
- if (! hasNext()) {
- throw new NoSuchElementException();
- }
- nextIndex ++;
- return getChildAt(nextIndex - 1);
- }
-
- /**
- * {@inheritDoc}
- */
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- }
-
-}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java 2007-07-18 20:25:19 UTC (rev 10039)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java 2007-07-18 21:45:10 UTC (rev 10040)
@@ -139,7 +139,7 @@
/**
* {@inheritDoc}
*/
- public List<FONode> getChildren() {
+ public List<FObj> getChildren() {
return null;
}
@@ -491,7 +491,7 @@
* non-text leaf between, null is returned.
*/
private FOText getNextContiguousTextInBlock() {
- final FONode nextLeaf = (FONode) this.getNextLeaf();
+ final FObj nextLeaf = (FObj) this.getNextLeaf();
return getContiguousTextInBlock(nextLeaf);
}
@@ -503,7 +503,7 @@
* non-text leaf between, null is returned.
*/
private FOText getPreviousContiguousTextInBlock() {
- final FONode previousLeaf = (FONode) this.getPreviousLeaf();
+ final FObj previousLeaf = (FObj) this.getPreviousLeaf();
return getContiguousTextInBlock(previousLeaf);
}
@@ -517,7 +517,7 @@
* 3) #leafToTest has the same ancestor Block as this.
* If any of these are not true, null is returned.
*/
- private FOText getContiguousTextInBlock(final FONode leafToTest) {
+ private FOText getContiguousTextInBlock(final FObj leafToTest) {
final FObj effectiveParent = this.getParent();
final FoContext context = null;
if (leafToTest == null) {
@@ -1253,7 +1253,7 @@
/**
* {@inheritDoc}
*/
- public void addChild(final FONode node) {
+ public void addChild(final FObj node) {
throw new IllegalStateException("Cannot add a child to "
+ this.getClass().getName());
}
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-18 20:25:19 UTC (rev 10039)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-18 21:45:10 UTC (rev 10040)
@@ -28,6 +28,8 @@
package org.foray.fotree;
+import org.foray.common.AbstractOrderedTreeNode;
+import org.foray.common.OrderedTreeNode;
import org.foray.common.XMLCharacter;
import org.foray.fotree.fo.FoProperty;
import org.foray.fotree.fo.FoValue;
@@ -97,9 +99,11 @@
import org.axsl.common.value.Visibility;
import org.axsl.common.value.WhiteSpaceTreatment;
import org.axsl.common.value.WrapOption;
+import org.axsl.fo.Fo;
import org.axsl.fo.FoContext;
import org.axsl.fo.FoInlineContext;
import org.axsl.fo.FoTreeException;
+import org.axsl.fo.fo.GraftingPoint;
import org.axsl.fo.fo.Marker;
import org.axsl.fo.fo.prop.ActiveStatePa;
import org.axsl.fo.fo.prop.AlignmentAdjustPa;
@@ -171,15 +175,22 @@
import org.axsl.text.TextServer;
import org.axsl.text.line.LineText;
+import org.apache.commons.logging.Log;
+
import java.awt.Color;
import java.awt.Shape;
import java.util.Collections;
+import java.util.Iterator;
import java.util.List;
+import java.util.NoSuchElementException;
+import javax.swing.tree.TreeNode;
+
/**
* Base class for formatting objects.
*/
-public abstract class FObj extends FONode implements org.axsl.fo.Fo,
+public abstract class FObj extends AbstractOrderedTreeNode
+ implements org.axsl.fo.Fo,
CommonAccessibilityPa, CommonAbsolutePositionPa,
CommonAuralPa, CommonBorderPaddingBgPa, CommonFontPa,
CommonHyphenationPa, CommonMarginBlockPa, CommonMarginInlinePa,
@@ -202,7 +213,7 @@
/** A static empty and immutable list of children, suitable for return by
* objects that have no children. */
- protected static final List<FONode> EMPTY_CHILD_LIST =
+ protected static final List<FObj> EMPTY_CHILD_LIST =
Collections.emptyList();
/** Static array containing one space, to be used for obtaining a font
@@ -222,19 +233,214 @@
/** The column number in {@link #line} at which this object was parsed. */
private int column;
+ /** The unique sequential index for this node.
+ * @see {@link org.axsl.fo.FONode#getSequentialIndex()} for a discussion
+ * of this number. */
+ private int sequentialIndex;
+
/**
* Constructor.
* @param parent The parent FObj.
* @param propertyList The property list for this FObj.
*/
protected FObj(final FObj parent, final PropertyList propertyList) {
- super(parent);
+ if (parent == null) {
+ assert this instanceof Root : "Non-root FONode has null parent.";
+ /* We reserve and hard-code zero for the root node. */
+ this.sequentialIndex = 0;
+ } else {
+ final FOTreeBuilder builder = parent.getFOTreeBuilder();
+ this.sequentialIndex = builder.getNextSequentialIndex();
+ }
this.propertyList = propertyList;
}
/**
* {@inheritDoc}
*/
+ public abstract FObj getParent();
+
+ /**
+ * Returns the parent that was parsed from the FO document.
+ * This can be different from the parent, in cases where pseudo-objects are
+ * placed in the tree to normalize it.
+ * For example, table-cells that are direct children of a table-body
+ * (instead of a table-row), are reparented with a pseudo table-row.
+ * Subclasses should override this method as necessary.
+ * @return The parent that was parsed from the FO tree.
+ */
+ public FObj getParsedParent() {
+ return this.getParent();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public OrderedTreeNode getOrderedParent() {
+ return this.getParent();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public abstract List<? extends FObj> getChildren();
+
+ /**
+ * Return this node's effective parent, cast as an FObj.
+ * This differs from the value returned by
+ * @param context An object that knows how to resolve FO Tree context
+ * issues.
+ * @return This node's effective parent.
+ */
+ public FObj effectiveParent(final FoContext context) {
+ /* If either this or its parent is a Marker, we want to return that
+ * Marker's surrogate RetrieveMarker's parent. */
+ if (this instanceof Marker) {
+ return effectiveMarkerParent(context);
+ }
+ final TreeNode parent = this.getParent();
+ if (parent instanceof Marker) {
+ return effectiveMarkerParent(context);
+ }
+ return getParent();
+ }
+
+ /**
+ * Returns the effective parent of a Marker instance.
+ * @param context An object that knows how to resolve FO Tree context
+ * issues.
+ * @return The parent of the RetrieveMarker instance found in the context.
+ */
+ private FObj effectiveMarkerParent(final FoContext context) {
+ if (context == null) {
+ /* TODO: Consider throwing an Exception. This should NOT
+ * happen. */
+ return getParent();
+ }
+ final GraftingPoint graftingPoint = context.getGraftingPoint();
+ if (graftingPoint == null) {
+ /* TODO: Consider throwing an Exception. This should NOT
+ * happen. */
+ return getParent();
+ }
+ org.foray.fotree.FObj forayGraftingPoint = null;
+ if (graftingPoint instanceof org.foray.fotree.FObj) {
+ forayGraftingPoint = (org.foray.fotree.FObj) graftingPoint;
+ } else {
+ throw new IllegalStateException("Non-FOray object found in FO "
+ + "Tree");
+ }
+ /* We don't want to return the GraftingPoint, but rather its parent. */
+ return forayGraftingPoint.getParent();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public List<? extends FObj> getSiblings() {
+ if (this.getParent() == null) {
+ return null;
+ }
+ return this.getParent().getChildren();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public FObj getChildAt(final int childIndex) {
+ if (childIndex < 0) {
+ return null;
+ ...
[truncated message content] |
|
From: <vic...@us...> - 2007-07-18 23:44:23
|
Revision: 10043
http://svn.sourceforge.net/foray/?rev=10043&view=rev
Author: victormote
Date: 2007-07-18 16:44:24 -0700 (Wed, 18 Jul 2007)
Log Message:
-----------
Conform to axsl changes renaming Character-related classes and making Character extend FoLineText.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java
trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2007-07-18 23:03:16 UTC (rev 10042)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2007-07-18 23:44:24 UTC (rev 10043)
@@ -31,9 +31,9 @@
import org.axsl.area.AreaTreeException;
import org.axsl.common.value.BackgroundRepeat;
import org.axsl.common.value.BorderStyle;
-import org.axsl.fo.FoText;
import org.axsl.fo.fo.ExternalGraphic;
import org.axsl.fo.fo.GraftingPoint;
+import org.axsl.fo.fo.CharacterSequence;
import org.axsl.fo.fo.Inline;
import org.axsl.fo.fo.InlineContainer;
import org.axsl.fo.fo.InstreamForeignObject;
@@ -220,7 +220,7 @@
/**
* {@inheritDoc}
*/
- public TextArea makeTextArea(final FoText foText,
+ public TextArea makeTextArea(final CharacterSequence foText,
final int ipd, final int startOffset, final int sizeInChars,
final boolean hasDiscretionaryHyphen,
final boolean hasFauxSmallCaps, final boolean isLastItemOnLine,
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-18 23:03:16 UTC (rev 10042)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-18 23:44:24 UTC (rev 10043)
@@ -32,9 +32,9 @@
import org.axsl.common.value.LeaderAlignment;
import org.axsl.common.value.LeaderPattern;
import org.axsl.common.value.RuleStyle;
-import org.axsl.fo.FoText;
import org.axsl.fo.fo.ExternalGraphic;
import org.axsl.fo.fo.GraftingPoint;
+import org.axsl.fo.fo.CharacterSequence;
import org.axsl.fo.fo.Inline;
import org.axsl.fo.fo.InlineContainer;
import org.axsl.fo.fo.InstreamForeignObject;
@@ -509,7 +509,7 @@
/**
* {@inheritDoc}
*/
- public TextArea makeTextArea(final FoText foText,
+ public TextArea makeTextArea(final CharacterSequence foText,
final int ipd, final int startOffset, final int sizeInChars,
final boolean hasDiscretionaryHyphen,
final boolean hasFauxSmallCaps, final boolean isLastItemOnLine,
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-07-18 23:03:16 UTC (rev 10042)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-07-18 23:44:24 UTC (rev 10043)
@@ -40,11 +40,11 @@
import org.axsl.common.value.TextAlign;
import org.axsl.common.value.TextAlignLast;
import org.axsl.fo.FoContext;
-import org.axsl.fo.FoText;
-import org.axsl.fo.FoTextContent;
import org.axsl.fo.fo.Block;
+import org.axsl.fo.fo.CharacterContent;
import org.axsl.fo.fo.ExternalGraphic;
import org.axsl.fo.fo.GraftingPoint;
+import org.axsl.fo.fo.CharacterSequence;
import org.axsl.fo.fo.Inline;
import org.axsl.fo.fo.InlineContainer;
import org.axsl.fo.fo.InstreamForeignObject;
@@ -961,7 +961,7 @@
* @param context An object that knows how to resolve FO context issues.
* @return True iff a text area should be created for the text item.
*/
- static boolean shouldCreateTextArea(final FoTextContent foText,
+ static boolean shouldCreateTextArea(final CharacterContent foText,
final Area parentArea, final int startOffset, final int sizeInChars,
final boolean isLastItemOnLine, final FoContext context) {
/* If the raw text is empty, don't create the TextArea. */
@@ -1074,7 +1074,7 @@
/**
* {@inheritDoc}
*/
- public TextArea makeTextArea(final FoText foText,
+ public TextArea makeTextArea(final CharacterSequence foText,
final int ipd, final int startOffset, final int sizeInChars,
final boolean hasDiscretionaryHyphen,
final boolean hasFauxSmallCaps, final boolean isLastItemOnLine,
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-18 23:03:16 UTC (rev 10042)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2007-07-18 23:44:24 UTC (rev 10043)
@@ -35,8 +35,8 @@
import org.axsl.common.value.WhiteSpaceTreatment;
import org.axsl.fo.Fo;
import org.axsl.fo.FoContext;
-import org.axsl.fo.FoTextContent;
import org.axsl.fo.fo.Block;
+import org.axsl.fo.fo.CharacterContent;
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.font.Font;
import org.axsl.font.FontUse;
@@ -158,7 +158,7 @@
* will be applied.
* @return The newly-created TextArea.
*/
- static TextArea makeTextArea(final FoTextContent generatedBy,
+ static TextArea makeTextArea(final CharacterContent generatedBy,
final LineArea parentArea,
final GraftingPoint graftingPoint, final int backingOffset,
final int backingSize, final int progressionDimensionUsed,
@@ -203,7 +203,7 @@
* will be applied.
* @return The newly-created TextArea.
*/
- static TextArea makeTextArea(final FoTextContent generatedBy,
+ static TextArea makeTextArea(final CharacterContent generatedBy,
final AbstractInlineArea parentArea,
final GraftingPoint graftingPoint, final int backingOffset,
final int backingSize, final int progressionDimensionUsed,
@@ -329,12 +329,12 @@
* Returns the raw value of the text content backing this area.
* @return The text content backing this area.
*/
- public FoTextContent getTextContent() {
+ public CharacterContent getTextContent() {
/* Do NOT use the traitGeneratedBy() method here, because we need the
* raw value, and this class overrides that method. */
final Fo foNode = this.getLinkage().getFONode();
/* Cast verified at construction. */
- return (FoTextContent) foNode;
+ return (CharacterContent) foNode;
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java 2007-07-18 23:03:16 UTC (rev 10042)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java 2007-07-18 23:44:24 UTC (rev 10043)
@@ -40,11 +40,9 @@
import org.axsl.common.value.WhiteSpaceTreatment;
import org.axsl.common.value.WrapOption;
import org.axsl.fo.FoContext;
-import org.axsl.fo.FoLineText;
import org.axsl.fo.ProxyFactory;
-import org.axsl.fo.fo.Block;
+import org.axsl.fo.fo.CharacterSequence;
import org.axsl.fo.fo.GraftingPoint;
-import org.axsl.fo.fo.Leader;
import org.axsl.fo.fo.Marker;
import org.axsl.font.Font;
import org.axsl.font.FontUse;
@@ -55,7 +53,7 @@
/**
* A text node in the formatting object tree.
*/
-public class FOText extends FObj implements FoLineText, org.axsl.fo.FoText {
+public class FOText extends FObj implements CharacterSequence {
/** Constant indicating that a given character should be discarded. */
public static final char DISCARD_CHAR = 0xFFFF;
@@ -484,67 +482,6 @@
}
/**
- * Returns the next contiguous FOText item that has exactly the same
- * closest ancestor block.
- * @return The next contiguous FOText item. If there is no subsequent
- * FOText item with the same closest ancestor block, or if there is a
- * non-text leaf between, null is returned.
- */
- private FOText getNextContiguousTextInBlock() {
- final FObj nextLeaf = (FObj) this.getNextLeaf();
- return getContiguousTextInBlock(nextLeaf);
- }
-
- /**
- * Returns the previous contiguous FOText item that has exactly the same
- * closest ancestor block.
- * @return The previous contiguous FOText item. If there is no previous
- * FOText item with the same closest ancestor block, or if there is a
- * non-text leaf between, null is returned.
- */
- private FOText getPreviousContiguousTextInBlock() {
- final FObj previousLeaf = (FObj) this.getPreviousLeaf();
- return getContiguousTextInBlock(previousLeaf);
- }
-
- /**
- * Tests a given node to see if it is the next contiguous text item in
- * this text item's block.
- * @param leafToTest The candidate node being tested for contiguity.
- * @return #leafToTest iff all of the following are true: 1) #leafToTest
- * is an FOText instance,
- * 2) #leafToTest has the same ancestor Leader (usually null) as this, and
- * 3) #leafToTest has the same ancestor Block as this.
- * If any of these are not true, null is returned.
- */
- private FOText getContiguousTextInBlock(final FObj leafToTest) {
- final FObj effectiveParent = this.getParent();
- final FoContext context = null;
- if (leafToTest == null) {
- return null;
- }
- if (! (leafToTest instanceof FOText)) {
- return null;
- }
- /* If either is within a Leader, they both need to be in the same one.
- */
- final Leader thisLeader = effectiveParent.getNearestLeader(context);
- final Leader testLeader = leafToTest.effectiveParent(context)
- .getNearestLeader(context);
- if (thisLeader != testLeader) {
- return null;
- }
- final Block thisBlock =
- this.effectiveParent(context).getContainingBlock(context);
- final Block testBlock = leafToTest.effectiveParent(context)
- .getContainingBlock(context);
- if (thisBlock != testBlock) {
- return null;
- }
- return (FOText) leafToTest;
- }
-
- /**
* <p>Filters the raw text as needed to present the text that should appear
* in the area tree. Specifically, this effectively filters for the
* following property:</p>
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-18 23:03:16 UTC (rev 10042)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-18 23:44:24 UTC (rev 10043)
@@ -4206,4 +4206,65 @@
}
+ /**
+ * Returns the next contiguous FOText item that has exactly the same
+ * closest ancestor block.
+ * @return The next contiguous FOText item. If there is no subsequent
+ * FOText item with the same closest ancestor block, or if there is a
+ * non-text leaf between, null is returned.
+ */
+ protected FOText getNextContiguousTextInBlock() {
+ final FObj nextLeaf = (FObj) this.getNextLeaf();
+ return getContiguousTextInBlock(nextLeaf);
+ }
+
+ /**
+ * Returns the previous contiguous FOText item that has exactly the same
+ * closest ancestor block.
+ * @return The previous contiguous FOText item. If there is no previous
+ * FOText item with the same closest ancestor block, or if there is a
+ * non-text leaf between, null is returned.
+ */
+ protected FOText getPreviousContiguousTextInBlock() {
+ final FObj previousLeaf = (FObj) this.getPreviousLeaf();
+ return getContiguousTextInBlock(previousLeaf);
+ }
+
+ /**
+ * Tests a given node to see if it is the next contiguous text item in
+ * this text item's block.
+ * @param leafToTest The candidate node being tested for contiguity.
+ * @return #leafToTest iff all of the following are true: 1) #leafToTest
+ * is an FOText instance,
+ * 2) #leafToTest has the same ancestor Leader (usually null) as this, and
+ * 3) #leafToTest has the same ancestor Block as this.
+ * If any of these are not true, null is returned.
+ */
+ private FOText getContiguousTextInBlock(final FObj leafToTest) {
+ final FObj effectiveParent = this.getParent();
+ final FoContext context = null;
+ if (leafToTest == null) {
+ return null;
+ }
+ if (! (leafToTest instanceof FOText)) {
+ return null;
+ }
+ /* If either is within a Leader, they both need to be in the same one.
+ */
+ final Leader thisLeader = effectiveParent.getNearestLeader(context);
+ final Leader testLeader = leafToTest.effectiveParent(context)
+ .getNearestLeader(context);
+ if (thisLeader != testLeader) {
+ return null;
+ }
+ final Block thisBlock =
+ this.effectiveParent(context).getContainingBlock(context);
+ final Block testBlock = leafToTest.effectiveParent(context)
+ .getContainingBlock(context);
+ if (thisBlock != testBlock) {
+ return null;
+ }
+ return (FOText) leafToTest;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java 2007-07-18 23:03:16 UTC (rev 10042)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java 2007-07-18 23:44:24 UTC (rev 10043)
@@ -33,9 +33,16 @@
import org.foray.fotree.Namespace;
import org.foray.fotree.PropertyList;
+import org.axsl.common.value.Iso3166;
+import org.axsl.common.value.Iso639;
+import org.axsl.common.value.WrapOption;
import org.axsl.fo.FoContext;
import org.axsl.fo.FoTreeException;
import org.axsl.fo.ProxyFactory;
+import org.axsl.fo.fo.GraftingPoint;
+import org.axsl.font.Font;
+import org.axsl.font.FontUse;
+import org.axsl.text.line.LineText;
import java.util.ArrayList;
import java.util.List;
@@ -187,4 +194,272 @@
return this.propertyList;
}
+ /**
+ * {@inheritDoc}
+ */
+ public char[] inlineText() {
+ return this.inlineText(null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public char[] inlineText(final FoContext context) {
+ return getAreaTreeText(context);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public FontUse inlinePrimaryFont() {
+ return this.inlinePrimaryFont(null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public FontUse inlinePrimaryFont(final FoContext context) {
+ final FObj effectiveParent = effectiveParent(context);
+ return effectiveParent.getPrimaryFont(context);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public FontUse inlineSecondaryFont(final char c) {
+ return this.inlineSecondaryFont(null, c);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public FontUse inlineSecondaryFont(final FoContext context, final char c) {
+ final FObj effectiveParent = effectiveParent(context);
+ return effectiveParent.getSecondaryFont(context, c);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int inlineFontSize() {
+ return this.inlineFontSize(null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int inlineFontSize(final FoContext context) {
+ final FObj effectiveParent = effectiveParent(context);
+ return effectiveParent.traitFontSize(context);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int inlineLetterSpacingOptimum() {
+ return this.inlineLetterSpacingOptimum(null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int inlineLetterSpacingOptimum(final FoContext context) {
+ final FObj effectiveParent = effectiveParent(context);
+ return effectiveParent.traitLetterSpacingOpt(context);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean inlineWrapOption() {
+ return this.inlineWrapOption(null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean inlineWrapOption(final FoContext context) {
+ final FObj effectiveParent = effectiveParent(context);
+ return effectiveParent.traitWrapOption(context)
+ == WrapOption.WRAP;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean inlineHyphenate() {
+ return this.inlineHyphenate(null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean inlineHyphenate(final FoContext context) {
+ final FObj effectiveParent = effectiveParent(context);
+ return effectiveParent.traitHyphenate(context);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Iso639 inlineLanguage() {
+ return this.inlineLanguage(null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Iso639 inlineLanguage(final FoContext context) {
+ final FObj effectiveParent = effectiveParent(context);
+ return effectiveParent.traitLanguage(context);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Iso3166 inlineCountry() {
+ return this.inlineCountry(null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Iso3166 inlineCountry(final FoContext context) {
+ final FObj effectiveParent = effectiveParent(context);
+ return effectiveParent.traitCountry(context);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int inlineHyphenationRemainCount() {
+ return this.inlineHyphenationRemainCount(null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int inlineHyphenationRemainCount(final FoContext context) {
+ final FObj effectiveParent = effectiveParent(context);
+ return effectiveParent.traitHyphenationRemainCharacterCount(context);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int inlineHyphenationPushCount() {
+ return this.inlineHyphenationPushCount(null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int inlineHyphenationPushCount(final FoContext context) {
+ final FObj effectiveParent = effectiveParent(context);
+ return effectiveParent.traitHyphenationPushCharacterCount(context);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int inlineHyphenationCharacter() {
+ return this.inlineHyphenationCharacter(null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int inlineHyphenationCharacter(final FoContext context) {
+ final FObj effectiveParent = effectiveParent(context);
+ return effectiveParent.traitHyphenationCharacter(context);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean inlineIsFauxSmallCaps() {
+ return this.inlineIsFauxSmallCaps(null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean inlineIsFauxSmallCaps(final FoContext context) {
+ final FObj effectiveParent = effectiveParent(context);
+ if (effectiveParent.traitFontVariant(context)
+ != Font.Variant.SMALL_CAPS) {
+ return false;
+ }
+ /*
+ * TODO: The other thing we would like to do here is see whether the
+ * font itself handles small-caps. If so, we should use that instead of
+ * the faux version. Right now, for this to work, the user needs to
+ * select a font with small-caps support and then turn
+ * font-variant="normal".
+ */
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int inlineFauxSmallCapsFontSize() {
+ return this.inlineFauxSmallCapsFontSize(null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int inlineFauxSmallCapsFontSize(final FoContext context) {
+ final FObj effectiveParent = effectiveParent(context);
+ return effectiveParent.getFauxSmallCapFontSize(context);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public LineText nextContiguousLineText() {
+ return getNextContiguousTextInBlock();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public LineText previousContiguousLineText() {
+ return getPreviousContiguousTextInBlock();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isLastItemInBlock() {
+ return this.getNextSibling() == null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public org.axsl.fo.FoLineText getContextWrapper(final FoContext context) {
+ final org.axsl.fo.fo.Marker marker = this.ancestorMarker();
+ if (marker == null) {
+ return this;
+ }
+ return new org.foray.fotree.FOLineText(this, context);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public org.axsl.fo.FoLineText getWrapped() {
+ /* This is the wrapped item. */
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public GraftingPoint getGraftingPoint() {
+ return null;
+ }
+
}
Modified: trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java
===================================================================
--- trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java 2007-07-18 23:03:16 UTC (rev 10042)
+++ trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java 2007-07-18 23:44:24 UTC (rev 10043)
@@ -37,9 +37,9 @@
import org.axsl.area.AreaTreeException;
import org.axsl.fo.FoLineNonText;
import org.axsl.fo.FoLineText;
-import org.axsl.fo.FoText;
import org.axsl.fo.fo.ExternalGraphic;
import org.axsl.fo.fo.GraftingPoint;
+import org.axsl.fo.fo.CharacterSequence;
import org.axsl.fo.fo.InstreamForeignObject;
import org.axsl.fo.fo.Leader;
import org.axsl.fo.fo.PageNumber;
@@ -149,8 +149,8 @@
if (this.areaStack.size() > 0) {
factory = this.areaStack.peek();
}
- if (textToUse instanceof FoText) {
- final FoText foText = (FoText) textToUse;
+ if (textToUse instanceof CharacterSequence) {
+ final CharacterSequence foText = (CharacterSequence) textToUse;
factory.makeTextArea(foText, sizeInline, startOffset, sizeInChars,
hasDiscretionaryHyphen, hasFauxSmallCaps, isLastItemOnLine,
graftingPoint);
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java 2007-07-18 23:03:16 UTC (rev 10042)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java 2007-07-18 23:44:24 UTC (rev 10043)
@@ -32,23 +32,23 @@
import org.axsl.area.LineArea;
import org.axsl.area.AreaTreeException;
import org.axsl.fo.FoLineText;
-import org.axsl.fo.FoText;
import org.axsl.fo.fo.GraftingPoint;
+import org.axsl.fo.fo.CharacterSequence;
/**
- * Pioneer Layout for {@link FoText}.
+ * Pioneer Layout for {@link CharacterSequence}.
*/
public class FOTextPL extends FONodePL {
/** The real FONode which this proxy represents. */
- private FoText node;
+ private CharacterSequence node;
/**
* Constructor.
* @param text The FO Tree object which is being laid out.
* @param layout The ancestor layout system.
*/
- public FOTextPL(final FoText text, final PioneerLS layout) {
+ public FOTextPL(final CharacterSequence text, final PioneerLS layout) {
super(text, layout);
this.node = text;
}
@@ -103,7 +103,7 @@
/**
* {@inheritDoc}
*/
- public FoText getFONode() {
+ public CharacterSequence getFONode() {
return this.node;
}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-07-18 23:03:16 UTC (rev 10042)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-07-18 23:44:24 UTC (rev 10043)
@@ -39,7 +39,6 @@
import org.axsl.area.RegionRefArea;
import org.axsl.area.AreaTreeException;
import org.axsl.fo.Fo;
-import org.axsl.fo.FoText;
import org.axsl.fo.ProxyFactory;
import org.axsl.fo.extension.ContinuedLabel;
import org.axsl.fo.fo.BasicLink;
@@ -56,6 +55,7 @@
import org.axsl.fo.fo.Flow;
import org.axsl.fo.fo.Footnote;
import org.axsl.fo.fo.FootnoteBody;
+import org.axsl.fo.fo.CharacterSequence;
import org.axsl.fo.fo.InitialPropertySet;
import org.axsl.fo.fo.Inline;
import org.axsl.fo.fo.InlineContainer;
@@ -395,7 +395,7 @@
/**
* {@inheritDoc}
*/
- public FOTextPL makeProxy(final FoText node) {
+ public FOTextPL makeProxy(final CharacterSequence node) {
return new FOTextPL(node, this);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-19 21:15:20
|
Revision: 10049
http://svn.sourceforge.net/foray/?rev=10049&view=rev
Author: victormote
Date: 2007-07-19 14:15:13 -0700 (Thu, 19 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new 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/ExternalGraphicArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.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-19 20:57:31 UTC (rev 10048)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-19 21:15:13 UTC (rev 10049)
@@ -45,7 +45,6 @@
import org.axsl.font.FontUse;
import org.axsl.galley.BackgroundArea;
-import java.awt.Color;
import java.awt.geom.Rectangle2D;
import java.util.List;
@@ -203,60 +202,6 @@
}
/**
- * Returns the underline-score trait of this area.
- * @return The underline-score trait of this area.
- * @see Fo#traitUnderlineScore(FoContext)
- */
- public boolean traitUnderlineScore() {
- return traitGeneratedBy().traitUnderlineScore(this);
- }
-
- /**
- * Returns the overline-score trait of this area.
- * @return The overline-score trait of this area.
- * @see Fo#traitOverlineScore(FoContext)
- */
- public boolean traitOverlineScore() {
- return traitGeneratedBy().traitOverlineScore(this);
- }
-
- /**
- * Returns the through-score trait of this area.
- * @return The through-score trait of this area.
- * @see Fo#traitThroughScore(FoContext)
- */
- public boolean traitThroughScore() {
- return traitGeneratedBy().traitThroughScore(this);
- }
-
- /**
- * Returns the underline-score-color trait of this area.
- * @return The underline-score-color trait of this area.
- * @see Fo#traitUnderlineScoreColor(FoContext)
- */
- public Color traitUnderlineScoreColor() {
- return traitGeneratedBy().traitUnderlineScoreColor(this);
- }
-
- /**
- * Returns the overline-score-color trait of this area.
- * @return The overline-score-color trait of this area.
- * @see Fo#traitOverlineScoreColor(FoContext)
- */
- public Color traitOverlineScoreColor() {
- return traitGeneratedBy().traitOverlineScoreColor(this);
- }
-
- /**
- * Returns the through-score-color trait of this area.
- * @return The through-score-color trait of this area.
- * @see Fo#traitThroughScoreColor(FoContext)
- */
- public Color traitThroughScoreColor() {
- return traitGeneratedBy().traitThroughScoreColor(this);
- }
-
- /**
* Returns the parent Area.
* @return The parent if it is an Area, or null if it is not.
*/
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java 2007-07-19 20:57:31 UTC (rev 10048)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java 2007-07-19 21:15:13 UTC (rev 10049)
@@ -34,6 +34,7 @@
import org.axsl.galley.RenderVisitor;
import org.axsl.graphic.Graphic;
+import java.awt.Color;
import java.util.Collections;
import java.util.List;
@@ -302,4 +303,46 @@
return traitGeneratedBy().traitSpaceEndOptimum(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitUnderlineScore() {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitOverlineScore() {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitThroughScore() {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitUnderlineScoreColor() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitOverlineScoreColor() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitThroughScoreColor() {
+ return null;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java 2007-07-19 20:57:31 UTC (rev 10048)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java 2007-07-19 21:15:13 UTC (rev 10049)
@@ -36,6 +36,7 @@
import org.axsl.galley.ForeignContent;
import org.axsl.galley.RenderVisitor;
+import java.awt.Color;
import java.util.Collections;
import java.util.List;
@@ -314,4 +315,46 @@
return traitGeneratedBy().traitSpaceEndOptimum(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitUnderlineScore() {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitOverlineScore() {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitThroughScore() {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitUnderlineScoreColor() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitOverlineScoreColor() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitThroughScoreColor() {
+ return null;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2007-07-19 20:57:31 UTC (rev 10048)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2007-07-19 21:15:13 UTC (rev 10049)
@@ -445,4 +445,46 @@
return traitGeneratedBy().traitSpaceEndOptimum(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitUnderlineScore() {
+ return traitGeneratedBy().traitUnderlineScore(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitOverlineScore() {
+ return traitGeneratedBy().traitOverlineScore(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitThroughScore() {
+ return traitGeneratedBy().traitThroughScore(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitUnderlineScoreColor() {
+ return traitGeneratedBy().traitUnderlineScoreColor(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitOverlineScoreColor() {
+ return traitGeneratedBy().traitOverlineScoreColor(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitThroughScoreColor() {
+ return traitGeneratedBy().traitThroughScoreColor(this);
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java 2007-07-19 20:57:31 UTC (rev 10048)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java 2007-07-19 21:15:13 UTC (rev 10049)
@@ -34,6 +34,7 @@
import org.axsl.fo.fo.InlineContainer;
import org.axsl.galley.RenderVisitor;
+import java.awt.Color;
import java.util.ArrayList;
import java.util.List;
@@ -241,4 +242,46 @@
return traitGeneratedBy().traitSpaceEndOptimum(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitUnderlineScore() {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitOverlineScore() {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitThroughScore() {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitUnderlineScoreColor() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitOverlineScoreColor() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitThroughScoreColor() {
+ return null;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-19 20:57:31 UTC (rev 10048)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-19 21:15:13 UTC (rev 10049)
@@ -46,6 +46,7 @@
import org.axsl.font.FontUse;
import org.axsl.galley.RenderVisitor;
+import java.awt.Color;
import java.util.ArrayList;
import java.util.List;
@@ -675,4 +676,46 @@
+ this.traitGeneratedBy().traitLetterSpacingOpt(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitUnderlineScore() {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitOverlineScore() {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitThroughScore() {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitUnderlineScoreColor() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitOverlineScoreColor() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitThroughScoreColor() {
+ return null;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java 2007-07-19 20:57:31 UTC (rev 10048)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java 2007-07-19 21:15:13 UTC (rev 10049)
@@ -36,6 +36,7 @@
import org.axsl.font.FontUse;
import org.axsl.galley.RenderVisitor;
+import java.awt.Color;
import java.util.Collections;
import java.util.List;
@@ -296,4 +297,46 @@
traitGeneratedBy().traitWordSpacingOpt(this));
}
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitUnderlineScore() {
+ return traitGeneratedBy().traitUnderlineScore(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitOverlineScore() {
+ return traitGeneratedBy().traitOverlineScore(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitThroughScore() {
+ return traitGeneratedBy().traitThroughScore(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitUnderlineScoreColor() {
+ return traitGeneratedBy().traitUnderlineScoreColor(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitOverlineScoreColor() {
+ return traitGeneratedBy().traitOverlineScoreColor(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitThroughScoreColor() {
+ return traitGeneratedBy().traitThroughScoreColor(this);
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java 2007-07-19 20:57:31 UTC (rev 10048)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java 2007-07-19 21:15:13 UTC (rev 10049)
@@ -36,6 +36,7 @@
import org.axsl.font.FontUse;
import org.axsl.galley.RenderVisitor;
+import java.awt.Color;
import java.util.Collections;
import java.util.List;
@@ -325,4 +326,46 @@
traitGeneratedBy().traitWordSpacingOpt(this));
}
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitUnderlineScore() {
+ return traitGeneratedBy().traitUnderlineScore(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitOverlineScore() {
+ return traitGeneratedBy().traitOverlineScore(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitThroughScore() {
+ return traitGeneratedBy().traitThroughScore(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitUnderlineScoreColor() {
+ return traitGeneratedBy().traitUnderlineScoreColor(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitOverlineScoreColor() {
+ return traitGeneratedBy().traitOverlineScoreColor(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitThroughScoreColor() {
+ return traitGeneratedBy().traitThroughScoreColor(this);
+ }
+
}
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-19 20:57:31 UTC (rev 10048)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2007-07-19 21:15:13 UTC (rev 10049)
@@ -42,6 +42,7 @@
import org.axsl.font.FontUse;
import org.axsl.galley.RenderVisitor;
+import java.awt.Color;
import java.util.Collections;
import java.util.List;
@@ -930,4 +931,46 @@
return traitGeneratedBy().traitLetterSpacingMin(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitUnderlineScore() {
+ return traitGeneratedBy().traitUnderlineScore(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitOverlineScore() {
+ return traitGeneratedBy().traitOverlineScore(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean traitThroughScore() {
+ return traitGeneratedBy().traitThroughScore(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitUnderlineScoreColor() {
+ return traitGeneratedBy().traitUnderlineScoreColor(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitOverlineScoreColor() {
+ return traitGeneratedBy().traitOverlineScoreColor(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitThroughScoreColor() {
+ return traitGeneratedBy().traitThroughScoreColor(this);
+ }
+
}
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-19 20:57:31 UTC (rev 10048)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-19 21:15:13 UTC (rev 10049)
@@ -161,6 +161,7 @@
import org.axsl.fo.fo.prop.SwitchToPa;
import org.axsl.fo.fo.prop.TableBorderPrecedencePa;
import org.axsl.fo.fo.prop.TablePa;
+import org.axsl.fo.fo.prop.TextDecorationPa;
import org.axsl.fo.fo.prop.TextShadowPa;
import org.axsl.fo.fo.prop.TreatAsWordSpacePa;
import org.axsl.fo.fo.prop.UnicodeBidiPa;
@@ -210,7 +211,8 @@
RenderingIntentPa,
ScoreSpacesPa, SpanPa, SrcPa, StartingStatePa, SuppressAtLineBreakPa,
SwitchToPa,
- TableBorderPrecedencePa, TablePa, TextShadowPa, TreatAsWordSpacePa,
+ TableBorderPrecedencePa, TablePa, TextDecorationPa, TextShadowPa,
+ TreatAsWordSpacePa,
UnicodeBidiPa, VisibilityPa, WrapOptionPa,
ZIndexPa {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-19 21:40:16
|
Revision: 10047
http://svn.sourceforge.net/foray/?rev=10047&view=rev
Author: victormote
Date: 2007-07-19 13:48:38 -0700 (Thu, 19 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new 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/LeaderArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.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-19 19:25:09 UTC (rev 10046)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-19 20:48:38 UTC (rev 10047)
@@ -117,33 +117,6 @@
}
/**
- * Returns the word-spacing optimum trait.
- * @return The word-spacing optimum trait.
- * @see Fo#traitWordSpacingOpt(FoContext)
- */
- public int traitWordSpacingOpt() {
- return traitGeneratedBy().traitWordSpacingOpt(this);
- }
-
- /**
- * Returns the word-spacing maximum trait.
- * @return The word-spacing maximum trait.
- * @see Fo#traitWordSpacingMax(FoContext)
- */
- public int traitWordSpacingMax() {
- return traitGeneratedBy().traitWordSpacingMax(this);
- }
-
- /**
- * Returns the word-spacing minimum trait.
- * @return The word-spacing minimum trait.
- * @see Fo#traitWordSpacingMin(FoContext)
- */
- public int traitWordSpacingMin() {
- return traitGeneratedBy().traitWordSpacingMin(this);
- }
-
- /**
* Returns the font-size trait.
* @return The font-size trait.
* @see Fo#traitFontSize(FoContext)
@@ -258,19 +231,6 @@
}
/**
- * Computes the width of a word, in millipoints.
- * @param word The word whose width should be computed.
- * @return The width of the word, in millipoints.
- */
- public int getWordWidth(final String word) {
- final FontUse fontUse = getPrimaryFont();
- final Font font = fontUse.getFont();
- fontUse.registerCharsUsed(word);
- return font.width(word, traitFontSize(),
- traitLetterSpacingOpt(), traitWordSpacingOpt());
- }
-
- /**
* Computes the width of a character, in millipoints.
* @param c The Unicode codepoint whose width should be computed.
* @return The width of the codepoint, in millipoints.
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-19 19:25:09 UTC (rev 10046)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-19 20:48:38 UTC (rev 10047)
@@ -32,9 +32,9 @@
import org.axsl.common.value.LeaderAlignment;
import org.axsl.common.value.LeaderPattern;
import org.axsl.common.value.RuleStyle;
+import org.axsl.fo.fo.CharacterSequence;
import org.axsl.fo.fo.ExternalGraphic;
import org.axsl.fo.fo.GraftingPoint;
-import org.axsl.fo.fo.CharacterSequence;
import org.axsl.fo.fo.Inline;
import org.axsl.fo.fo.InlineContainer;
import org.axsl.fo.fo.InstreamForeignObject;
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java 2007-07-19 19:25:09 UTC (rev 10046)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java 2007-07-19 20:48:38 UTC (rev 10047)
@@ -32,6 +32,8 @@
import org.axsl.fo.Fo;
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.fo.fo.PageNumber;
+import org.axsl.font.Font;
+import org.axsl.font.FontUse;
import org.axsl.galley.RenderVisitor;
import java.util.Collections;
@@ -280,4 +282,18 @@
return traitGeneratedBy().traitSpaceEndOptimum(this);
}
+ /**
+ * Computes the width of a word, in millipoints.
+ * @param word The word whose width should be computed.
+ * @return The width of the word, in millipoints.
+ */
+ public int getWordWidth(final String word) {
+ final FontUse fontUse = getPrimaryFont();
+ final Font font = fontUse.getFont();
+ fontUse.registerCharsUsed(word);
+ return font.width(word, traitFontSize(),
+ traitLetterSpacingOpt(),
+ traitGeneratedBy().traitWordSpacingOpt(this));
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java 2007-07-19 19:25:09 UTC (rev 10046)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java 2007-07-19 20:48:38 UTC (rev 10047)
@@ -32,6 +32,8 @@
import org.axsl.fo.Fo;
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.fo.fo.PageNumberCitation;
+import org.axsl.font.Font;
+import org.axsl.font.FontUse;
import org.axsl.galley.RenderVisitor;
import java.util.Collections;
@@ -309,4 +311,18 @@
return traitGeneratedBy().traitRefId(this);
}
+ /**
+ * Computes the width of a word, in millipoints.
+ * @param word The word whose width should be computed.
+ * @return The width of the word, in millipoints.
+ */
+ public int getWordWidth(final String word) {
+ final FontUse fontUse = getPrimaryFont();
+ final Font font = fontUse.getFont();
+ fontUse.registerCharsUsed(word);
+ return font.width(word, traitFontSize(),
+ traitLetterSpacingOpt(),
+ traitGeneratedBy().traitWordSpacingOpt(this));
+ }
+
}
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-19 19:25:09 UTC (rev 10046)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2007-07-19 20:48:38 UTC (rev 10047)
@@ -248,7 +248,7 @@
this.backingOffset = backingOffset;
this.backingSize = backingSize;
this.resolvedLetterSpacing = parentArea.traitLetterSpacingOpt();
- this.resolvedWordSpacing = parentArea.traitWordSpacingOpt();
+ this.resolvedWordSpacing = this.traitWordSpacingOpt();
this.hasDiscretionaryHyphen = hasDiscretionaryHyphen;
this.hasFauxSmallCaps = hasFauxSmallCaps;
setProgressionDimension(progressionDimensionUsed);
@@ -752,8 +752,8 @@
/**
* {@inheritDoc}
*/
- public Fo traitGeneratedBy() {
- return this.getLinkage().getFONode();
+ public CharacterContent traitGeneratedBy() {
+ return (CharacterContent) this.getLinkage().getFONode();
}
/**
@@ -882,4 +882,28 @@
}
}
+ /**
+ * Returns the word-spacing optimum trait.
+ * @return The word-spacing optimum trait.
+ */
+ public int traitWordSpacingOpt() {
+ return traitGeneratedBy().traitWordSpacingOpt(this);
+ }
+
+ /**
+ * Returns the word-spacing maximum trait.
+ * @return The word-spacing maximum trait.
+ */
+ public int traitWordSpacingMax() {
+ return traitGeneratedBy().traitWordSpacingMax(this);
+ }
+
+ /**
+ * Returns the word-spacing minimum trait.
+ * @return The word-spacing minimum trait.
+ */
+ public int traitWordSpacingMin() {
+ return traitGeneratedBy().traitWordSpacingMin(this);
+ }
+
}
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-19 19:25:09 UTC (rev 10046)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-19 20:48:38 UTC (rev 10047)
@@ -116,6 +116,7 @@
import org.axsl.fo.fo.prop.CaptionSidePa;
import org.axsl.fo.fo.prop.CaseNamePa;
import org.axsl.fo.fo.prop.CaseTitlePa;
+import org.axsl.fo.fo.prop.CharacterPa;
import org.axsl.fo.fo.prop.ClearPa;
import org.axsl.fo.fo.prop.ClipPa;
import org.axsl.fo.fo.prop.ColorProfileNamePa;
@@ -197,7 +198,8 @@
CommonHyphenationPa, CommonMarginBlockPa, CommonMarginInlinePa,
CommonRelativePositionPa, ActiveStatePa, AlignmentAdjustPa,
AlignmentBaselinePa, AutoRestorePa, BaselineShiftPa, BasicLinkPa,
- BlockPa, CaptionSidePa, CaseNamePa, CaseTitlePa, ClearPa, ClipPa,
+ BlockPa, CaptionSidePa, CaseNamePa, CaseTitlePa, CharacterPa, ClearPa,
+ ClipPa,
ColorProfileNamePa, ColumnCountPa, ColumnGapPa, ContentTypePa,
DirectionPa, DisplayAlignPa, DominantBaselinePa, EmptyCellsPa, ExtentPa,
ExternalDestinationPa, FloatPa, FlowNamePa, GlyphOrientationPa,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-19 21:58:41
|
Revision: 10051
http://svn.sourceforge.net/foray/?rev=10051&view=rev
Author: victormote
Date: 2007-07-19 14:58:38 -0700 (Thu, 19 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new 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/BlockArea.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-19 21:31:09 UTC (rev 10050)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-19 21:58:38 UTC (rev 10051)
@@ -839,33 +839,6 @@
throws AreaTreeException;
/**
- * Returns the half-leading minimum trait for this area.
- * @return The half-leading minimum trait for this area.
- * @see Fo#traitHalfLeadingMin(FoContext)
- */
- public int traitHalfLeadingMin() {
- return traitGeneratedBy().traitHalfLeadingMin(this);
- }
-
- /**
- * Returns the half-leading optimum trait for this area.
- * @return The half-leading optimum trait for this area.
- * @see Fo#traitHalfLeadingOpt(FoContext)
- */
- public int traitHalfLeadingOpt() {
- return traitGeneratedBy().traitHalfLeadingOpt(this);
- }
-
- /**
- * Returns the half-leading maximum trait for this area.
- * @return The half-leading maximum trait for this area.
- * @see Fo#traitHalfLeadingMax(FoContext)
- */
- public int traitHalfLeadingMax() {
- return traitGeneratedBy().traitHalfLeadingMax(this);
- }
-
- /**
* Indicates whether this area is a reference area.
* @return True iff this area is a reference area.
*/
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BlockArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/BlockArea.java 2007-07-19 21:31:09 UTC (rev 10050)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/BlockArea.java 2007-07-19 21:58:38 UTC (rev 10051)
@@ -89,4 +89,28 @@
return (Block) this.getLinkage().getFONode();
}
+ /**
+ * Returns the half-leading minimum trait for this area.
+ * @return The half-leading minimum trait for this area.
+ */
+ public int traitHalfLeadingMin() {
+ return traitGeneratedBy().traitHalfLeadingMin(this);
+ }
+
+ /**
+ * Returns the half-leading optimum trait for this area.
+ * @return The half-leading optimum trait for this area.
+ */
+ public int traitHalfLeadingOpt() {
+ return traitGeneratedBy().traitHalfLeadingOpt(this);
+ }
+
+ /**
+ * Returns the half-leading maximum trait for this area.
+ * @return The half-leading maximum trait for this area.
+ */
+ public int traitHalfLeadingMax() {
+ return traitGeneratedBy().traitHalfLeadingMax(this);
+ }
+
}
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-19 21:31:09 UTC (rev 10050)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-19 21:58:38 UTC (rev 10051)
@@ -143,6 +143,7 @@
import org.axsl.fo.fo.prop.GlyphOrientationPa;
import org.axsl.fo.fo.prop.InternalDestinationPa;
import org.axsl.fo.fo.prop.LeaderPa;
+import org.axsl.fo.fo.prop.LineHeightPa;
import org.axsl.fo.fo.prop.ListBlockPa;
import org.axsl.fo.fo.prop.MediaUsagePa;
import org.axsl.fo.fo.prop.NumberColumnsRepeatedPa;
@@ -204,7 +205,7 @@
ColorProfileNamePa, ColumnCountPa, ColumnGapPa, ContentTypePa,
DirectionPa, DisplayAlignPa, DominantBaselinePa, EmptyCellsPa, ExtentPa,
ExternalDestinationPa, FloatPa, FlowNamePa, GlyphOrientationPa,
- InternalDestinationPa, LeaderPa, ListBlockPa,
+ InternalDestinationPa, LeaderPa, LineHeightPa, ListBlockPa,
MediaUsagePa, NumberColumnsRepeatedPa, OverflowPa, PageDimensionPa,
PageSequencePa,
ReferenceOrientationPa, RefIdPa, RelativeAlignPa,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-19 22:37:18
|
Revision: 10054
http://svn.sourceforge.net/foray/?rev=10054&view=rev
Author: victormote
Date: 2007-07-19 15:37:11 -0700 (Thu, 19 Jul 2007)
Log Message:
-----------
Conform to axsl changes removing convenience methods.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.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-19 22:20:40 UTC (rev 10053)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-19 22:37:11 UTC (rev 10054)
@@ -269,9 +269,10 @@
public int brOriginX() {
// Start at the padding-rectangle origin.
int x = prOriginX();
+ final WritingMode writingMode = this.getWritingMode();
if (this.getBPAxis() == AbsoluteAxis.VERTICAL) {
// Our BP Axis is vertical
- final boolean goingRight = this.traitIPDirectionOdd()
+ final boolean goingRight = writingMode.getIpDirectionOdd()
== AbsoluteDirection.LEFT_TO_RIGHT;
if (goingRight) {
x -= this.traitBorderStartWidth();
@@ -280,7 +281,7 @@
}
} else {
// Our BP Axis is horizontal
- final boolean goingRight = this.traitBPDirection()
+ final boolean goingRight = writingMode.getBpDirection()
== AbsoluteDirection.LEFT_TO_RIGHT;
if (goingRight) {
x -= this.traitBorderBeforeWidth();
@@ -297,9 +298,10 @@
public int brOriginY() {
// Start at the padding-rectangle origin.
int y = prOriginY();
+ final WritingMode writingMode = this.getWritingMode();
if (this.getBPAxis() == AbsoluteAxis.VERTICAL) {
// Our BP Axis is vertical
- final boolean goingDown = this.traitBPDirection()
+ final boolean goingDown = writingMode.getBpDirection()
== AbsoluteDirection.TOP_TO_BOTTOM;
if (goingDown) {
y += this.traitBorderBeforeWidth();
@@ -308,7 +310,7 @@
}
} else {
// Our BP Axis is horizontal
- final boolean goingUp = this.traitIPDirectionOdd()
+ final boolean goingUp = writingMode.getIpDirectionOdd()
== AbsoluteDirection.BOTTOM_TO_TOP;
if (goingUp) {
y -= this.traitBorderStartWidth();
@@ -370,9 +372,10 @@
public int prOriginX() {
// Start at the content-rectangle origin.
int x = crOriginX();
+ final WritingMode writingMode = this.getWritingMode();
if (this.getBPAxis() == AbsoluteAxis.VERTICAL) {
// Our BP Axis is vertical
- final boolean goingRight = this.traitIPDirectionOdd()
+ final boolean goingRight = writingMode.getIpDirectionOdd()
== AbsoluteDirection.LEFT_TO_RIGHT;
if (goingRight) {
x -= this.traitPaddingStart();
@@ -381,7 +384,7 @@
}
} else {
// Our BP Axis is horizontal
- final boolean goingRight = this.traitBPDirection()
+ final boolean goingRight = writingMode.getBpDirection()
== AbsoluteDirection.LEFT_TO_RIGHT;
if (goingRight) {
x -= this.traitPaddingBefore();
@@ -399,8 +402,9 @@
public int prOriginY() {
// Start at the content-rectangle origin.
int y = crOriginY();
+ final WritingMode writingMode = this.getWritingMode();
if (this.getBPAxis() == AbsoluteAxis.VERTICAL) {
- final boolean goingDown = this.traitBPDirection()
+ final boolean goingDown = writingMode.getBpDirection()
== AbsoluteDirection.TOP_TO_BOTTOM;
if (goingDown) {
y += this.traitPaddingBefore();
@@ -409,7 +413,7 @@
}
} else {
// Our BP Axis is horizontal
- final boolean goingRight = this.traitBPDirection()
+ final boolean goingRight = writingMode.getBpDirection()
== AbsoluteDirection.LEFT_TO_RIGHT;
if (goingRight) {
y -= this.traitPaddingBefore();
@@ -643,33 +647,6 @@
public abstract int traitSpaceEndOptimum();
/**
- * Returns the bp direction trait for this area.
- * @return The bp direction trait for this area.
- * @see Fo#traitBpDirection(FoContext)
- */
- public AbsoluteDirection traitBPDirection() {
- return traitGeneratedBy().traitBpDirection(this);
- }
-
- /**
- * Returns the ip direction trait for odd-numbered lines in this area.
- * @return The ip direction trait for odd-numbered lines in this area.
- * @see Fo#traitIpDirectionOdd(FoContext)
- */
- public AbsoluteDirection traitIPDirectionOdd() {
- return traitGeneratedBy().traitIpDirectionOdd(this);
- }
-
- /**
- * Returns the ip direction trait for even-numbered lines in this area.
- * @return The ip direction trait for even-numbered lines in this area.
- * @see Fo#traitIpDirectionOdd(FoContext)
- */
- public AbsoluteDirection traitIPDirectionEven() {
- return traitGeneratedBy().traitIpDirectionEven(this);
- }
-
- /**
* Return the minimum BP dimension for this area.
* @return The minimum BP dimension for this area, or -1 for "auto".
*/
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-19 22:20:40 UTC (rev 10053)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-19 22:37:11 UTC (rev 10054)
@@ -2365,27 +2365,6 @@
/**
* {@inheritDoc}
*/
- public AbsoluteDirection traitIpDirectionOdd(final FoContext context) {
- return this.getPropertyList().traitIPDirectionOdd(this, context);
- }
-
- /**
- * {@inheritDoc}
- */
- public AbsoluteDirection traitIpDirectionEven(final FoContext context) {
- return this.getPropertyList().traitIPDirectionEven(this, context);
- }
-
- /**
- * {@inheritDoc}
- */
- public AbsoluteDirection traitBpDirection(final FoContext context) {
- return this.getPropertyList().traitBPDirection(this, context);
- }
-
- /**
- * {@inheritDoc}
- */
public AbsoluteDirection traitShiftDirectionOdd(final FoContext context) {
return this.getPropertyList().traitShiftDirectionOdd(this, context);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-19 23:06:06
|
Revision: 10055
http://svn.sourceforge.net/foray/?rev=10055&view=rev
Author: victormote
Date: 2007-07-19 16:06:07 -0700 (Thu, 19 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new property-specific interfaces.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java
trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.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/AbstractInlineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java 2007-07-19 22:37:11 UTC (rev 10054)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java 2007-07-19 23:06:07 UTC (rev 10055)
@@ -238,4 +238,29 @@
return 0;
}
+ /**
+ * Returns the BPD for an inline area.
+ * @return The BPD for an inline area.
+ */
+ protected int crBPDInline() {
+ int actual = 0;
+ final int computed = this.getBpDimensionOpt();
+ if (computed < 0) {
+ actual = ancestorArea().crBpd()
+ - traitBorderBeforeWidth()
+ - traitBorderAfterWidth()
+ - traitPaddingBefore()
+ - traitPaddingAfter();
+ } else {
+ actual = computed;
+ }
+ return actual;
+ }
+
+ /**
+ * Returns the optimum block-progression-dimension for this inline area.
+ * @return The optimum bpd for this area, in millipoints.
+ */
+ protected abstract int getBpDimensionOpt();
+
}
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-19 22:37:11 UTC (rev 10054)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-19 23:06:07 UTC (rev 10055)
@@ -647,30 +647,6 @@
public abstract int traitSpaceEndOptimum();
/**
- * Return the minimum BP dimension for this area.
- * @return The minimum BP dimension for this area, or -1 for "auto".
- */
- public int traitBPDimensionMin() {
- return traitGeneratedBy().traitBpDimensionMin(this);
- }
-
- /**
- * Return the optimum BP dimension for this area.
- * @return The optimum BP dimension for this area, or -1 for "auto".
- */
- public int traitBPDimensionOpt() {
- return traitGeneratedBy().traitBpDimensionOpt(this);
- }
-
- /**
- * Return the maximum BP dimension for this area.
- * @return The maximim BP dimension for this area, or -1 for "auto".
- */
- public int traitBPDimensionMax() {
- return traitGeneratedBy().traitBpDimensionMax(this);
- }
-
- /**
* Return the minimum IP dimension for this area.
* @return The minimum IP dimension for this area, or -1 for "auto".
*/
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java 2007-07-19 22:37:11 UTC (rev 10054)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java 2007-07-19 23:06:07 UTC (rev 10055)
@@ -198,25 +198,6 @@
}
/**
- * Returns the BPD for an inline area.
- * @return The BPD for an inline area.
- */
- protected int crBPDInline() {
- int actual = 0;
- final int computed = this.traitBPDimensionOpt();
- if (computed < 0) {
- actual = ancestorArea().crBpd()
- - traitBorderBeforeWidth()
- - traitBorderAfterWidth()
- - traitPaddingBefore()
- - traitPaddingAfter();
- } else {
- actual = computed;
- }
- return actual;
- }
-
- /**
* Computes the initial value of anteriorSpace for this Area.
*/
public void initializeAnteriorSpace() {
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java 2007-07-19 22:37:11 UTC (rev 10054)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java 2007-07-19 23:06:07 UTC (rev 10055)
@@ -345,4 +345,11 @@
return null;
}
+ /**
+ * {@inheritDoc}
+ */
+ protected int getBpDimensionOpt() {
+ return this.traitGeneratedBy().traitBpDimensionOpt(this);
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java 2007-07-19 22:37:11 UTC (rev 10054)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java 2007-07-19 23:06:07 UTC (rev 10055)
@@ -357,4 +357,11 @@
return null;
}
+ /**
+ * {@inheritDoc}
+ */
+ protected int getBpDimensionOpt() {
+ return this.traitGeneratedBy().traitBpDimensionOpt(this);
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2007-07-19 22:37:11 UTC (rev 10054)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2007-07-19 23:06:07 UTC (rev 10055)
@@ -487,4 +487,11 @@
return traitGeneratedBy().traitThroughScoreColor(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ protected int getBpDimensionOpt() {
+ return this.traitGeneratedBy().traitBpDimensionOpt(this);
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java 2007-07-19 22:37:11 UTC (rev 10054)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java 2007-07-19 23:06:07 UTC (rev 10055)
@@ -334,4 +334,11 @@
return newListBlockArea;
}
+ /**
+ * {@inheritDoc}
+ */
+ protected int getBpDimensionOpt() {
+ return this.traitGeneratedBy().traitBpDimensionOpt(this);
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-19 22:37:11 UTC (rev 10054)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-19 23:06:07 UTC (rev 10055)
@@ -718,4 +718,11 @@
return null;
}
+ /**
+ * {@inheritDoc}
+ */
+ protected int getBpDimensionOpt() {
+ return 0;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java 2007-07-19 22:37:11 UTC (rev 10054)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java 2007-07-19 23:06:07 UTC (rev 10055)
@@ -339,4 +339,11 @@
return traitGeneratedBy().traitThroughScoreColor(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ protected int getBpDimensionOpt() {
+ return 0;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java 2007-07-19 22:37:11 UTC (rev 10054)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java 2007-07-19 23:06:07 UTC (rev 10055)
@@ -368,4 +368,11 @@
return traitGeneratedBy().traitThroughScoreColor(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ protected int getBpDimensionOpt() {
+ return 0;
+ }
+
}
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-19 22:37:11 UTC (rev 10054)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2007-07-19 23:06:07 UTC (rev 10055)
@@ -973,4 +973,11 @@
return traitGeneratedBy().traitThroughScoreColor(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ protected int getBpDimensionOpt() {
+ return 0;
+ }
+
}
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-19 22:37:11 UTC (rev 10054)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-19 23:06:07 UTC (rev 10055)
@@ -113,6 +113,7 @@
import org.axsl.fo.fo.prop.BaselineShiftPa;
import org.axsl.fo.fo.prop.BasicLinkPa;
import org.axsl.fo.fo.prop.BlockPa;
+import org.axsl.fo.fo.prop.BlockProgressionDimensionPa;
import org.axsl.fo.fo.prop.CaptionSidePa;
import org.axsl.fo.fo.prop.CaseNamePa;
import org.axsl.fo.fo.prop.CaseTitlePa;
@@ -202,8 +203,8 @@
CommonHyphenationPa, CommonMarginBlockPa, CommonMarginInlinePa,
CommonRelativePositionPa, ActiveStatePa, AlignmentAdjustPa,
AlignmentBaselinePa, AutoRestorePa, BaselineShiftPa, BasicLinkPa,
- BlockPa, CaptionSidePa, CaseNamePa, CaseTitlePa, CharacterPa, ClearPa,
- ClipPa,
+ BlockPa, BlockProgressionDimensionPa, CaptionSidePa, CaseNamePa,
+ CaseTitlePa, CharacterPa, ClearPa, ClipPa,
ColorProfileNamePa, ColumnCountPa, ColumnGapPa, ContentTypePa,
DirectionPa, DisplayAlignPa, DominantBaselinePa, EmptyCellsPa, ExtentPa,
ExternalDestinationPa, FloatPa, FlowNamePa, GlyphOrientationPa,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-19 23:31:16
|
Revision: 10056
http://svn.sourceforge.net/foray/?rev=10056&view=rev
Author: victormote
Date: 2007-07-19 16:31:16 -0700 (Thu, 19 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new property-specific interfaces.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/AbstractTablePartContainer.java
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java
trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/ListBlockArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/ListItemArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/NormalFlowRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/TableRowContainer.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/AbstractTablePartContainer.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AbstractTablePartContainer.java 2007-07-19 23:06:07 UTC (rev 10055)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AbstractTablePartContainer.java 2007-07-19 23:31:16 UTC (rev 10056)
@@ -188,4 +188,11 @@
return 0;
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitIPDimensionOpt() {
+ return -1;
+ }
+
}
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-19 23:06:07 UTC (rev 10055)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-19 23:31:16 UTC (rev 10056)
@@ -647,30 +647,6 @@
public abstract int traitSpaceEndOptimum();
/**
- * Return the minimum IP dimension for this area.
- * @return The minimum IP dimension for this area, or -1 for "auto".
- */
- public int traitIPDimensionMin() {
- return traitGeneratedBy().traitIpDimensionMin(this);
- }
-
- /**
- * Return the optimum IP dimension for this area.
- * @return The optimum IP dimension for this area, or -1 for "auto".
- */
- public int traitIPDimensionOpt() {
- return traitGeneratedBy().traitIpDimensionOpt(this);
- }
-
- /**
- * Return the maximum IP dimension for this area.
- * @return The maximim IP dimension for this area, or -1 for "auto".
- */
- public int traitIPDimensionMax() {
- return traitGeneratedBy().traitIpDimensionMax(this);
- }
-
- /**
* Tells which axis (horizontal or vertical) is the block-progression axis.
* @return Either {@link AbsoluteAxis#HORIZONTAL} or
* {@link AbsoluteAxis#VERTICAL}, or null if writing-mode is invalid.
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java 2007-07-19 23:06:07 UTC (rev 10055)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java 2007-07-19 23:31:16 UTC (rev 10056)
@@ -323,4 +323,10 @@
return offset;
}
+ /**
+ * Return the optimum IP dimension for this area.
+ * @return The optimum IP dimension for this area, or -1 for "auto".
+ */
+ public abstract int traitIPDimensionOpt();
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java 2007-07-19 23:06:07 UTC (rev 10055)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java 2007-07-19 23:31:16 UTC (rev 10056)
@@ -513,4 +513,11 @@
return traitGeneratedBy().traitSpaceEndOptimum(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitIPDimensionOpt() {
+ return traitGeneratedBy().traitIpDimensionOpt(this);
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java 2007-07-19 23:06:07 UTC (rev 10055)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java 2007-07-19 23:31:16 UTC (rev 10056)
@@ -352,4 +352,11 @@
return this.traitGeneratedBy().traitBpDimensionOpt(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitIPDimensionOpt() {
+ return traitGeneratedBy().traitIpDimensionOpt(this);
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java 2007-07-19 23:06:07 UTC (rev 10055)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java 2007-07-19 23:31:16 UTC (rev 10056)
@@ -364,4 +364,11 @@
return this.traitGeneratedBy().traitBpDimensionOpt(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitIPDimensionOpt() {
+ return traitGeneratedBy().traitIpDimensionOpt(this);
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2007-07-19 23:06:07 UTC (rev 10055)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2007-07-19 23:31:16 UTC (rev 10056)
@@ -494,4 +494,11 @@
return this.traitGeneratedBy().traitBpDimensionOpt(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitIPDimensionOpt() {
+ return traitGeneratedBy().traitIpDimensionOpt(this);
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java 2007-07-19 23:06:07 UTC (rev 10055)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java 2007-07-19 23:31:16 UTC (rev 10056)
@@ -341,4 +341,11 @@
return this.traitGeneratedBy().traitBpDimensionOpt(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitIPDimensionOpt() {
+ return traitGeneratedBy().traitIpDimensionOpt(this);
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-19 23:06:07 UTC (rev 10055)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-19 23:31:16 UTC (rev 10056)
@@ -725,4 +725,11 @@
return 0;
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitIPDimensionOpt() {
+ return -1;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-07-19 23:06:07 UTC (rev 10055)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-07-19 23:31:16 UTC (rev 10056)
@@ -1419,4 +1419,11 @@
return traitGeneratedBy().traitSpaceEndOptimum(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitIPDimensionOpt() {
+ return -1;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ListBlockArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/ListBlockArea.java 2007-07-19 23:06:07 UTC (rev 10055)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/ListBlockArea.java 2007-07-19 23:31:16 UTC (rev 10056)
@@ -311,4 +311,11 @@
return traitGeneratedBy().traitSpaceEndOptimum(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitIPDimensionOpt() {
+ return -1;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ListItemArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/ListItemArea.java 2007-07-19 23:06:07 UTC (rev 10055)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/ListItemArea.java 2007-07-19 23:31:16 UTC (rev 10056)
@@ -390,4 +390,11 @@
return traitGeneratedBy().traitSpaceEndOptimum(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitIPDimensionOpt() {
+ return -1;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2007-07-19 23:06:07 UTC (rev 10055)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2007-07-19 23:31:16 UTC (rev 10056)
@@ -510,4 +510,11 @@
return traitGeneratedBy().traitSpaceEndOptimum(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitIPDimensionOpt() {
+ return -1;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/NormalFlowRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/NormalFlowRA.java 2007-07-19 23:06:07 UTC (rev 10055)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/NormalFlowRA.java 2007-07-19 23:31:16 UTC (rev 10056)
@@ -404,4 +404,11 @@
return 0;
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitIPDimensionOpt() {
+ return -1;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java 2007-07-19 23:06:07 UTC (rev 10055)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java 2007-07-19 23:31:16 UTC (rev 10056)
@@ -346,4 +346,11 @@
return 0;
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitIPDimensionOpt() {
+ return -1;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java 2007-07-19 23:06:07 UTC (rev 10055)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java 2007-07-19 23:31:16 UTC (rev 10056)
@@ -375,4 +375,11 @@
return 0;
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitIPDimensionOpt() {
+ return -1;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java 2007-07-19 23:06:07 UTC (rev 10055)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/SpanRA.java 2007-07-19 23:31:16 UTC (rev 10056)
@@ -561,4 +561,11 @@
return 0;
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitIPDimensionOpt() {
+ return -1;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java 2007-07-19 23:06:07 UTC (rev 10055)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java 2007-07-19 23:31:16 UTC (rev 10056)
@@ -717,4 +717,11 @@
return this.traitGeneratedBy().traitDisplayAlign(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitIPDimensionOpt() {
+ return traitGeneratedBy().traitIpDimensionOpt(this);
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java 2007-07-19 23:06:07 UTC (rev 10055)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TableRA.java 2007-07-19 23:31:16 UTC (rev 10056)
@@ -858,4 +858,11 @@
return traitGeneratedBy().traitSpaceEndOptimum(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitIPDimensionOpt() {
+ return -1;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableRowContainer.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/TableRowContainer.java 2007-07-19 23:06:07 UTC (rev 10055)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TableRowContainer.java 2007-07-19 23:31:16 UTC (rev 10056)
@@ -379,4 +379,11 @@
return 0;
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitIPDimensionOpt() {
+ return -1;
+ }
+
}
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-19 23:06:07 UTC (rev 10055)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2007-07-19 23:31:16 UTC (rev 10056)
@@ -980,4 +980,11 @@
return 0;
}
+ /**
+ * {@inheritDoc}
+ */
+ public int traitIPDimensionOpt() {
+ return -1;
+ }
+
}
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-19 23:06:07 UTC (rev 10055)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-19 23:31:16 UTC (rev 10056)
@@ -142,6 +142,7 @@
import org.axsl.fo.fo.prop.FloatPa;
import org.axsl.fo.fo.prop.FlowNamePa;
import org.axsl.fo.fo.prop.GlyphOrientationPa;
+import org.axsl.fo.fo.prop.InlineProgressionDimensionPa;
import org.axsl.fo.fo.prop.InternalDestinationPa;
import org.axsl.fo.fo.prop.KeepTogetherPa;
import org.axsl.fo.fo.prop.KeepWithPa;
@@ -208,6 +209,7 @@
ColorProfileNamePa, ColumnCountPa, ColumnGapPa, ContentTypePa,
DirectionPa, DisplayAlignPa, DominantBaselinePa, EmptyCellsPa, ExtentPa,
ExternalDestinationPa, FloatPa, FlowNamePa, GlyphOrientationPa,
+ InlineProgressionDimensionPa,
InternalDestinationPa, KeepTogetherPa, KeepWithPa, LeaderPa,
LineHeightPa, ListBlockPa,
MediaUsagePa, NumberColumnsRepeatedPa, OverflowPa, PageDimensionPa,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-19 23:49:41
|
Revision: 10058
http://svn.sourceforge.net/foray/?rev=10058&view=rev
Author: victormote
Date: 2007-07-19 16:49:44 -0700 (Thu, 19 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new property-specific interfaces.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
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-19 23:34:47 UTC (rev 10057)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-19 23:49:44 UTC (rev 10058)
@@ -114,6 +114,7 @@
import org.axsl.fo.fo.prop.BasicLinkPa;
import org.axsl.fo.fo.prop.BlockPa;
import org.axsl.fo.fo.prop.BlockProgressionDimensionPa;
+import org.axsl.fo.fo.prop.BreakPa;
import org.axsl.fo.fo.prop.CaptionSidePa;
import org.axsl.fo.fo.prop.CaseNamePa;
import org.axsl.fo.fo.prop.CaseTitlePa;
@@ -204,8 +205,8 @@
CommonHyphenationPa, CommonMarginBlockPa, CommonMarginInlinePa,
CommonRelativePositionPa, ActiveStatePa, AlignmentAdjustPa,
AlignmentBaselinePa, AutoRestorePa, BaselineShiftPa, BasicLinkPa,
- BlockPa, BlockProgressionDimensionPa, CaptionSidePa, CaseNamePa,
- CaseTitlePa, CharacterPa, ClearPa, ClipPa,
+ BlockPa, BlockProgressionDimensionPa, BreakPa, CaptionSidePa,
+ CaseNamePa, CaseTitlePa, CharacterPa, ClearPa, ClipPa,
ColorProfileNamePa, ColumnCountPa, ColumnGapPa, ContentTypePa,
DirectionPa, DisplayAlignPa, DominantBaselinePa, EmptyCellsPa, ExtentPa,
ExternalDestinationPa, FloatPa, FlowNamePa, GlyphOrientationPa,
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-07-19 23:34:47 UTC (rev 10057)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-07-19 23:49:44 UTC (rev 10058)
@@ -31,13 +31,13 @@
import org.foray.layout.LayoutStrategy;
import org.axsl.area.Area;
+import org.axsl.area.AreaTreeException;
import org.axsl.area.NormalBlockArea;
import org.axsl.area.NormalFlowRefArea;
import org.axsl.area.PageArea;
import org.axsl.area.PageCollection;
import org.axsl.area.RegionBodyRefArea;
import org.axsl.area.RegionRefArea;
-import org.axsl.area.AreaTreeException;
import org.axsl.fo.Fo;
import org.axsl.fo.ProxyFactory;
import org.axsl.fo.extension.ContinuedLabel;
@@ -48,6 +48,7 @@
import org.axsl.fo.fo.Bookmark;
import org.axsl.fo.fo.BookmarkTitle;
import org.axsl.fo.fo.Character;
+import org.axsl.fo.fo.CharacterSequence;
import org.axsl.fo.fo.ColorProfile;
import org.axsl.fo.fo.Declarations;
import org.axsl.fo.fo.ExternalGraphic;
@@ -55,7 +56,6 @@
import org.axsl.fo.fo.Flow;
import org.axsl.fo.fo.Footnote;
import org.axsl.fo.fo.FootnoteBody;
-import org.axsl.fo.fo.CharacterSequence;
import org.axsl.fo.fo.InitialPropertySet;
import org.axsl.fo.fo.Inline;
import org.axsl.fo.fo.InlineContainer;
@@ -95,6 +95,7 @@
import org.axsl.fo.fo.TableRow;
import org.axsl.fo.fo.Title;
import org.axsl.fo.fo.Wrapper;
+import org.axsl.fo.fo.prop.BreakPa;
import org.axsl.fo.svg.SvgElement;
import org.axsl.text.line.EagerLineBreaker;
@@ -277,8 +278,12 @@
* {@link Status#OK} if no break is required.
*/
public Status checkBreakBefore(final Fo node, final Area area) {
+ if (! (node instanceof BreakPa)) {
+ return Status.OK;
+ }
+ final BreakPa breakableNode = (BreakPa) node;
if (!(area instanceof NormalFlowRefArea)) {
- switch (node.traitBreakBefore(area)) {
+ switch (breakableNode.traitBreakBefore(area)) {
case PAGE:
return Status.FORCE_PAGE_BREAK;
case ODD_PAGE:
@@ -292,7 +297,7 @@
}
}
final NormalFlowRefArea colArea = (NormalFlowRefArea) area;
- switch (node.traitBreakBefore(area)) {
+ switch (breakableNode.traitBreakBefore(area)) {
case PAGE: {
// if first ColumnArea, and empty, return OK
if (colArea.getChildCount() == 0
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-20 15:08:46
|
Revision: 10060
http://svn.sourceforge.net/foray/?rev=10060&view=rev
Author: victormote
Date: 2007-07-20 08:08:48 -0700 (Fri, 20 Jul 2007)
Log Message:
-----------
Conform to axsl changes renaming FoContext methods.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjScaled.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractAbsoluteDimension.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractPadding.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractRelativeDimension.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LeaderLength.java
trunk/foray/foray-fotree/src/javatest/org/foray/fotree/AbstractPropertyTest.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/OverrideGraftingContext.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2007-07-20 14:48:00 UTC (rev 10059)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2007-07-20 15:08:48 UTC (rev 10060)
@@ -658,7 +658,7 @@
/**
* {@inheritDoc}
*/
- public int ipdNearestBlockLevel() {
+ public int ipdAncestorBlockOrRa() {
/* TODO: The area used here is speculative, as we are awaiting
* clarification from the XSL-FO Editors.
* Also, consider renaming the method, both here and in aXSL, depending
@@ -670,7 +670,7 @@
/**
* {@inheritDoc}
*/
- public int bpdNearestBlockLevel() {
+ public int bpdAncestorBlockOrRa() {
/* TODO: The area used here is speculative, as we are awaiting
* clarification from the XSL-FO Editors.
* Also, consider renaming the method, both here and in aXSL, depending
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjScaled.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjScaled.java 2007-07-20 14:48:00 UTC (rev 10059)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjScaled.java 2007-07-20 15:08:48 UTC (rev 10060)
@@ -104,7 +104,7 @@
* We punt by returning the smaller of 1) the intrinsic width,
* and 2) the width of the parent area. */
return Math.min(intrinsicWidth,
- context.ipdNearestBlockLevel());
+ context.ipdAncestorBlockOrRa());
} else {
/* We can use the other dimension to compute this one. */
final int viewportBpd = this.viewportBpd(context);
@@ -174,7 +174,7 @@
* We punt by returning the smaller of 1) the intrinsic height,
* and 2) the height of the parent area. */
return Math.min(intrinsicHeight,
- context.bpdNearestBlockLevel());
+ context.bpdAncestorBlockOrRa());
} else {
/* We can use the other dimension to compute this one. */
final int viewportIpd = this.viewportIpd(context);
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractAbsoluteDimension.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractAbsoluteDimension.java 2007-07-20 14:48:00 UTC (rev 10059)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractAbsoluteDimension.java 2007-07-20 15:08:48 UTC (rev 10060)
@@ -115,9 +115,9 @@
if (value().canEvalPercentage()) {
int base = 0;
if (relativeAxis == RelativeAxis.BLOCK_PROGRESSION) {
- base = context.bpdNearestBlockLevel();
+ base = context.bpdAncestorBlockOrRa();
} else {
- base = context.ipdNearestBlockLevel();
+ base = context.ipdAncestorBlockOrRa();
}
final float percentage = value().evalPercentage();
return Math.round(percentage * base
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractPadding.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractPadding.java 2007-07-20 14:48:00 UTC (rev 10059)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractPadding.java 2007-07-20 15:08:48 UTC (rev 10060)
@@ -109,7 +109,7 @@
}
if (value().canEvalPercentage()) {
/* TODO: This base is probably not quite right. */
- final int base = context.ipdNearestBlockLevel();
+ final int base = context.ipdAncestorBlockOrRa();
return Math.round(value().evalPercentage() * base);
}
if (value() instanceof DtLengthConditional) {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractRelativeDimension.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractRelativeDimension.java 2007-07-20 14:48:00 UTC (rev 10059)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractRelativeDimension.java 2007-07-20 15:08:48 UTC (rev 10060)
@@ -134,9 +134,9 @@
int base = 0;
if (this.getRelativeAxis() == RelativeAxis.BLOCK_PROGRESSION) {
- base = context.bpdNearestBlockLevel();
+ base = context.bpdAncestorBlockOrRa();
} else {
- base = context.ipdNearestBlockLevel();
+ base = context.ipdAncestorBlockOrRa();
}
if (base < 0) {
return FObj.DIMENSION_AUTO;
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LeaderLength.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LeaderLength.java 2007-07-20 14:48:00 UTC (rev 10059)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/LeaderLength.java 2007-07-20 15:08:48 UTC (rev 10060)
@@ -181,7 +181,7 @@
}
if (length.canEvalPercentage()) {
final float percent = length.evalPercentage();
- return Math.round(context.ipdNearestBlockLevel() * percent
+ return Math.round(context.ipdAncestorBlockOrRa() * percent
/ WKConstants.PERCENT_CONVERSION);
}
throw this.unexpectedRetrieval();
@@ -190,7 +190,7 @@
final FoValue foValue = this.convertValueToFoValue(value());
if (foValue == FoValue.INHERIT) {
return getValueInherited(context, subProperty, fobj,
- context.ipdNearestBlockLevel());
+ context.ipdAncestorBlockOrRa());
}
}
throw this.unexpectedRetrieval();
@@ -243,7 +243,7 @@
return DEFAULT_OPTIMUM_VALUE;
}
case MAXIMUM: {
- return foContext.ipdNearestBlockLevel();
+ return foContext.ipdAncestorBlockOrRa();
}
}
return 0;
Modified: trunk/foray/foray-fotree/src/javatest/org/foray/fotree/AbstractPropertyTest.java
===================================================================
--- trunk/foray/foray-fotree/src/javatest/org/foray/fotree/AbstractPropertyTest.java 2007-07-20 14:48:00 UTC (rev 10059)
+++ trunk/foray/foray-fotree/src/javatest/org/foray/fotree/AbstractPropertyTest.java 2007-07-20 15:08:48 UTC (rev 10060)
@@ -47,10 +47,10 @@
public GraftingPoint getGraftingPoint() {
return null;
}
- public int ipdNearestBlockLevel() {
+ public int ipdAncestorBlockOrRa() {
return 6 * 72000;
}
- public int bpdNearestBlockLevel() {
+ public int bpdAncestorBlockOrRa() {
return 9 * 72000;
}
public int tableWidth() {
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/OverrideGraftingContext.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/OverrideGraftingContext.java 2007-07-20 14:48:00 UTC (rev 10059)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/OverrideGraftingContext.java 2007-07-20 15:08:48 UTC (rev 10060)
@@ -72,15 +72,15 @@
/**
* {@inheritDoc}
*/
- public int ipdNearestBlockLevel() {
- return this.wrappedContext.ipdNearestBlockLevel();
+ public int ipdAncestorBlockOrRa() {
+ return this.wrappedContext.ipdAncestorBlockOrRa();
}
/**
* {@inheritDoc}
*/
- public int bpdNearestBlockLevel() {
- return this.wrappedContext.bpdNearestBlockLevel();
+ public int bpdAncestorBlockOrRa() {
+ return this.wrappedContext.bpdAncestorBlockOrRa();
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-20 16:13:16
|
Revision: 10062
http://svn.sourceforge.net/foray/?rev=10062&view=rev
Author: victormote
Date: 2007-07-20 09:13:18 -0700 (Fri, 20 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new property-specific interfaces.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java
trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.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/AbstractInlineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java 2007-07-20 15:26:08 UTC (rev 10061)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java 2007-07-20 16:13:18 UTC (rev 10062)
@@ -34,8 +34,6 @@
import org.axsl.fo.fo.prop.BaselineShiftPa;
import org.axsl.galley.GeneralInlineArea;
-import java.awt.Color;
-
/**
* Common superclass for all areas generated by inline formatting objects.
* This should not be confused with the more specific class {@link InlineArea}
@@ -184,13 +182,6 @@
}
/**
- * {@inheritDoc}
- */
- public Color traitColor() {
- return traitGeneratedBy().traitColor(this);
- }
-
- /**
* Standard validation routine for child classes that are setting a new
* parent.
* @param node The new parent node.
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2007-07-20 15:26:08 UTC (rev 10061)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2007-07-20 16:13:18 UTC (rev 10062)
@@ -35,11 +35,13 @@
import org.axsl.fo.Fo;
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.fo.fo.Table;
+import org.axsl.fo.fo.prop.ColorPa;
import org.axsl.font.FontConsumer;
import org.axsl.text.TextServer;
import org.apache.commons.logging.Log;
+import java.awt.Color;
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
@@ -798,4 +800,21 @@
return this.ancestorArea().crIpd();
}
+ /**
+ * Returns the color of this Area.
+ * For areas generated by FOs which have color, this is simply the color of
+ * the "generated-by" trait.
+ * For other areas, it is the color of the Fo that generated the nearest
+ * ancestor Area which was generated by an Fo with color.
+ * @return The color of this Area.
+ */
+ public Color getColor() {
+ final Fo generatedBy = this.traitGeneratedBy();
+ if (generatedBy instanceof ColorPa) {
+ final ColorPa coloredFo = (ColorPa) generatedBy;
+ return coloredFo.traitColor(this);
+ }
+ return this.getParent().getColor();
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java 2007-07-20 15:26:08 UTC (rev 10061)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/ExternalGraphicArea.java 2007-07-20 16:13:18 UTC (rev 10062)
@@ -359,4 +359,12 @@
return traitGeneratedBy().traitIpDimensionOpt(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitColor() {
+ /* Color is irrelevant. */
+ return Color.BLACK;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java 2007-07-20 15:26:08 UTC (rev 10061)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java 2007-07-20 16:13:18 UTC (rev 10062)
@@ -371,4 +371,12 @@
return traitGeneratedBy().traitIpDimensionOpt(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitColor() {
+ /* Color is irrelevant. */
+ return Color.BLACK;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2007-07-20 15:26:08 UTC (rev 10061)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/InlineArea.java 2007-07-20 16:13:18 UTC (rev 10062)
@@ -501,4 +501,11 @@
return traitGeneratedBy().traitIpDimensionOpt(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitColor() {
+ return traitGeneratedBy().traitColor(this);
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java 2007-07-20 15:26:08 UTC (rev 10061)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/InlineContainerArea.java 2007-07-20 16:13:18 UTC (rev 10062)
@@ -348,4 +348,11 @@
return traitGeneratedBy().traitIpDimensionOpt(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitColor() {
+ return traitGeneratedBy().traitColor(this);
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-20 15:26:08 UTC (rev 10061)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LeaderArea.java 2007-07-20 16:13:18 UTC (rev 10062)
@@ -732,4 +732,11 @@
return -1;
}
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitColor() {
+ return traitGeneratedBy().traitColor(this);
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java 2007-07-20 15:26:08 UTC (rev 10061)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberArea.java 2007-07-20 16:13:18 UTC (rev 10062)
@@ -353,4 +353,11 @@
return -1;
}
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitColor() {
+ return this.getColor();
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java 2007-07-20 15:26:08 UTC (rev 10061)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageNumberCitationArea.java 2007-07-20 16:13:18 UTC (rev 10062)
@@ -382,4 +382,11 @@
return -1;
}
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitColor() {
+ return this.getColor();
+ }
+
}
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-20 15:26:08 UTC (rev 10061)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2007-07-20 16:13:18 UTC (rev 10062)
@@ -987,4 +987,11 @@
return -1;
}
+ /**
+ * {@inheritDoc}
+ */
+ public Color traitColor() {
+ return traitGeneratedBy().traitColor(this);
+ }
+
}
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-20 15:26:08 UTC (rev 10061)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-20 16:13:18 UTC (rev 10062)
@@ -121,6 +121,7 @@
import org.axsl.fo.fo.prop.CharacterPa;
import org.axsl.fo.fo.prop.ClearPa;
import org.axsl.fo.fo.prop.ClipPa;
+import org.axsl.fo.fo.prop.ColorPa;
import org.axsl.fo.fo.prop.ColorProfileNamePa;
import org.axsl.fo.fo.prop.ColumnCountPa;
import org.axsl.fo.fo.prop.ColumnGapPa;
@@ -206,7 +207,7 @@
CommonRelativePositionPa, ActiveStatePa, AlignmentAdjustPa,
AlignmentBaselinePa, AutoRestorePa, BaselineShiftPa, BasicLinkPa,
BlockPa, BlockProgressionDimensionPa, BreakPa, CaptionSidePa,
- CaseNamePa, CaseTitlePa, CharacterPa, ClearPa, ClipPa,
+ CaseNamePa, CaseTitlePa, CharacterPa, ClearPa, ClipPa, ColorPa,
ColorProfileNamePa, ColumnCountPa, ColumnGapPa, ContentTypePa,
DirectionPa, DisplayAlignPa, DominantBaselinePa, EmptyCellsPa, ExtentPa,
ExternalDestinationPa, FloatPa, FlowNamePa, GlyphOrientationPa,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-20 16:24:08
|
Revision: 10063
http://svn.sourceforge.net/foray/?rev=10063&view=rev
Author: victormote
Date: 2007-07-20 09:24:08 -0700 (Fri, 20 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new property-specific interfaces.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.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-20 16:13:18 UTC (rev 10062)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-20 16:24:08 UTC (rev 10063)
@@ -974,22 +974,6 @@
}
/**
- * Returns the text-altitude trait for this Area.
- * @return The text-altitude trait.
- */
- public int traitTextAltitude() {
- return this.traitGeneratedBy().traitTextAltitude(this);
- }
-
- /**
- * Returns the text-depth trait for this Area.
- * @return The text-depth trait.
- */
- public int traitTextDepth() {
- return this.traitGeneratedBy().traitTextDepth(this);
- }
-
- /**
* Indicates whether there is an absolute fence preceding this Area for
* purposes of stacking constraints.
* This method is only relevant for block-areas as inline-areas have a more
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-20 16:13:18 UTC (rev 10062)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-20 16:24:08 UTC (rev 10063)
@@ -168,7 +168,9 @@
import org.axsl.fo.fo.prop.SwitchToPa;
import org.axsl.fo.fo.prop.TableBorderPrecedencePa;
import org.axsl.fo.fo.prop.TablePa;
+import org.axsl.fo.fo.prop.TextAltitudePa;
import org.axsl.fo.fo.prop.TextDecorationPa;
+import org.axsl.fo.fo.prop.TextDepthPa;
import org.axsl.fo.fo.prop.TextShadowPa;
import org.axsl.fo.fo.prop.TreatAsWordSpacePa;
import org.axsl.fo.fo.prop.UnicodeBidiPa;
@@ -220,7 +222,8 @@
RenderingIntentPa,
ScoreSpacesPa, SpanPa, SrcPa, StartingStatePa, SuppressAtLineBreakPa,
SwitchToPa,
- TableBorderPrecedencePa, TablePa, TextDecorationPa, TextShadowPa,
+ TableBorderPrecedencePa, TablePa, TextAltitudePa, TextDecorationPa,
+ TextDepthPa, TextShadowPa,
TreatAsWordSpacePa,
UnicodeBidiPa, VisibilityPa, WrapOptionPa,
ZIndexPa {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-20 16:33:22
|
Revision: 10064
http://svn.sourceforge.net/foray/?rev=10064&view=rev
Author: victormote
Date: 2007-07-20 09:33:15 -0700 (Fri, 20 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new 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/LineArea.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-20 16:24:08 UTC (rev 10063)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-20 16:33:15 UTC (rev 10064)
@@ -36,7 +36,6 @@
import org.axsl.common.value.AbsoluteDirection;
import org.axsl.common.value.LinkType;
import org.axsl.common.value.RelativeAxis;
-import org.axsl.common.value.TextAlign;
import org.axsl.common.value.WhiteSpaceTreatment;
import org.axsl.common.value.WritingMode;
import org.axsl.fo.Fo;
@@ -823,15 +822,6 @@
}
/**
- * Returns the text-align trait for this area.
- * @return The text-align trait for this area.
- * @see Fo#traitTextAlign(FoContext)
- */
- public TextAlign traitTextAlign() {
- return traitGeneratedBy().traitTextAlign(this);
- }
-
- /**
* {@inheritDoc}
*/
public String destinationName() {
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-07-20 16:24:08 UTC (rev 10063)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-07-20 16:33:15 UTC (rev 10064)
@@ -824,7 +824,6 @@
}
/**
- * {@inheritDoc}
* Returns the effective text alignment value for <em>this</em> line.
* This method uses either the text-align or text-align-last properties, as
* appropriate.
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-20 16:24:08 UTC (rev 10063)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-20 16:33:15 UTC (rev 10064)
@@ -168,6 +168,7 @@
import org.axsl.fo.fo.prop.SwitchToPa;
import org.axsl.fo.fo.prop.TableBorderPrecedencePa;
import org.axsl.fo.fo.prop.TablePa;
+import org.axsl.fo.fo.prop.TextAlignPa;
import org.axsl.fo.fo.prop.TextAltitudePa;
import org.axsl.fo.fo.prop.TextDecorationPa;
import org.axsl.fo.fo.prop.TextDepthPa;
@@ -222,7 +223,8 @@
RenderingIntentPa,
ScoreSpacesPa, SpanPa, SrcPa, StartingStatePa, SuppressAtLineBreakPa,
SwitchToPa,
- TableBorderPrecedencePa, TablePa, TextAltitudePa, TextDecorationPa,
+ TableBorderPrecedencePa, TablePa, TextAlignPa, TextAltitudePa,
+ TextDecorationPa,
TextDepthPa, TextShadowPa,
TreatAsWordSpacePa,
UnicodeBidiPa, VisibilityPa, WrapOptionPa,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-20 17:08:14
|
Revision: 10065
http://svn.sourceforge.net/foray/?rev=10065&view=rev
Author: victormote
Date: 2007-07-20 10:08:14 -0700 (Fri, 20 Jul 2007)
Log Message:
-----------
1. Conform to axsl changes moving methods from Fo to new property-specific interfaces.
2. Conform to axsl change removing the traitTextTransform from the exposed methods.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java
trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.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-20 16:33:15 UTC (rev 10064)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-20 17:08:14 UTC (rev 10065)
@@ -41,6 +41,7 @@
import org.axsl.fo.Fo;
import org.axsl.fo.FoContext;
import org.axsl.fo.fo.BasicLink;
+import org.axsl.fo.fo.Block;
import org.axsl.font.FontUse;
import org.axsl.galley.BackgroundArea;
@@ -799,10 +800,11 @@
/**
* Returns the whitespace-treatment trait for this area.
* @return The whitespace-treatment trait for this area.
- * @see Fo#traitWhiteSpaceTreatment(FoContext)
*/
public WhiteSpaceTreatment traitWhiteSpaceTreatment() {
- return traitGeneratedBy().traitWhiteSpaceTreatment(this);
+ final NormalBlockArea nearestBlockArea = this.nearestNormalBlockArea();
+ final Block block = nearestBlockArea.traitGeneratedBy();
+ return block.traitWhiteSpaceTreatment(nearestBlockArea);
}
/**
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2007-07-20 16:33:15 UTC (rev 10064)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaNode.java 2007-07-20 17:08:14 UTC (rev 10065)
@@ -347,6 +347,16 @@
}
/**
+ * Returns this if this is a normal block area, or the nearest ancestor
+ * normal block area otherwise.
+ * @return The nearest normal block area, which can be this.
+ */
+ public NormalBlockArea nearestNormalBlockArea() {
+ final AreaNode parent = this.getParent();
+ return parent.nearestNormalBlockArea();
+ }
+
+ /**
* Returns the nearest ancestor that is a reference area.
* @return The nearest ancestor that is a reference area.
*/
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-07-20 16:33:15 UTC (rev 10064)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2007-07-20 17:08:14 UTC (rev 10065)
@@ -39,12 +39,13 @@
import org.axsl.common.value.RelativeCompass;
import org.axsl.common.value.TextAlign;
import org.axsl.common.value.TextAlignLast;
+import org.axsl.common.value.WhiteSpaceTreatment;
import org.axsl.fo.FoContext;
import org.axsl.fo.fo.Block;
import org.axsl.fo.fo.CharacterContent;
+import org.axsl.fo.fo.CharacterSequence;
import org.axsl.fo.fo.ExternalGraphic;
import org.axsl.fo.fo.GraftingPoint;
-import org.axsl.fo.fo.CharacterSequence;
import org.axsl.fo.fo.Inline;
import org.axsl.fo.fo.InlineContainer;
import org.axsl.fo.fo.InstreamForeignObject;
@@ -1425,4 +1426,12 @@
return -1;
}
+ /**
+ * Returns the whitespace-treatment trait for this area.
+ * @return The whitespace-treatment trait for this area.
+ */
+ public WhiteSpaceTreatment traitWhiteSpaceTreatment() {
+ return traitGeneratedBy().traitWhiteSpaceTreatment(this);
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2007-07-20 16:33:15 UTC (rev 10064)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2007-07-20 17:08:14 UTC (rev 10065)
@@ -517,4 +517,14 @@
return -1;
}
+ /**
+ * {@inheritDoc}
+ * Overrides superclass method, because this is the normal-block-area that
+ * is being sought.
+ */
+ @Override
+ public NormalBlockArea nearestNormalBlockArea() {
+ return this;
+ }
+
}
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-20 16:33:15 UTC (rev 10064)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-20 17:08:14 UTC (rev 10065)
@@ -176,6 +176,7 @@
import org.axsl.fo.fo.prop.TreatAsWordSpacePa;
import org.axsl.fo.fo.prop.UnicodeBidiPa;
import org.axsl.fo.fo.prop.VisibilityPa;
+import org.axsl.fo.fo.prop.WhiteSpaceTreatmentPa;
import org.axsl.fo.fo.prop.WrapOptionPa;
import org.axsl.fo.fo.prop.ZIndexPa;
import org.axsl.font.Font;
@@ -227,7 +228,7 @@
TextDecorationPa,
TextDepthPa, TextShadowPa,
TreatAsWordSpacePa,
- UnicodeBidiPa, VisibilityPa, WrapOptionPa,
+ UnicodeBidiPa, VisibilityPa, WhiteSpaceTreatmentPa, WrapOptionPa,
ZIndexPa {
/** A static empty and immutable list of children, suitable for return by
@@ -3425,7 +3426,12 @@
}
/**
- * {@inheritDoc}
+ * Returns the "text-transform" trait for this FO.
+ * @param context An object that knows how to resolve FO Tree context
+ * issues.
+ * @return The "text-transform" trait.
+ * @see "XSL-FO Standard 1.0, Section 7.16.6"
+ * @see "XSL-FO Standard 1.0, Section 5.7.1"
*/
public TextTransform traitTextTransform(final FoContext context) {
final FoValue foValue = this.getPropertyList().traitTextTransform(this,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-20 17:25:28
|
Revision: 10066
http://svn.sourceforge.net/foray/?rev=10066&view=rev
Author: victormote
Date: 2007-07-20 10:25:25 -0700 (Fri, 20 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new property-specific interfaces.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.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-20 17:08:14 UTC (rev 10065)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-20 17:25:25 UTC (rev 10066)
@@ -42,6 +42,7 @@
import org.axsl.fo.FoContext;
import org.axsl.fo.fo.BasicLink;
import org.axsl.fo.fo.Block;
+import org.axsl.fo.fo.prop.IdPa;
import org.axsl.font.FontUse;
import org.axsl.galley.BackgroundArea;
@@ -1025,7 +1026,11 @@
* {@inheritDoc}
*/
public String traitId() {
- return traitGeneratedBy().traitId();
+ final Fo generatedBy = this.traitGeneratedBy();
+ if (generatedBy instanceof IdPa) {
+ return ((IdPa) generatedBy).traitId();
+ }
+ return null;
}
/**
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-20 17:08:14 UTC (rev 10065)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-20 17:25:25 UTC (rev 10066)
@@ -144,6 +144,7 @@
import org.axsl.fo.fo.prop.FloatPa;
import org.axsl.fo.fo.prop.FlowNamePa;
import org.axsl.fo.fo.prop.GlyphOrientationPa;
+import org.axsl.fo.fo.prop.IdPa;
import org.axsl.fo.fo.prop.InlineProgressionDimensionPa;
import org.axsl.fo.fo.prop.InternalDestinationPa;
import org.axsl.fo.fo.prop.KeepTogetherPa;
@@ -214,7 +215,7 @@
CaseNamePa, CaseTitlePa, CharacterPa, ClearPa, ClipPa, ColorPa,
ColorProfileNamePa, ColumnCountPa, ColumnGapPa, ContentTypePa,
DirectionPa, DisplayAlignPa, DominantBaselinePa, EmptyCellsPa, ExtentPa,
- ExternalDestinationPa, FloatPa, FlowNamePa, GlyphOrientationPa,
+ ExternalDestinationPa, FloatPa, FlowNamePa, GlyphOrientationPa, IdPa,
InlineProgressionDimensionPa,
InternalDestinationPa, KeepTogetherPa, KeepWithPa, LeaderPa,
LineHeightPa, ListBlockPa,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-20 19:38:06
|
Revision: 10068
http://svn.sourceforge.net/foray/?rev=10068&view=rev
Author: victormote
Date: 2007-07-20 12:38:08 -0700 (Fri, 20 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new property-specific interfaces.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractAbsoluteOffset.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java 2007-07-20 19:19:31 UTC (rev 10067)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/BlockContainerRA.java 2007-07-20 19:38:08 UTC (rev 10068)
@@ -33,13 +33,13 @@
import org.axsl.common.value.BackgroundRepeat;
import org.axsl.common.value.BorderStyle;
import org.axsl.common.value.RelativeAxis;
-import org.axsl.fo.Fo;
import org.axsl.fo.FoContext;
import org.axsl.fo.fo.Block;
import org.axsl.fo.fo.BlockContainer;
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.fo.fo.ListBlock;
import org.axsl.fo.fo.Table;
+import org.axsl.fo.fo.prop.CommonPositionPa;
import org.axsl.galley.BlockContainerArea;
import org.axsl.galley.RenderVisitor;
import org.axsl.graphic.Graphic;
@@ -111,12 +111,12 @@
public int crOriginBPDOffset() {
if (this.traitAbsolutePosition() == AbsolutePosition.ABSOLUTE) {
final int top = this.traitTop();
- if (top != Fo.ABSOLUTE_POSITION_AUTO) {
+ if (top != CommonPositionPa.ABSOLUTE_POSITION_AUTO) {
/* If "top" is specified, that is the offset needed. */
return top;
}
final int bottom = this.traitBottom();
- if (bottom != Fo.ABSOLUTE_POSITION_AUTO) {
+ if (bottom != CommonPositionPa.ABSOLUTE_POSITION_AUTO) {
/* If "bottom" is specified, */
final Area parentArea = this.getAreaParent();
return parentArea.crBpd() - bottom
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractAbsoluteOffset.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractAbsoluteOffset.java 2007-07-20 19:19:31 UTC (rev 10067)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractAbsoluteOffset.java 2007-07-20 19:38:08 UTC (rev 10068)
@@ -38,6 +38,7 @@
import org.axsl.common.value.AbsoluteCompass;
import org.axsl.fo.FoContext;
+import org.axsl.fo.fo.prop.CommonPositionPa;
/**
* Abstract superclass for the "top", "bottom", "left", and "right" properties
@@ -100,7 +101,7 @@
final FoValue keyword = this.convertValueToFoValue(value());
switch (keyword) {
case AUTO: {
- return FObj.ABSOLUTE_POSITION_AUTO;
+ return CommonPositionPa.ABSOLUTE_POSITION_AUTO;
}
case INHERIT: {
final FObj parent = fobj.effectiveParent(context);
@@ -132,7 +133,7 @@
* @return The initial value for this property.
*/
public static int getValueNoInstance() {
- return FObj.ABSOLUTE_POSITION_AUTO;
+ return CommonPositionPa.ABSOLUTE_POSITION_AUTO;
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-07-20 20:10:10
|
Revision: 10069
http://svn.sourceforge.net/foray/?rev=10069&view=rev
Author: victormote
Date: 2007-07-20 13:10:12 -0700 (Fri, 20 Jul 2007)
Log Message:
-----------
Conform to axsl changes moving methods from Fo to new property-specific interfaces.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.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-20 19:38:08 UTC (rev 10068)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-20 20:10:12 UTC (rev 10069)
@@ -43,6 +43,7 @@
import org.axsl.fo.fo.BasicLink;
import org.axsl.fo.fo.Block;
import org.axsl.fo.fo.prop.IdPa;
+import org.axsl.fo.fo.prop.WritingModePa;
import org.axsl.font.FontUse;
import org.axsl.galley.BackgroundArea;
@@ -643,10 +644,13 @@
/**
* Returns the writing-mode for this area.
* @return The writing-mode for this area.
- * @see Fo#getWritingMode(FoContext)
*/
public WritingMode getWritingMode() {
- return traitGeneratedBy().getWritingMode(this);
+ final Fo generatedBy = traitGeneratedBy();
+ if (generatedBy instanceof WritingModePa) {
+ return ((WritingModePa) generatedBy).getWritingMode(this);
+ }
+ return this.ancestorArea().getWritingMode();
}
/**
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-20 19:38:08 UTC (rev 10068)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-20 20:10:12 UTC (rev 10069)
@@ -179,6 +179,7 @@
import org.axsl.fo.fo.prop.VisibilityPa;
import org.axsl.fo.fo.prop.WhiteSpaceTreatmentPa;
import org.axsl.fo.fo.prop.WrapOptionPa;
+import org.axsl.fo.fo.prop.WritingModePa;
import org.axsl.fo.fo.prop.ZIndexPa;
import org.axsl.font.Font;
import org.axsl.font.FontConsumer;
@@ -230,7 +231,7 @@
TextDepthPa, TextShadowPa,
TreatAsWordSpacePa,
UnicodeBidiPa, VisibilityPa, WhiteSpaceTreatmentPa, WrapOptionPa,
- ZIndexPa {
+ WritingModePa, ZIndexPa {
/** 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.
|
|
From: <vic...@us...> - 2007-07-20 20:39:30
|
Revision: 10070
http://svn.sourceforge.net/foray/?rev=10070&view=rev
Author: victormote
Date: 2007-07-20 13:39:33 -0700 (Fri, 20 Jul 2007)
Log Message:
-----------
1. Conform to axsl change renaming method.
2. Change logic for getting the writing-mode to make sure that we don't pick up the writing-mode set on an object for which writing-mode is not used.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractAbsoluteDimension.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractIndent.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderBottomColor.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderBottomWidth.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderLeftColor.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderLeftWidth.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderRightColor.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderRightWidth.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderTopColor.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderTopWidth.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PaddingBottom.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PaddingLeft.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PaddingRight.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PaddingTop.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-20 20:10:12 UTC (rev 10069)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-07-20 20:39:33 UTC (rev 10070)
@@ -648,7 +648,7 @@
public WritingMode getWritingMode() {
final Fo generatedBy = traitGeneratedBy();
if (generatedBy instanceof WritingModePa) {
- return ((WritingModePa) generatedBy).getWritingMode(this);
+ return ((WritingModePa) generatedBy).traitWritingMode(this);
}
return this.ancestorArea().getWritingMode();
}
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-20 20:10:12 UTC (rev 10069)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2007-07-20 20:39:33 UTC (rev 10070)
@@ -45,6 +45,7 @@
import org.foray.fotree.fo.obj.Root;
import org.foray.fotree.fo.obj.StaticContent;
import org.foray.fotree.fo.obj.Table;
+import org.foray.fotree.fo.prop.WritingMode;
import org.foray.fotree.value.DtWritingMode;
import org.axsl.common.value.AbsoluteAxis;
@@ -231,7 +232,7 @@
TextDepthPa, TextShadowPa,
TreatAsWordSpacePa,
UnicodeBidiPa, VisibilityPa, WhiteSpaceTreatmentPa, WrapOptionPa,
- WritingModePa, ZIndexPa {
+ ZIndexPa {
/** A static empty and immutable list of children, suitable for return by
* objects that have no children. */
@@ -2437,7 +2438,8 @@
case AUTO: {
if (this.isBlockLevelFo()) {
final Iso15924 script = this.traitScript(context);
- final DtWritingMode writingMode = this.getWritingMode(context);
+ final DtWritingMode writingMode = this.traitWritingMode(
+ context);
if (script.equals("auto")) {
if (writingMode.getAbsoluteAxis(
RelativeAxis.INLINE_PROGRESSION)
@@ -2731,7 +2733,8 @@
public RelativeCompass traitCaptionSide(final FoContext context) {
final FoValue foCaptionSide = this.getPropertyList().traitCaptionSide(
this, context);
- return convertCaptionSide(foCaptionSide, this.getWritingMode(context));
+ return convertCaptionSide(foCaptionSide,
+ this.traitWritingMode(context));
}
/**
@@ -3872,10 +3875,20 @@
}
/**
- * {@inheritDoc}
+ * Returns the writing-mode for this FO.
+ * @param context An object that knows how to resolve FO Tree context
+ * issues.
+ * @return The writing-mode for this FO.
*/
- public DtWritingMode getWritingMode(final FoContext context) {
- return this.getPropertyList().getWritingMode(this, context);
+ public DtWritingMode traitWritingMode(final FoContext context) {
+ if (this instanceof WritingModePa) {
+ return this.getPropertyList().getWritingMode(this, context);
+ }
+ final FObj parent = this.getParent();
+ if (parent == null) {
+ return WritingMode.getValueNoInstance(context, this);
+ }
+ return parent.traitWritingMode(context);
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractAbsoluteDimension.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractAbsoluteDimension.java 2007-07-20 20:10:12 UTC (rev 10069)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractAbsoluteDimension.java 2007-07-20 20:39:33 UTC (rev 10070)
@@ -154,7 +154,7 @@
*/
private RelativeAxis getRelativeAxis(final FoContext context,
final FObj fobj) {
- final DtWritingMode writingMode = fobj.getWritingMode(context);
+ final DtWritingMode writingMode = fobj.traitWritingMode(context);
final AbsoluteAxis absoluteAxis = this.getAbsoluteAxis();
return writingMode.getRelativeAxis(absoluteAxis);
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractIndent.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractIndent.java 2007-07-20 20:10:12 UTC (rev 10069)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbstractIndent.java 2007-07-20 20:39:33 UTC (rev 10070)
@@ -192,7 +192,7 @@
public static FoProperty rawAbsoluteCorrespondingPropertyType(
final FObj fobj, final FoContext context,
final RelativeCompass direction) {
- final DtWritingMode writingMode = fobj.getWritingMode(context);
+ final DtWritingMode writingMode = fobj.traitWritingMode(context);
final AbsoluteCompass absoluteCompass =
writingMode.getAbsoluteDirection(direction);
switch(absoluteCompass) {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderBottomColor.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderBottomColor.java 2007-07-20 20:10:12 UTC (rev 10069)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderBottomColor.java 2007-07-20 20:39:33 UTC (rev 10070)
@@ -69,7 +69,7 @@
* {@inheritDoc}
*/
public Color getParentValue(final FObj parent, final FoContext context) {
- final DtWritingMode writingMode = parent.getWritingMode(context);
+ final DtWritingMode writingMode = parent.traitWritingMode(context);
final RelativeCompass direction = writingMode.getRelativeDirection(
AbsoluteCompass.BOTTOM);
return parent.getPropertyList().getBorderColor(parent, context,
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderBottomWidth.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderBottomWidth.java 2007-07-20 20:10:12 UTC (rev 10069)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderBottomWidth.java 2007-07-20 20:39:33 UTC (rev 10070)
@@ -68,7 +68,7 @@
*/
protected RelativeCompass getRelativeCompass(
final FoContext context, final FObj fobj) {
- final DtWritingMode writingMode = fobj.getWritingMode(context);
+ final DtWritingMode writingMode = fobj.traitWritingMode(context);
return writingMode.getRelativeDirection(AbsoluteCompass.BOTTOM);
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderLeftColor.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderLeftColor.java 2007-07-20 20:10:12 UTC (rev 10069)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderLeftColor.java 2007-07-20 20:39:33 UTC (rev 10070)
@@ -69,7 +69,7 @@
* {@inheritDoc}
*/
public Color getParentValue(final FObj parent, final FoContext context) {
- final DtWritingMode writingMode = parent.getWritingMode(context);
+ final DtWritingMode writingMode = parent.traitWritingMode(context);
final RelativeCompass direction = writingMode.getRelativeDirection(
AbsoluteCompass.LEFT);
return parent.getPropertyList().getBorderColor(parent, context,
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderLeftWidth.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderLeftWidth.java 2007-07-20 20:10:12 UTC (rev 10069)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderLeftWidth.java 2007-07-20 20:39:33 UTC (rev 10070)
@@ -68,7 +68,7 @@
*/
protected RelativeCompass getRelativeCompass(
final FoContext context, final FObj fobj) {
- final DtWritingMode writingMode = fobj.getWritingMode(context);
+ final DtWritingMode writingMode = fobj.traitWritingMode(context);
return writingMode.getRelativeDirection(AbsoluteCompass.LEFT);
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderRightColor.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderRightColor.java 2007-07-20 20:10:12 UTC (rev 10069)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderRightColor.java 2007-07-20 20:39:33 UTC (rev 10070)
@@ -69,7 +69,7 @@
* {@inheritDoc}
*/
public Color getParentValue(final FObj parent, final FoContext context) {
- final DtWritingMode writingMode = parent.getWritingMode(context);
+ final DtWritingMode writingMode = parent.traitWritingMode(context);
final RelativeCompass direction = writingMode.getRelativeDirection(
AbsoluteCompass.RIGHT);
return parent.getPropertyList().getBorderColor(parent, context,
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderRightWidth.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderRightWidth.java 2007-07-20 20:10:12 UTC (rev 10069)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderRightWidth.java 2007-07-20 20:39:33 UTC (rev 10070)
@@ -68,7 +68,7 @@
*/
protected RelativeCompass getRelativeCompass(
final FoContext context, final FObj fobj) {
- final DtWritingMode writingMode = fobj.getWritingMode(context);
+ final DtWritingMode writingMode = fobj.traitWritingMode(context);
return writingMode.getRelativeDirection(AbsoluteCompass.RIGHT);
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderTopColor.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderTopColor.java 2007-07-20 20:10:12 UTC (rev 10069)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderTopColor.java 2007-07-20 20:39:33 UTC (rev 10070)
@@ -69,7 +69,7 @@
* {@inheritDoc}
*/
public Color getParentValue(final FObj parent, final FoContext context) {
- final DtWritingMode writingMode = parent.getWritingMode(context);
+ final DtWritingMode writingMode = parent.traitWritingMode(context);
final RelativeCompass direction = writingMode.getRelativeDirection(
AbsoluteCompass.TOP);
return parent.getPropertyList().getBorderColor(parent, context,
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderTopWidth.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderTopWidth.java 2007-07-20 20:10:12 UTC (rev 10069)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderTopWidth.java 2007-07-20 20:39:33 UTC (rev 10070)
@@ -68,7 +68,7 @@
*/
protected RelativeCompass getRelativeCompass(
final FoContext context, final FObj fobj) {
- final DtWritingMode writingMode = fobj.getWritingMode(context);
+ final DtWritingMode writingMode = fobj.traitWritingMode(context);
return writingMode.getRelativeDirection(AbsoluteCompass.TOP);
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PaddingBottom.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PaddingBottom.java 2007-07-20 20:10:12 UTC (rev 10069)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PaddingBottom.java 2007-07-20 20:39:33 UTC (rev 10070)
@@ -68,7 +68,7 @@
*/
protected RelativeCompass getRelativeCompass(final FoContext context,
final FObj fobj) {
- final DtWritingMode writingMode = fobj.getWritingMode(context);
+ final DtWritingMode writingMode = fobj.traitWritingMode(context);
return writingMode.getRelativeDirection(AbsoluteCompass.BOTTOM);
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PaddingLeft.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PaddingLeft.java 2007-07-20 20:10:12 UTC (rev 10069)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PaddingLeft.java 2007-07-20 20:39:33 UTC (rev 10070)
@@ -68,7 +68,7 @@
*/
protected RelativeCompass getRelativeCompass(final FoContext context,
final FObj fobj) {
- final DtWritingMode writingMode = fobj.getWritingMode(context);
+ final DtWritingMode writingMode = fobj.traitWritingMode(context);
return writingMode.getRelativeDirection(AbsoluteCompass.LEFT);
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PaddingRight.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PaddingRight.java 2007-07-20 20:10:12 UTC (rev 10069)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PaddingRight.java 2007-07-20 20:39:33 UTC (rev 10070)
@@ -68,7 +68,7 @@
*/
protected RelativeCompass getRelativeCompass(final FoContext context,
final FObj fobj) {
- final DtWritingMode writingMode = fobj.getWritingMode(context);
+ final DtWritingMode writingMode = fobj.traitWritingMode(context);
return writingMode.getRelativeDirection(AbsoluteCompass.RIGHT);
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PaddingTop.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PaddingTop.java 2007-07-20 20:10:12 UTC (rev 10069)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PaddingTop.java 2007-07-20 20:39:33 UTC (rev 10070)
@@ -68,7 +68,7 @@
*/
protected RelativeCompass getRelativeCompass(final FoContext context,
final FObj fobj) {
- final DtWritingMode writingMode = fobj.getWritingMode(context);
+ final DtWritingMode writingMode = fobj.traitWritingMode(context);
return writingMode.getRelativeDirection(AbsoluteCompass.TOP);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|