Source Code Cross Referenced for Header.java in  » Portal » Open-Portal » soif » 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 » Portal » Open Portal » soif 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *	CONFIDENTIAL AND PROPRIETARY SOURCE CODE OF
003:         *	NETSCAPE COMMUNICATIONS CORPORATION
004:         *
005:         *	Copyright (c) 1996 Netscape Communications Corporation.
006:         *	All Rights Reserved.
007:         *	Use of this Source Code is subject to the terms of the applicable
008:         *	license agreement from Netscape Communications Corporation.
009:         */
010:
011:        package soif;
012:
013:        import java.applet.Applet;
014:
015:        import util.ReportError;
016:
017:        /**
018:         Lo, a header file.
019:         *
020:         */
021:        public class Header {
022:            /* ----------------------------------------------------------- */
023:
024:            /**
025:             * Version string.
026:             */
027:            public final static String VERSION = "SOIF Package";
028:
029:            /**
030:             * Long version string.
031:             */
032:            public final static String LONG_VERSION = VERSION;
033:
034:            /* ----------------------------------------------------------- */
035:
036:            /**
037:             * Array of star gif names.
038:             */
039:            public final static String starPower[] = { "star0.gif",
040:                    "star0.gif", "star-5.gif", "star1.gif", "star1-5.gif",
041:                    "star2.gif", "star2-5.gif", "star3.gif", "star3-5.gif",
042:                    "star4.gif" };
043:
044:            /**
045:             * Prints the version string and, if the <b>dbgLvl</b> parameter
046:             * includes the value <i>longVer</i>, also prints the long
047:             * version of the version string.
048:             * @param a the calling applet whose parameters are to be checked
049:             */
050:            public final static void printVersion(Applet a) {
051:                String dbgString = a.getParameter("dbgLvl");
052:
053:                if (dbgString != null) {
054:                    if (dbgString.indexOf("longVer") != -1) {
055:                        System.out.println(LONG_VERSION);
056:                        return;
057:                    }
058:                }
059:
060:                System.out.println(VERSION);
061:            }
062:
063:            /**
064:             * Prints the version string and, if the <b>dbgLvl</b> parameter
065:             * includes the value <i>longVer</i>, also prints the long
066:             * version of the version string.
067:             * @param b print long version, true or false
068:             */
069:            public final static void printVersion(boolean b) {
070:                if (b) {
071:                    System.out.println(LONG_VERSION);
072:                } else {
073:                    System.out.println(VERSION);
074:                }
075:            }
076:
077:            /* ----------------------------------------------------------- */
078:
079:            /**
080:             * Macro for obtaining parameters and returning not found errors.
081:             * @param param parameter
082:             */
083:            public final static String paramMacro(Applet applet, String param) {
084:                String s = applet.getParameter(param);
085:
086:                if (s == null) {
087:                    ReportError.reportError(ReportError.ADMIN, "Header",
088:                            "paramMacro", Messages.MISSINGPARAMETER + ": "
089:                                    + param);
090:                }
091:
092:                return s;
093:            }
094:
095:            /**
096:             * Build a CSID based on the codebase and expected application
097:             * parameters host, port and name.
098:             * @param app application
099:             */
100:            public final static CSID parameterCSIDMacro(Applet applet) {
101:                CSID csid = new CSID(applet.getCodeBase().toString(), applet
102:                        .getParameter("host"), applet.getParameter("port"),
103:                        applet.getParameter("name"));
104:
105:                if (csid.isValid() == false) {
106:                    ReportError.reportError(ReportError.ADMIN, "Header",
107:                            "parameterCSIDMacro", Messages.INVALIDCSID);
108:                }
109:
110:                return csid;
111:            }
112:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.