Source Code Cross Referenced for HtmlPanelGroup.java in  » J2EE » ICEfaces-1.6.1 » com » icesoft » faces » component » ext » 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 » J2EE » ICEfaces 1.6.1 » com.icesoft.faces.component.ext 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Version: MPL 1.1/GPL 2.0/LGPL 2.1
003:         *
004:         * "The contents of this file are subject to the Mozilla Public License
005:         * Version 1.1 (the "License"); you may not use this file except in
006:         * compliance with the License. You may obtain a copy of the License at
007:         * http://www.mozilla.org/MPL/
008:         *
009:         * Software distributed under the License is distributed on an "AS IS"
010:         * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
011:         * License for the specific language governing rights and limitations under
012:         * the License.
013:         *
014:         * The Original Code is ICEfaces 1.5 open source software code, released
015:         * November 5, 2006. The Initial Developer of the Original Code is ICEsoft
016:         * Technologies Canada, Corp. Portions created by ICEsoft are Copyright (C)
017:         * 2004-2006 ICEsoft Technologies Canada, Corp. All Rights Reserved.
018:         *
019:         * Contributor(s): _____________________.
020:         *
021:         * Alternatively, the contents of this file may be used under the terms of
022:         * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"
023:         * License), in which case the provisions of the LGPL License are
024:         * applicable instead of those above. If you wish to allow use of your
025:         * version of this file only under the terms of the LGPL License and not to
026:         * allow others to use your version of this file under the MPL, indicate
027:         * your decision by deleting the provisions above and replace them with
028:         * the notice and other provisions required by the LGPL License. If you do
029:         * not delete the provisions above, a recipient may use your version of
030:         * this file under either the MPL or the LGPL License."
031:         *
032:         */
033:
034:        package com.icesoft.faces.component.ext;
035:
036:        import com.icesoft.faces.component.CSS_DEFAULT;
037:        import com.icesoft.faces.component.dragdrop.DndEvent;
038:        import com.icesoft.faces.component.dragdrop.DragEvent;
039:        import com.icesoft.faces.component.dragdrop.DropEvent;
040:        import com.icesoft.faces.component.ext.taglib.Util;
041:        import com.icesoft.faces.context.effects.CurrentStyle;
042:        import com.icesoft.faces.context.effects.Effect;
043:        import com.icesoft.faces.context.effects.JavascriptContext;
044:
045:        import javax.faces.context.FacesContext;
046:        import javax.faces.el.MethodBinding;
047:        import javax.faces.el.ValueBinding;
048:        import javax.faces.event.AbortProcessingException;
049:        import javax.faces.event.FacesEvent;
050:        import javax.faces.event.PhaseId;
051:
052:        /**
053:         * This is an extension of javax.faces.component.html.HtmlPanelGroup, which
054:         * provides some additional behavior to this component such as: <ul> <li>changes
055:         * the component's rendered state based on the authentication</li> <li>provides
056:         * drag & drop mechanism</li> <li>allows to render scrollable panel</li>
057:         * <li>adds effects to the component</li> <ul>
058:         */
059:
060:        public class HtmlPanelGroup extends
061:                javax.faces.component.html.HtmlPanelGroup {
062:            public static final String COMPONENT_TYPE = "com.icesoft.faces.HtmlPanelGroup";
063:            public static final String RENDERER_TYPE = "com.icesoft.faces.Group";
064:            public static final String SCROLLABLE_STYLE = "overflow:auto;";
065:            private static final boolean DEFAULT_VISIBLE = true;
066:            private String renderedOnUserRole = null;
067:            private String style = null;
068:            private String scrollWidth = null;
069:            private String scrollHeight = null;
070:
071:            private String draggable;
072:            private MethodBinding dragListener;
073:            private Object dragValue;
074:
075:            private String dropTarget;
076:            private MethodBinding dropListener;
077:            private Object dropValue;
078:
079:            private String dropMask;
080:            private String dragMask;
081:
082:            private CurrentStyle currentStyle;
083:            // This is needed to avoid unessisary dom updates.
084:            private String renderedStyle;
085:
086:            private Effect effect;
087:            private Boolean visible = null;
088:            private String dragOptions;
089:
090:            private Effect onclickeffect;
091:            private Effect ondblclickeffect;
092:            private Effect onmousedowneffect;
093:            private Effect onmouseupeffect;
094:            private Effect onmousemoveeffect;
095:            private Effect onmouseovereffect;
096:            private Effect onmouseouteffect;
097:
098:            private Effect onkeypresseffect;
099:            private Effect onkeydowneffect;
100:            private Effect onkeyupeffect;
101:
102:            private String hoverclass;
103:
104:            /**
105:             *
106:             */
107:            public HtmlPanelGroup() {//The following attributes should be overriden by ice:panelGroup
108:                super ();
109:                setRendererType(RENDERER_TYPE);
110:            }
111:
112:            public void setValueBinding(String s, ValueBinding vb) {
113:                if (s != null
114:                        && (s.indexOf("effect") != -1
115:                                || s.indexOf("drag") != -1 || s.indexOf("drop") != -1)) {
116:                    // If this is an effect attribute make sure Ice Extras is included
117:                    JavascriptContext.includeLib(JavascriptContext.ICE_EXTRAS,
118:                            getFacesContext());
119:                }
120:                super .setValueBinding(s, vb);
121:            }
122:
123:            /**
124:             * <p>Set the value of the <code>renderedOnUserRole</code> property.</p>
125:             */
126:            public void setRenderedOnUserRole(String renderedOnUserRole) {
127:                this .renderedOnUserRole = renderedOnUserRole;
128:            }
129:
130:            /**
131:             * <p>Return the value of the <code>renderedOnUserRole</code> property.</p>
132:             */
133:            public String getRenderedOnUserRole() {
134:                if (renderedOnUserRole != null) {
135:                    return renderedOnUserRole;
136:                }
137:                ValueBinding vb = getValueBinding("renderedOnUserRole");
138:                return vb != null ? (String) vb.getValue(getFacesContext())
139:                        : null;
140:            }
141:
142:            /**
143:             * <p>Set the value of the <code>visible</code> property.</p>
144:             */
145:            public void setVisible(boolean visible) {
146:                this .visible = Boolean.valueOf(visible);
147:            }
148:
149:            /**
150:             * <p>Return the value of the <code>visible</code> property.</p>
151:             */
152:            public boolean isVisible() {
153:                if (visible != null) {
154:                    return visible.booleanValue();
155:                }
156:                ValueBinding vb = getValueBinding("visible");
157:                Boolean boolVal = vb != null ? (Boolean) vb
158:                        .getValue(getFacesContext()) : null;
159:                return boolVal != null ? boolVal.booleanValue()
160:                        : DEFAULT_VISIBLE;
161:            }
162:
163:            /**
164:             * <p>Set the value of the <code>style</code> property.</p>
165:             */
166:            public void setStyle(String style) {
167:                this .style = style;
168:            }
169:
170:            /**
171:             * <p>Return the value of the <code>style</code> property.</p>
172:             */
173:            public String getStyle() {
174:                if (style != null) {
175:                    return getScrollableStyle(style);
176:                }
177:
178:                ValueBinding vb = getValueBinding("style");
179:                return vb != null ? getScrollableStyle((String) vb
180:                        .getValue(getFacesContext())) : getScrollableStyle("");
181:            }
182:
183:            /**
184:             * <p>Set the value of the <code>dragOptions</code> property.</p>
185:             */
186:            public void setDragOptions(String s) {
187:                this .dragOptions = s;
188:            }
189:
190:            /**
191:             * <p>Return the value of the <code>dragOptions</code> property.</p>
192:             */
193:            public String getDragOptions() {
194:                if (this .dragOptions != null) {
195:                    return dragOptions;
196:                }
197:                ValueBinding vb = getValueBinding("dragOptions");
198:                return vb != null ? (String) vb.getValue(getFacesContext())
199:                        : null;
200:            }
201:
202:            /**
203:             * <p>Set the value of the <code>scrollWidth</code> property.</p>
204:             */
205:            public void setScrollWidth(String scrollWidth) {
206:                this .scrollWidth = scrollWidth;
207:            }
208:
209:            /**
210:             * <p>Return the value of the <code>scrollWidth</code> property.</p>
211:             */
212:            public String getScrollWidth() {
213:                if (scrollWidth != null) {
214:                    return scrollWidth;
215:                }
216:                ValueBinding vb = getValueBinding("scrollWidth");
217:                return vb != null ? (String) vb.getValue(getFacesContext())
218:                        : null;
219:            }
220:
221:            /**
222:             * <p>Set the value of the <code>scrollHeight</code> property.</p>
223:             */
224:            public void setScrollHeight(String scrollHeight) {
225:                this .scrollHeight = scrollHeight;
226:            }
227:
228:            /**
229:             * <p>Return the value of the <code>scrollHeight</code> property.</p>
230:             */
231:            public String getScrollHeight() {
232:                if (scrollHeight != null) {
233:                    return scrollHeight;
234:                }
235:                ValueBinding vb = getValueBinding("scrollHeight");
236:                return vb != null ? (String) vb.getValue(getFacesContext())
237:                        : null;
238:            }
239:
240:            /**
241:             * <p>Return the value of the <code>rendered</code> property.</p>
242:             */
243:            public boolean isRendered() {
244:                if (!Util.isRenderedOnUserRole(this )) {
245:                    return false;
246:                }
247:                return super .isRendered();
248:            }
249:
250:            /**
251:             * <p>Return the value of the <code>draggable</code> property.</p>
252:             */
253:            public String getDraggable() {
254:                if (draggable != null) {
255:                    return draggable;
256:                }
257:                ValueBinding vb = getValueBinding("draggable");
258:                return vb != null ? (String) vb.getValue(getFacesContext())
259:                        : null;
260:            }
261:
262:            /**
263:             * <p>Set the value of the <code>draggable</code> property.</p>
264:             */
265:            public void setDraggable(String draggable) {
266:                this .draggable = draggable;
267:                JavascriptContext.includeLib(JavascriptContext.ICE_EXTRAS,
268:                        getFacesContext());
269:            }
270:
271:            /**
272:             * <p>Return the value of the <code>dragListener</code> property.</p>
273:             */
274:            public MethodBinding getDragListener() {
275:                return dragListener;
276:            }
277:
278:            /**
279:             * <p>Set the value of the <code>dragListener</code> property.</p>
280:             */
281:            public void setDragListener(MethodBinding dragListener) {
282:                this .dragListener = dragListener;
283:            }
284:
285:            /**
286:             * <p>Return the value of the <code>dragValue</code> property.</p>
287:             */
288:            public Object getDragValue() {
289:                if (dragValue != null) {
290:                    return dragValue;
291:                }
292:                ValueBinding vb = getValueBinding("dragValue");
293:                return vb != null ? (Object) vb.getValue(getFacesContext())
294:                        : null;
295:            }
296:
297:            /**
298:             * <p>Set the value of the <code>dragValue</code> property.</p>
299:             */
300:            public void setDragValue(Object dragValue) {
301:                this .dragValue = dragValue;
302:            }
303:
304:            /**
305:             * <p>Return the value of the <code>dropTarget</code> property.</p>
306:             */
307:            public String getDropTarget() {
308:                if (dropTarget != null) {
309:                    return dropTarget;
310:                }
311:                ValueBinding vb = getValueBinding("dropTarget");
312:                return vb != null ? (String) vb.getValue(getFacesContext())
313:                        : null;
314:            }
315:
316:            /**
317:             * <p>Set the value of the <code>dropTarget</code> property.</p>
318:             */
319:            public void setDropTarget(String dropTarget) {
320:                this .dropTarget = dropTarget;
321:                JavascriptContext.includeLib(JavascriptContext.ICE_EXTRAS,
322:                        getFacesContext());
323:            }
324:
325:            /**
326:             * <p>Return the value of the <code>dropListener</code> property.</p>
327:             */
328:            public MethodBinding getDropListener() {
329:                return dropListener;
330:            }
331:
332:            /**
333:             * <p>Set the value of the <code>dropListener</code> property.</p>
334:             */
335:            public void setDropListener(MethodBinding dropListener) {
336:                this .dropListener = dropListener;
337:            }
338:
339:            /**
340:             * <p>Return the value of the <code>dropValue</code> property.</p>
341:             */
342:            public Object getDropValue() {
343:                if (dropValue != null) {
344:                    return dropValue;
345:                }
346:                ValueBinding vb = getValueBinding("dropValue");
347:                return vb != null ? (Object) vb.getValue(getFacesContext())
348:                        : null;
349:            }
350:
351:            /**
352:             * <p>Set the value of the <code>dropValue</code> property.</p>
353:             */
354:            public void setDropValue(Object dropValue) {
355:                this .dropValue = dropValue;
356:            }
357:
358:            /**
359:             * <p>Return the value of the <code>dropMask</code> property.</p>
360:             */
361:            public String getDropMask() {
362:                return dropMask;
363:            }
364:
365:            /**
366:             * <p>Set the value of the <code>dropMask</code> property.</p>
367:             */
368:            public void setDropMask(String dropMask) {
369:                this .dropMask = dropMask;
370:            }
371:
372:            /**
373:             * <p>Return the value of the <code>dragMask</code> property.</p>
374:             */
375:            public String getDragMask() {
376:                return dragMask;
377:            }
378:
379:            /**
380:             * <p>Set the value of the <code>dragMask</code> property.</p>
381:             */
382:            public void setDragMask(String dragMask) {
383:                this .dragMask = dragMask;
384:            }
385:
386:            /**
387:             * <p>Return the value of the <code>effect</code> property.</p>
388:             */
389:            public Effect getEffect() {
390:                if (effect != null) {
391:                    return effect;
392:                }
393:                ValueBinding vb = getValueBinding("effect");
394:                return vb != null ? (Effect) vb.getValue(getFacesContext())
395:                        : null;
396:            }
397:
398:            /**
399:             * <p>Set the value of the <code>effect</code> property.</p>
400:             */
401:            public void setEffect(Effect effect) {
402:                this .effect = effect;
403:                JavascriptContext.includeLib(JavascriptContext.ICE_EXTRAS,
404:                        getFacesContext());
405:            }
406:
407:            /**
408:             * <p>Return the value of the <code>onclickeffect</code> property.</p>
409:             */
410:            public Effect getOnclickeffect() {
411:                if (onclickeffect != null) {
412:                    return onclickeffect;
413:                }
414:                ValueBinding vb = getValueBinding("onclickeffect");
415:
416:                return vb != null ? (Effect) vb.getValue(getFacesContext())
417:                        : null;
418:            }
419:
420:            /**
421:             * <p>Set the value of the <code>onclickeffect</code> property.</p>
422:             */
423:            public void setOnclickeffect(Effect onclickeffect) {
424:                this .onclickeffect = onclickeffect;
425:                JavascriptContext.includeLib(JavascriptContext.ICE_EXTRAS,
426:                        getFacesContext());
427:            }
428:
429:            /**
430:             * <p>Return the value of the <code>ondblclickeffect</code> property.</p>
431:             */
432:            public Effect getOndblclickeffect() {
433:                if (ondblclickeffect != null) {
434:                    return ondblclickeffect;
435:                }
436:                ValueBinding vb = getValueBinding("ondblclickeffect");
437:
438:                return vb != null ? (Effect) vb.getValue(getFacesContext())
439:                        : null;
440:            }
441:
442:            /**
443:             * <p>Set the value of the <code>ondblclickeffect</code> property.</p>
444:             */
445:            public void setOndblclickeffect(Effect ondblclickeffect) {
446:                this .ondblclickeffect = ondblclickeffect;
447:                JavascriptContext.includeLib(JavascriptContext.ICE_EXTRAS,
448:                        getFacesContext());
449:            }
450:
451:            /**
452:             * <p>Return the value of the <code>onmousedowneffect</code> property.</p>
453:             */
454:            public Effect getOnmousedowneffect() {
455:                if (onmousedowneffect != null) {
456:                    return onmousedowneffect;
457:                }
458:                ValueBinding vb = getValueBinding("onmousedowneffect");
459:
460:                return vb != null ? (Effect) vb.getValue(getFacesContext())
461:                        : null;
462:            }
463:
464:            /**
465:             * <p>Set the value of the <code>onmousedowneffect</code> property.</p>
466:             */
467:            public void setOnmousedowneffect(Effect onmousedowneffect) {
468:                this .onmousedowneffect = onmousedowneffect;
469:                JavascriptContext.includeLib(JavascriptContext.ICE_EXTRAS,
470:                        getFacesContext());
471:            }
472:
473:            /**
474:             * <p>Return the value of the <code>onmouseupeffect</code> property.</p>
475:             */
476:            public Effect getOnmouseupeffect() {
477:                if (onmouseupeffect != null) {
478:                    return onmouseupeffect;
479:                }
480:                ValueBinding vb = getValueBinding("onmouseupeffect");
481:
482:                return vb != null ? (Effect) vb.getValue(getFacesContext())
483:                        : null;
484:            }
485:
486:            /**
487:             * <p>Set the value of the <code>onmouseupeffect</code> property.</p>
488:             */
489:            public void setOnmouseupeffect(Effect onmouseupeffect) {
490:                this .onmouseupeffect = onmouseupeffect;
491:                JavascriptContext.includeLib(JavascriptContext.ICE_EXTRAS,
492:                        getFacesContext());
493:            }
494:
495:            /**
496:             * <p>Return the value of the <code>onmousemoveeffect</code> property.</p>
497:             */
498:            public Effect getOnmousemoveeffect() {
499:                if (onmousemoveeffect != null) {
500:                    return onmousemoveeffect;
501:                }
502:                ValueBinding vb = getValueBinding("onmousemoveeffect");
503:
504:                return vb != null ? (Effect) vb.getValue(getFacesContext())
505:                        : null;
506:            }
507:
508:            /**
509:             * <p>Set the value of the <code>onmousemoveeffect</code> property.</p>
510:             */
511:            public void setOnmousemoveeffect(Effect onmousemoveeffect) {
512:                this .onmousemoveeffect = onmousemoveeffect;
513:                JavascriptContext.includeLib(JavascriptContext.ICE_EXTRAS,
514:                        getFacesContext());
515:            }
516:
517:            /**
518:             * <p>Return the value of the <code>onmouseovereffect</code> property.</p>
519:             */
520:            public Effect getOnmouseovereffect() {
521:                if (onmouseovereffect != null) {
522:                    return onmouseovereffect;
523:                }
524:                ValueBinding vb = getValueBinding("onmouseovereffect");
525:
526:                return vb != null ? (Effect) vb.getValue(getFacesContext())
527:                        : null;
528:            }
529:
530:            /**
531:             * <p>Set the value of the <code>onmouseovereffect</code> property.</p>
532:             */
533:            public void setOnmouseovereffect(Effect onmouseovereffect) {
534:                this .onmouseovereffect = onmouseovereffect;
535:                JavascriptContext.includeLib(JavascriptContext.ICE_EXTRAS,
536:                        getFacesContext());
537:            }
538:
539:            /**
540:             * <p>Return the value of the <code>onmouseouteffect</code> property.</p>
541:             */
542:            public Effect getOnmouseouteffect() {
543:                if (onmouseouteffect != null) {
544:                    return onmouseouteffect;
545:                }
546:                ValueBinding vb = getValueBinding("onmouseouteffect");
547:
548:                return vb != null ? (Effect) vb.getValue(getFacesContext())
549:                        : null;
550:            }
551:
552:            /**
553:             * <p>Set the value of the <code>onmouseouteffect</code> property.</p>
554:             */
555:            public void setOnmouseouteffect(Effect onmouseouteffect) {
556:                this .onmouseouteffect = onmouseouteffect;
557:                JavascriptContext.includeLib(JavascriptContext.ICE_EXTRAS,
558:                        getFacesContext());
559:            }
560:
561:            /**
562:             * <p>Return the value of the <code>onkeypresseffect</code> property.</p>
563:             */
564:            public Effect getOnkeypresseffect() {
565:                if (onkeypresseffect != null) {
566:                    return onkeypresseffect;
567:                }
568:                ValueBinding vb = getValueBinding("onkeypresseffect");
569:
570:                return vb != null ? (Effect) vb.getValue(getFacesContext())
571:                        : null;
572:            }
573:
574:            /**
575:             * <p>Set the value of the <code>onkeypresseffect</code> property.</p>
576:             */
577:            public void setOnkeypresseffect(Effect onkeypresseffect) {
578:                this .onkeypresseffect = onkeypresseffect;
579:                JavascriptContext.includeLib(JavascriptContext.ICE_EXTRAS,
580:                        getFacesContext());
581:            }
582:
583:            /**
584:             * <p>Return the value of the <code>onkeydowneffect</code> property.</p>
585:             */
586:            public Effect getOnkeydowneffect() {
587:                if (onkeydowneffect != null) {
588:                    return onkeydowneffect;
589:                }
590:                ValueBinding vb = getValueBinding("onkeydowneffect");
591:
592:                return vb != null ? (Effect) vb.getValue(getFacesContext())
593:                        : null;
594:            }
595:
596:            /**
597:             * <p>Set the value of the <code>onkeydowneffect</code> property.</p>
598:             */
599:            public void setOnkeydowneffect(Effect onkeydowneffect) {
600:                this .onkeydowneffect = onkeydowneffect;
601:                JavascriptContext.includeLib(JavascriptContext.ICE_EXTRAS,
602:                        getFacesContext());
603:            }
604:
605:            /**
606:             * <p>Return the value of the <code>onkeyupeffect</code> property.</p>
607:             */
608:            public Effect getOnkeyupeffect() {
609:                if (onkeyupeffect != null) {
610:                    return onkeyupeffect;
611:                }
612:                ValueBinding vb = getValueBinding("onkeyupeffect");
613:
614:                return vb != null ? (Effect) vb.getValue(getFacesContext())
615:                        : null;
616:            }
617:
618:            /**
619:             * <p>Set the value of the <code>onkeyupeffect</code> property.</p>
620:             */
621:            public void setOnkeyupeffect(Effect onkeyupeffect) {
622:                this .onkeyupeffect = onkeyupeffect;
623:                JavascriptContext.includeLib(JavascriptContext.ICE_EXTRAS,
624:                        getFacesContext());
625:            }
626:
627:            /**
628:             * <p>Gets the state of the instance as a <code>Serializable</code>
629:             * Object.</p>
630:             */
631:            public Object saveState(FacesContext context) {
632:                Object values[] = new Object[29];
633:                values[0] = super .saveState(context);
634:                values[1] = renderedOnUserRole;
635:                values[2] = style;
636:                values[3] = scrollWidth;
637:                values[4] = scrollHeight;
638:                values[6] = dragListener;
639:                values[7] = dragValue;
640:                values[8] = dropTarget;
641:                values[9] = dropListener;
642:                values[10] = dropValue;
643:                values[11] = dragMask;
644:                values[12] = dropMask;
645:                values[13] = effect;
646:                values[14] = onclickeffect;
647:                values[15] = ondblclickeffect;
648:                values[16] = onmousedowneffect;
649:                values[17] = onmouseupeffect;
650:                values[18] = onmousemoveeffect;
651:                values[19] = onmouseovereffect;
652:                values[20] = onmouseouteffect;
653:                values[24] = onkeypresseffect;
654:                values[25] = onkeydowneffect;
655:                values[26] = onkeyupeffect;
656:                values[27] = currentStyle;
657:                values[28] = visible;
658:                return values;
659:
660:            }
661:
662:            /**
663:             * <p>Perform any processing required to restore the state from the entries
664:             * in the state Object.</p>
665:             */
666:            public void restoreState(FacesContext context, Object state) {
667:                Object values[] = (Object[]) state;
668:                super .restoreState(context, values[0]);
669:                renderedOnUserRole = (String) values[1];
670:                state = values[2];
671:                scrollWidth = (String) values[3];
672:                scrollHeight = (String) values[4];
673:                draggable = (String) values[5];
674:                dragListener = (MethodBinding) values[6];
675:                dragValue = values[7];
676:                dropTarget = (String) values[8];
677:                dropListener = (MethodBinding) values[9];
678:                dropValue = values[10];
679:                dragMask = (String) values[11];
680:                dropMask = (String) values[12];
681:                effect = (Effect) values[13];
682:                onclickeffect = (Effect) values[14];
683:                ondblclickeffect = (Effect) values[15];
684:                onmousedowneffect = (Effect) values[16];
685:                onmouseupeffect = (Effect) values[17];
686:                onmousemoveeffect = (Effect) values[18];
687:                onmouseovereffect = (Effect) values[19];
688:                onmouseouteffect = (Effect) values[20];
689:                onkeypresseffect = (Effect) values[24];
690:                onkeydowneffect = (Effect) values[25];
691:                onkeyupeffect = (Effect) values[26];
692:                currentStyle = (CurrentStyle) values[27];
693:                visible = (Boolean) values[28];
694:            }
695:
696:            /**
697:             * <p>Return the given _style String as the <code>scrollableStyle</code> property.</p>
698:             * @param _style 
699:             * @return String
700:             */
701:            private String getScrollableStyle(String _style) {
702:                return _style;
703:            }
704:
705:            /* (non-Javadoc)
706:             * @see javax.faces.component.UIComponent#broadcast(javax.faces.event.FacesEvent)
707:             */
708:            public void broadcast(FacesEvent event)
709:                    throws AbortProcessingException {
710:                super .broadcast(event);
711:
712:                if (event instanceof  DragEvent && dragListener != null) {
713:                    Object[] oa = { (DragEvent) event };
714:                    dragListener.invoke(getFacesContext(), oa);
715:                }
716:                if (event instanceof  DropEvent && dropListener != null) {
717:                    Object[] oa = { (DropEvent) event };
718:                    dropListener.invoke(getFacesContext(), oa);
719:                }
720:            }
721:
722:            /* (non-Javadoc)
723:             * @see javax.faces.component.UIComponent#queueEvent(javax.faces.event.FacesEvent)
724:             */
725:            public void queueEvent(FacesEvent event) {
726:                if (event instanceof  DndEvent) {
727:                    event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
728:                }
729:                super .queueEvent(event);
730:            }
731:
732:            /**
733:             * <p>Return the value of the <code>currentStyle</code> property.</p>
734:             */
735:            public CurrentStyle getCurrentStyle() {
736:                return currentStyle;
737:            }
738:
739:            /**
740:             * <p>Set the value of the <code>currentStyle</code> property.</p>
741:             */
742:            public void setCurrentStyle(CurrentStyle currentStyle) {
743:                this .currentStyle = currentStyle;
744:            }
745:
746:            /**
747:             * <p>Return the value of the <code>renderedStyle</code> property.</p>
748:             */
749:            public String getRenderedStyle() {
750:                return renderedStyle;
751:            }
752:
753:            /**
754:             * <p>Set the value of the <code>renderedStyle</code> property.</p>
755:             */
756:            public void setRenderedStyle(String renderedStyle) {
757:                this .renderedStyle = renderedStyle;
758:            }
759:
760:            public String getHoverclass() {
761:                return hoverclass;
762:            }
763:
764:            public void setHoverclass(String hoverclass) {
765:                this .hoverclass = hoverclass;
766:            }
767:
768:            /**
769:             * <p>Return the value of the <code>styleClass</code> property.</p>
770:             */
771:            public String getStyleClass() {
772:                return Util.getQualifiedStyleClass(this , super .getStyleClass(),
773:                        CSS_DEFAULT.PANEL_GROUP_DEFAULT_STYLE_CLASS,
774:                        "styleClass");
775:            }
776:
777:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.