Source Code Cross Referenced for JRDesignHyperlink.java in  » Report » jasperreports-2.0.1 » net » sf » jasperreports » engine » design » 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 » Report » jasperreports 2.0.1 » net.sf.jasperreports.engine.design 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * ============================================================================
003:         * GNU Lesser General Public License
004:         * ============================================================================
005:         *
006:         * JasperReports - Free Java report-generating library.
007:         * Copyright (C) 2001-2006 JasperSoft Corporation http://www.jaspersoft.com
008:         * 
009:         * This library is free software; you can redistribute it and/or
010:         * modify it under the terms of the GNU Lesser General Public
011:         * License as published by the Free Software Foundation; either
012:         * version 2.1 of the License, or (at your option) any later version.
013:         * 
014:         * This library is distributed in the hope that it will be useful,
015:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
016:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
017:         * Lesser General Public License for more details.
018:         * 
019:         * You should have received a copy of the GNU Lesser General Public
020:         * License along with this library; if not, write to the Free Software
021:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA.
022:         * 
023:         * JasperSoft Corporation
024:         * 303 Second Street, Suite 450 North
025:         * San Francisco, CA 94107
026:         * http://www.jaspersoft.com
027:         */
028:        package net.sf.jasperreports.engine.design;
029:
030:        import java.util.ArrayList;
031:        import java.util.Iterator;
032:        import java.util.List;
033:
034:        import net.sf.jasperreports.engine.JRConstants;
035:        import net.sf.jasperreports.engine.JRExpression;
036:        import net.sf.jasperreports.engine.JRHyperlink;
037:        import net.sf.jasperreports.engine.JRHyperlinkHelper;
038:        import net.sf.jasperreports.engine.JRHyperlinkParameter;
039:        import net.sf.jasperreports.engine.base.JRBaseHyperlink;
040:
041:        /**
042:         * Stand-alone implementation of {@link JRHyperlink JRHyperlink}
043:         * which should be used for report design purposes. 
044:         * 
045:         * @author Lucian Chirita (lucianc@users.sourceforge.net)
046:         * @version $Id: JRDesignHyperlink.java 1368 2006-09-01 12:01:52Z lucianc $
047:         */
048:        public class JRDesignHyperlink extends JRBaseHyperlink {
049:
050:            private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID;
051:
052:            private List hyperlinkParameters;
053:
054:            public JRDesignHyperlink() {
055:                hyperlinkParameters = new ArrayList();
056:            }
057:
058:            /**
059:             * Sets the link type as a built-in hyperlink type.
060:             * 
061:             * @param hyperlinkType the built-in hyperlink type
062:             * @see #getLinkType()
063:             */
064:            public void setHyperlinkType(byte hyperlinkType) {
065:                setLinkType(JRHyperlinkHelper.getLinkType(hyperlinkType));
066:            }
067:
068:            /**
069:             * Sets the hyperlink target.
070:             * 
071:             * @param hyperlinkTarget the hyperlink target, one of
072:             * <ul>
073:             * <li>{@link JRHyperlink#HYPERLINK_TARGET_SELF JRHyperlink.HYPERLINK_TARGET_SELF}</li>
074:             * <li>{@link JRHyperlink#HYPERLINK_TARGET_BLANK JRHyperlink.HYPERLINK_TARGET_BLANK}</li>
075:             * </ul>
076:             * @see #getHyperlinkTarget()
077:             */
078:            public void setHyperlinkTarget(byte hyperlinkTarget) {
079:                this .hyperlinkTarget = hyperlinkTarget;
080:            }
081:
082:            /**
083:             * Sets the expression that will generate the hyperlink reference URL
084:             * or the referred document location.
085:             * <p>
086:             * This expression is used when the hyperlink type is
087:             * {@link JRHyperlink#HYPERLINK_TYPE_REFERENCE JRHyperlink.HYPERLINK_TYPE_REFERENCE},
088:             * {@link JRHyperlink#HYPERLINK_TYPE_REMOTE_ANCHOR JRHyperlink.HYPERLINK_TYPE_REMOTE_ANCHOR} or
089:             * {@link JRHyperlink#HYPERLINK_TYPE_REMOTE_PAGE JRHyperlink.HYPERLINK_TYPE_REMOTE_PAGE}.
090:             * The type of the expression should be <code>java.lang.String</code>
091:             * </p>
092:             * 
093:             * @param hyperlinkReferenceExpression the reference expression
094:             * @see #getHyperlinkReferenceExpression()
095:             */
096:            public void setHyperlinkReferenceExpression(
097:                    JRExpression hyperlinkReferenceExpression) {
098:                this .hyperlinkReferenceExpression = hyperlinkReferenceExpression;
099:            }
100:
101:            /**
102:             * Sets the expression that will generate the referred anchor.
103:             * <p>
104:             * This expression is used when the hyperlink type is
105:             * {@link JRHyperlink#HYPERLINK_TYPE_LOCAL_ANCHOR JRHyperlink.HYPERLINK_TYPE_LOCAL_ANCHOR} or
106:             * {@link JRHyperlink#HYPERLINK_TYPE_REMOTE_ANCHOR JRHyperlink.HYPERLINK_TYPE_REMOTE_ANCHOR}.
107:             * The type of the expression should be <code>java.lang.String</code>
108:             * </p>
109:             * 
110:             * @param hyperlinkAnchorExpression the anchor expression
111:             * @see #getHyperlinkAnchorExpression()
112:             */
113:            public void setHyperlinkAnchorExpression(
114:                    JRExpression hyperlinkAnchorExpression) {
115:                this .hyperlinkAnchorExpression = hyperlinkAnchorExpression;
116:            }
117:
118:            /**
119:             * Sets the expression that will generate the referred page.
120:             * <p>
121:             * This expression is used when the hyperlink type is
122:             * {@link JRHyperlink#HYPERLINK_TYPE_LOCAL_PAGE JRHyperlink.HYPERLINK_TYPE_LOCAL_PAGE} or
123:             * {@link JRHyperlink#HYPERLINK_TYPE_REMOTE_PAGE JRHyperlink.HYPERLINK_TYPE_REMOTE_PAGE}.
124:             * The type of the expression should be <code>java.lang.Integer</code>
125:             * </p>
126:             * 
127:             * @param hyperlinkPageExpression the page expression
128:             * @see #getHyperlinkPageExpression()
129:             */
130:            public void setHyperlinkPageExpression(
131:                    JRExpression hyperlinkPageExpression) {
132:                this .hyperlinkPageExpression = hyperlinkPageExpression;
133:            }
134:
135:            /**
136:             * Sets the hyperlink type.
137:             * <p>
138:             * The type can be one of the built-in types
139:             * (Reference, LocalAnchor, LocalPage, RemoteAnchor, RemotePage),
140:             * or can be an arbitrary type.
141:             * </p>
142:             * @param type the hyperlink type
143:             */
144:            public void setLinkType(String type) {
145:                this .linkType = type;
146:            }
147:
148:            public JRHyperlinkParameter[] getHyperlinkParameters() {
149:                JRHyperlinkParameter[] parameters;
150:                if (hyperlinkParameters.isEmpty()) {
151:                    parameters = null;
152:                } else {
153:                    parameters = new JRHyperlinkParameter[hyperlinkParameters
154:                            .size()];
155:                    hyperlinkParameters.toArray(parameters);
156:                }
157:                return parameters;
158:            }
159:
160:            /**
161:             * Returns the list of custom hyperlink parameters.
162:             * 
163:             * @return the list of custom hyperlink parameters
164:             */
165:            public List getHyperlinkParametersList() {
166:                return hyperlinkParameters;
167:            }
168:
169:            /**
170:             * Adds a custom hyperlink parameter.
171:             * 
172:             * @param parameter the parameter to add
173:             */
174:            public void addHyperlinkParameter(JRHyperlinkParameter parameter) {
175:                hyperlinkParameters.add(parameter);
176:            }
177:
178:            /**
179:             * Removes a custom hyperlink parameter.
180:             * 
181:             * @param parameter the parameter to remove
182:             */
183:            public void removeHyperlinkParameter(JRHyperlinkParameter parameter) {
184:                hyperlinkParameters.remove(parameter);
185:            }
186:
187:            /**
188:             * Removes a custom hyperlink parameter.
189:             * <p>
190:             * If multiple parameters having the specified name exist, all of them
191:             * will be removed
192:             * </p>
193:             * 
194:             * @param parameterName the parameter name
195:             */
196:            public void removeHyperlinkParameter(String parameterName) {
197:                for (Iterator it = hyperlinkParameters.iterator(); it.hasNext();) {
198:                    JRHyperlinkParameter parameter = (JRHyperlinkParameter) it
199:                            .next();
200:                    if (parameter.getName() != null
201:                            && parameter.getName().equals(parameterName)) {
202:                        it.remove();
203:                    }
204:                }
205:            }
206:
207:            /**
208:             * Sets the expression which will be used to generate the hyperlink tooltip.
209:             * The type of the expression should be <code>java.lang.String</code>.
210:             * 
211:             * @param hyperlinkTooltipExpression the expression which will be used to generate the hyperlink tooltip
212:             * @see #getHyperlinkTooltipExpression()
213:             */
214:            public void setHyperlinkTooltipExpression(
215:                    JRExpression hyperlinkTooltipExpression) {
216:                this.hyperlinkTooltipExpression = hyperlinkTooltipExpression;
217:            }
218:
219:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.