[FOray-commit] SF.net SVN: foray: [7533] trunk/foray/foray-areatree/src/java/org/foray/area
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2006-06-12 15:24:08
|
Revision: 7533 Author: victormote Date: 2006-06-12 08:23:59 -0700 (Mon, 12 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7533&view=rev Log Message: ----------- Add new abstract superclass for linkage items, and a subclass for the specialized case of Markers. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java Added Paths: ----------- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java Added: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java (rev 0) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java 2006-06-12 15:23:59 UTC (rev 7533) @@ -0,0 +1,47 @@ +/* + * 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.area; + +import org.axsl.foR.FONode; +import org.axsl.foR.FONodeResult; + +/** + * Abstract superclass for classes that handle the linkage between the FO Tree + * and the Area Tree. + */ +public abstract class FOLinkage implements FONodeResult { + + /** The FONode for which this linkage tracks Area generation. */ + private FONode foGenerator; + + public FOLinkage(FONode foGenerator) { + this.foGenerator = foGenerator; + } + + public FONode getFONode() { + return this.foGenerator; + } + +} Property changes on: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkage.java ___________________________________________________________________ Name: svn:keywords + "Author Id Rev Date URL" Name: svn:eol-style + native Added: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java (rev 0) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java 2006-06-12 15:23:59 UTC (rev 7533) @@ -0,0 +1,51 @@ +/* + * 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.area; + +import org.axsl.foR.FONode; +import org.axsl.foR.FONodeResult; + +import java.util.HashMap; + +/** + * A collection of {@link FOLinkageNormal} instances keyed by the + * retrieve-marker item that is their "parent". + */ +public class FOLinkageMarker extends HashMap implements FONodeResult { + + static final long serialVersionUID = 632226032801502694L; + + /** The FONode. */ + private FONode realFONode; + + public FOLinkageMarker(FONode realFObj) { + this.realFONode = realFObj; + } + + public FONode getFONode() { + return this.realFONode; + } + +} Property changes on: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageMarker.java ___________________________________________________________________ Name: svn:keywords + "Author Id Rev Date URL" Name: svn:eol-style + native Modified: trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java 2006-06-12 15:14:48 UTC (rev 7532) +++ trunk/foray/foray-areatree/src/java/org/foray/area/FOLinkageNormal.java 2006-06-12 15:23:59 UTC (rev 7533) @@ -27,7 +27,6 @@ import org.axsl.areaW.Area; import org.axsl.areaW.AreaNode; import org.axsl.foR.FONode; -import org.axsl.foR.FONodeResult; import java.util.ArrayList; @@ -35,27 +34,21 @@ * <p>An implementation of {@link org.axsl.foR.FONodeProxy} suitable for use * with the FOray AreaTree.</p> */ -public class FOLinkageNormal implements FONodeResult { +public class FOLinkageNormal extends FOLinkage { - /** The FONode which generated the Areas in {@link #generatedAreas}. */ - private FONode realFONode; - /** - * The ordered list of Area instances generated by {@link #realFONode}. + * The ordered list of Area instances generated by + * {@link FOLinkage#getFONode()}. * Index 0 "is-first" and Index size() - 1 "is-last". * This is currently set up to only store the root node of any subtree that - * was generated by {@link #realFONode}. + * was generated by {@link FOLinkage#getFONode()}. */ private ArrayList generatedAreas = new ArrayList(); public FOLinkageNormal(FONode realFObj) { - this.realFONode = realFObj; + super(realFObj); } - public FONode getFONode() { - return this.realFONode; - } - public void registerGeneratedArea(AreaNode areaNode) { AreaNode parent = areaNode.getWritableParent(); if (parent != null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |