Source Code Cross Referenced for CmsImageComparisonDialog.java in  » Content-Management-System » opencms » org » opencms » workplace » comparison » 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 » Content Management System » opencms » org.opencms.workplace.comparison 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * File   : $Source: /usr/local/cvs/opencms/src/org/opencms/workplace/comparison/CmsImageComparisonDialog.java,v $
003:         * Date   : $Date: 2008-02-27 12:05:55 $
004:         * Version: $Revision: 1.6 $
005:         *
006:         * Copyright (c) 2002 - 2008 Alkacon Software GmbH (http://www.alkacon.com)
007:         * All rights reserved.
008:         * 
009:         * This source code is the intellectual property of Alkacon Software GmbH.
010:         * It is PROPRIETARY and CONFIDENTIAL.
011:         * Use of this source code is subject to license terms.
012:         *
013:         * In order to use this source code, you need written permission from 
014:         * Alkacon Software GmbH. Redistribution of this source code, in modified 
015:         * or unmodified form, is not allowed unless written permission by 
016:         * Alkacon Software GmbH has been given.
017:         *
018:         * ALKACON SOFTWARE GMBH MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY
019:         * OF THIS SOURCE CODE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
020:         * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
021:         * PURPOSE, OR NON-INFRINGEMENT. ALKACON SOFTWARE GMBH SHALL NOT BE LIABLE FOR ANY
022:         * DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
023:         * THIS SOURCE CODE OR ITS DERIVATIVES.
024:         *
025:         * For further information about Alkacon Software GmbH, please see the
026:         * company website: http://www.alkacon.com
027:         */
028:
029:        package org.opencms.workplace.comparison;
030:
031:        import org.opencms.jsp.CmsJspActionElement;
032:        import org.opencms.util.CmsUUID;
033:        import org.opencms.workplace.CmsDialog;
034:        import org.opencms.workplace.commons.CmsHistoryList;
035:
036:        import javax.servlet.jsp.JspWriter;
037:
038:        /**
039:         * Provides a GUI for displaying two images.<p> 
040:         *
041:         * @author Jan Baudisch
042:         * 
043:         * @version $Revision: 1.6 $ 
044:         * 
045:         * @since 6.0.0 
046:         */
047:        public class CmsImageComparisonDialog extends CmsDialog {
048:
049:            /** Parameter value for the structure id of the first file. */
050:            private String m_paramId1;
051:
052:            /** Parameter value for the structure id of the second file. */
053:            private String m_paramId2;
054:
055:            /** Parameter value for the version of the first file. */
056:            private String m_paramVersion1;
057:
058:            /** Parameter value for the version of the second file. */
059:            private String m_paramVersion2;
060:
061:            /**
062:             * Default constructor.<p>
063:             * 
064:             * @param jsp an initialized JSP action element
065:             */
066:            public CmsImageComparisonDialog(CmsJspActionElement jsp) {
067:
068:                super (jsp);
069:            }
070:
071:            /**
072:             * Performs the dialog actions depending on the initialized action and displays the dialog form.<p>
073:             * 
074:             * @throws Exception if writing to the JSP out fails
075:             */
076:            public void displayDialog() throws Exception {
077:
078:                if (getAction() == ACTION_CANCEL) {
079:                    actionCloseDialog();
080:                }
081:                String link1 = CmsHistoryList.getHistoryLink(getCms(),
082:                        new CmsUUID(m_paramId1), m_paramVersion1);
083:                String link2 = CmsHistoryList.getHistoryLink(getCms(),
084:                        new CmsUUID(m_paramId2), m_paramVersion2);
085:                JspWriter out = getJsp().getJspContext().getOut();
086:                out
087:                        .println(dialogBlockStart(key(Messages.GUI_COMPARE_CONTENT_0)));
088:                out.println(dialogContentStart(null));
089:                out
090:                        .println("<table cellpadding='0' cellspacing='0' border='0' class='maxwidth'><tr align='center'><th>");
091:                out.println(key(Messages.GUI_COMPARE_VERSION_1,
092:                        new String[] { CmsHistoryList.getDisplayVersion(
093:                                m_paramVersion1, getLocale()) }));
094:                out.println("</th><th>");
095:                out.println(key(Messages.GUI_COMPARE_VERSION_1,
096:                        new String[] { CmsHistoryList.getDisplayVersion(
097:                                m_paramVersion2, getLocale()) }));
098:                out.println("</th></tr>");
099:                out.println("<tr><td>&nbsp;</td><td>&nbsp;</td></tr>");
100:                out.println("\t<tr align='center'>\n");
101:                out.println("\t\t<td width='50%'><img src='");
102:                out.print(getJsp().link(link1));
103:                out.print("' alt='");
104:                out.print(key(Messages.GUI_COMPARE_VERSION_1,
105:                        new String[] { CmsHistoryList.getDisplayVersion(
106:                                m_paramVersion1, getLocale()) }));
107:                out.print("'/></td>\n");
108:                out.println("\t\t<td width='50%'><img src='");
109:                out.print(getJsp().link(link2));
110:                out.print("' alt='");
111:                out.print(key(Messages.GUI_COMPARE_VERSION_1,
112:                        new String[] { CmsHistoryList.getDisplayVersion(
113:                                m_paramVersion2, getLocale()) }));
114:                out.print("'/></td>\n");
115:                out.println("\t</tr>");
116:                out.println("</table>");
117:                out.println(dialogBlockEnd());
118:                out.println(dialogContentEnd());
119:                out.println(dialogEnd());
120:                out.println(bodyEnd());
121:                out.println(htmlEnd());
122:            }
123:
124:            /**
125:             * Returns the paramId1.<p>
126:             *
127:             * @return the paramId1
128:             */
129:            public String getParamId1() {
130:
131:                return m_paramId1;
132:            }
133:
134:            /**
135:             * Returns the paramId2.<p>
136:             *
137:             * @return the paramId2
138:             */
139:            public String getParamId2() {
140:
141:                return m_paramId2;
142:            }
143:
144:            /**
145:             * Returns the paramVersion1.<p>
146:             *
147:             * @return the paramVersion1
148:             */
149:            public String getParamVersion1() {
150:
151:                return m_paramVersion1;
152:            }
153:
154:            /**
155:             * Returns the paramVersion2.<p>
156:             *
157:             * @return the paramVersion2
158:             */
159:            public String getParamVersion2() {
160:
161:                return m_paramVersion2;
162:            }
163:
164:            /**
165:             * Sets the paramId1.<p>
166:             *
167:             * @param paramId1 the paramId1 to set
168:             */
169:            public void setParamId1(String paramId1) {
170:
171:                m_paramId1 = paramId1;
172:            }
173:
174:            /**
175:             * Sets the paramId2.<p>
176:             *
177:             * @param paramId2 the paramId2 to set
178:             */
179:            public void setParamId2(String paramId2) {
180:
181:                m_paramId2 = paramId2;
182:            }
183:
184:            /**
185:             * Sets the paramVersion1.<p>
186:             *
187:             * @param paramVersion1 the paramVersion1 to set
188:             */
189:            public void setParamVersion1(String paramVersion1) {
190:
191:                m_paramVersion1 = paramVersion1;
192:            }
193:
194:            /**
195:             * Sets the paramVersion2.<p>
196:             *
197:             * @param paramVersion2 the paramVersion2 to set
198:             */
199:            public void setParamVersion2(String paramVersion2) {
200:
201:                m_paramVersion2 = paramVersion2;
202:            }
203:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.