Source Code Cross Referenced for ImageComponentBase.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:         * <code></code>Use
051:         * the <code>ui:image</code>
052:         * tag to display an inline image in the rendered
053:         * HTML page. The url attribute is used to specify the URL to the image
054:         * file that
055:         * is to be displayed.&nbsp;&nbsp; If you use an image that is a
056:         * PNG type and ends with ".png " this tag will output the correct format
057:         * for an &lt;img&gt; tag to display a PNG correctly in Internet
058:         * Explorer.&nbsp; In order to use this feature you must set the
059:         * height and width properties of this tag..<br>
060:         * <br>
061:         * The <code>ui:image</code>
062:         * tag can be used to display a theme-specific image in the
063:         * rendered HTML page. The icon attribute used in the <code>ui:image
064:         * </code>tag is
065:         * a key value that is mapped to a URL in theme properties file. The key
066:         * is used
067:         * to look up the appropriate image source and related attributes from the
068:         * current
069:         * theme. By specifying a key, you avoid the need to specify predefined
070:         * constants
071:         * such as height and width. The image can also be seamlessly changed when
072:         * a
073:         * different theme is selected.<br>
074:         * <br>
075:         * Note: currently the list of
076:         * icons that you can use is not publicly
077:         * supported, but the icon names are specified in the
078:         * <code>/com/sun/rave/web/ui/suntheme/SunTheme.properties</code>
079:         * file. The names are
080:         * listed as resource keys of the format <code>image.ICON_NAME</code>.
081:         * Use only
082:         * the part of the key that follows image. For example, if the key is
083:         * <code>image.ALARM_CRITICAL_SMALL</code>,
084:         * you should specify
085:         * <code>ALARM_CRITICAL_SMALL</code>
086:         * as the value of the icon attribute of the
087:         * <code>ui:icon</code>
088:         * tag. A list of supported icon values will be published in
089:         * the near future.<br>
090:         * <h3>HTML Elements and Layout</h3>
091:         * The rendered HTML page displays an XHTML compliant <code>&lt;img&gt;</code>
092:         * element with any applicable element attributes. The attributes can be
093:         * specified
094:         * through the <code>&lt;ui:image&gt;</code>
095:         * tag attributes.
096:         * <h3>Client Side Javascript
097:         * Functions</h3>
098:         * None.
099:         * <br>
100:         * <h3>Examples</h3>
101:         * <h4>Example 1: Create an image</h4>
102:         * <code>&lt;ui:image id="image1"
103:         * url="../images/dot.gif" /&gt;
104:         * <br>
105:         * <br>
106:         * </code>This will generate the
107:         * following markup: <br>
108:         * &nbsp;&nbsp; <br>
109:         * <code>&lt;img
110:         * src="../images/dot.gif" alt="" /&gt;
111:         * </code><br>
112:         * <br>
113:         * <h4>Example 2: Create a theme
114:         * specific image<br>
115:         * </h4>
116:         * <code>&lt;ui:image id="image2"
117:         * icon="</code><code>ALARM_CRITICAL_SMALL</code><code>"
118:         * /&gt;
119:         * </code>
120:         * <p>Auto-generated component class.
121:         * Do <strong>NOT</strong> modify; all changes
122:         * <strong>will</strong> be lost!</p>
123:         */
124:
125:        public abstract class ImageComponentBase extends
126:                javax.faces.component.UIGraphic {
127:
128:            /**
129:             * <p>Construct a new <code>ImageComponentBase</code>.</p>
130:             */
131:            public ImageComponentBase() {
132:                super ();
133:                setRendererType("com.sun.rave.web.ui.Image");
134:            }
135:
136:            /**
137:             * <p>Return the identifier of the component family to which this
138:             * component belongs.  This identifier, in conjunction with the value
139:             * of the <code>rendererType</code> property, may be used to select
140:             * the appropriate {@link Renderer} for this component instance.</p>
141:             */
142:            public String getFamily() {
143:                return "com.sun.rave.web.ui.Image";
144:            }
145:
146:            /**
147:             * <p>Return the <code>ValueBinding</code> stored for the
148:             * specified name (if any), respecting any property aliases.</p>
149:             *
150:             * @param name Name of value binding to retrieve
151:             */
152:            public ValueBinding getValueBinding(String name) {
153:                if (name.equals("url")) {
154:                    return super .getValueBinding("value");
155:                }
156:                return super .getValueBinding(name);
157:            }
158:
159:            /**
160:             * <p>Set the <code>ValueBinding</code> stored for the
161:             * specified name (if any), respecting any property
162:             * aliases.</p>
163:             *
164:             * @param name    Name of value binding to set
165:             * @param binding ValueBinding to set, or null to remove
166:             */
167:            public void setValueBinding(String name, ValueBinding binding) {
168:                if (name.equals("url")) {
169:                    super .setValueBinding("value", binding);
170:                    return;
171:                }
172:                super .setValueBinding(name, binding);
173:            }
174:
175:            // align
176:            private String align = null;
177:
178:            /**
179:             * <p>Specifies the position of the image with respect to its context.
180:             * 	Valid values are: bottom (the default); middle; top; left; right.</p>
181:             */
182:            public String getAlign() {
183:                if (this .align != null) {
184:                    return this .align;
185:                }
186:                ValueBinding _vb = getValueBinding("align");
187:                if (_vb != null) {
188:                    return (String) _vb.getValue(getFacesContext());
189:                }
190:                return null;
191:            }
192:
193:            /**
194:             * <p>Specifies the position of the image with respect to its context.
195:             * 	Valid values are: bottom (the default); middle; top; left; right.</p>
196:             * @see #getAlign()
197:             */
198:            public void setAlign(String align) {
199:                this .align = align;
200:            }
201:
202:            // alt
203:            private String alt = null;
204:
205:            /**
206:             * <p>Alternative text description used by screen reader tools</p>
207:             */
208:            public String getAlt() {
209:                if (this .alt != null) {
210:                    return this .alt;
211:                }
212:                ValueBinding _vb = getValueBinding("alt");
213:                if (_vb != null) {
214:                    return (String) _vb.getValue(getFacesContext());
215:                }
216:                return null;
217:            }
218:
219:            /**
220:             * <p>Alternative text description used by screen reader tools</p>
221:             * @see #getAlt()
222:             */
223:            public void setAlt(String alt) {
224:                this .alt = alt;
225:            }
226:
227:            // border
228:            private int border = Integer.MIN_VALUE;
229:            private boolean border_set = false;
230:
231:            /**
232:             * <p>Specifies the width of the img border in pixels.
233:             * 	The default value for this attribute depends on the web browser</p>
234:             */
235:            public int getBorder() {
236:                if (this .border_set) {
237:                    return this .border;
238:                }
239:                ValueBinding _vb = getValueBinding("border");
240:                if (_vb != null) {
241:                    Object _result = _vb.getValue(getFacesContext());
242:                    if (_result == null) {
243:                        return Integer.MIN_VALUE;
244:                    } else {
245:                        return ((Integer) _result).intValue();
246:                    }
247:                }
248:                return 0;
249:            }
250:
251:            /**
252:             * <p>Specifies the width of the img border in pixels.
253:             * 	The default value for this attribute depends on the web browser</p>
254:             * @see #getBorder()
255:             */
256:            public void setBorder(int border) {
257:                this .border = border;
258:                this .border_set = true;
259:            }
260:
261:            // height
262:            private int height = Integer.MIN_VALUE;
263:            private boolean height_set = false;
264:
265:            /**
266:             * <p>When specified, the width and height attributes tell web browsers 
267:             * 	to override the natural image or object size in favor of these values</p>
268:             */
269:            public int getHeight() {
270:                if (this .height_set) {
271:                    return this .height;
272:                }
273:                ValueBinding _vb = getValueBinding("height");
274:                if (_vb != null) {
275:                    Object _result = _vb.getValue(getFacesContext());
276:                    if (_result == null) {
277:                        return Integer.MIN_VALUE;
278:                    } else {
279:                        return ((Integer) _result).intValue();
280:                    }
281:                }
282:                return Integer.MIN_VALUE;
283:            }
284:
285:            /**
286:             * <p>When specified, the width and height attributes tell web browsers 
287:             * 	to override the natural image or object size in favor of these values</p>
288:             * @see #getHeight()
289:             */
290:            public void setHeight(int height) {
291:                this .height = height;
292:                this .height_set = true;
293:            }
294:
295:            // hspace
296:            private int hspace = Integer.MIN_VALUE;
297:            private boolean hspace_set = false;
298:
299:            /**
300:             * <p>Specifies the amount of white space in pixels to be inserted to the
301:             * 	left and right of the image. The default value is not specified but is       
302:             * 	generally a small, non-zero size.</p>
303:             */
304:            public int getHspace() {
305:                if (this .hspace_set) {
306:                    return this .hspace;
307:                }
308:                ValueBinding _vb = getValueBinding("hspace");
309:                if (_vb != null) {
310:                    Object _result = _vb.getValue(getFacesContext());
311:                    if (_result == null) {
312:                        return Integer.MIN_VALUE;
313:                    } else {
314:                        return ((Integer) _result).intValue();
315:                    }
316:                }
317:                return Integer.MIN_VALUE;
318:            }
319:
320:            /**
321:             * <p>Specifies the amount of white space in pixels to be inserted to the
322:             * 	left and right of the image. The default value is not specified but is       
323:             * 	generally a small, non-zero size.</p>
324:             * @see #getHspace()
325:             */
326:            public void setHspace(int hspace) {
327:                this .hspace = hspace;
328:                this .hspace_set = true;
329:            }
330:
331:            // icon
332:            private String icon = null;
333:
334:            /**
335:             * <p>The identifier of the desired theme image.</p>
336:             */
337:            public String getIcon() {
338:                if (this .icon != null) {
339:                    return this .icon;
340:                }
341:                ValueBinding _vb = getValueBinding("icon");
342:                if (_vb != null) {
343:                    return (String) _vb.getValue(getFacesContext());
344:                }
345:                return null;
346:            }
347:
348:            /**
349:             * <p>The identifier of the desired theme image.</p>
350:             * @see #getIcon()
351:             */
352:            public void setIcon(String icon) {
353:                this .icon = icon;
354:            }
355:
356:            // longDesc
357:            private String longDesc = null;
358:
359:            /**
360:             * <p>A verbose description of this image</p>
361:             */
362:            public String getLongDesc() {
363:                if (this .longDesc != null) {
364:                    return this .longDesc;
365:                }
366:                ValueBinding _vb = getValueBinding("longDesc");
367:                if (_vb != null) {
368:                    return (String) _vb.getValue(getFacesContext());
369:                }
370:                return null;
371:            }
372:
373:            /**
374:             * <p>A verbose description of this image</p>
375:             * @see #getLongDesc()
376:             */
377:            public void setLongDesc(String longDesc) {
378:                this .longDesc = longDesc;
379:            }
380:
381:            // onClick
382:            private String onClick = null;
383:
384:            /**
385:             * <p>Scripting code executed when a mouse click
386:             *     occurs over this component.</p>
387:             */
388:            public String getOnClick() {
389:                if (this .onClick != null) {
390:                    return this .onClick;
391:                }
392:                ValueBinding _vb = getValueBinding("onClick");
393:                if (_vb != null) {
394:                    return (String) _vb.getValue(getFacesContext());
395:                }
396:                return null;
397:            }
398:
399:            /**
400:             * <p>Scripting code executed when a mouse click
401:             *     occurs over this component.</p>
402:             * @see #getOnClick()
403:             */
404:            public void setOnClick(String onClick) {
405:                this .onClick = onClick;
406:            }
407:
408:            // onDblClick
409:            private String onDblClick = null;
410:
411:            /**
412:             * <p>Scripting code executed when a mouse double click
413:             *     occurs over this component.</p>
414:             */
415:            public String getOnDblClick() {
416:                if (this .onDblClick != null) {
417:                    return this .onDblClick;
418:                }
419:                ValueBinding _vb = getValueBinding("onDblClick");
420:                if (_vb != null) {
421:                    return (String) _vb.getValue(getFacesContext());
422:                }
423:                return null;
424:            }
425:
426:            /**
427:             * <p>Scripting code executed when a mouse double click
428:             *     occurs over this component.</p>
429:             * @see #getOnDblClick()
430:             */
431:            public void setOnDblClick(String onDblClick) {
432:                this .onDblClick = onDblClick;
433:            }
434:
435:            // onMouseDown
436:            private String onMouseDown = null;
437:
438:            /**
439:             * <p>Scripting code executed when the user presses a mouse button while the
440:             *     mouse pointer is on the component.</p>
441:             */
442:            public String getOnMouseDown() {
443:                if (this .onMouseDown != null) {
444:                    return this .onMouseDown;
445:                }
446:                ValueBinding _vb = getValueBinding("onMouseDown");
447:                if (_vb != null) {
448:                    return (String) _vb.getValue(getFacesContext());
449:                }
450:                return null;
451:            }
452:
453:            /**
454:             * <p>Scripting code executed when the user presses a mouse button while the
455:             *     mouse pointer is on the component.</p>
456:             * @see #getOnMouseDown()
457:             */
458:            public void setOnMouseDown(String onMouseDown) {
459:                this .onMouseDown = onMouseDown;
460:            }
461:
462:            // onMouseMove
463:            private String onMouseMove = null;
464:
465:            /**
466:             * <p>Scripting code executed when the user moves the mouse pointer while
467:             *     over the component.</p>
468:             */
469:            public String getOnMouseMove() {
470:                if (this .onMouseMove != null) {
471:                    return this .onMouseMove;
472:                }
473:                ValueBinding _vb = getValueBinding("onMouseMove");
474:                if (_vb != null) {
475:                    return (String) _vb.getValue(getFacesContext());
476:                }
477:                return null;
478:            }
479:
480:            /**
481:             * <p>Scripting code executed when the user moves the mouse pointer while
482:             *     over the component.</p>
483:             * @see #getOnMouseMove()
484:             */
485:            public void setOnMouseMove(String onMouseMove) {
486:                this .onMouseMove = onMouseMove;
487:            }
488:
489:            // onMouseOut
490:            private String onMouseOut = null;
491:
492:            /**
493:             * <p>Scripting code executed when a mouse out movement
494:             *     occurs over this component.</p>
495:             */
496:            public String getOnMouseOut() {
497:                if (this .onMouseOut != null) {
498:                    return this .onMouseOut;
499:                }
500:                ValueBinding _vb = getValueBinding("onMouseOut");
501:                if (_vb != null) {
502:                    return (String) _vb.getValue(getFacesContext());
503:                }
504:                return null;
505:            }
506:
507:            /**
508:             * <p>Scripting code executed when a mouse out movement
509:             *     occurs over this component.</p>
510:             * @see #getOnMouseOut()
511:             */
512:            public void setOnMouseOut(String onMouseOut) {
513:                this .onMouseOut = onMouseOut;
514:            }
515:
516:            // onMouseOver
517:            private String onMouseOver = null;
518:
519:            /**
520:             * <p>Scripting code executed when the user moves the  mouse pointer into
521:             *     the boundary of this component.</p>
522:             */
523:            public String getOnMouseOver() {
524:                if (this .onMouseOver != null) {
525:                    return this .onMouseOver;
526:                }
527:                ValueBinding _vb = getValueBinding("onMouseOver");
528:                if (_vb != null) {
529:                    return (String) _vb.getValue(getFacesContext());
530:                }
531:                return null;
532:            }
533:
534:            /**
535:             * <p>Scripting code executed when the user moves the  mouse pointer into
536:             *     the boundary of this component.</p>
537:             * @see #getOnMouseOver()
538:             */
539:            public void setOnMouseOver(String onMouseOver) {
540:                this .onMouseOver = onMouseOver;
541:            }
542:
543:            // onMouseUp
544:            private String onMouseUp = null;
545:
546:            /**
547:             * <p>Scripting code executed when the user releases a mouse button while
548:             *     the mouse pointer is on the component.</p>
549:             */
550:            public String getOnMouseUp() {
551:                if (this .onMouseUp != null) {
552:                    return this .onMouseUp;
553:                }
554:                ValueBinding _vb = getValueBinding("onMouseUp");
555:                if (_vb != null) {
556:                    return (String) _vb.getValue(getFacesContext());
557:                }
558:                return null;
559:            }
560:
561:            /**
562:             * <p>Scripting code executed when the user releases a mouse button while
563:             *     the mouse pointer is on the component.</p>
564:             * @see #getOnMouseUp()
565:             */
566:            public void setOnMouseUp(String onMouseUp) {
567:                this .onMouseUp = onMouseUp;
568:            }
569:
570:            // style
571:            private String style = null;
572:
573:            /**
574:             * <p>CSS style(s) to be applied when this component is rendered.</p>
575:             */
576:            public String getStyle() {
577:                if (this .style != null) {
578:                    return this .style;
579:                }
580:                ValueBinding _vb = getValueBinding("style");
581:                if (_vb != null) {
582:                    return (String) _vb.getValue(getFacesContext());
583:                }
584:                return null;
585:            }
586:
587:            /**
588:             * <p>CSS style(s) to be applied when this component is rendered.</p>
589:             * @see #getStyle()
590:             */
591:            public void setStyle(String style) {
592:                this .style = style;
593:            }
594:
595:            // styleClass
596:            private String styleClass = null;
597:
598:            /**
599:             * <p>CSS style class(es) to be applied when this component is rendered.</p>
600:             */
601:            public String getStyleClass() {
602:                if (this .styleClass != null) {
603:                    return this .styleClass;
604:                }
605:                ValueBinding _vb = getValueBinding("styleClass");
606:                if (_vb != null) {
607:                    return (String) _vb.getValue(getFacesContext());
608:                }
609:                return null;
610:            }
611:
612:            /**
613:             * <p>CSS style class(es) to be applied when this component is rendered.</p>
614:             * @see #getStyleClass()
615:             */
616:            public void setStyleClass(String styleClass) {
617:                this .styleClass = styleClass;
618:            }
619:
620:            // toolTip
621:            private String toolTip = null;
622:
623:            /**
624:             * <p>Display the text as a tooltip for this component</p>
625:             */
626:            public String getToolTip() {
627:                if (this .toolTip != null) {
628:                    return this .toolTip;
629:                }
630:                ValueBinding _vb = getValueBinding("toolTip");
631:                if (_vb != null) {
632:                    return (String) _vb.getValue(getFacesContext());
633:                }
634:                return null;
635:            }
636:
637:            /**
638:             * <p>Display the text as a tooltip for this component</p>
639:             * @see #getToolTip()
640:             */
641:            public void setToolTip(String toolTip) {
642:                this .toolTip = toolTip;
643:            }
644:
645:            // url
646:            /**
647:             * <p>Absolute or relative URL to the image to be rendered.</p>
648:             */
649:            public String getUrl() {
650:                return (String) getValue();
651:            }
652:
653:            /**
654:             * <p>Absolute or relative URL to the image to be rendered.</p>
655:             * @see #getUrl()
656:             */
657:            public void setUrl(String url) {
658:                setValue((Object) url);
659:            }
660:
661:            // visible
662:            private boolean visible = false;
663:            private boolean visible_set = false;
664:
665:            /**
666:             * <p>Use the visible attribute to indicate whether the component should be
667:             *     viewable by the user in the rendered HTML page. If set to false, the
668:             *     HTML code for the component is present in the page, but the component
669:             *     is hidden with style attributes. By default, visible is set to true, so
670:             *     HTML for the component HTML is included and visible to the user. If the
671:             *     component is not visible, it can still be processed on subsequent form
672:             *     submissions because the HTML is present.</p>
673:             */
674:            public boolean isVisible() {
675:                if (this .visible_set) {
676:                    return this .visible;
677:                }
678:                ValueBinding _vb = getValueBinding("visible");
679:                if (_vb != null) {
680:                    Object _result = _vb.getValue(getFacesContext());
681:                    if (_result == null) {
682:                        return false;
683:                    } else {
684:                        return ((Boolean) _result).booleanValue();
685:                    }
686:                }
687:                return true;
688:            }
689:
690:            /**
691:             * <p>Use the visible attribute to indicate whether the component should be
692:             *     viewable by the user in the rendered HTML page. If set to false, the
693:             *     HTML code for the component is present in the page, but the component
694:             *     is hidden with style attributes. By default, visible is set to true, so
695:             *     HTML for the component HTML is included and visible to the user. If the
696:             *     component is not visible, it can still be processed on subsequent form
697:             *     submissions because the HTML is present.</p>
698:             * @see #isVisible()
699:             */
700:            public void setVisible(boolean visible) {
701:                this .visible = visible;
702:                this .visible_set = true;
703:            }
704:
705:            // vspace
706:            private int vspace = Integer.MIN_VALUE;
707:            private boolean vspace_set = false;
708:
709:            /**
710:             * <p>Specifies the amount of white space in pixels to be inserted above and
711:             * 	below the image. The default value is not specified but is generally a
712:             * 	small, non-zero size.</p>
713:             */
714:            public int getVspace() {
715:                if (this .vspace_set) {
716:                    return this .vspace;
717:                }
718:                ValueBinding _vb = getValueBinding("vspace");
719:                if (_vb != null) {
720:                    Object _result = _vb.getValue(getFacesContext());
721:                    if (_result == null) {
722:                        return Integer.MIN_VALUE;
723:                    } else {
724:                        return ((Integer) _result).intValue();
725:                    }
726:                }
727:                return Integer.MIN_VALUE;
728:            }
729:
730:            /**
731:             * <p>Specifies the amount of white space in pixels to be inserted above and
732:             * 	below the image. The default value is not specified but is generally a
733:             * 	small, non-zero size.</p>
734:             * @see #getVspace()
735:             */
736:            public void setVspace(int vspace) {
737:                this .vspace = vspace;
738:                this .vspace_set = true;
739:            }
740:
741:            // width
742:            private int width = Integer.MIN_VALUE;
743:            private boolean width_set = false;
744:
745:            /**
746:             * <p>Image width override. When specified, the width and height attributes 
747:             * 	tell web browsers to override the natural image or object size in favor 
748:             * 	of these values, specified in pixels. Some browsers might not support 
749:             * 	this behavior.</p>
750:             */
751:            public int getWidth() {
752:                if (this .width_set) {
753:                    return this .width;
754:                }
755:                ValueBinding _vb = getValueBinding("width");
756:                if (_vb != null) {
757:                    Object _result = _vb.getValue(getFacesContext());
758:                    if (_result == null) {
759:                        return Integer.MIN_VALUE;
760:                    } else {
761:                        return ((Integer) _result).intValue();
762:                    }
763:                }
764:                return Integer.MIN_VALUE;
765:            }
766:
767:            /**
768:             * <p>Image width override. When specified, the width and height attributes 
769:             * 	tell web browsers to override the natural image or object size in favor 
770:             * 	of these values, specified in pixels. Some browsers might not support 
771:             * 	this behavior.</p>
772:             * @see #getWidth()
773:             */
774:            public void setWidth(int width) {
775:                this .width = width;
776:                this .width_set = true;
777:            }
778:
779:            /**
780:             * <p>Restore the state of this component.</p>
781:             */
782:            public void restoreState(FacesContext _context, Object _state) {
783:                Object _values[] = (Object[]) _state;
784:                super .restoreState(_context, _values[0]);
785:                this .align = (String) _values[1];
786:                this .alt = (String) _values[2];
787:                this .border = ((Integer) _values[3]).intValue();
788:                this .border_set = ((Boolean) _values[4]).booleanValue();
789:                this .height = ((Integer) _values[5]).intValue();
790:                this .height_set = ((Boolean) _values[6]).booleanValue();
791:                this .hspace = ((Integer) _values[7]).intValue();
792:                this .hspace_set = ((Boolean) _values[8]).booleanValue();
793:                this .icon = (String) _values[9];
794:                this .longDesc = (String) _values[10];
795:                this .onClick = (String) _values[11];
796:                this .onDblClick = (String) _values[12];
797:                this .onMouseDown = (String) _values[13];
798:                this .onMouseMove = (String) _values[14];
799:                this .onMouseOut = (String) _values[15];
800:                this .onMouseOver = (String) _values[16];
801:                this .onMouseUp = (String) _values[17];
802:                this .style = (String) _values[18];
803:                this .styleClass = (String) _values[19];
804:                this .toolTip = (String) _values[20];
805:                this .visible = ((Boolean) _values[21]).booleanValue();
806:                this .visible_set = ((Boolean) _values[22]).booleanValue();
807:                this .vspace = ((Integer) _values[23]).intValue();
808:                this .vspace_set = ((Boolean) _values[24]).booleanValue();
809:                this .width = ((Integer) _values[25]).intValue();
810:                this .width_set = ((Boolean) _values[26]).booleanValue();
811:            }
812:
813:            /**
814:             * <p>Save the state of this component.</p>
815:             */
816:            public Object saveState(FacesContext _context) {
817:                Object _values[] = new Object[27];
818:                _values[0] = super .saveState(_context);
819:                _values[1] = this .align;
820:                _values[2] = this .alt;
821:                _values[3] = new Integer(this .border);
822:                _values[4] = this .border_set ? Boolean.TRUE : Boolean.FALSE;
823:                _values[5] = new Integer(this .height);
824:                _values[6] = this .height_set ? Boolean.TRUE : Boolean.FALSE;
825:                _values[7] = new Integer(this .hspace);
826:                _values[8] = this .hspace_set ? Boolean.TRUE : Boolean.FALSE;
827:                _values[9] = this .icon;
828:                _values[10] = this .longDesc;
829:                _values[11] = this .onClick;
830:                _values[12] = this .onDblClick;
831:                _values[13] = this .onMouseDown;
832:                _values[14] = this .onMouseMove;
833:                _values[15] = this .onMouseOut;
834:                _values[16] = this .onMouseOver;
835:                _values[17] = this .onMouseUp;
836:                _values[18] = this .style;
837:                _values[19] = this .styleClass;
838:                _values[20] = this .toolTip;
839:                _values[21] = this .visible ? Boolean.TRUE : Boolean.FALSE;
840:                _values[22] = this .visible_set ? Boolean.TRUE : Boolean.FALSE;
841:                _values[23] = new Integer(this .vspace);
842:                _values[24] = this .vspace_set ? Boolean.TRUE : Boolean.FALSE;
843:                _values[25] = new Integer(this .width);
844:                _values[26] = this.width_set ? Boolean.TRUE : Boolean.FALSE;
845:                return _values;
846:            }
847:
848:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.