summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Bernard West <pbwest@apache.org>2004-07-24 04:20:40 +0000
committerPeter Bernard West <pbwest@apache.org>2004-07-24 04:20:40 +0000
commit076f09060b8671aaf210320da7cbeefd645c743c (patch)
tree944c140c8ee2a89c6d56fdd5e0d8dd11b9a2d79d
parent18714d390fc68e2ed46c98decf9439f3d8a8b997 (diff)
downloadxmlgraphics-fop-076f09060b8671aaf210320da7cbeefd645c743c.tar.gz
xmlgraphics-fop-076f09060b8671aaf210320da7cbeefd645c743c.zip
Supersedes AbstractViewport as superclass for block-level viewport-areas.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197819 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/java/org/apache/fop/area/BlockViewportArea.java87
1 files changed, 87 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/area/BlockViewportArea.java b/src/java/org/apache/fop/area/BlockViewportArea.java
new file mode 100644
index 000000000..aa2c9e97b
--- /dev/null
+++ b/src/java/org/apache/fop/area/BlockViewportArea.java
@@ -0,0 +1,87 @@
+/*
+ *
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * 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.
+ *
+ * Created on 24/07/2004
+ * $Id$
+ */
+package org.apache.fop.area;
+
+import org.apache.fop.datastructs.Node;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.flow.FoPageSequence;
+
+
+/**
+ * @author pbw
+ * @version $Revision$ $Name$
+ */
+public abstract class BlockViewportArea extends BlockArea implements Viewport {
+
+ private static final String tag = "$Name$";
+ private static final String revision = "$Revision$";
+
+ /** Does the viewport rectange clip the reference-area? */
+ protected boolean clip = true;
+
+ /** The reference-area of the viewport/reference pair */
+ protected ReferenceArea refArea;
+
+ /**
+ * @param pageSeq
+ * @param generatedBy
+ * @param parent
+ * @param sync
+ */
+ public BlockViewportArea(FoPageSequence pageSeq, FONode generatedBy,
+ Node parent, Object sync) {
+ super(pageSeq, generatedBy, parent, sync);
+ // TODO Auto-generated constructor stub
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.fop.area.Viewport#setReferenceArea(org.apache.fop.area.ReferenceArea)
+ */
+ public void setReferenceArea(ReferenceArea ref) {
+ synchronized (sync) {
+ refArea = ref;
+ }
+ }
+ /* (non-Javadoc)
+ * @see org.apache.fop.area.Viewport#getReferenceArea()
+ */
+ public ReferenceArea getReferenceArea() {
+ synchronized (sync) {
+ return refArea;
+ }
+ }
+ /* (non-Javadoc)
+ * @see org.apache.fop.area.Viewport#setClip(boolean)
+ */
+ public void setClip(boolean clip) {
+ synchronized (sync) {
+ this.clip = clip;
+ }
+ }
+ /* (non-Javadoc)
+ * @see org.apache.fop.area.Viewport#getClip()
+ */
+ public boolean getClip() {
+ synchronized (sync) {
+ return clip;
+ }
+ }
+
+}