Source Code Cross Referenced for WindowState.java in  » Portal » gridsphere » javax » portlet » 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 » gridsphere » javax.portlet 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * Copyright 2003 IBM Corporation and Sun Microsystems, Inc.
003:         * All rights reserved.
004:         * Use is subject to license terms.
005:         */package javax.portlet;
006:
007:        /**
008:         * The <CODE>WindowState</CODE> class represents
009:         * the possible window states that a portlet window can assume.
010:         * <P>
011:         * This class defines a standard set of the most basic portlet window states.
012:         * Additional window states may be defined by calling the constructor of
013:         * this class. If a portal/portlet-container does not support a
014:         * custom window state defined in the portlet application deployment descriptor,
015:         * the custom window state will be ignored by the portal/portlet container.
016:         */
017:
018:        public class WindowState {
019:
020:            /**
021:             * The <code>NORMAL</code> window state indicates that a portlet
022:             * may be sharing the page with other portlets. It may also
023:             * indicate that the target device has limited display capabilities.
024:             * Therefore, a portlet should restrict the size of its rendered
025:             * output in this window state.
026:             * <p/>
027:             * The string value for this state is <code>"normal"</code>.
028:             */
029:            public final static WindowState NORMAL = new WindowState("normal");
030:
031:            /**
032:             * The <code>MAXIMIZED</code> window state is an indication
033:             * that a portlet may be the only portlet being rendered in the
034:             * portal page, or that the portlet has more space compared to other portlets
035:             * in the portal page. A portlet may generate richer content
036:             * when its window state is <code>MAXIMIZED</code>.
037:             * <p/>
038:             * The string value for this state is <code>"maximized"</code>.
039:             */
040:            public final static WindowState MAXIMIZED = new WindowState(
041:                    "maximized");
042:
043:            /**
044:             * When a portlet is in <code>MINIMIZED</code> window state,
045:             * the portlet should only render minimal output or no output at all.
046:             * <p/>
047:             * The string value for this state is <code>"minimized"</code>.
048:             */
049:            public final static WindowState MINIMIZED = new WindowState(
050:                    "minimized");
051:
052:            private String _name;
053:
054:            /**
055:             * Creates a new window state with the given name.
056:             * <p/>
057:             * Upper case letters in the name are converted to
058:             * lower case letters.
059:             *
060:             * @param name The name of the portlet mode
061:             */
062:            public WindowState(String name) {
063:                if (name == null) {
064:                    throw new IllegalArgumentException(
065:                            "WindowState name can not be NULL");
066:                }
067:                _name = name.toLowerCase();
068:            }
069:
070:            /**
071:             * Returns a String representation of this window state.
072:             * Window state names are always lower case names.
073:             *
074:             * @return String representation of this window state.
075:             */
076:
077:            public String toString() {
078:                return _name;
079:            }
080:
081:            /**
082:             * Returns the hash code value for this window state.
083:             * The hash code is constructed by producing the
084:             * hash value of the String value of this window state.
085:             *
086:             * @return hash code value for this window state
087:             */
088:
089:            public int hashCode() {
090:                return _name.hashCode();
091:            }
092:
093:            /**
094:             * Compares the specified object with this window state
095:             * for equality. Returns <code>true</code> if the
096:             * Strings <code>equals</code> method for the String
097:             * representing the two window states returns <code>true</code>.
098:             *
099:             * @param object window state to compare this window state with.
100:             * @return true, if the specified object is equal with this window state.
101:             */
102:
103:            public boolean equals(Object object) {
104:                if (object instanceof  WindowState)
105:                    return _name.equals(((WindowState) object)._name);
106:                else
107:                    return false;
108:            }
109:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.