Source Code Cross Referenced for PropertySheetBase.java in  » IDE-Netbeans » visualweb.api.designer » com » sun » rave » web » ui » component » 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 » IDE Netbeans » visualweb.api.designer » com.sun.rave.web.ui.component 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003:         *
004:         * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005:         *
006:         * The contents of this file are subject to the terms of either the GNU
007:         * General Public License Version 2 only ("GPL") or the Common
008:         * Development and Distribution License("CDDL") (collectively, the
009:         * "License"). You may not use this file except in compliance with the
010:         * License. You can obtain a copy of the License at
011:         * http://www.netbeans.org/cddl-gplv2.html
012:         * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013:         * specific language governing permissions and limitations under the
014:         * License.  When distributing the software, include this License Header
015:         * Notice in each file and include the License file at
016:         * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
017:         * particular file as subject to the "Classpath" exception as provided
018:         * by Sun in the GPL Version 2 section of the License file that
019:         * accompanied this code. If applicable, add the following below the
020:         * License Header, with the fields enclosed by brackets [] replaced by
021:         * your own identifying information:
022:         * "Portions Copyrighted [year] [name of copyright owner]"
023:         *
024:         * Contributor(s):
025:         *
026:         * The Original Software is NetBeans. The Initial Developer of the Original
027:         * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
028:         * Microsystems, Inc. All Rights Reserved.
029:         *
030:         * If you wish your version of this file to be governed by only the CDDL
031:         * or only the GPL Version 2, indicate your decision by adding
032:         * "[Contributor] elects to include this software in this distribution
033:         * under the [CDDL or GPL Version 2] license." If you do not indicate a
034:         * single choice of license, a recipient has the option to distribute
035:         * your version of this file under either the CDDL, the GPL Version 2 or
036:         * to extend the choice of license to its licensees as provided above.
037:         * However, if you add GPL Version 2 code and therefore, elected the GPL
038:         * Version 2 license, then the option applies only if the new code is
039:         * made subject to such option by the copyright holder.
040:         */
041:        package com.sun.rave.web.ui.component;
042:
043:        import java.io.IOException;
044:        import javax.faces.component.UIComponent;
045:        import javax.faces.context.FacesContext;
046:        import javax.faces.el.MethodBinding;
047:        import javax.faces.el.ValueBinding;
048:
049:        /**
050:         * <h3>HTML Elements and Layout</h3>
051:         * 
052:         * <p> The <code>PropertySheet</code> component is a <code>NamingContainer</code>
053:         *     used to layout <code>PropertySheetSection</code> components on a page.
054:         *     Each <code>PropertySheetSection</code> may in turn have any number of
055:         *     <code>Property</code> components within it.  This allows you to easily
056:         *     format a page with a number of input or read-only fields.
057:         *     <code>PropertySheetSection</code>s allow you to group <code>Property</code>
058:         *     components together and provide a <code>label</code> for the set of
059:         *     enclosed <code>Property</code>s.</p>
060:         * 
061:         * <p> The <code>PropertySheet</code> allows each
062:         *     <code>PropertySheetSection</code> to have an optional "jump link" from the
063:         *     top of the <code>PropertySheet</code> to each
064:         *     <code>PropertySheetSection</code> within the <code>PropertySheet</code>.
065:         *     This is accomplished by supplying the attribute <code>jumpLinks</code> with
066:         *     a value of true.  If not specified, this attribute defaults to false.</p>
067:         * 
068:         * <h3>Client Side Javascript Functions</h3>
069:         * 
070:         * <p> None.</p>
071:         * 
072:         * <h3>Example:</h3>
073:         * 
074:         * <h4>Example 1: Create a simple <code>PropertySheet</code> which contains 2 <code>PropertySheetSection</code> components each containing 2 <code>Property</code> components:</h4>
075:         * 
076:         * <p>
077:         *     <code>
078:         *     <pre>
079:         * 	&lt;ui:propertySheet id="propSheetExample1" jumpLinks="true"&gt;
080:         * 	    &lt;ui:propertySheetSection id="firstSection" label="Search Criteria"&gt;
081:         * 		&lt;ui:property id="Property1" label="Instance Name: " labelAlign="right" noWrap="true" overlapLabel="false"&gt;
082:         * 		    &lt;ui:dropDown id="servers" required="true" items="#{BackingFileChoice.servers}" /&gt;
083:         * 		    &lt;f:verbatim&gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&lt;/f:verbatim&gt;
084:         * 		    &lt;ui:label id="logFileLabel" labelLevel="2" text="Log File: " /&gt;
085:         * 		    &lt;ui:dropDown id="logFile" items="#{BackingFileChoice.archivedLogFiles}" /&gt;
086:         * 		&lt;/ui:property&gt;
087:         * 		&lt;ui:property id="Property2" label="Log Level: " labelAlign="right" noWrap="true" overlapLabel="false" helpText="#{bundle.['log.level.help']}"&gt;
088:         * 		    &lt;f:facet name="content"&gt;
089:         * 			&lt;ui:dropDown id="logLevel" items="#{BackingFileChoice.logLevel}" /&gt;
090:         * 		    &lt;/f:facet&gt;
091:         * 		&lt;/ui:property&gt;
092:         * 	    &lt;/ui:propertySheetSection&gt;
093:         * 	    &lt;ui:propertySheetSection id="secondSection" label="Advanced Options"&gt;
094:         * 		&lt;ui:property id="Property3" label="Logger: " labelAlign="right" noWrap="true" overlapLabel="false" helpText="Select one or more module logs to view"&gt;
095:         * 		    &lt;ui:listbox id="logger" items="#{BackingFileChoice.loggers}" rows="5" /&gt;
096:         * 		&lt;/ui:property&gt;
097:         * 		&lt;ui:property id="Property4" noWrap="true" overlapLabel="false" helpText="Select one or more module logs to view"&gt;
098:         * 		    &lt;ui:checkbox id="limitLongLogs" label="Limit excessively long messages" /&gt;
099:         * 		&lt;/ui:property&gt;
100:         * 	    &lt;/ui:propertySheetSection&gt;
101:         * 	&lt;/ui:propertySheet&gt;
102:         *     </pre>
103:         *     </code>
104:         * </p>
105:         * <p>Auto-generated component class.
106:         * Do <strong>NOT</strong> modify; all changes
107:         * <strong>will</strong> be lost!</p>
108:         */
109:
110:        public abstract class PropertySheetBase extends
111:                javax.faces.component.UIComponentBase {
112:
113:            /**
114:             * <p>Construct a new <code>PropertySheetBase</code>.</p>
115:             */
116:            public PropertySheetBase() {
117:                super ();
118:                setRendererType("com.sun.rave.web.ui.PropertySheet");
119:            }
120:
121:            /**
122:             * <p>Return the identifier of the component family to which this
123:             * component belongs.  This identifier, in conjunction with the value
124:             * of the <code>rendererType</code> property, may be used to select
125:             * the appropriate {@link Renderer} for this component instance.</p>
126:             */
127:            public String getFamily() {
128:                return "com.sun.rave.web.ui.PropertySheet";
129:            }
130:
131:            // jumpLinks
132:            private boolean jumpLinks = false;
133:            private boolean jumpLinks_set = false;
134:
135:            /**
136:             * <p>	This boolean attribute allows you to control whether jump links
137:             * 		will be created at the top of this <code>PropertySheet</code>
138:             * 		or not.  The default is NOT to create the links -- setting this
139:             * 		attribute to "true" turns this feature on.</p>
140:             */
141:            public boolean isJumpLinks() {
142:                if (this .jumpLinks_set) {
143:                    return this .jumpLinks;
144:                }
145:                ValueBinding _vb = getValueBinding("jumpLinks");
146:                if (_vb != null) {
147:                    Object _result = _vb.getValue(getFacesContext());
148:                    if (_result == null) {
149:                        return false;
150:                    } else {
151:                        return ((Boolean) _result).booleanValue();
152:                    }
153:                }
154:                return false;
155:            }
156:
157:            /**
158:             * <p>	This boolean attribute allows you to control whether jump links
159:             * 		will be created at the top of this <code>PropertySheet</code>
160:             * 		or not.  The default is NOT to create the links -- setting this
161:             * 		attribute to "true" turns this feature on.</p>
162:             * @see #isJumpLinks()
163:             */
164:            public void setJumpLinks(boolean jumpLinks) {
165:                this .jumpLinks = jumpLinks;
166:                this .jumpLinks_set = true;
167:            }
168:
169:            // requiredFields
170:            private String requiredFields = null;
171:
172:            /**
173:             * <p>This property indicates whether a required field legend should be
174:             * 	  displayed at the top right-hand side of the property sheet.</p>
175:             */
176:            public String getRequiredFields() {
177:                if (this .requiredFields != null) {
178:                    return this .requiredFields;
179:                }
180:                ValueBinding _vb = getValueBinding("requiredFields");
181:                if (_vb != null) {
182:                    return (String) _vb.getValue(getFacesContext());
183:                }
184:                return null;
185:            }
186:
187:            /**
188:             * <p>This property indicates whether a required field legend should be
189:             * 	  displayed at the top right-hand side of the property sheet.</p>
190:             * @see #getRequiredFields()
191:             */
192:            public void setRequiredFields(String requiredFields) {
193:                this .requiredFields = requiredFields;
194:            }
195:
196:            // style
197:            private String style = null;
198:
199:            /**
200:             * <p>CSS style(s) to be applied when this component is rendered.</p>
201:             */
202:            public String getStyle() {
203:                if (this .style != null) {
204:                    return this .style;
205:                }
206:                ValueBinding _vb = getValueBinding("style");
207:                if (_vb != null) {
208:                    return (String) _vb.getValue(getFacesContext());
209:                }
210:                return null;
211:            }
212:
213:            /**
214:             * <p>CSS style(s) to be applied when this component is rendered.</p>
215:             * @see #getStyle()
216:             */
217:            public void setStyle(String style) {
218:                this .style = style;
219:            }
220:
221:            // styleClass
222:            private String styleClass = null;
223:
224:            /**
225:             * <p>CSS style class(es) to be applied when this component is rendered.</p>
226:             */
227:            public String getStyleClass() {
228:                if (this .styleClass != null) {
229:                    return this .styleClass;
230:                }
231:                ValueBinding _vb = getValueBinding("styleClass");
232:                if (_vb != null) {
233:                    return (String) _vb.getValue(getFacesContext());
234:                }
235:                return null;
236:            }
237:
238:            /**
239:             * <p>CSS style class(es) to be applied when this component is rendered.</p>
240:             * @see #getStyleClass()
241:             */
242:            public void setStyleClass(String styleClass) {
243:                this .styleClass = styleClass;
244:            }
245:
246:            // visible
247:            private boolean visible = false;
248:            private boolean visible_set = false;
249:
250:            /**
251:             * <p>Use the visible attribute to indicate whether the component should be
252:             *     viewable by the user in the rendered HTML page. If set to false, the
253:             *     HTML code for the component is present in the page, but the component
254:             *     is hidden with style attributes. By default, visible is set to true, so
255:             *     HTML for the component HTML is included and visible to the user. If the
256:             *     component is not visible, it can still be processed on subsequent form
257:             *     submissions because the HTML is present.</p>
258:             */
259:            public boolean isVisible() {
260:                if (this .visible_set) {
261:                    return this .visible;
262:                }
263:                ValueBinding _vb = getValueBinding("visible");
264:                if (_vb != null) {
265:                    Object _result = _vb.getValue(getFacesContext());
266:                    if (_result == null) {
267:                        return false;
268:                    } else {
269:                        return ((Boolean) _result).booleanValue();
270:                    }
271:                }
272:                return true;
273:            }
274:
275:            /**
276:             * <p>Use the visible attribute to indicate whether the component should be
277:             *     viewable by the user in the rendered HTML page. If set to false, the
278:             *     HTML code for the component is present in the page, but the component
279:             *     is hidden with style attributes. By default, visible is set to true, so
280:             *     HTML for the component HTML is included and visible to the user. If the
281:             *     component is not visible, it can still be processed on subsequent form
282:             *     submissions because the HTML is present.</p>
283:             * @see #isVisible()
284:             */
285:            public void setVisible(boolean visible) {
286:                this .visible = visible;
287:                this .visible_set = true;
288:            }
289:
290:            /**
291:             * <p>Restore the state of this component.</p>
292:             */
293:            public void restoreState(FacesContext _context, Object _state) {
294:                Object _values[] = (Object[]) _state;
295:                super .restoreState(_context, _values[0]);
296:                this .jumpLinks = ((Boolean) _values[1]).booleanValue();
297:                this .jumpLinks_set = ((Boolean) _values[2]).booleanValue();
298:                this .requiredFields = (String) _values[3];
299:                this .style = (String) _values[4];
300:                this .styleClass = (String) _values[5];
301:                this .visible = ((Boolean) _values[6]).booleanValue();
302:                this .visible_set = ((Boolean) _values[7]).booleanValue();
303:            }
304:
305:            /**
306:             * <p>Save the state of this component.</p>
307:             */
308:            public Object saveState(FacesContext _context) {
309:                Object _values[] = new Object[8];
310:                _values[0] = super .saveState(_context);
311:                _values[1] = this .jumpLinks ? Boolean.TRUE : Boolean.FALSE;
312:                _values[2] = this .jumpLinks_set ? Boolean.TRUE : Boolean.FALSE;
313:                _values[3] = this .requiredFields;
314:                _values[4] = this .style;
315:                _values[5] = this .styleClass;
316:                _values[6] = this .visible ? Boolean.TRUE : Boolean.FALSE;
317:                _values[7] = this.visible_set ? Boolean.TRUE : Boolean.FALSE;
318:                return _values;
319:            }
320:
321:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.