foray-commit Mailing List for FOray (Page 283)
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
(139) |
Apr
(98) |
May
(250) |
Jun
(394) |
Jul
(84) |
Aug
(13) |
Sep
(420) |
Oct
(186) |
Nov
(1) |
Dec
(3) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(108) |
Feb
(202) |
Mar
(291) |
Apr
(247) |
May
(374) |
Jun
(227) |
Jul
(231) |
Aug
(60) |
Sep
(31) |
Oct
(45) |
Nov
(18) |
Dec
|
| 2008 |
Jan
(38) |
Feb
(71) |
Mar
(142) |
Apr
|
May
(59) |
Jun
(6) |
Jul
(10) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
(12) |
Feb
(4) |
Mar
(88) |
Apr
(121) |
May
(17) |
Jun
(30) |
Jul
|
Aug
(5) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2010 |
Jan
(11) |
Feb
(76) |
Mar
(11) |
Apr
|
May
(11) |
Jun
|
Jul
|
Aug
(44) |
Sep
(14) |
Oct
(7) |
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(168) |
| 2017 |
Jan
(77) |
Feb
(11) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
(88) |
Mar
(118) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(141) |
| 2021 |
Jan
(170) |
Feb
(20) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(62) |
Nov
(189) |
Dec
(162) |
| 2022 |
Jan
(201) |
Feb
(118) |
Mar
(8) |
Apr
|
May
(2) |
Jun
(47) |
Jul
(19) |
Aug
(14) |
Sep
(3) |
Oct
|
Nov
(28) |
Dec
(235) |
| 2023 |
Jan
(112) |
Feb
(23) |
Mar
(2) |
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
(70) |
Sep
(92) |
Oct
(20) |
Nov
(1) |
Dec
(1) |
| 2024 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
(14) |
Jun
(11) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(10) |
Feb
(29) |
Mar
|
Apr
(162) |
May
(245) |
Jun
(83) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(4) |
Dec
(23) |
| 2026 |
Jan
(119) |
Feb
(335) |
Mar
(103) |
Apr
(43) |
May
(154) |
Jun
(107) |
Jul
(187) |
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <vic...@us...> - 2006-09-04 22:42:44
|
Revision: 7890
http://svn.sourceforge.net/foray/?rev=7890&view=rev
Author: victormote
Date: 2006-09-04 15:42:36 -0700 (Mon, 04 Sep 2006)
Log Message:
-----------
Conform to axsl changes: Remove unneeded method.
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/PropertyList.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2006-09-04 22:01:46 UTC (rev 7889)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2006-09-04 22:42:36 UTC (rev 7890)
@@ -340,7 +340,8 @@
// Start at the padding-rectangle origin.
int x = prOriginX();
if (this.getBPAxis() == Constants.AXIS_VERTICAL) {
- final boolean goingRight = (this.traitIPDirection()
+ // Our BP Axis is vertical
+ final boolean goingRight = (this.traitIPDirectionOdd()
== Constants.DIRECTION_LEFT_TO_RIGHT);
if (goingRight) {
x -= this.traitBorderStartWidth();
@@ -369,6 +370,7 @@
// Start at the padding-rectangle origin.
int y = prOriginY();
if (this.getBPAxis() == Constants.AXIS_VERTICAL) {
+ // Our BP Axis is vertical
final boolean goingDown = (this.traitBPDirection()
== Constants.DIRECTION_TOP_TO_BOTTOM);
if (goingDown) {
@@ -378,7 +380,7 @@
}
} else {
// Our BP Axis is horizontal
- final boolean goingUp = (this.traitIPDirection()
+ final boolean goingUp = (this.traitIPDirectionOdd()
== Constants.DIRECTION_BOTTOM_TO_TOP);
if (goingUp) {
y -= this.traitBorderStartWidth();
@@ -438,7 +440,8 @@
// Start at the content-rectangle origin.
int x = crOriginX();
if (this.getBPAxis() == Constants.AXIS_VERTICAL) {
- final boolean goingRight = (this.traitIPDirection()
+ // Our BP Axis is vertical
+ final boolean goingRight = (this.traitIPDirectionOdd()
== Constants.DIRECTION_LEFT_TO_RIGHT);
if (goingRight) {
x -= this.traitPaddingStart();
@@ -778,14 +781,18 @@
return traitGeneratedBy().traitSpaceEndOptimum(this, ancestor.crIPD());
}
- public int traitBPDirection() {
+ public byte traitBPDirection() {
return traitGeneratedBy().traitBPDirection(this);
}
- public int traitIPDirection() {
- return traitGeneratedBy().traitIPDirection(this);
+ public byte traitIPDirectionOdd() {
+ return traitGeneratedBy().traitIPDirectionOdd(this);
}
+ public byte traitIPDirectionEven() {
+ return traitGeneratedBy().traitIPDirectionEven(this);
+ }
+
private int nearestBaseBPD() {
int nearestBPD = -1;
final Area nearest = this.ancestorGeneratedByBlockLevelFO();
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-09-04 22:01:46 UTC (rev 7889)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-09-04 22:42:36 UTC (rev 7890)
@@ -1647,13 +1647,6 @@
/**
* {@inheritDoc}
*/
- public byte traitIPDirection(final FOContext context) {
- return propertyList.traitIPDirection(context);
- }
-
- /**
- * {@inheritDoc}
- */
public byte traitBPDirection(final FOContext context) {
return propertyList.traitBPDirection(context);
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-09-04 22:01:46 UTC (rev 7889)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-09-04 22:42:36 UTC (rev 7890)
@@ -2150,15 +2150,6 @@
* DIRECTION_LEFT_TO_RIGHT, or DIRECTION_RIGHT_TO_LEFT, depending on
* the writing-mode.
*/
- public byte traitIPDirection(final FOContext context) {
- return getWritingMode(context).getIPDirectionOdd();
- }
-
- /**
- * @return One of DIRECTION_TOP_TO_BOTTOM, DIRECTION_BOTTOM_TO_TOP,
- * DIRECTION_LEFT_TO_RIGHT, or DIRECTION_RIGHT_TO_LEFT, depending on
- * the writing-mode.
- */
public byte traitBPDirection(final FOContext context) {
return getWritingMode(context).getBPDirection();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-04 22:01:51
|
Revision: 7889
http://svn.sourceforge.net/foray/?rev=7889&view=rev
Author: victormote
Date: 2006-09-04 15:01:46 -0700 (Mon, 04 Sep 2006)
Log Message:
-----------
Conform to axsl change: Have traitSourceDocument() return a String[] instead of a String.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/SourceDocument.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-09-04 20:26:51 UTC (rev 7888)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-09-04 22:01:46 UTC (rev 7889)
@@ -1570,7 +1570,7 @@
/**
* {@inheritDoc}
*/
- public String traitSourceDocument(final FOContext context) {
+ public String[] traitSourceDocument(final FOContext context) {
return propertyList.getSourceDocument(context);
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-09-04 20:26:51 UTC (rev 7888)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-09-04 22:01:46 UTC (rev 7889)
@@ -2062,7 +2062,7 @@
(context, Constants.FOPROP_BACKGROUND_REPEAT, fobj);
}
- public String getSourceDocument(final FOContext context) {
+ public String[] getSourceDocument(final FOContext context) {
final SourceDocument property = (SourceDocument) getProperty
(Constants.FOPROP_SOURCE_DOCUMENT);
if (property == null) {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/SourceDocument.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/SourceDocument.java 2006-09-04 20:26:51 UTC (rev 7888)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/SourceDocument.java 2006-09-04 22:01:46 UTC (rev 7889)
@@ -31,6 +31,7 @@
import org.foray.fotree.value.DtURI;
import org.foray.fotree.value.PropertyKeyword;
import org.foray.fotree.value.PropertyValue;
+import org.foray.fotree.value.ValueCollection;
import org.axsl.common.Constants;
import org.axsl.foR.FOContext;
@@ -62,20 +63,20 @@
}
final ArrayList tokenizedList = DtURI.tokenizeURIList(value);
if (tokenizedList.size() > 0) {
- /*
- * For now, just store the first one. TODO: We probably need to
- * store these in a PropertyCollection & return a String[].
- */
- final String token = (String) tokenizedList.get(0);
- final DtURI uri = DtURI.makeUriDT(token);
- if (uri != null) {
- return uri;
+ final ValueCollection collection = new ValueCollection();
+ for (int i = 0; i < tokenizedList.size(); i++) {
+ final String token = (String) tokenizedList.get(i);
+ final DtURI uri = DtURI.makeUriDT(token);
+ if (uri != null) {
+ collection.addItem(uri);
+ }
}
+ return collection;
}
throw unexpectedValue(value, propertyList);
}
- public String getValue(final FOContext context, final FObj fobj) {
+ public String[] getValue(final FOContext context, final FObj fobj) {
if (this.value instanceof PropertyKeyword) {
final short keyword = ((PropertyKeyword) value).getValue();
switch (keyword) {
@@ -86,18 +87,24 @@
}
}
case Constants.FOVAL_NONE: {
- return "";
+ return null;
}
}
}
- if (this.value instanceof DtURI) {
- return ((DtURI) this.value).getValue();
+ if (this.value instanceof ValueCollection) {
+ final ValueCollection theCollection = (ValueCollection) this.value;
+ final String[] returnArray = new String[theCollection.getCount()];
+ for (int i = 0; i < theCollection.getCount(); i++) {
+ final DtURI value = (DtURI) theCollection.getItem(i);
+ returnArray[i] = value.getValue();
+ }
+ return returnArray;
}
return getValueNoInstance();
}
- public static String getValueNoInstance() {
- return "";
+ public static String[] getValueNoInstance() {
+ return null;
}
protected short[] getValidKeywords() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-04 20:27:00
|
Revision: 7888
http://svn.sourceforge.net/foray/?rev=7888&view=rev
Author: victormote
Date: 2006-09-04 13:26:51 -0700 (Mon, 04 Sep 2006)
Log Message:
-----------
Conform to axsl changes: Roll a play-during method up into special return values of another method.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PlayDuring.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-09-04 20:02:18 UTC (rev 7887)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-09-04 20:26:51 UTC (rev 7888)
@@ -2300,13 +2300,6 @@
/**
* {@inheritDoc}
*/
- public boolean traitPlayDuringAuto() {
- return propertyList.traitPlayDuringAuto();
- }
-
- /**
- * {@inheritDoc}
- */
public String[] traitVoiceFamily(final FOContext context) {
return propertyList.getVoiceFamily(context);
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-09-04 20:02:18 UTC (rev 7887)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-09-04 20:26:51 UTC (rev 7888)
@@ -3053,15 +3053,6 @@
return PlayDuring.getRepeatNoInstance();
}
- public boolean traitPlayDuringAuto() {
- final PlayDuring property = (PlayDuring) getProperty(Constants
- .FOPROP_PLAY_DURING);
- if (property != null) {
- return property.getAuto();
- }
- return PlayDuring.getAutoNoInstance();
- }
-
public String[] getVoiceFamily(final FOContext context) {
final VoiceFamily property = (VoiceFamily) getProperty(Constants
.FOPROP_VOICE_FAMILY);
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PlayDuring.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PlayDuring.java 2006-09-04 20:02:18 UTC (rev 7887)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PlayDuring.java 2006-09-04 20:26:51 UTC (rev 7888)
@@ -99,7 +99,7 @@
return "";
}
case Constants.FOVAL_NONE: {
- return "";
+ return null;
}
}
}
@@ -107,12 +107,7 @@
}
public static String getValueNoInstance() {
- /*
- * This is a little odd. The initial value is "auto", which implies
- * some things about any parent sounds that are already playing.
- * However, the play-during value itself does not automatically
- * inherit.
- */
+ /* A return value of "" implies "auto" the default. */
return "";
}
@@ -122,7 +117,7 @@
if (parent != null) {
return fobj.traitPlayDuring(context);
}
- return "";
+ return PlayDuring.getValueNoInstance();
}
public boolean getMix() {
@@ -141,20 +136,6 @@
return false;
}
- public boolean getAuto() {
- if (this.value instanceof PropertyKeyword) {
- final short keyword = ((PropertyKeyword) this.value).getValue();
- if (keyword == Constants.FOVAL_AUTO) {
- return true;
- }
- }
- return false;
- }
-
- public static boolean getAutoNoInstance() {
- return true;
- }
-
protected short[] getValidKeywords() {
return validKeywords;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-04 20:18:43
|
Revision: 7887
http://svn.sourceforge.net/foray/?rev=7887&view=rev
Author: victormote
Date: 2006-09-04 13:02:18 -0700 (Mon, 04 Sep 2006)
Log Message:
-----------
Conform to axsl change: Make hyphenation character 21-bits.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FOLineText.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/PropertyList.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Character.java
trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2006-09-04 18:24:24 UTC (rev 7886)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2006-09-04 20:02:18 UTC (rev 7887)
@@ -235,7 +235,7 @@
traitLetterSpacingOpt(), traitWordSpacingOpt());
}
- public int getCharWidth(final char c) {
+ public int getCharWidth(final int c) {
final FontUse fontUse = getPrimaryFont();
final Font font = getPrimaryFont().getFont();
fontUse.registerCharUsed(c);
@@ -1028,7 +1028,7 @@
return traitGeneratedBy().traitRefId(this);
}
- public char traitHyphenationCharacter() {
+ public int traitHyphenationCharacter() {
return traitGeneratedBy().traitHyphenationCharacter(this);
}
@@ -1089,7 +1089,7 @@
}
public int getHyphenWidth() {
- final char hyphenChar = traitHyphenationCharacter();
+ final int hyphenChar = traitHyphenationCharacter();
return getCharWidth(hyphenChar);
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2006-09-04 18:24:24 UTC (rev 7886)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TextArea.java 2006-09-04 20:02:18 UTC (rev 7887)
@@ -24,6 +24,7 @@
package org.foray.area;
+import org.foray.common.StringUtilPre5;
import org.foray.common.XMLCharacter;
import org.axsl.areaR.RenderVisitor;
@@ -179,15 +180,27 @@
return new char[0];
}
int arraySize = this.backingSize - ignoreAtStart - ignoreAtEnd;
+ final int hyphenChar = this.traitHyphenationCharacter();
+ int discretionaryHyphenSize = 0;
if (this.hasDiscretionaryHyphen) {
- arraySize ++;
+ discretionaryHyphenSize = StringUtilPre5.charCount(hyphenChar);
}
+ arraySize += discretionaryHyphenSize;
final char[] returnChars = new char[arraySize];
System.arraycopy(rawText, this.backingOffset + ignoreAtStart,
returnChars, 0, returnChars.length);
if (this.hasDiscretionaryHyphen) {
- returnChars[returnChars.length - 1]
- = this.traitHyphenationCharacter();
+ if (discretionaryHyphenSize == 1) {
+ returnChars[returnChars.length - discretionaryHyphenSize]
+ = (char) this.traitHyphenationCharacter();
+ } else {
+ final String hyphenString = StringUtilPre5.newString(
+ new int[] {hyphenChar}, 0, 1);
+ final char[] hyphenChars = hyphenString.toCharArray();
+ System.arraycopy(hyphenChars, 0, returnChars,
+ returnChars.length - hyphenChars.length,
+ hyphenChars.length);
+ }
}
/* Apply faux small-caps, if appropriate. */
if (hasFauxSmallCaps) {
@@ -414,7 +427,7 @@
* @param c The character to be tested.
* @return True iff word-spacing should be added for this character.
*/
- private boolean wordSpacingApplies(final char c) {
+ private boolean wordSpacingApplies(final int c) {
switch (c) {
case ' ': {
return true;
@@ -515,7 +528,7 @@
* @return The width of c plus any word-spacing or letter-spacing that is
* related to it.
*/
- private int charWidth(final char c, final boolean lastCharOnLine) {
+ private int charWidth(final int c, final boolean lastCharOnLine) {
FontUse fontUse = this.getPrimaryFont();
if (! fontUse.glyphAvailable(c)) {
fontUse = this.getSecondaryFont(c);
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOLineText.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOLineText.java 2006-09-04 18:24:24 UTC (rev 7886)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOLineText.java 2006-09-04 20:02:18 UTC (rev 7887)
@@ -201,14 +201,14 @@
/**
* {@inheritDoc}
*/
- public char inlineHyphenationCharacter() {
+ public int inlineHyphenationCharacter() {
return realLineText.inlineHyphenationCharacter(this.context);
}
/**
* {@inheritDoc}
*/
- public char inlineHyphenationCharacter(final FOContext context) {
+ public int inlineHyphenationCharacter(final FOContext context) {
return realLineText.inlineHyphenationCharacter(context);
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java 2006-09-04 18:24:24 UTC (rev 7886)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java 2006-09-04 20:02:18 UTC (rev 7887)
@@ -635,11 +635,11 @@
return effectiveParent.traitHyphenationPushCharacterCount(context);
}
- public char inlineHyphenationCharacter() {
+ public int inlineHyphenationCharacter() {
return this.inlineHyphenationCharacter(null);
}
- public char inlineHyphenationCharacter(final FOContext context) {
+ public int inlineHyphenationCharacter(final FOContext context) {
final FObj effectiveParent = effectiveParent(context);
return effectiveParent.traitHyphenationCharacter(context);
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-09-04 18:24:24 UTC (rev 7886)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-09-04 20:02:18 UTC (rev 7887)
@@ -1521,7 +1521,7 @@
/**
* {@inheritDoc}
*/
- public char traitHyphenationCharacter(final FOContext context) {
+ public int traitHyphenationCharacter(final FOContext context) {
return propertyList.getHyphenationCharacter(context);
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-09-04 18:24:24 UTC (rev 7886)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-09-04 20:02:18 UTC (rev 7887)
@@ -1967,7 +1967,7 @@
Constants.FOPROP_HYPHENATE);
}
- public char getHyphenationCharacter(final FOContext context) {
+ public int getHyphenationCharacter(final FOContext context) {
final Character property = (Character) getProperty(Constants
.FOPROP_HYPHENATION_CHARACTER);
if (property != null) {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Character.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Character.java 2006-09-04 18:24:24 UTC (rev 7886)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Character.java 2006-09-04 20:02:18 UTC (rev 7887)
@@ -72,7 +72,7 @@
}
/* For "hyphenation-character", which can be inherited. */
- public char getValue(final FOContext context, final FObj fobj) {
+ public int getValue(final FOContext context, final FObj fobj) {
if (this.value instanceof PropertyKeyword) {
switch (propertyType) {
case Constants.FOPROP_HYPHENATION_CHARACTER: {
@@ -98,7 +98,7 @@
}
/* For properties that can be inherited. */
- public static char getValueNoInstance(final FOContext context,
+ public static int getValueNoInstance(final FOContext context,
final short propertyType, final FObj fobj) {
switch (propertyType) {
case Constants.FOPROP_HYPHENATION_CHARACTER: {
Modified: trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java
===================================================================
--- trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java 2006-09-04 18:24:24 UTC (rev 7886)
+++ trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java 2006-09-04 20:02:18 UTC (rev 7887)
@@ -212,7 +212,7 @@
}
public int getHyphenWidth(final LineText lineText) {
- final char hyphenChar = lineText.inlineHyphenationCharacter();
+ final int hyphenChar = lineText.inlineHyphenationCharacter();
return getCharWidth(lineText, hyphenChar);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-04 18:24:27
|
Revision: 7886
http://svn.sourceforge.net/foray/?rev=7886&view=rev
Author: victormote
Date: 2006-09-04 11:24:24 -0700 (Mon, 04 Sep 2006)
Log Message:
-----------
Clean up use of exception thrown, and log the warning message in all cases.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-04 18:08:18 UTC (rev 7885)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-04 18:24:24 UTC (rev 7886)
@@ -91,15 +91,16 @@
psm);
firstPage = true;
if (nextSubSequence == null) {
+ final String basicMessage = "Subsequences exhausted in "
+ + "page-sequence-master \"" + psm.traitMasterName()
+ + "\".";
+ /* Log the warning in any case. */
+ psm.getLogger().warn(basicMessage + "\n"
+ + " Attempting to use previous subsequence.");
if (!canRecover) {
- psm.throwException("subsequences exhausted in "
- + "page-sequence-master '" + psm.traitMasterName()
- + "', cannot recover");
+ psm.throwException(basicMessage + "\n"
+ + " Cannot recover.");
}
- psm.getLogger().warn(
- "subsequences exhausted in " + "page-sequence-master '"
- + psm.traitMasterName()
- + "', use previous subsequence");
canRecover = false;
} else {
currentSubSequence = nextSubSequence;
@@ -124,14 +125,6 @@
return null;
}
- /**
- * {@inheritDoc}
- */
- public int firstFallbackPage() {
- /* TODO: Implement this. */
- return Integer.MAX_VALUE;
- }
-
private SubSequenceWrapper makeWrapper(
final SubSequenceSpecifier specifier) {
if (specifier instanceof SinglePageMasterReference) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-04 18:08:22
|
Revision: 7885
http://svn.sourceforge.net/foray/?rev=7885&view=rev
Author: victormote
Date: 2006-09-04 11:08:18 -0700 (Mon, 04 Sep 2006)
Log Message:
-----------
Remove no-longer-needed test.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-04 18:02:40 UTC (rev 7884)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-04 18:08:18 UTC (rev 7885)
@@ -109,12 +109,6 @@
}
final org.foray.fotree.fo.obj.SimplePageMaster pageMaster =
psm.layoutMasterSet().getSimplePageMaster(pageMasterName);
- if (pageMaster == null) {
- psm.throwException("No simple-page-master matching '"
- + pageMasterName
- + "' in page-sequence-master '" + psm.traitMasterName()
- + "'.");
- }
return pageMaster;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-04 18:02:48
|
Revision: 7884
http://svn.sourceforge.net/foray/?rev=7884&view=rev
Author: victormote
Date: 2006-09-04 11:02:40 -0700 (Mon, 04 Sep 2006)
Log Message:
-----------
Add logic to validate the existence of the page-masters at parse time.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.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/LayoutMasterSet.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/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/SinglePageMasterReference.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-09-04 17:05:58 UTC (rev 7883)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-09-04 18:02:40 UTC (rev 7884)
@@ -204,6 +204,18 @@
}
/**
+ * Creates a suitable exception or warning if an object references a
+ * non-existent page.
+ * @throws FOTreeException If a non-existent page is referenced.
+ */
+ public void invalidPageReference(final String invalidReference)
+ throws FOTreeException {
+ final String message = this.getFullName() + " references a "
+ + "non-existent page: \"" + invalidReference + "\"";
+ this.throwException(message);
+ }
+
+ /**
* {@inheritDoc}
*/
public boolean isBlockLevelFO() {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java 2006-09-04 17:05:58 UTC (rev 7883)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java 2006-09-04 18:02:40 UTC (rev 7884)
@@ -65,14 +65,10 @@
logWarning(getFullName() + " has no master-reference, and "
+ "will be ignored.");
}
- final LayoutMasterSet layoutMasterSet = repeatablePMAlternatives()
- .pageSequenceMaster().layoutMasterSet();
- if (layoutMasterSet.getSimplePageMaster(this.traitMasterReference())
- == null) {
- logWarning(getFullName() + " \"" + this.traitMasterReference()
- + "\" has master-reference which matches \n"
- + " no page definitions. It will be ignored.");
- }
+ /* Validity of the page-master referenced cannot be checked until the
+ * entire layout-master-set has been parsed, because the page-masters
+ * can be created after they are referenced.
+ * See LayoutMasterSet.validateDescendants(). */
}
/**
@@ -101,7 +97,7 @@
}
/**
- * The parent.
+ * Convenience method returning the parent.
* @return The parent, properly cast.
*/
public RepeatablePMAlternatives repeatablePMAlternatives() {
@@ -110,6 +106,22 @@
}
/**
+ * Convenience method returning the grandparent, properly cast.
+ * @return The grandparent PageSequenceMaster.
+ */
+ public PageSequenceMaster pageSequenceMaster() {
+ return repeatablePMAlternatives().pageSequenceMaster();
+ }
+
+ /**
+ * Convenience method returning the great-grandparent, properly cast.
+ * @return The great-grandparent LayoutMasterSet.
+ */
+ public LayoutMasterSet layoutMasterSet() {
+ return pageSequenceMaster().layoutMasterSet();
+ }
+
+ /**
* Indicates whether this instance matches a specific set of constraints.
* @param isOddPage True if the
* @param isFirstPage Set to true to return a true value if this instance's
@@ -204,4 +216,17 @@
return factory.makeProxy(this);
}
+ /**
+ * Checks to make sure that each page referenced actually exists.
+ * Note that it is not useful to execute this method until the entire
+ * layout-master-set has been parsed, as you cannot be sure that all
+ * page-masters have been parsed until then.
+ */
+ public void validatePageExistence() throws FOTreeException {
+ if (layoutMasterSet().getSimplePageMaster(this.traitMasterReference())
+ == null) {
+ this.invalidPageReference(this.traitMasterReference());
+ }
+ }
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/LayoutMasterSet.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/LayoutMasterSet.java 2006-09-04 17:05:58 UTC (rev 7883)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/LayoutMasterSet.java 2006-09-04 18:02:40 UTC (rev 7884)
@@ -94,7 +94,24 @@
* {@inheritDoc}
*/
protected void validateDescendants() throws FOTreeException {
- return;
+ for (int i = 0; i < this.getChildCount(); i++) {
+ final Object child = this.getChildAt(i);
+ if (child instanceof PageSequenceMaster) {
+ final PageSequenceMaster psm = (PageSequenceMaster) child;
+ /* Existence of the pages referenced cannot be validated until
+ * here because page-masters can be created after they are
+ * referenced. */
+ psm.validatePageExistence();
+ } else if (child instanceof SimplePageMaster) {
+ /* No validation needed other than acknowledging the validity
+ * of the type. */
+ } else {
+ final FObj fobj = (FObj) child;
+ fobj.throwException(this.getFullName() + " children must be "
+ + "simple-page-master \n"
+ + " or page-sequence-master.");
+ }
+ }
}
public String getName() {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceMaster.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceMaster.java 2006-09-04 17:05:58 UTC (rev 7883)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceMaster.java 2006-09-04 18:02:40 UTC (rev 7884)
@@ -142,4 +142,18 @@
return returnSet;
}
+ /**
+ * Checks to make sure that each page referenced actually exists.
+ * Note that it is not useful to execute this method until the entire
+ * layout-master-set has been parsed, as you cannot be sure that all
+ * page-masters have been parsed until then.
+ */
+ public void validatePageExistence() throws FOTreeException {
+ for (int i = 0; i < this.getChildCount(); i++) {
+ final SubSequenceSpecifier specifier = (SubSequenceSpecifier)
+ this.getChildAt(i);
+ specifier.validatePageExistence();
+ }
+ }
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java 2006-09-04 17:05:58 UTC (rev 7883)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java 2006-09-04 18:02:40 UTC (rev 7884)
@@ -102,4 +102,15 @@
return returnSet;
}
+ /**
+ * {@inheritDoc}
+ */
+ public void validatePageExistence() throws FOTreeException {
+ for (int i = 0; i < this.getChildCount(); i++) {
+ final ConditionalPageMasterReference child =
+ (ConditionalPageMasterReference) this.getChildAt(i);
+ child.validatePageExistence();
+ }
+ }
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java 2006-09-04 17:05:58 UTC (rev 7883)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java 2006-09-04 18:02:40 UTC (rev 7884)
@@ -58,6 +58,10 @@
logWarning(getFullName() + " has no master-reference, and will be "
+ "ignored.");
}
+ /* Validity of the page-master referenced cannot be checked until the
+ * entire layout-master-set has been parsed, because the page-masters
+ * can be created after they are referenced.
+ * See LayoutMasterSet.validateDescendants(). */
}
/**
@@ -92,4 +96,14 @@
return returnSet;
}
+ /**
+ * {@inheritDoc}
+ */
+ public void validatePageExistence() throws FOTreeException {
+ if (layoutMasterSet().getSimplePageMaster(this.traitMasterReference())
+ == null) {
+ this.invalidPageReference(this.traitMasterReference());
+ }
+ }
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java 2006-09-04 17:05:58 UTC (rev 7883)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java 2006-09-04 18:02:40 UTC (rev 7884)
@@ -56,6 +56,10 @@
this.logWarning(getFullName() + " has no master-reference, and "
+ "will be ignored.");
}
+ /* Validity of the page-master referenced cannot be checked until the
+ * entire layout-master-set has been parsed, because the page-masters
+ * can be created after they are referenced.
+ * See LayoutMasterSet.validateDescendants(). */
}
/**
@@ -90,4 +94,14 @@
return returnSet;
}
+ /**
+ * {@inheritDoc}
+ */
+ public void validatePageExistence() throws FOTreeException {
+ if (layoutMasterSet().getSimplePageMaster(this.traitMasterReference())
+ == null) {
+ this.invalidPageReference(this.traitMasterReference());
+ }
+ }
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java 2006-09-04 17:05:58 UTC (rev 7883)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java 2006-09-04 18:02:40 UTC (rev 7884)
@@ -78,10 +78,26 @@
}
/**
- * Returns the page-master instances that are included in this template.
+ * Convenience method returning the grandparent.
+ * @return The grandparent, properly cast.
+ */
+ public LayoutMasterSet layoutMasterSet() {
+ return pageSequenceMaster().layoutMasterSet();
+ }
+
+ /**
+ * Returns the page-master instances that are included in this specifier.
* @return The page-master instances that can be generated from this
- * template.
+ * specifier.
*/
public abstract Set getPages() ;
+ /**
+ * Checks to make sure that each page referenced actually exists.
+ * Note that it is not useful to execute this method until the entire
+ * layout-master-set has been parsed, as you cannot be sure that all
+ * page-masters have been parsed until then.
+ */
+ public abstract void validatePageExistence() throws FOTreeException ;
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-04 17:06:06
|
Revision: 7883
http://svn.sourceforge.net/foray/?rev=7883&view=rev
Author: victormote
Date: 2006-09-04 10:05:58 -0700 (Mon, 04 Sep 2006)
Log Message:
-----------
Remove unnecessary throws clause.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-04 17:02:17 UTC (rev 7882)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-04 17:05:58 UTC (rev 7883)
@@ -163,8 +163,7 @@
*/
private abstract class SubSequenceWrapper {
abstract String getNextPageMasterName(boolean isFirstPage,
- boolean isLastPage, boolean isOddPage, boolean isEmptyPage)
- throws FOTreeException;
+ boolean isLastPage, boolean isOddPage, boolean isEmptyPage) ;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-04 17:02:23
|
Revision: 7882
http://svn.sourceforge.net/foray/?rev=7882&view=rev
Author: victormote
Date: 2006-09-04 10:02:17 -0700 (Mon, 04 Sep 2006)
Log Message:
-----------
Share more common code.
Modified Paths:
--------------
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/SinglePageMasterReference.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java 2006-09-04 16:57:28 UTC (rev 7881)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java 2006-09-04 17:02:17 UTC (rev 7882)
@@ -84,15 +84,6 @@
}
/**
- * The parent.
- * @return The parent, properly cast.
- */
- public PageSequenceMaster pageSequenceMaster() {
- /* Cast verified at construction. */
- return (PageSequenceMaster) this.parentFO();
- }
-
- /**
* {@inheritDoc}
*/
public Set getPages() {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java 2006-09-04 16:57:28 UTC (rev 7881)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java 2006-09-04 17:02:17 UTC (rev 7882)
@@ -80,15 +80,6 @@
}
/**
- * The parent.
- * @return The parent, properly cast.
- */
- public PageSequenceMaster pageSequenceMaster() {
- /* Cast verified at construction. */
- return (PageSequenceMaster) this.parentFO();
- }
-
- /**
* {@inheritDoc}
*/
public Set getPages() {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java 2006-09-04 16:57:28 UTC (rev 7881)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java 2006-09-04 17:02:17 UTC (rev 7882)
@@ -65,15 +65,6 @@
validateEmptyContent();
}
- /**
- * The parent.
- * @return The parent, properly cast.
- */
- public PageSequenceMaster pageSequenceMaster() {
- /* Cast verified at construction. */
- return (PageSequenceMaster) this.parentFO();
- }
-
public String getName() {
return "single-page-master-reference";
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java 2006-09-04 16:57:28 UTC (rev 7881)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java 2006-09-04 17:02:17 UTC (rev 7882)
@@ -69,6 +69,15 @@
}
/**
+ * The parent.
+ * @return The parent, properly cast.
+ */
+ public PageSequenceMaster pageSequenceMaster() {
+ /* Cast verified at validateAncestry(). */
+ return (PageSequenceMaster) this.parentFO();
+ }
+
+ /**
* Returns the page-master instances that are included in this template.
* @return The page-master instances that can be generated from this
* template.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-04 16:57:34
|
Revision: 7881
http://svn.sourceforge.net/foray/?rev=7881&view=rev
Author: victormote
Date: 2006-09-04 09:57:28 -0700 (Mon, 04 Sep 2006)
Log Message:
-----------
1. Move some common code to SubSequenceSpecifier.
2. Add some descendant validation of the SubSequenceSpecifier sub-classes.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.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/SinglePageMasterReference.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-09-04 16:35:31 UTC (rev 7880)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-09-04 16:57:28 UTC (rev 7881)
@@ -190,6 +190,19 @@
return true;
}
+ public void validateEmptyContent() throws FOTreeException {
+ if (this.getChildCount() > 0) {
+ throwException(this.getFullName() + " has NO content.");
+ }
+ }
+
+ public void validateAtLeastOneChild() throws FOTreeException {
+ if (this.getChildCount() > 1) {
+ throwException(this.getFullName() + " must have at least one "
+ + "child.");
+ }
+ }
+
/**
* {@inheritDoc}
*/
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java 2006-09-04 16:35:31 UTC (rev 7880)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java 2006-09-04 16:57:28 UTC (rev 7881)
@@ -51,16 +51,6 @@
/**
* {@inheritDoc}
*/
- protected void validateAncestry() throws FOTreeException {
- if (! (this.getParent() instanceof PageSequenceMaster)) {
- throwException(getFullName() + " must be child of "
- + "fo:page-sequence-master.");
- }
- }
-
- /**
- * {@inheritDoc}
- */
protected void validateProperties() throws FOTreeException {
return;
}
@@ -68,22 +58,17 @@
/**
* {@inheritDoc}
*/
- protected void setup() throws FOTreeException {
- return;
- }
-
- /**
- * {@inheritDoc}
- */
- protected void end() throws FOTreeException {
- return;
- }
-
- /**
- * {@inheritDoc}
- */
protected void validateDescendants() throws FOTreeException {
- return;
+ validateAtLeastOneChild();
+ /* All children must be conditional-page-master-reference. */
+ for (int i = 0; i < this.getChildCount(); i++) {
+ final Object child = this.getChildAt(i);
+ if (! (child instanceof ConditionalPageMasterReference)) {
+ final FObj fobj = (FObj) child;
+ fobj.throwException(this.getFullName() + " children must be "
+ + "conditional-page-master-reference");
+ }
+ }
}
public String getName() {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java 2006-09-04 16:35:31 UTC (rev 7880)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java 2006-09-04 16:57:28 UTC (rev 7881)
@@ -51,16 +51,6 @@
/**
* {@inheritDoc}
*/
- protected void validateAncestry() throws FOTreeException {
- if (! (this.getParent() instanceof PageSequenceMaster)) {
- throwException(getFullName() + " must be child of "
- + "fo:page-sequence-master.");
- }
- }
-
- /**
- * {@inheritDoc}
- */
protected void validateProperties() throws FOTreeException {
final String masterReference = traitMasterReference();
if (masterReference == null
@@ -73,22 +63,8 @@
/**
* {@inheritDoc}
*/
- public void setup() {
- return;
- }
-
- /**
- * {@inheritDoc}
- */
- protected void end() throws FOTreeException {
- return;
- }
-
- /**
- * {@inheritDoc}
- */
protected void validateDescendants() throws FOTreeException {
- return;
+ validateEmptyContent();
}
public String getName() {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java 2006-09-04 16:35:31 UTC (rev 7880)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java 2006-09-04 16:57:28 UTC (rev 7881)
@@ -50,16 +50,6 @@
/**
* {@inheritDoc}
*/
- protected void validateAncestry() throws FOTreeException {
- if (! (this.getParent() instanceof PageSequenceMaster)) {
- throwException(getFullName() + " must be child of "
- + "fo:page-sequence-master.");
- }
- }
-
- /**
- * {@inheritDoc}
- */
protected void validateProperties() throws FOTreeException {
final String masterReference = traitMasterReference();
if (masterReference.equals("")) {
@@ -71,22 +61,8 @@
/**
* {@inheritDoc}
*/
- public void setup() {
- return;
- }
-
- /**
- * {@inheritDoc}
- */
- protected void end() throws FOTreeException {
- return;
- }
-
- /**
- * {@inheritDoc}
- */
protected void validateDescendants() throws FOTreeException {
- return;
+ validateEmptyContent();
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java 2006-09-04 16:35:31 UTC (rev 7880)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java 2006-09-04 16:57:28 UTC (rev 7881)
@@ -27,11 +27,14 @@
import org.foray.fotree.FObj;
import org.foray.fotree.PropertyList;
+import org.axsl.foR.FOTreeException;
+
import java.util.Set;
/**
* Abstract superclass for the formatting objects that can be used to specify a
* sub-sequence of pages to be used in a page-sequence-master.
+ * @see "XSL-FO Standard 1.0, Section 6.4.7"
*/
public abstract class SubSequenceSpecifier extends FObj {
@@ -42,6 +45,30 @@
}
/**
+ * {@inheritDoc}
+ */
+ protected void validateAncestry() throws FOTreeException {
+ if (! (this.getParent() instanceof PageSequenceMaster)) {
+ throwException(getFullName() + " must be child of "
+ + "fo:page-sequence-master.");
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setup() {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
* Returns the page-master instances that are included in this template.
* @return The page-master instances that can be generated from this
* template.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-04 16:35:40
|
Revision: 7880
http://svn.sourceforge.net/foray/?rev=7880&view=rev
Author: victormote
Date: 2006-09-04 09:35:31 -0700 (Mon, 04 Sep 2006)
Log Message:
-----------
Make SubSequenceSpecifier an abstract class.
Modified Paths:
--------------
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/SinglePageMasterReference.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java 2006-09-04 00:18:15 UTC (rev 7879)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java 2006-09-04 16:35:31 UTC (rev 7880)
@@ -40,8 +40,7 @@
/**
* A "repeatable-page-master-alternatives" object in XSL-FO.
*/
-public class RepeatablePMAlternatives extends FObj
- implements SubSequenceSpecifier {
+public class RepeatablePMAlternatives extends SubSequenceSpecifier {
public RepeatablePMAlternatives(final FObj parent,
final PropertyList propertyList, final String systemId,
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java 2006-09-04 00:18:15 UTC (rev 7879)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java 2006-09-04 16:35:31 UTC (rev 7880)
@@ -40,8 +40,7 @@
/**
* A "repeatable-page-master-reference" object in XSL-FO.
*/
-public class RepeatablePMReference extends FObj
- implements SubSequenceSpecifier {
+public class RepeatablePMReference extends SubSequenceSpecifier {
public RepeatablePMReference(final FObj parent,
final PropertyList propertyList, final String systemId,
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java 2006-09-04 00:18:15 UTC (rev 7879)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java 2006-09-04 16:35:31 UTC (rev 7880)
@@ -39,8 +39,7 @@
/**
* A "single-page-master-reference" object in XSl-FO.
*/
-public class SinglePageMasterReference extends FObj
- implements SubSequenceSpecifier {
+public class SinglePageMasterReference extends SubSequenceSpecifier {
public SinglePageMasterReference(final FObj parent,
final PropertyList propertyList, final String systemId,
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java 2006-09-04 00:18:15 UTC (rev 7879)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java 2006-09-04 16:35:31 UTC (rev 7880)
@@ -24,19 +24,28 @@
package org.foray.fotree.fo.obj;
+import org.foray.fotree.FObj;
+import org.foray.fotree.PropertyList;
+
import java.util.Set;
/**
- * Interface specifying requirements for a sub-sequence-specifier in XSL-FO,
- * that is, items capable of looking up an appropriate PageMaster.
+ * Abstract superclass for the formatting objects that can be used to specify a
+ * sub-sequence of pages to be used in a page-sequence-master.
*/
-public interface SubSequenceSpecifier {
+public abstract class SubSequenceSpecifier extends FObj {
+ protected SubSequenceSpecifier(final FObj parent,
+ final PropertyList propertyList, final String systemId,
+ final int line, final int column) {
+ super(parent, propertyList, systemId, line, column);
+ }
+
/**
* Returns the page-master instances that are included in this template.
* @return The page-master instances that can be generated from this
* template.
*/
- Set getPages() ;
+ public abstract Set getPages() ;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-04 00:18:18
|
Revision: 7879
http://svn.sourceforge.net/foray/?rev=7879&view=rev
Author: victormote
Date: 2006-09-03 17:18:15 -0700 (Sun, 03 Sep 2006)
Log Message:
-----------
Stub implementation of new axsl method.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-03 23:51:37 UTC (rev 7878)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-04 00:18:15 UTC (rev 7879)
@@ -130,6 +130,14 @@
return null;
}
+ /**
+ * {@inheritDoc}
+ */
+ public int firstFallbackPage() {
+ /* TODO: Implement this. */
+ return Integer.MAX_VALUE;
+ }
+
private SubSequenceWrapper makeWrapper(
final SubSequenceSpecifier specifier) {
if (specifier instanceof SinglePageMasterReference) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-03 23:51:40
|
Revision: 7878
http://svn.sourceforge.net/foray/?rev=7878&view=rev
Author: victormote
Date: 2006-09-03 16:51:37 -0700 (Sun, 03 Sep 2006)
Log Message:
-----------
More cleanup of page selection method signatures.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-03 23:26:25 UTC (rev 7877)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-03 23:51:37 UTC (rev 7878)
@@ -84,7 +84,7 @@
return null;
}
String pageMasterName = currentSubSequence.getNextPageMasterName(
- oddPage, firstPage, blankPage);
+ firstPage, false, oddPage, blankPage);
boolean canRecover = true;
while (pageMasterName == null) {
final SubSequenceWrapper nextSubSequence = getNextSubSequence(
@@ -104,8 +104,8 @@
} else {
currentSubSequence = nextSubSequence;
}
- pageMasterName = currentSubSequence.getNextPageMasterName(oddPage,
- firstPage, blankPage);
+ pageMasterName = currentSubSequence.getNextPageMasterName(firstPage,
+ false, oddPage, blankPage);
}
final org.foray.fotree.fo.obj.SimplePageMaster pageMaster =
psm.layoutMasterSet().getSimplePageMaster(pageMasterName);
@@ -154,8 +154,8 @@
* wrappers.
*/
private abstract class SubSequenceWrapper {
- abstract String getNextPageMasterName(boolean isOddPage,
- boolean isFirstPage, boolean isEmptyPage)
+ abstract String getNextPageMasterName(boolean isFirstPage,
+ boolean isLastPage, boolean isOddPage, boolean isEmptyPage)
throws FOTreeException;
}
@@ -175,8 +175,9 @@
this.wrapped = wrapped;
}
- public String getNextPageMasterName(final boolean isOddPage,
- final boolean isFirstPage, final boolean isEmptyPage) {
+ public String getNextPageMasterName(final boolean isFirstPage,
+ final boolean isLastPage, final boolean isOddPage,
+ final boolean isEmptyPage) {
if (! this.isDone) {
this.isDone = true;
return wrapped.traitMasterName();
@@ -200,8 +201,9 @@
this.wrapped = wrapped;
}
- public String getNextPageMasterName(final boolean isOddPage,
- final boolean isFirstPage, final boolean isEmptyPage) {
+ public String getNextPageMasterName(final boolean isFirstPage,
+ final boolean isLastPage, final boolean isOddPage,
+ final boolean isEmptyPage) {
if (numberConsumed < wrapped.traitMaximumRepeats()) {
numberConsumed++;
} else {
@@ -226,8 +228,9 @@
this.wrapped = wrapped;
}
- public String getNextPageMasterName(final boolean isOddPage,
- final boolean isFirstPage, final boolean isEmptyPage) {
+ public String getNextPageMasterName(final boolean isFirstPage,
+ final boolean isLastPage, final boolean isOddPage,
+ final boolean isEmptyPage) {
if (numberConsumed < wrapped.traitMaximumRepeats()) {
numberConsumed++;
} else {
@@ -237,7 +240,7 @@
for (int i = 0; i < wrapped.getChildCount(); i++) {
final ConditionalPageMasterReference cpmr =
(ConditionalPageMasterReference) wrapped.getChildAt(i);
- if (cpmr.matchesCriteria(isFirstPage, false, isOddPage,
+ if (cpmr.matchesCriteria(isFirstPage, isLastPage, isOddPage,
isEmptyPage)) {
return cpmr.traitMasterReference();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-03 23:26:29
|
Revision: 7877
http://svn.sourceforge.net/foray/?rev=7877&view=rev
Author: victormote
Date: 2006-09-03 16:26:25 -0700 (Sun, 03 Sep 2006)
Log Message:
-----------
Extract methods to clean up doc on page selection.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java 2006-09-03 22:26:23 UTC (rev 7876)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java 2006-09-03 23:26:25 UTC (rev 7877)
@@ -109,30 +109,68 @@
return (RepeatablePMAlternatives) this.parentFO();
}
- protected boolean isValid(final boolean isOddPage,
- final boolean isFirstPage, final boolean isEmptyPage) {
+ /**
+ * Indicates whether this instance matches a specific set of constraints.
+ * @param isOddPage True if the
+ * @param isFirstPage Set to true to return a true value if this instance's
+ * page-position is "first".
+ * @param isEmptyPage
+ * @return True iff this instance matches the "position" criteria.
+ * Note that if both <tt>isFirstPage</tt> and <tt>isLasttPage</tt> are
+ * specified, this instance's ability to satisfy <em>either</em> of the
+ * criteria allows it to return true.
+ * @see "XSL-FO Standard 1.0, Section 6.4.11."
+ */
+ protected boolean matchesCriteria(final boolean isFirstPage,
+ final boolean isLastPage, final boolean isOddPage,
+ final boolean isEmptyPage) {
+ if (! matchesPositionCriteria(isFirstPage, isLastPage)) {
+ return false;
+ }
+ if (! matchesParityCriteria(isOddPage)) {
+ return false;
+ }
+ if (! matchesContentCriteria(isEmptyPage)) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Indicates whether this instance matches the "position" criteria.
+ * @param isFirstPage Set to true to return a true value if this instance's
+ * page-position is "first".
+ * @param isLastPage Set to true to return a true value if this instance's
+ * page-position is "last".
+ * @return True iff this instance matches the "position" criteria.
+ * Note that if both <tt>isFirstPage</tt> and <tt>isLasttPage</tt> are
+ * specified, this instance's ability to satisfy <em>either</em> of the
+ * criteria allows it to return true.
+ * @see "XSL-FO Standard 1.0, Section 6.4.11."
+ */
+ public boolean matchesPositionCriteria(final boolean isFirstPage,
+ final boolean isLastPage) {
final int pagePosition = traitPagePosition();
- if (isFirstPage) {
- if (pagePosition == Constants.FOVAL_REST) {
- return false;
- } else if (pagePosition == Constants.FOVAL_LAST) {
- // how the hell do you know at this point?
- logWarning(getFullName() + ": "
- + "page-position='last' is not yet implemented (NYI)");
- return false;
- }
- } else {
- if (pagePosition == Constants.FOVAL_FIRST) {
- return false;
- } else if (pagePosition == Constants.FOVAL_LAST) {
- // how the hell do you know at this point?
- logWarning(getFullName() + ": "
- + "page-position='last' is not yet implemented (NYI)");
- // potentially valid, don't return
- }
+ if (pagePosition == Constants.FOVAL_ANY) {
+ return true;
}
+ if (pagePosition == Constants.FOVAL_FIRST
+ && isFirstPage) {
+ return true;
+ }
+ if (pagePosition == Constants.FOVAL_LAST
+ && isLastPage) {
+ return true;
+ }
+ if (pagePosition == Constants.FOVAL_REST
+ && !isFirstPage
+ && !isLastPage) {
+ return true;
+ }
+ return false;
+ }
- // odd-or-even
+ public boolean matchesParityCriteria(final boolean isOddPage) {
if (isOddPage) {
if (traitOddOrEven() == Constants.FOVAL_EVEN) {
return false;
@@ -142,8 +180,10 @@
return false;
}
}
+ return true;
+ }
- // blank-or-not-blank
+ public boolean matchesContentCriteria(final boolean isEmptyPage) {
if (isEmptyPage) {
if (traitBlankOrNotBlank() == Constants.FOVAL_NOT_BLANK) {
return false;
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-03 22:26:23 UTC (rev 7876)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-03 23:26:25 UTC (rev 7877)
@@ -237,7 +237,8 @@
for (int i = 0; i < wrapped.getChildCount(); i++) {
final ConditionalPageMasterReference cpmr =
(ConditionalPageMasterReference) wrapped.getChildAt(i);
- if (cpmr.isValid(isOddPage, isFirstPage, isEmptyPage)) {
+ if (cpmr.matchesCriteria(isFirstPage, false, isOddPage,
+ isEmptyPage)) {
return cpmr.traitMasterReference();
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-03 22:26:29
|
Revision: 7876
http://svn.sourceforge.net/foray/?rev=7876&view=rev
Author: victormote
Date: 2006-09-03 15:26:23 -0700 (Sun, 03 Sep 2006)
Log Message:
-----------
Fix bug. Was skipping the first sub-sequence identifier.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java 2006-09-03 22:03:10 UTC (rev 7875)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java 2006-09-03 22:26:23 UTC (rev 7876)
@@ -69,8 +69,8 @@
.pageSequenceMaster().layoutMasterSet();
if (layoutMasterSet.getSimplePageMaster(this.traitMasterReference())
== null) {
- logWarning(getFullName() + "'" + this.traitMasterReference()
- + "' has master-reference which matches \n"
+ logWarning(getFullName() + " \"" + this.traitMasterReference()
+ + "\" has master-reference which matches \n"
+ " no page definitions. It will be ignored.");
}
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-03 22:03:10 UTC (rev 7875)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-03 22:26:23 UTC (rev 7876)
@@ -39,7 +39,7 @@
/** Current index into the PageSequenceMaster child sub-sequences.
* Used only for PageSequenceMaster */
- private int currentSubSequenceNumber;
+ private int currentSubSequenceNumber = -1;
/** Current SubSequenceSpecifier. */
private SubSequenceWrapper currentSubSequence;
@@ -80,6 +80,9 @@
currentSubSequence = getNextSubSequence(psm);
firstPage = true;
}
+ if (currentSubSequence == null) {
+ return null;
+ }
String pageMasterName = currentSubSequence.getNextPageMasterName(
oddPage, firstPage, blankPage);
boolean canRecover = true;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-03 22:03:15
|
Revision: 7875
http://svn.sourceforge.net/foray/?rev=7875&view=rev
Author: victormote
Date: 2006-09-03 15:03:10 -0700 (Sun, 03 Sep 2006)
Log Message:
-----------
1. Add warning if a conditional-page-master-reference refers to a non-existent page.
2. Don't include null items in the returned Set of page masters.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.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/RepeatablePMAlternatives.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java 2006-09-03 21:32:08 UTC (rev 7874)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java 2006-09-03 22:03:10 UTC (rev 7875)
@@ -51,7 +51,6 @@
* {@inheritDoc}
*/
protected void validateAncestry() throws FOTreeException {
- /* Validate ancestry. */
if (! (this.getParent() instanceof RepeatablePMAlternatives)) {
throwException(getFullName() + " must be child of "
+ "fo:repeatable-page-master-alternatives.");
@@ -62,11 +61,18 @@
* {@inheritDoc}
*/
protected void validateProperties() throws FOTreeException {
- /* Validate properties. */
if (traitMasterReference() == null) {
logWarning(getFullName() + " has no master-reference, and "
+ "will be ignored.");
}
+ final LayoutMasterSet layoutMasterSet = repeatablePMAlternatives()
+ .pageSequenceMaster().layoutMasterSet();
+ if (layoutMasterSet.getSimplePageMaster(this.traitMasterReference())
+ == null) {
+ logWarning(getFullName() + "'" + this.traitMasterReference()
+ + "' has master-reference which matches \n"
+ + " no page definitions. It will be ignored.");
+ }
}
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java 2006-09-03 21:32:08 UTC (rev 7874)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java 2006-09-03 22:03:10 UTC (rev 7875)
@@ -254,8 +254,8 @@
pageMasters = this.pageSequenceTemplate.getPages();
final Iterator iterator = pageMasters.iterator();
while (iterator.hasNext()) {
- final AbstractPageMaster pageMaster = (AbstractPageMaster)
- iterator.next();
+ final Object object = iterator.next();
+ final AbstractPageMaster pageMaster = (AbstractPageMaster) object;
if (! pageMaster.hasRegion(flow.traitFlowName())) {
return pageMaster;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java 2006-09-03 21:32:08 UTC (rev 7874)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java 2006-09-03 22:03:10 UTC (rev 7875)
@@ -120,7 +120,9 @@
(ConditionalPageMasterReference) this.children.get(i);
final AbstractPageMaster pageMaster = layoutSet.getSimplePageMaster(
conditional.traitMasterReference());
- returnSet.add(pageMaster);
+ if (pageMaster != null) {
+ returnSet.add(pageMaster);
+ }
}
return returnSet;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-03 21:32:12
|
Revision: 7874
http://svn.sourceforge.net/foray/?rev=7874&view=rev
Author: victormote
Date: 2006-09-03 14:32:08 -0700 (Sun, 03 Sep 2006)
Log Message:
-----------
More cleanup of state logic in pagination classes, moving the logic and related variables to inner wrapper classes in PageMasterResolver.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.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
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-03 21:21:31 UTC (rev 7873)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-03 21:32:08 UTC (rev 7874)
@@ -133,10 +133,18 @@
return new SinglePageMRWrapper((SinglePageMasterReference)
specifier);
}
+ if (specifier instanceof RepeatablePMReference) {
+ return new RepeatablePMRefWrapper((RepeatablePMReference)
+ specifier);
+ }
+ if (specifier instanceof RepeatablePMAlternatives) {
+ return new RepeatablePMAltWrapper((RepeatablePMAlternatives)
+ specifier);
+ }
return null;
}
-/******************************************************************************/
+/* ************************************************************************** */
/**
* Private inner abstract superclass for all sub-sequence specifier
@@ -149,7 +157,7 @@
}
-/******************************************************************************/
+/* ************************************************************************** */
/**
* Private inner class wrapping a {@link SinglePageMasterReference}
@@ -175,4 +183,64 @@
}
+/* ************************************************************************** */
+
+ /**
+ * Private inner class wrapping a {@link RepeatablePMReference} instance.
+ */
+ private class RepeatablePMRefWrapper extends SubSequenceWrapper {
+
+ private RepeatablePMReference wrapped;
+ private int numberConsumed = 0;
+
+ RepeatablePMRefWrapper(final RepeatablePMReference wrapped) {
+ this.wrapped = wrapped;
+ }
+
+ public String getNextPageMasterName(final boolean isOddPage,
+ final boolean isFirstPage, final boolean isEmptyPage) {
+ if (numberConsumed < wrapped.traitMaximumRepeats()) {
+ numberConsumed++;
+ } else {
+ return null;
+ }
+ return wrapped.traitMasterName();
+ }
+
+ }
+
+/* ************************************************************************** */
+
+ /**
+ * Private inner class wrapping a {@link RepeatablePMAlternatives} instance.
+ */
+ private class RepeatablePMAltWrapper extends SubSequenceWrapper {
+
+ private RepeatablePMAlternatives wrapped;
+ private int numberConsumed = 0;
+
+ RepeatablePMAltWrapper(final RepeatablePMAlternatives wrapped) {
+ this.wrapped = wrapped;
+ }
+
+ public String getNextPageMasterName(final boolean isOddPage,
+ final boolean isFirstPage, final boolean isEmptyPage) {
+ if (numberConsumed < wrapped.traitMaximumRepeats()) {
+ numberConsumed++;
+ } else {
+ return null;
+ }
+
+ for (int i = 0; i < wrapped.getChildCount(); i++) {
+ final ConditionalPageMasterReference cpmr =
+ (ConditionalPageMasterReference) wrapped.getChildAt(i);
+ if (cpmr.isValid(isOddPage, isFirstPage, isEmptyPage)) {
+ return cpmr.traitMasterReference();
+ }
+ }
+ return null;
+ }
+
+ }
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java 2006-09-03 21:21:31 UTC (rev 7873)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java 2006-09-03 21:32:08 UTC (rev 7874)
@@ -43,11 +43,6 @@
public class RepeatablePMAlternatives extends FObj
implements SubSequenceSpecifier {
- /* TODO: This state information should probably be stored in
- * PageSequenceMaster, with a unique value for each occurrence used within
- * each PageSequence. */
- private int numberConsumed = 0;
-
public RepeatablePMAlternatives(final FObj parent,
final PropertyList propertyList, final String systemId,
final int line, final int column) {
@@ -96,28 +91,6 @@
return "repeatable-page-master-alternatives";
}
- public String getNextPageMasterName(final boolean isOddPage,
- final boolean isFirstPage, final boolean isEmptyPage) {
- if (numberConsumed < traitMaximumRepeats()) {
- numberConsumed++;
- } else {
- return null;
- }
-
- for (int i = 0; i < this.children.size(); i++) {
- final ConditionalPageMasterReference cpmr =
- (ConditionalPageMasterReference)this.children.get(i);
- if (cpmr.isValid(isOddPage, isFirstPage, isEmptyPage)) {
- return cpmr.traitMasterReference();
- }
- }
- return null;
- }
-
- public void reset() {
- this.numberConsumed = 0;
- }
-
public Namespace getNamespace() {
return this.getFOTreeBuilder().getFONamespace();
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java 2006-09-03 21:21:31 UTC (rev 7873)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java 2006-09-03 21:32:08 UTC (rev 7874)
@@ -43,11 +43,6 @@
public class RepeatablePMReference extends FObj
implements SubSequenceSpecifier {
- /* TODO: This state information should probably be stored in
- * PageSequenceMaster, with a unique value for each occurrence used within
- * each PageSequence. */
- private int numberConsumed = 0;
-
public RepeatablePMReference(final FObj parent,
final PropertyList propertyList, final String systemId,
final int line, final int column) {
@@ -101,20 +96,6 @@
return "repeatable-page-master-reference";
}
- public String getNextPageMasterName(final boolean isOddPage,
- final boolean isFirstPage, final boolean isEmptyPage) {
- if (numberConsumed < traitMaximumRepeats()) {
- numberConsumed++;
- } else {
- return null;
- }
- return traitMasterName();
- }
-
- public void reset() {
- this.numberConsumed = 0;
- }
-
public Namespace getNamespace() {
return this.getFOTreeBuilder().getFONamespace();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-03 21:21:35
|
Revision: 7873
http://svn.sourceforge.net/foray/?rev=7873&view=rev
Author: victormote
Date: 2006-09-03 14:21:31 -0700 (Sun, 03 Sep 2006)
Log Message:
-----------
More cleanup of page generation logic.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.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/SinglePageMasterReference.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java
Removed Paths:
-------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterReference.java
Deleted: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterReference.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterReference.java 2006-09-03 21:06:28 UTC (rev 7872)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterReference.java 2006-09-03 21:21:31 UTC (rev 7873)
@@ -1,45 +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
- *
- */
-
-/* $Id$ */
-
-package org.foray.fotree.fo.obj;
-
-import org.foray.fotree.FObj;
-import org.foray.fotree.PropertyList;
-
-
-/**
- * Abstract base class for PageMasterReference classes.
- * Provides implementation for handling the master-reference attribute and
- * containment within a PageSequenceMaster
- */
-public abstract class PageMasterReference extends FObj
- implements SubSequenceSpecifier {
-
- public PageMasterReference(final FObj parent,
- final PropertyList propertyList, final String systemId,
- final int line, final int column) {
- super(parent, propertyList, systemId, line, column);
- }
-
-}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-03 21:06:28 UTC (rev 7872)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-03 21:21:31 UTC (rev 7873)
@@ -42,7 +42,7 @@
private int currentSubSequenceNumber;
/** Current SubSequenceSpecifier. */
- private SubSequenceSpecifier currentSubSequence;
+ private SubSequenceWrapper currentSubSequence;
public PageMasterResolver(final PageSequence pageSequence,
final int lastPageNumber) {
@@ -84,7 +84,7 @@
oddPage, firstPage, blankPage);
boolean canRecover = true;
while (pageMasterName == null) {
- final SubSequenceSpecifier nextSubSequence = getNextSubSequence(
+ final SubSequenceWrapper nextSubSequence = getNextSubSequence(
psm);
firstPage = true;
if (nextSubSequence == null) {
@@ -97,7 +97,6 @@
"subsequences exhausted in " + "page-sequence-master '"
+ psm.traitMasterName()
+ "', use previous subsequence");
- currentSubSequence.reset();
canRecover = false;
} else {
currentSubSequence = nextSubSequence;
@@ -116,15 +115,64 @@
return pageMaster;
}
- protected SubSequenceSpecifier getNextSubSequence(
+ protected SubSequenceWrapper getNextSubSequence(
final PageSequenceMaster psm) {
currentSubSequenceNumber++;
if (currentSubSequenceNumber >= 0
&& currentSubSequenceNumber < psm.getChildCount()) {
- return (SubSequenceSpecifier) psm.getChildAt(
- currentSubSequenceNumber);
+ final SubSequenceSpecifier specifier = (SubSequenceSpecifier)
+ psm.getChildAt(currentSubSequenceNumber);
+ return makeWrapper(specifier);
}
return null;
}
+ private SubSequenceWrapper makeWrapper(
+ final SubSequenceSpecifier specifier) {
+ if (specifier instanceof SinglePageMasterReference) {
+ return new SinglePageMRWrapper((SinglePageMasterReference)
+ specifier);
+ }
+ return null;
+ }
+
+/******************************************************************************/
+
+ /**
+ * Private inner abstract superclass for all sub-sequence specifier
+ * wrappers.
+ */
+ private abstract class SubSequenceWrapper {
+ abstract String getNextPageMasterName(boolean isOddPage,
+ boolean isFirstPage, boolean isEmptyPage)
+ throws FOTreeException;
+
+ }
+
+/******************************************************************************/
+
+ /**
+ * Private inner class wrapping a {@link SinglePageMasterReference}
+ * instance.
+ */
+ private class SinglePageMRWrapper extends SubSequenceWrapper {
+
+ private SinglePageMasterReference wrapped;
+ private boolean isDone = false;
+
+ SinglePageMRWrapper(final SinglePageMasterReference wrapped) {
+ this.wrapped = wrapped;
+ }
+
+ public String getNextPageMasterName(final boolean isOddPage,
+ final boolean isFirstPage, final boolean isEmptyPage) {
+ if (! this.isDone) {
+ this.isDone = true;
+ return wrapped.traitMasterName();
+ }
+ return null;
+ }
+
+ }
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java 2006-09-03 21:06:28 UTC (rev 7872)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java 2006-09-03 21:21:31 UTC (rev 7873)
@@ -40,7 +40,7 @@
/**
* A "repeatable-page-master-reference" object in XSL-FO.
*/
-public class RepeatablePMReference extends PageMasterReference
+public class RepeatablePMReference extends FObj
implements SubSequenceSpecifier {
/* TODO: This state information should probably be stored in
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java 2006-09-03 21:06:28 UTC (rev 7872)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java 2006-09-03 21:21:31 UTC (rev 7873)
@@ -39,13 +39,9 @@
/**
* A "single-page-master-reference" object in XSl-FO.
*/
-public class SinglePageMasterReference extends PageMasterReference {
+public class SinglePageMasterReference extends FObj
+ implements SubSequenceSpecifier {
- /* TODO: This state information should probably be stored in
- * PageSequenceMaster, with a unique value for each occurrence used within
- * each PageSequence. */
- private boolean isDone = false;
-
public SinglePageMasterReference(final FObj parent,
final PropertyList propertyList, final String systemId,
final int line, final int column) {
@@ -107,19 +103,6 @@
return "single-page-master-reference";
}
- public String getNextPageMasterName(final boolean isOddPage,
- final boolean isFirstPage, final boolean isEmptyPage) {
- if (! this.isDone) {
- this.isDone = true;
- return traitMasterName();
- }
- return null;
- }
-
- public void reset() {
- this.isDone = false;
- }
-
public Namespace getNamespace() {
return this.getFOTreeBuilder().getFONamespace();
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java 2006-09-03 21:06:28 UTC (rev 7872)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java 2006-09-03 21:21:31 UTC (rev 7873)
@@ -24,8 +24,6 @@
package org.foray.fotree.fo.obj;
-import org.axsl.foR.FOTreeException;
-
import java.util.Set;
/**
@@ -34,20 +32,7 @@
*/
public interface SubSequenceSpecifier {
- String getNextPageMasterName(boolean isOddPage, boolean isFirstPage,
- boolean isEmptyPage) throws FOTreeException;
-
/**
- * Called before a new page sequence is rendered so subsequences can reset
- * any state they keep during the formatting process.
- */
- /* TODO: This method should be removed. Any state information should be
- * tracked by the PageSequenceMaster, with unique values for each
- * PageSequence. At the very least it needs to be renamed to avoid confusion
- * with the method of the same signature in FONode. */
- void reset();
-
- /**
* Returns the page-master instances that are included in this template.
* @return The page-master instances that can be generated from this
* template.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-03 21:06:39
|
Revision: 7872
http://svn.sourceforge.net/foray/?rev=7872&view=rev
Author: victormote
Date: 2006-09-03 14:06:28 -0700 (Sun, 03 Sep 2006)
Log Message:
-----------
Move the stateful logic in PageSequenceMaster to PageMasterResolver.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceMaster.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-03 20:23:13 UTC (rev 7871)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-03 21:06:28 UTC (rev 7872)
@@ -25,15 +25,10 @@
package org.foray.fotree.fo.obj;
import org.axsl.foR.FOTreeException;
-import org.axsl.foR.fo.Flow;
import org.axsl.foR.fo.SimplePageMaster;
/**
* Provides pages sequentially for a given {@link PageSequence}.
- * Implementations may keep track of state information, that is, what
- * sub-sequence specifiers have already been exhausted and partially exhausted.
- * Therefore, only one instance of {@link PageMasterResolver} should be used for
- * a given layout of a {@link PageSequence}.
*/
public class PageMasterResolver implements org.axsl.foR.fo.PageMasterResolver {
@@ -42,6 +37,13 @@
private int lastDocumentPageNumber = 0;
+ /** Current index into the PageSequenceMaster child sub-sequences.
+ * Used only for PageSequenceMaster */
+ private int currentSubSequenceNumber;
+
+ /** Current SubSequenceSpecifier. */
+ private SubSequenceSpecifier currentSubSequence;
+
public PageMasterResolver(final PageSequence pageSequence,
final int lastPageNumber) {
this.pageSequence = pageSequence;
@@ -63,22 +65,66 @@
if (psm == null) {
return null;
}
- final Flow flow = getFlow();
this.lastDocumentPageNumber ++;
final org.foray.fotree.fo.obj.SimplePageMaster spm =
- psm.getNextSimplePageMaster(
- ((this.lastDocumentPageNumber % 2) == 1), isBlank);
- final Region region = (Region) spm.getRegionBody();
- if (!flow.traitFlowName().equals(region.traitRegionName())) {
- throw new FOTreeException("Flow '" + flow.traitFlowName()
- + "' does not map to the region-body in page-master '"
- + spm.traitMasterName() + "'");
- }
+ getNextSimplePageMaster(
+ ((this.lastDocumentPageNumber % 2) == 1), isBlank, psm);
return spm;
}
- private Flow getFlow() {
- return this.pageSequence.getFlow();
+ private org.foray.fotree.fo.obj.SimplePageMaster getNextSimplePageMaster(
+ final boolean oddPage, final boolean blankPage,
+ final PageSequenceMaster psm) throws FOTreeException {
+ boolean firstPage = false;
+ if (currentSubSequence == null) {
+ currentSubSequence = getNextSubSequence(psm);
+ firstPage = true;
+ }
+ String pageMasterName = currentSubSequence.getNextPageMasterName(
+ oddPage, firstPage, blankPage);
+ boolean canRecover = true;
+ while (pageMasterName == null) {
+ final SubSequenceSpecifier nextSubSequence = getNextSubSequence(
+ psm);
+ firstPage = true;
+ if (nextSubSequence == null) {
+ if (!canRecover) {
+ psm.throwException("subsequences exhausted in "
+ + "page-sequence-master '" + psm.traitMasterName()
+ + "', cannot recover");
+ }
+ psm.getLogger().warn(
+ "subsequences exhausted in " + "page-sequence-master '"
+ + psm.traitMasterName()
+ + "', use previous subsequence");
+ currentSubSequence.reset();
+ canRecover = false;
+ } else {
+ currentSubSequence = nextSubSequence;
+ }
+ pageMasterName = currentSubSequence.getNextPageMasterName(oddPage,
+ firstPage, blankPage);
+ }
+ final org.foray.fotree.fo.obj.SimplePageMaster pageMaster =
+ psm.layoutMasterSet().getSimplePageMaster(pageMasterName);
+ if (pageMaster == null) {
+ psm.throwException("No simple-page-master matching '"
+ + pageMasterName
+ + "' in page-sequence-master '" + psm.traitMasterName()
+ + "'.");
+ }
+ return pageMaster;
}
+ protected SubSequenceSpecifier getNextSubSequence(
+ final PageSequenceMaster psm) {
+ currentSubSequenceNumber++;
+ if (currentSubSequenceNumber >= 0
+ && currentSubSequenceNumber < psm.getChildCount()) {
+ return (SubSequenceSpecifier) psm.getChildAt(
+ currentSubSequenceNumber);
+ }
+ return null;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceMaster.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceMaster.java 2006-09-03 20:23:13 UTC (rev 7871)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceMaster.java 2006-09-03 21:06:28 UTC (rev 7872)
@@ -41,10 +41,6 @@
*/
public class PageSequenceMaster extends FObj implements PageSequenceTemplate {
- private SubSequenceSpecifier currentSubSequence;
-
- private int currentSubSequenceNumber;
-
// The terminology may be confusing. A 'page-sequence-master' consists
// of a sequence of what the XSL spec refers to as
// 'sub-sequence-specifiers'. These are, in fact, simple or complex
@@ -84,8 +80,7 @@
* {@inheritDoc}
*/
public void setup() throws FOTreeException {
- currentSubSequenceNumber = -1;
- currentSubSequence = null;
+ return;
}
/**
@@ -122,64 +117,6 @@
return (LayoutMasterSet) this.parentFO();
}
- protected SubSequenceSpecifier getNextSubSequence() {
- currentSubSequenceNumber++;
- if (currentSubSequenceNumber >= 0
- && currentSubSequenceNumber < this.children.size()) {
- return (SubSequenceSpecifier) this.children
- .get(currentSubSequenceNumber);
- }
- return null;
- }
-
- public void reset() {
- currentSubSequenceNumber = -1;
- currentSubSequence = null;
- for (int i = 0; i < this.children.size(); i++) {
- ((SubSequenceSpecifier) this.children.get(i)).reset();
- }
- }
-
- public SimplePageMaster getNextSimplePageMaster(final boolean oddPage,
- final boolean blankPage) throws FOTreeException {
- boolean firstPage = false;
- if (currentSubSequence == null) {
- currentSubSequence = getNextSubSequence();
- firstPage = true;
- }
- String pageMasterName = currentSubSequence.getNextPageMasterName(
- oddPage, firstPage, blankPage);
- boolean canRecover = true;
- while (pageMasterName == null) {
- final SubSequenceSpecifier nextSubSequence = getNextSubSequence();
- firstPage = true;
- if (nextSubSequence == null) {
- if (!canRecover) {
- throwException("subsequences exhausted in "
- + "page-sequence-master '" + traitMasterName()
- + "', cannot recover");
- }
- getLogger().warn(
- "subsequences exhausted in " + "page-sequence-master '"
- + traitMasterName()
- + "', use previous subsequence");
- currentSubSequence.reset();
- canRecover = false;
- } else {
- currentSubSequence = nextSubSequence;
- }
- pageMasterName = currentSubSequence.getNextPageMasterName(oddPage,
- firstPage, blankPage);
- }
- final SimplePageMaster pageMaster = this.layoutMasterSet()
- .getSimplePageMaster(pageMasterName);
- if (pageMaster == null) {
- throwException("No simple-page-master matching '" + pageMasterName
- + "' in page-sequence-master '" + traitMasterName() + "'.");
- }
- return pageMaster;
- }
-
public String getName() {
return "page-sequence-master";
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-03 20:23:25
|
Revision: 7871
http://svn.sourceforge.net/foray/?rev=7871&view=rev
Author: victormote
Date: 2006-09-03 13:23:13 -0700 (Sun, 03 Sep 2006)
Log Message:
-----------
Clean up some doc.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java 2006-09-03 20:15:25 UTC (rev 7870)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java 2006-09-03 20:23:13 UTC (rev 7871)
@@ -42,32 +42,31 @@
*/
public class PageSequence extends FObj implements org.axsl.foR.fo.PageSequence {
- // There doesn't seem to be anything in the spec requiring flows
- // to be in the order given, only that they map to the regions
- // defined in the page sequence, so all we need is this one hashtable
- // the set of flows includes StaticContent flows also
-
/**
- * Map of flows to their flow name (flow-name, Flow) Does only contain flows
- * for static content!
+ * Map whose key is a String containing the flow-name and whose value is
+ * the related StaticContent instance.
*/
- private HashMap flowMap;
+ private HashMap staticContentMap;
- // according to communication from Paul Grosso (XSL-List,
- // 001228, Number 406), confusion in spec section 6.4.5 about
- // multiplicity of fo:flow in XSL 1.0 is cleared up - one (1)
- // fo:flow per fo:page-sequence only.
+ /**
+ * The {@link Flow} instance for this page-sequence.
+ * According to communication from Paul Grosso (XSL-List,
+ * 001228, Number 406), confusion in spec section 6.4.5 about
+ * multiplicity of fo:flow in XSL 1.0 is cleared up - one (1)
+ * fo:flow per fo:page-sequence only.
+ */
private Flow flow = null;
- // page number and related formatting variables
+ /** Handles page numbering and related formatting. */
private PageNumberGenerator pageNumberGenerator;
+ /** The object containing the template for the use of page masters. */
private PageSequenceTemplate pageSequenceTemplate;
public PageSequence(final FObj parent, final PropertyList propertyList,
final String systemId, final int line, final int column) {
super(parent, propertyList, systemId, line, column);
- flowMap = new HashMap();
+ staticContentMap = new HashMap();
}
/**
@@ -128,7 +127,7 @@
throwException("Only a single fo:flow permitted per "
+ getFullName());
}
- if (flowMap.containsKey(flow.traitFlowName())) {
+ if (staticContentMap.containsKey(flow.traitFlowName())) {
throwException("flow-names must be unique within an "
+ getFullName());
}
@@ -141,7 +140,7 @@
throwException("Static content ('" + staticContent.traitFlowName()
+ "') is not allowed after fo:flow");
}
- if (flowMap.containsKey(staticContent.traitFlowName())) {
+ if (staticContentMap.containsKey(staticContent.traitFlowName())) {
throwException("flow-names must be unique within an "
+ "fo:page-sequence");
}
@@ -153,11 +152,11 @@
"region-name '" + staticContent.traitFlowName()
+ "' doesn't exist in the layout-master-set.");
}
- flowMap.put(staticContent.traitFlowName(), staticContent);
+ staticContentMap.put(staticContent.traitFlowName(), staticContent);
}
public StaticContent getStaticContent(final String regionName) {
- return (StaticContent) flowMap.get(regionName);
+ return (StaticContent) staticContentMap.get(regionName);
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-03 20:15:32
|
Revision: 7870
http://svn.sourceforge.net/foray/?rev=7870&view=rev
Author: victormote
Date: 2006-09-03 13:15:25 -0700 (Sun, 03 Sep 2006)
Log Message:
-----------
Start using the PageSequenceTemplate abstraction.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-03 19:31:25 UTC (rev 7869)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-03 20:15:25 UTC (rev 7870)
@@ -54,18 +54,19 @@
*/
public SimplePageMaster getNextPageMaster(final boolean isBlank)
throws FOTreeException {
-
- org.foray.fotree.fo.obj.SimplePageMaster spm = getSimplePageMaster();
- if (spm != null) {
- return spm;
+ final PageSequenceTemplate template = this.pageSequence
+ .getPageSequenceTemplate();
+ if (template instanceof org.foray.fotree.fo.obj.SimplePageMaster) {
+ return (org.foray.fotree.fo.obj.SimplePageMaster) template;
}
- final PageSequenceMaster psm = getPageSequenceMaster();
+ final PageSequenceMaster psm = (PageSequenceMaster) template;
if (psm == null) {
return null;
}
final Flow flow = getFlow();
this.lastDocumentPageNumber ++;
- spm = psm.getNextSimplePageMaster(
+ final org.foray.fotree.fo.obj.SimplePageMaster spm =
+ psm.getNextSimplePageMaster(
((this.lastDocumentPageNumber % 2) == 1), isBlank);
final Region region = (Region) spm.getRegionBody();
if (!flow.traitFlowName().equals(region.traitRegionName())) {
@@ -76,14 +77,6 @@
return spm;
}
- private org.foray.fotree.fo.obj.SimplePageMaster getSimplePageMaster() {
- return this.pageSequence.getSimplePageMaster();
- }
-
- private PageSequenceMaster getPageSequenceMaster() {
- return this.pageSequence.getPageSequenceMaster();
- }
-
private Flow getFlow() {
return this.pageSequence.getFlow();
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java 2006-09-03 19:31:25 UTC (rev 7869)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java 2006-09-03 20:15:25 UTC (rev 7870)
@@ -62,10 +62,8 @@
// page number and related formatting variables
private PageNumberGenerator pageNumberGenerator;
- private PageSequenceMaster pageSequenceMaster;
+ private PageSequenceTemplate pageSequenceTemplate;
- private SimplePageMaster simplePageMaster;
-
public PageSequence(final FObj parent, final PropertyList propertyList,
final String systemId, final int line, final int column) {
super(parent, propertyList, systemId, line, column);
@@ -85,7 +83,18 @@
* {@inheritDoc}
*/
protected void validateProperties() throws FOTreeException {
- return;
+ final String masterReference = this.traitMasterReference();
+ this.pageSequenceTemplate = getLayoutMasterSet().getSimplePageMaster(
+ masterReference);
+ if (this.pageSequenceTemplate == null) {
+ this.pageSequenceTemplate = getLayoutMasterSet()
+ .getPageSequenceMaster(masterReference);
+ if (this.pageSequenceTemplate == null) {
+ throwException("master-reference '" + traitMasterReference()
+ + "' for fo:page-sequence matches no "
+ + "simple-page-master or page-sequence-master");
+ }
+ }
}
/**
@@ -124,7 +133,6 @@
+ getFullName());
}
this.flow = flow;
- setupPagination();
}
public void addStaticContent(final StaticContent staticContent)
@@ -209,16 +217,6 @@
return this.flow;
}
- public SimplePageMaster getSimplePageMaster() {
- final String masterReference = this.traitMasterReference();
- return getLayoutMasterSet().getSimplePageMaster(masterReference);
- }
-
- public PageSequenceMaster getPageSequenceMaster() {
- final String masterReference = this.traitMasterReference();
- return getLayoutMasterSet().getPageSequenceMaster(masterReference);
- }
-
/**
* {@inheritDoc}
*/
@@ -227,19 +225,6 @@
return new PageMasterResolver(this, lastPageNumber);
}
- private void setupPagination() throws FOTreeException {
- this.simplePageMaster = getSimplePageMaster();
- if (this.simplePageMaster == null) {
- pageSequenceMaster = getPageSequenceMaster();
- if (pageSequenceMaster == null) {
- throwException("master-reference '" + traitMasterReference()
- + "' for fo:page-sequence matches no "
- + "simple-page-master or page-sequence-master");
- }
- pageSequenceMaster.reset();
- }
- }
-
/**
* {@inheritDoc}
*/
@@ -267,11 +252,7 @@
*/
protected AbstractPageMaster flowValid(final AbstractFlow flow) {
final Set pageMasters;
- if (this.getSimplePageMaster() != null) {
- pageMasters = this.getSimplePageMaster().getPages();
- } else {
- pageMasters = this.getPageSequenceMaster().getPages();
- }
+ pageMasters = this.pageSequenceTemplate.getPages();
final Iterator iterator = pageMasters.iterator();
while (iterator.hasNext()) {
final AbstractPageMaster pageMaster = (AbstractPageMaster)
@@ -283,4 +264,12 @@
return null;
}
+ /**
+ * Returns the page sequence template for this page sequence.
+ * @return Returns the pageSequenceTemplate.
+ */
+ public PageSequenceTemplate getPageSequenceTemplate() {
+ return this.pageSequenceTemplate;
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-03 19:31:28
|
Revision: 7869
http://svn.sourceforge.net/foray/?rev=7869&view=rev
Author: victormote
Date: 2006-09-03 12:31:25 -0700 (Sun, 03 Sep 2006)
Log Message:
-----------
Remove layout-time testing of flow/page validity, as this is now tested at parse time.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java 2006-09-03 19:29:50 UTC (rev 7868)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java 2006-09-03 19:31:25 UTC (rev 7869)
@@ -237,14 +237,6 @@
+ "simple-page-master or page-sequence-master");
}
pageSequenceMaster.reset();
- } else {
- final Region region =
- (Region) this.simplePageMaster.getRegionBody();
- if (!flow.traitFlowName().equals(region.traitRegionName())) {
- throwException("Flow '" + flow.traitFlowName()
- + "' does not map to the region-body in page-master '"
- + this.simplePageMaster.traitMasterName() + "'");
- }
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-03 19:29:59
|
Revision: 7868
http://svn.sourceforge.net/foray/?rev=7868&view=rev
Author: victormote
Date: 2006-09-03 12:29:50 -0700 (Sun, 03 Sep 2006)
Log Message:
-----------
Add and use infrastructure allowing better validation of sub-sequence specifiers and better integration between page sequencing and flows.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractFlow.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/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/PageSequenceTemplate.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/SimplePageMaster.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/SubSequenceSpecifier.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractFlow.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractFlow.java 2006-09-03 18:43:33 UTC (rev 7867)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractFlow.java 2006-09-03 19:29:50 UTC (rev 7868)
@@ -58,6 +58,15 @@
if (name == null || name.equals("")) {
throwException(getFullName() + "requires a 'flow-name'.");
}
+ /* Make sure that this flow name can be laid out on every page that can
+ * be created in the page-sequence. */
+ final AbstractPageMaster problemPage = getPageSequence().flowValid(
+ this);
+ if (problemPage != null) {
+ throwException(this.getFullName() + " '" + traitFlowName()
+ + "' cannot flow into page-master '"
+ + problemPage.traitMasterName() + "'");
+ }
}
public boolean isRAGenerator() {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractPageMaster.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractPageMaster.java 2006-09-03 18:43:33 UTC (rev 7867)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractPageMaster.java 2006-09-03 19:29:50 UTC (rev 7868)
@@ -60,4 +60,12 @@
}
}
+ /**
+ * Indicates whether this page has a region matching a given flow name.
+ * @param flowName The flow name sought.
+ * @return True iff this page has a region whose name matches
+ * <tt>flowName</tt>.
+ */
+ public abstract boolean hasRegion(String flowName);
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java 2006-09-03 18:43:33 UTC (rev 7867)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequence.java 2006-09-03 19:29:50 UTC (rev 7868)
@@ -34,6 +34,8 @@
import org.axsl.foR.fo.Flow;
import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
/**
* A "page-sequence" object in XSL-FO.
@@ -264,4 +266,29 @@
return null;
}
+ /**
+ * Make sure that a given flow can be laid out on every page in this
+ * page-sequence.
+ * @param flow The abstract flow to be tested.
+ * @return The first page-master detected which cannot take content from
+ * <tt>flow</tt>, or null if the flow can be laid out on all pages.
+ */
+ protected AbstractPageMaster flowValid(final AbstractFlow flow) {
+ final Set pageMasters;
+ if (this.getSimplePageMaster() != null) {
+ pageMasters = this.getSimplePageMaster().getPages();
+ } else {
+ pageMasters = this.getPageSequenceMaster().getPages();
+ }
+ final Iterator iterator = pageMasters.iterator();
+ while (iterator.hasNext()) {
+ final AbstractPageMaster pageMaster = (AbstractPageMaster)
+ iterator.next();
+ if (! pageMaster.hasRegion(flow.traitFlowName())) {
+ return pageMaster;
+ }
+ }
+ return null;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceMaster.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceMaster.java 2006-09-03 18:43:33 UTC (rev 7867)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceMaster.java 2006-09-03 19:29:50 UTC (rev 7868)
@@ -33,10 +33,13 @@
import org.axsl.foR.FOTreeException;
import org.axsl.foR.ProxyFactory;
+import java.util.HashSet;
+import java.util.Set;
+
/**
* A "page-sequence-master" object in XSL-FO.
*/
-public class PageSequenceMaster extends FObj {
+public class PageSequenceMaster extends FObj implements PageSequenceTemplate {
private SubSequenceSpecifier currentSubSequence;
@@ -189,4 +192,17 @@
return factory.makeProxy(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public Set getPages() {
+ final Set returnSet = new HashSet();
+ for (int i = 0; i < this.children.size(); i++) {
+ final Object child = this.children.get(i);
+ final SubSequenceSpecifier specifier = (SubSequenceSpecifier) child;
+ returnSet.addAll(specifier.getPages());
+ }
+ return returnSet;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceTemplate.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceTemplate.java 2006-09-03 18:43:33 UTC (rev 7867)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceTemplate.java 2006-09-03 19:29:50 UTC (rev 7868)
@@ -24,6 +24,8 @@
package org.foray.fotree.fo.obj;
+import java.util.Set;
+
/**
* Abstraction of the formatting objects that can be used as a template to
* generate sequences of pages for a page-sequence.
@@ -37,6 +39,6 @@
* @return The page-master instances that can be generated from this
* template.
*/
- AbstractPageMaster[] getPages() ;
+ Set getPages() ;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java 2006-09-03 18:43:33 UTC (rev 7867)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java 2006-09-03 19:29:50 UTC (rev 7868)
@@ -34,6 +34,9 @@
import org.axsl.foR.FOTreeException;
import org.axsl.foR.ProxyFactory;
+import java.util.HashSet;
+import java.util.Set;
+
/**
* A "repeatable-page-master-alternatives" object in XSL-FO.
*/
@@ -123,4 +126,30 @@
return factory.makeProxy(this);
}
+ /**
+ * The parent.
+ * @return The parent, properly cast.
+ */
+ public PageSequenceMaster pageSequenceMaster() {
+ /* Cast verified at construction. */
+ return (PageSequenceMaster) this.parentFO();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Set getPages() {
+ final Set returnSet = new HashSet();
+ final LayoutMasterSet layoutSet = this.pageSequenceMaster()
+ .layoutMasterSet();
+ for (int i = 0; i < this.children.size(); i++) {
+ final ConditionalPageMasterReference conditional =
+ (ConditionalPageMasterReference) this.children.get(i);
+ final AbstractPageMaster pageMaster = layoutSet.getSimplePageMaster(
+ conditional.traitMasterReference());
+ returnSet.add(pageMaster);
+ }
+ return returnSet;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java 2006-09-03 18:43:33 UTC (rev 7867)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java 2006-09-03 19:29:50 UTC (rev 7868)
@@ -34,6 +34,9 @@
import org.axsl.foR.FOTreeException;
import org.axsl.foR.ProxyFactory;
+import java.util.HashSet;
+import java.util.Set;
+
/**
* A "repeatable-page-master-reference" object in XSL-FO.
*/
@@ -120,4 +123,26 @@
return factory.makeProxy(this);
}
+ /**
+ * The parent.
+ * @return The parent, properly cast.
+ */
+ public PageSequenceMaster pageSequenceMaster() {
+ /* Cast verified at construction. */
+ return (PageSequenceMaster) this.parentFO();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Set getPages() {
+ final Set returnSet = new HashSet(1);
+ final LayoutMasterSet layoutSet = this.pageSequenceMaster()
+ .layoutMasterSet();
+ final AbstractPageMaster pageMaster = layoutSet.getSimplePageMaster(
+ this.traitMasterReference());
+ returnSet.add(pageMaster);
+ return returnSet;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SimplePageMaster.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SimplePageMaster.java 2006-09-03 18:43:33 UTC (rev 7867)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SimplePageMaster.java 2006-09-03 19:29:50 UTC (rev 7868)
@@ -33,11 +33,14 @@
import org.axsl.foR.FOTreeException;
import org.axsl.foR.ProxyFactory;
+import java.util.HashSet;
+import java.util.Set;
+
/**
* A "simple-page-master" object in XSL-FO.
*/
public class SimplePageMaster extends AbstractPageMaster
- implements org.axsl.foR.fo.SimplePageMaster {
+ implements org.axsl.foR.fo.SimplePageMaster, PageSequenceTemplate {
// Fallback values for "auto" page size: 8x11in
public static final int FALLBACK_PAGE_HEIGHT = 792000;
public static final int FALLBACK_PAGE_WIDTH = 576000;
@@ -274,4 +277,26 @@
return factory.makeProxy(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public Set getPages() {
+ final Set returnSet = new HashSet(1);
+ returnSet.add(this);
+ return returnSet;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean hasRegion(final String flowName) {
+ for (int i = 0; i < this.children.size(); i++) {
+ final Region region = (Region) this.children.get(i);
+ if (region.traitRegionName().equals(flowName)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java 2006-09-03 18:43:33 UTC (rev 7867)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java 2006-09-03 19:29:50 UTC (rev 7868)
@@ -32,7 +32,10 @@
import org.axsl.foR.FOTreeException;
import org.axsl.foR.ProxyFactory;
+import java.util.HashSet;
+import java.util.Set;
+
/**
* A "single-page-master-reference" object in XSl-FO.
*/
@@ -125,4 +128,17 @@
return factory.makeProxy(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ public Set getPages() {
+ final Set returnSet = new HashSet(1);
+ final LayoutMasterSet layoutSet = this.pageSequenceMaster()
+ .layoutMasterSet();
+ final AbstractPageMaster pageMaster = layoutSet.getSimplePageMaster(
+ this.traitMasterReference());
+ returnSet.add(pageMaster);
+ return returnSet;
+ }
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java 2006-09-03 18:43:33 UTC (rev 7867)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SubSequenceSpecifier.java 2006-09-03 19:29:50 UTC (rev 7868)
@@ -26,6 +26,8 @@
import org.axsl.foR.FOTreeException;
+import java.util.Set;
+
/**
* Interface specifying requirements for a sub-sequence-specifier in XSL-FO,
* that is, items capable of looking up an appropriate PageMaster.
@@ -45,4 +47,11 @@
* with the method of the same signature in FONode. */
void reset();
+ /**
+ * Returns the page-master instances that are included in this template.
+ * @return The page-master instances that can be generated from this
+ * template.
+ */
+ Set getPages() ;
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-03 18:43:38
|
Revision: 7867
http://svn.sourceforge.net/foray/?rev=7867&view=rev
Author: victormote
Date: 2006-09-03 11:43:33 -0700 (Sun, 03 Sep 2006)
Log Message:
-----------
Add interface for classes that act as a template for generating the sequence of pages.
Added Paths:
-----------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceTemplate.java
Added: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceTemplate.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceTemplate.java (rev 0)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceTemplate.java 2006-09-03 18:43:33 UTC (rev 7867)
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2006 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
+ *
+ */
+
+/* $Id$ */
+
+package org.foray.fotree.fo.obj;
+
+/**
+ * Abstraction of the formatting objects that can be used as a template to
+ * generate sequences of pages for a page-sequence.
+ * For XSL-FO 1.0, this includes {@link SimplePageMaster} and
+ * {@link PageSequenceMaster};
+ */
+public interface PageSequenceTemplate {
+
+ /**
+ * Returns the page-master instances that are included in this template.
+ * @return The page-master instances that can be generated from this
+ * template.
+ */
+ AbstractPageMaster[] getPages() ;
+
+}
Property changes on: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceTemplate.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-03 18:07:26
|
Revision: 7866
http://svn.sourceforge.net/foray/?rev=7866&view=rev
Author: victormote
Date: 2006-09-03 11:06:59 -0700 (Sun, 03 Sep 2006)
Log Message:
-----------
Make end() abstract.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.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/BlockContainer.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/FootnoteBody.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/InlineContainer.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/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/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/RegionAfter.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBefore.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBody.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionEnd.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionStart.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/SinglePageMasterReference.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/TableBody.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/TableColumn.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableFooter.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableHeader.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/foray/obj/ContinuedLabel.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/obj/SVGElement.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -179,10 +179,7 @@
* subclass to do some validation or setup work after the object and all of
* its properties have been parsed and all of its children processed.
*/
- protected void end() throws FOTreeException {
- // do nothing by default
- return;
- }
+ protected abstract void end() throws FOTreeException ;
/**
* Subclasses can set this flag to false if there is a validity problem
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BidiOverride.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BidiOverride.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BidiOverride.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -67,6 +67,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BlockContainer.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BlockContainer.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BlockContainer.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -67,6 +67,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
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 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -77,6 +77,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ColorProfile.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ColorProfile.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ColorProfile.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -67,6 +67,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ConditionalPageMasterReference.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -79,6 +79,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Declarations.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Declarations.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Declarations.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -67,6 +67,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ExternalGraphic.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ExternalGraphic.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ExternalGraphic.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -90,6 +90,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Float.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Float.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Float.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -66,6 +66,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FootnoteBody.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FootnoteBody.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/FootnoteBody.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -67,6 +67,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/InitialPropertySet.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/InitialPropertySet.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/InitialPropertySet.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -68,6 +68,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/InlineContainer.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/InlineContainer.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/InlineContainer.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -67,6 +67,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/LayoutMasterSet.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/LayoutMasterSet.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/LayoutMasterSet.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -86,6 +86,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ListItemBody.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ListItemBody.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ListItemBody.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -68,6 +68,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ListItemLabel.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ListItemLabel.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ListItemLabel.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -68,6 +68,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiCase.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiCase.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiCase.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -67,6 +67,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiProperties.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiProperties.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiProperties.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -67,6 +67,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiPropertySet.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiPropertySet.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiPropertySet.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -67,6 +67,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiSwitch.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiSwitch.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiSwitch.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -67,6 +67,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiToggle.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiToggle.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/MultiToggle.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -68,6 +68,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageNumber.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageNumber.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageNumber.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -69,6 +69,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageNumberCitation.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageNumberCitation.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageNumberCitation.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -72,6 +72,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionAfter.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionAfter.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionAfter.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -51,6 +51,13 @@
getPageMaster().addRegionAfter(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ protected void end() throws FOTreeException {
+ return;
+ }
+
public String getName() {
return "region-after";
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBefore.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBefore.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBefore.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -51,6 +51,13 @@
getPageMaster().addRegionBefore(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ protected void end() throws FOTreeException {
+ return;
+ }
+
public String getName() {
return "region-before";
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBody.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBody.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBody.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -51,6 +51,13 @@
getPageMaster().addRegionBody(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ protected void end() throws FOTreeException {
+ return;
+ }
+
public String getName() {
return "region-body";
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionEnd.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionEnd.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionEnd.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -50,6 +50,13 @@
getPageMaster().addRegionEnd(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ protected void end() throws FOTreeException {
+ return;
+ }
+
public String getName() {
return "region-end";
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionStart.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionStart.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionStart.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -51,6 +51,13 @@
getPageMaster().addRegionStart(this);
}
+ /**
+ * {@inheritDoc}
+ */
+ protected void end() throws FOTreeException {
+ return;
+ }
+
public String getName() {
return "region-start";
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -78,6 +78,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -83,6 +83,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RetrieveMarker.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RetrieveMarker.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RetrieveMarker.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -67,6 +67,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -73,18 +73,25 @@
/**
* {@inheritDoc}
*/
- protected void validateDescendants() throws FOTreeException {
+ public void setup() {
return;
}
/**
* {@inheritDoc}
*/
- public void setup() {
+ protected void end() throws FOTreeException {
return;
}
/**
+ * {@inheritDoc}
+ */
+ protected void validateDescendants() throws FOTreeException {
+ return;
+ }
+
+ /**
* The parent.
* @return The parent, properly cast.
*/
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableAndCaption.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableAndCaption.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableAndCaption.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -67,6 +67,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableBody.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableBody.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableBody.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -59,6 +59,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableCaption.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableCaption.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableCaption.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -68,6 +68,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableColumn.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableColumn.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableColumn.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -72,6 +72,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableFooter.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableFooter.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableFooter.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -59,6 +59,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableHeader.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableHeader.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableHeader.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -59,6 +59,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableRow.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableRow.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/TableRow.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -69,6 +69,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Title.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Title.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Title.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -67,6 +67,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/foray/obj/ContinuedLabel.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/foray/obj/ContinuedLabel.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/foray/obj/ContinuedLabel.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -68,6 +68,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/obj/SVGElement.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/obj/SVGElement.java 2006-09-03 17:55:15 UTC (rev 7865)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/obj/SVGElement.java 2006-09-03 18:06:59 UTC (rev 7866)
@@ -78,6 +78,13 @@
/**
* {@inheritDoc}
*/
+ protected void end() throws FOTreeException {
+ return;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
protected void validateDescendants() throws FOTreeException {
return;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|