Source Code Cross Referenced for RegionReference.java in  » Graphic-Library » fop » org » apache » fop » area » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Graphic Library » fop » org.apache.fop.area 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         * 
009:         *      http://www.apache.org/licenses/LICENSE-2.0
010:         * 
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:
018:        /* $Id: RegionReference.java 426576 2006-07-28 15:44:37Z jeremias $ */
019:
020:        package org.apache.fop.area;
021:
022:        import java.util.ArrayList;
023:        import java.util.List;
024:
025:        import org.apache.fop.fo.pagination.Region;
026:
027:        /**
028:         * This is a region reference area for a page regions.
029:         * This area is the direct child of a region-viewport-area. It is cloneable
030:         * so the page master can make copies from the original page and regions.
031:         */
032:        public class RegionReference extends Area implements  Cloneable {
033:
034:            /** Reference to the region FO. */
035:            //protected Region regionFO;
036:            private int regionClass;
037:            private String regionName;
038:            private CTM ctm;
039:
040:            // the list of block areas from the static flow
041:            private ArrayList blocks = new ArrayList();
042:
043:            /** the parent RegionViewport for this object */
044:            protected RegionViewport regionViewport;
045:
046:            /**
047:             * Create a new region reference area.
048:             *
049:             * @param regionFO the region.
050:             * @param parent the viewport for this region.
051:             */
052:            public RegionReference(Region regionFO, RegionViewport parent) {
053:                this (regionFO.getNameId(), regionFO.getRegionName(), parent);
054:            }
055:
056:            /**
057:             * Create a new region reference area.
058:             *
059:             * @param regionClass the region class (as returned by Region.getNameId())
060:             * @param regionName the name of the region (as returned by Region.getRegionName())
061:             * @param parent the viewport for this region.
062:             */
063:            public RegionReference(int regionClass, String regionName,
064:                    RegionViewport parent) {
065:                this .regionClass = regionClass;
066:                this .regionName = regionName;
067:                addTrait(Trait.IS_REFERENCE_AREA, Boolean.TRUE);
068:                regionViewport = parent;
069:            }
070:
071:            /** @see org.apache.fop.area.Area#addChildArea(org.apache.fop.area.Area) */
072:            public void addChildArea(Area child) {
073:                blocks.add(child);
074:            }
075:
076:            /**
077:             * Set the Coordinate Transformation Matrix which transforms content
078:             * coordinates in this region reference area which are specified in
079:             * terms of "start" and "before" into coordinates in a system which
080:             * is positioned in "absolute" directions (with origin at lower left of
081:             * the region reference area.
082:             *
083:             * @param ctm the current transform to position this region
084:             */
085:            public void setCTM(CTM ctm) {
086:                this .ctm = ctm;
087:            }
088:
089:            /**
090:             * @return Returns the parent RegionViewport.
091:             */
092:            public RegionViewport getRegionViewport() {
093:                return regionViewport;
094:            }
095:
096:            /**
097:             * Get the current transform of this region.
098:             *
099:             * @return ctm the current transform to position this region
100:             */
101:            public CTM getCTM() {
102:                return this .ctm;
103:            }
104:
105:            /**
106:             * Get the block in this region.
107:             *
108:             * @return the list of blocks in this region
109:             */
110:            public List getBlocks() {
111:                return blocks;
112:            }
113:
114:            /**
115:             * Get the region class of this region.
116:             *
117:             * @return the region class
118:             */
119:            public int getRegionClass() {
120:                return this .regionClass;
121:            }
122:
123:            /** @return the region name */
124:            public String getRegionName() {
125:                return this .regionName;
126:            }
127:
128:            /**
129:             * Add a block area to this region reference area.
130:             *
131:             * @param block the block area to add
132:             */
133:            public void addBlock(Block block) {
134:                addChildArea(block);
135:            }
136:
137:            /**
138:             * Clone this region.
139:             * This is used when cloning the page by the page master.
140:             *
141:             * @return a copy of this region reference area
142:             */
143:            public Object clone() {
144:                RegionReference rr = new RegionReference(regionClass,
145:                        regionName, regionViewport);
146:                rr.ctm = ctm;
147:                rr.setIPD(getIPD());
148:                rr.blocks = (ArrayList) blocks.clone();
149:                return rr;
150:            }
151:
152:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.