KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > fop > area > BlockViewport


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17
18 /* $Id: BlockViewport.java 426576 2006-07-28 15:44:37Z jeremias $ */
19  
20 package org.apache.fop.area;
21
22 /**
23  * A BlockViewport.
24  * This is used for block level Viewport/reference pairs.
25  * The block-container creates this area.
26  */

27 public class BlockViewport extends Block {
28     // clipping for this viewport
29
private boolean clip = false;
30     // transform if rotated or absolute
31
private CTM viewportCTM;
32
33     /**
34      * Create a new block viewport area.
35      */

36     public BlockViewport() {
37     }
38
39     /**
40      * Set the transform of this viewport.
41      * If the viewport is rotated or has an absolute positioning
42      * this transform will do the work.
43      *
44      * @param ctm the transformation
45      */

46     public void setCTM(CTM ctm) {
47         viewportCTM = ctm;
48     }
49
50     /**
51      * Get the transform of this block viewport.
52      *
53      * @return the transformation of this viewport
54      * or null if normally stacked without rotation
55      */

56     public CTM getCTM() {
57         return viewportCTM;
58     }
59
60     /**
61      * Set the clipping for this viewport.
62      *
63      * @param cl the clipping for the viewport
64      */

65     public void setClip(boolean cl) {
66         clip = cl;
67     }
68
69     /**
70      * Get the clipping for this viewport.
71      *
72      * @return the clipping for the viewport
73      * true if the contents should be clipped for this viewport
74      */

75     public boolean getClip() {
76         return clip;
77     }
78 }
79
80
Popular Tags