Revision: 7854
http://svn.sourceforge.net/foray/?rev=7854&view=rev
Author: victormote
Date: 2006-09-02 13:15:17 -0700 (Sat, 02 Sep 2006)
Log Message:
-----------
Add new abstract class for page masters.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SimplePageMaster.java
Added Paths:
-----------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractPageMaster.java
Added: 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 (rev 0)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractPageMaster.java 2006-09-02 20:15:17 UTC (rev 7854)
@@ -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.fotree.fo.obj;
+
+import org.foray.fotree.FObj;
+import org.foray.fotree.PropertyList;
+
+import org.axsl.foR.FOTreeException;
+
+/**
+ * Abstract superclass for all page master classes.
+ */
+public abstract class AbstractPageMaster extends FObj {
+
+ public AbstractPageMaster(final FObj parent,
+ final PropertyList propertyList, final String systemId,
+ final int line, final int column) throws FOTreeException {
+ super(parent, propertyList, systemId, line, column);
+ if (! (parent instanceof LayoutMasterSet)) {
+ throwException(getFullName() + " must be child "
+ + "of fo:layout-master-set.");
+ }
+ }
+
+}
Property changes on: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/AbstractPageMaster.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
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-02 18:11:10 UTC (rev 7853)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/SimplePageMaster.java 2006-09-02 20:15:17 UTC (rev 7854)
@@ -36,7 +36,7 @@
/**
* A "simple-page-master" object in XSL-FO.
*/
-public class SimplePageMaster extends FObj
+public class SimplePageMaster extends AbstractPageMaster
implements org.axsl.foR.fo.SimplePageMaster {
// Fallback values for "auto" page size: 8x11in
public static final int FALLBACK_PAGE_HEIGHT = 792000;
@@ -52,10 +52,6 @@
final String systemId, final int line, final int column)
throws FOTreeException {
super(parent, propertyList, systemId, line, column);
- if (! (parent instanceof LayoutMasterSet)) {
- throwException(getFullName() + " must be child "
- + "of fo:layout-master-set.");
- }
}
protected void start() throws FOTreeException {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|