Revision: 7586
Author: victormote
Date: 2006-06-14 09:32:57 -0700 (Wed, 14 Jun 2006)
ViewCVS: http://svn.sourceforge.net/foray/?rev=7586&view=rev
Log Message:
-----------
Remove instance variable that is a duplicate of "children". The only difference was that specifiers lacking a master-reference were left out of the removed instance variable. However, the will be ignored during processing anyway.
Modified Paths:
--------------
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
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-06-14 16:15:58 UTC (rev 7585)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageSequenceMaster.java 2006-06-14 16:32:57 UTC (rev 7586)
@@ -34,14 +34,11 @@
import org.axsl.foR.FOTreeException;
import org.axsl.foR.ProxyFactory;
-import java.util.ArrayList;
-
/**
* Models the fo:page-sequence-master object.
*/
public class PageSequenceMaster extends FObj {
- private ArrayList subSequenceSpecifiers;
private SubSequenceSpecifier currentSubSequence;
private int currentSubSequenceNumber;
@@ -59,7 +56,6 @@
throwException(getFullName() + " must be child "
+ "of fo:layout-master-set.");
}
- subSequenceSpecifiers = new ArrayList();
currentSubSequenceNumber = -1;
currentSubSequence = null;
}
@@ -98,17 +94,12 @@
return (LayoutMasterSet) this.parentFO();
}
- protected void addSubsequenceSpecifier(
- SubSequenceSpecifier pageMasterReference) {
- subSequenceSpecifiers.add(pageMasterReference);
- }
-
protected SubSequenceSpecifier getNextSubSequence() {
currentSubSequenceNumber++;
if (currentSubSequenceNumber >= 0
- && currentSubSequenceNumber < subSequenceSpecifiers.size()) {
- return (SubSequenceSpecifier)subSequenceSpecifiers
- .get(currentSubSequenceNumber);
+ && currentSubSequenceNumber < this.children.size()) {
+ return (SubSequenceSpecifier)
+ this.children.get(currentSubSequenceNumber);
}
return null;
}
@@ -116,8 +107,8 @@
public void reset() {
currentSubSequenceNumber = -1;
currentSubSequence = null;
- for (int i = 0; i< subSequenceSpecifiers.size(); i++) {
- ((SubSequenceSpecifier)subSequenceSpecifiers.get(i)).reset();
+ for (int i = 0; i< this.children.size(); i++) {
+ ((SubSequenceSpecifier)this.children.get(i)).reset();
}
}
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-06-14 16:15:58 UTC (rev 7585)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMAlternatives.java 2006-06-14 16:32:57 UTC (rev 7586)
@@ -43,8 +43,6 @@
public class RepeatablePMAlternatives extends FObj
implements SubSequenceSpecifier {
- private PageSequenceMaster pageSequenceMaster;
-
/* TODO: This state information should probably be stored in
* PageSequenceMaster, with a unique value for each occurrence used within
* each PageSequence. */
@@ -57,10 +55,7 @@
throws FOTreeException {
super(parent, propertyList, systemId, line, column);
- if (parent instanceof PageSequenceMaster) {
- this.pageSequenceMaster = (PageSequenceMaster)parent;
- this.pageSequenceMaster.addSubsequenceSpecifier(this);
- } else {
+ if (! (parent instanceof PageSequenceMaster)) {
throwException(getFullName() + " must be child of "
+ "fo:page-sequence-master.");
}
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-06-14 16:15:58 UTC (rev 7585)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RepeatablePMReference.java 2006-06-14 16:32:57 UTC (rev 7586)
@@ -53,11 +53,7 @@
FOContext context = null;
String masterReference = traitMasterReference(context);
if (! masterReference.equals("")) {
- if (parent instanceof PageSequenceMaster) {
- PageSequenceMaster pageSequenceMaster
- = (PageSequenceMaster)parent;
- pageSequenceMaster.addSubsequenceSpecifier(this);
- } else {
+ if (! (parent instanceof PageSequenceMaster)) {
throwException(getFullName() + " must be child of "
+ "fo:page-sequence-master.");
}
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-06-14 16:15:58 UTC (rev 7585)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SinglePageMasterReference.java 2006-06-14 16:32:57 UTC (rev 7586)
@@ -59,8 +59,6 @@
if (masterReference.equals("")) {
this.logWarning(getFullName() + " has no master-reference, and "
+ "will be ignored.");
- } else {
- pageSequenceMaster().addSubsequenceSpecifier(this);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|