Source Code Cross Referenced for UnComponent.java in  » J2EE » WiSerFramework » de » ug2t » unifiedGui » 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 » WiSerFramework » de.ug2t.unifiedGui 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // @@
002:        // @@
003:        /*
004:         * Wi.Ser Framework
005:         *
006:         * Version: 1.8.1, 20-September-2007  
007:         * Copyright (C) 2005 Dirk von der Weiden <dvdw@imail.de>
008:         *
009:         * This library is free software; you can redistribute it and/or
010:         * modify it under the terms of the GNU Lesser General Public
011:         * License as published by the Free Software Foundation; either
012:         * version 2 of the License, or (at your option) any later version.
013:         *
014:         * This library is distributed in the hope that it will be useful,
015:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
016:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
017:         * Lesser General Public License for more details.
018:         *
019:         * You should have received a copy of the GNU Lesser General Public
020:         * License along with this library located in LGPL.txt in the 
021:         * license directory; if not, write to the 
022:         * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
023:         * Boston, MA  02111-1307, USA.
024:         * 
025:         * If this agreement does not cover your requirements, please contact us
026:         * via email to get detailed information about the commercial license 
027:         * or our service offerings!
028:         *
029:         */
030:        // @@
031:        package de.ug2t.unifiedGui;
032:
033:        import java.awt.*;
034:        import java.util.*;
035:
036:        import de.ug2t.channel.ho.*;
037:        import de.ug2t.connector.*;
038:        import de.ug2t.kernel.*;
039:        import de.ug2t.model.values.*;
040:        import de.ug2t.unifiedGui.exceptions.*;
041:        import de.ug2t.unifiedGui.interfaces.*;
042:        import de.ug2t.unifiedGui.plugins.*;
043:
044:        /**
045:         * @author Dirk
046:         * 
047:         * date: 03.04.2004 project: WiSer-Framework
048:         * 
049:         * <p>
050:         * UnComponent is the full implementation of the IUnComponent interface. It is
051:         * the common class for all widgets in all channels.
052:         * </p>
053:         */
054:        public class UnComponent extends KeTreeNode implements  IUnComponent {
055:            protected static UnEventDispatcher pdm_dispatcher = null;
056:
057:            protected ArrayList pdm_listeners2Indirect = null;
058:            protected ArrayList pdm_listeners = null;
059:            protected ArrayList pdm_preFct = null;
060:            protected ArrayList pdm_postFct = null;
061:
062:            // refreshed by client-event
063:            protected boolean pdm_isRefreshed = false;
064:            protected boolean pdm_isIndirectRefreshed = false;
065:
066:            protected boolean pdm_submit = false;
067:            protected String pdm_toolTip = null;
068:
069:            protected boolean pdm_colorSet = false;
070:            protected boolean pdm_fontSet = false;
071:            protected boolean pdm_borderSet = false;
072:
073:            protected ACoDataGetter pdm_callback = null;
074:            protected String pdm_cbParam = null;
075:            protected boolean pdm_doRefresh = false;
076:            protected boolean pdm_global = false;
077:
078:            private IMoValue pem_model = null;
079:            private IMoValue pem_modelTpl = null;
080:            private boolean pem_renderIfHidden = false;
081:
082:            protected UnFontDescriptor pdm_font = null;
083:            protected boolean pdm_setFocus = false;
084:
085:            protected boolean pdm_preFctActive = true;
086:            protected boolean pdm_postFctActive = true;
087:
088:            protected boolean pdm_getMaxSpace = false;
089:
090:            protected UnFixedSize pdm_fsize = null;
091:            protected boolean pdm_eventOnChange = false;
092:
093:            private ArrayList pem_synced = null;
094:            private String pem_class = null;
095:            private boolean pem_eventConsumed = false;
096:            private PlBasicComponentAggregat pem_pluginPeer = null;
097:            private int pem_border = IUnComponent.NO_BORDER;
098:            private String pem_borderColor = "";
099:            private int pem_borderWidth = 0;
100:            private String pem_fgColor = "black";
101:            private String pem_bgColor = "transparent";
102:            private String pem_cursor = null;
103:            private IUnApplication pem_appl = null;
104:            private int pem_evPrio = Integer.MAX_VALUE;
105:
106:            public static void pcmf_setDispatcher(UnEventDispatcher xDisp) {
107:                UnComponent.pdm_dispatcher = xDisp;
108:            }
109:
110:            public void pcmf_setEventPrio(int xPrio) {
111:                this .pem_evPrio = xPrio;
112:            }
113:
114:            public int pcmf_getEventPrio() {
115:                return (this .pem_evPrio);
116:            }
117:
118:            public PlBasicComponentAggregat pcmf_getParentPlugin() {
119:                PlBasicComponentAggregat l_pl = null;
120:                KeTreeNode l_p = this ;
121:
122:                while (l_p != null) {
123:                    l_p = l_p.pcmf_getParentNode();
124:                    if (l_p instanceof  UnComponent) {
125:                        l_pl = ((UnComponent) l_p).pcmf_getPluginPeer();
126:                        if (l_pl != null)
127:                            return (l_pl);
128:                    }
129:                }
130:                return (null);
131:            }
132:
133:            public PlBasicComponentAggregat pcmf_getPluginPeer() {
134:                return (pem_pluginPeer);
135:            }
136:
137:            public void pcmf_setPluginPeer(PlBasicComponentAggregat xPl) {
138:                pem_pluginPeer = xPl;
139:            }
140:
141:            public UnComponent pcmf_getUnComponent() {
142:                return (this );
143:            }
144:
145:            public void pcmf_clearSynced() {
146:                if (this .pem_synced == null)
147:                    return;
148:
149:                Iterator l_it = this .pem_synced.iterator();
150:                while (l_it.hasNext()) {
151:                    IUnSyncComponent l_synced = (IUnSyncComponent) l_it.next();
152:                    l_synced.pcmf_unSync();
153:                }
154:                this .pem_synced = null;
155:            }
156:
157:            public void pcmf_addSynced(IUnSyncComponent xSynced) {
158:                if (this .pem_synced == null)
159:                    this .pem_synced = new ArrayList();
160:
161:                xSynced.pcmf_setSynced();
162:                this .pem_synced.add(xSynced);
163:            }
164:
165:            public IUnSyncComponent pcmf_removeSynced(IUnSyncComponent xSynced) {
166:                if (this .pem_synced == null)
167:                    return (null);
168:
169:                if (this .pem_synced.remove(xSynced) == true) {
170:                    xSynced.pcmf_unSync();
171:                    return (xSynced);
172:                } else
173:                    return (null);
174:            }
175:
176:            public void pcmf_resetColorSettings() {
177:                this .pdm_colorSet = false;
178:                this .pem_fgColor = "black";
179:                this .pem_bgColor = "transparent";
180:            }
181:
182:            public Iterator pcmf_getSynced() {
183:                if (this .pem_synced == null)
184:                    return (null);
185:                else
186:                    return (this .pem_synced.iterator());
187:            }
188:
189:            public UnComponent(String xName) throws Exception {
190:                super (xName, null);
191:
192:                return;
193:            };
194:
195:            public void pcmf_reConstructObject(String xName) throws Exception {
196:                super .pcmf_reConstructObject(xName, null);
197:
198:                return;
199:            };
200:
201:            public void pcmf_setEventOnChange(boolean xEvC) {
202:                this .pdm_eventOnChange = xEvC;
203:            };
204:
205:            public boolean pcmf_getEventOnChange() {
206:                return (this .pdm_eventOnChange);
207:            };
208:
209:            public boolean pcmf_hasCtxMenu() {
210:                return (false);
211:            }
212:
213:            public void pcmf_setFixedSize(int w, int h, int type) {
214:                if (this .pdm_fsize != null && this .pdm_fsize.pcmf_getW() == w
215:                        && this .pdm_fsize.pcmf_getH() == h
216:                        && this .pdm_fsize.pcmf_getType() == type)
217:                    return;
218:
219:                this .pcmf_setPropChanged(true);
220:                this .pdm_fsize = new UnFixedSize(w, h, type);
221:            }
222:
223:            public UnFixedSize pcmf_getFixedSize() {
224:                if (this .pdm_fsize == null)
225:                    return (null);
226:
227:                return (new UnFixedSize(this .pdm_fsize.pcmf_getW(),
228:                        this .pdm_fsize.pcmf_getH(), this .pdm_fsize
229:                                .pcmf_getType()));
230:            }
231:
232:            public void pcmf_deleteFixedSize() {
233:                this .pdm_fsize = null;
234:            }
235:
236:            public void pcmf_setGlobal(boolean xGlobal) {
237:                pdm_global = xGlobal;
238:                return;
239:            };
240:
241:            protected void pdmf_setMyAppl() {
242:                if (pem_appl == null) {
243:                    Object l_appl = KeRegisteredObject
244:                            .pcmf_getObjByName(IUnApplication.MY_APPL);
245:                    pem_appl = (IUnApplication) l_appl;
246:                }
247:            }
248:
249:            public boolean pcmf_getGlobal() {
250:                return (pdm_global);
251:            };
252:
253:            public void pcmf_setRefresh() {
254:                pdm_isRefreshed = true;
255:                return;
256:            };
257:
258:            public boolean pcmf_isRefreshed() {
259:                return (pdm_isRefreshed);
260:            };
261:
262:            public void pcmf_setIndirectRefresh() {
263:                pdm_isIndirectRefreshed = true;
264:                return;
265:            };
266:
267:            public boolean pcmf_isIndirectRefreshed() {
268:                return (pdm_isIndirectRefreshed);
269:            };
270:
271:            public void pcmf_dispatchEvent() throws Exception {
272:                pdm_isRefreshed = false;
273:
274:                IUnGuiEventListener l_listener = null;
275:                Iterator l_it = null;
276:
277:                if (this .pdm_listeners == null)
278:                    return;
279:
280:                l_it = pdm_listeners.iterator();
281:                while (l_it.hasNext()) {
282:                    l_listener = (IUnGuiEventListener) l_it.next();
283:
284:                    UnComponent l_appl = this .pcmf_getAppl()
285:                            .pcmf_getUnComponent();
286:                    pcmf_callListener(l_listener);
287:
288:                    if (l_appl.pcmf_isDeleted())
289:                        throw (new UnApplicationCloseException());
290:
291:                    if (this .pem_eventConsumed)
292:                        break;
293:                }
294:                ;
295:
296:                pem_eventConsumed = false;
297:
298:                return;
299:            }
300:
301:            public final Object pcmf_reset() {
302:                Object l_obj = this .pdm_Element;
303:
304:                if (this .pcmf_isDefSet()) {
305:                    if (this .pdm_default instanceof  UnDefaultProps)
306:                        ((UnDefaultProps) this .pdm_default).pcmf_assign(this );
307:                    else
308:                        this .pcmf_setValue(pdm_default);
309:                }
310:
311:                return (l_obj);
312:            };
313:
314:            public final Object pcmf_resetRecursive() {
315:                if (this .pdm_default instanceof  UnDefaultProps)
316:                    ((UnDefaultProps) this .pdm_default).pcmf_assign(this );
317:
318:                return (super .pcmf_resetRecursive());
319:            };
320:
321:            private void pcmf_callListener(IUnGuiEventListener l_listener)
322:                    throws Exception {
323:                if (l_listener instanceof  IUnSynchronizedGuiEventListener
324:                        && ((IUnSynchronizedGuiEventListener) l_listener)
325:                                .pcmf_synchronize()) {
326:                    try {
327:                        UnEventDispatcher.pcmf_startSingleProcessing();
328:                        l_listener.pcmf_execListener(this );
329:                        UnEventDispatcher.pcmf_endSingleProcessing();
330:                    } catch (Exception e) {
331:                        UnEventDispatcher.pcmf_endSingleProcessing();
332:                        throw (new UnDispatchErrorWrapper(e, this , l_listener));
333:                    } catch (Throwable e) {
334:                        UnEventDispatcher.pcmf_endSingleProcessing();
335:                        throw (new UnDispatchErrorWrapper(e, this , l_listener));
336:                    }
337:                } else {
338:                    try {
339:                        l_listener.pcmf_execListener(this );
340:                    } catch (Exception e) {
341:                        throw (new UnDispatchErrorWrapper(e, this , l_listener));
342:                    } catch (Throwable e) {
343:                        throw (new UnDispatchErrorWrapper(e, this , l_listener));
344:                    }
345:                }
346:            };
347:
348:            public void pcmf_dispatchIndirectEvent() throws Exception {
349:                pdm_isIndirectRefreshed = false;
350:
351:                IUnGuiEventListener l_listener = null;
352:                Iterator l_it = null;
353:
354:                if (this .pdm_listeners2Indirect == null)
355:                    return;
356:
357:                l_it = pdm_listeners2Indirect.iterator();
358:                while (l_it.hasNext()) {
359:                    l_listener = (IUnGuiEventListener) l_it.next();
360:
361:                    UnComponent l_appl = this .pcmf_getAppl()
362:                            .pcmf_getUnComponent();
363:                    pcmf_callListener(l_listener);
364:
365:                    if (l_appl.pcmf_isDeleted())
366:                        throw (new UnApplicationCloseException());
367:
368:                    if (this .pem_eventConsumed)
369:                        break;
370:                }
371:                ;
372:
373:                pem_eventConsumed = false;
374:
375:                return;
376:            };
377:
378:            public void pcmf_addEventChannel(IUnEventChannel xEvC) {
379:                this .pcmf_addNode("EVC", xEvC.pcmf_getUnComponent());
380:            }
381:
382:            public void pcmf_remEventChannel(IUnEventChannel xEvC) {
383:                this .pcmf_removeNode(xEvC.pcmf_getUnComponent());
384:            }
385:
386:            public ArrayList pcmf_getListeners() {
387:                if (this .pdm_listeners == null)
388:                    return (null);
389:
390:                return (new ArrayList(this .pdm_listeners));
391:            };
392:
393:            public void pcmf_addListener(IUnGuiEventListener xListener) {
394:                if (this .pdm_listeners == null)
395:                    this .pdm_listeners = new ArrayList();
396:
397:                pdm_listeners.add(xListener);
398:                return;
399:            };
400:
401:            public void pcmf_remListener(IUnGuiEventListener xListener) {
402:                if (this .pdm_listeners == null)
403:                    return;
404:
405:                pdm_listeners.remove(xListener);
406:                return;
407:            };
408:
409:            public void pcmf_addIndirectListener(IUnGuiEventListener xListener) {
410:                if (this .pdm_listeners2Indirect == null)
411:                    this .pdm_listeners2Indirect = new ArrayList();
412:
413:                pdm_listeners2Indirect.add(xListener);
414:                return;
415:            };
416:
417:            public void pcmf_remIndirectListener(IUnGuiEventListener xListener) {
418:                if (this .pdm_listeners2Indirect == null)
419:                    return;
420:
421:                pdm_listeners2Indirect.remove(xListener);
422:                return;
423:            };
424:
425:            public ArrayList pcmf_getIndirectListeners() {
426:                if (this .pdm_listeners2Indirect == null)
427:                    return (null);
428:
429:                return (new ArrayList(this .pdm_listeners2Indirect));
430:            };
431:
432:            public void pcmf_addPreFct(IUnPreDisplayFunction xpreFct) {
433:                this .pcmf_setPreFct(true);
434:
435:                if (pdm_preFct == null)
436:                    pdm_preFct = new ArrayList();
437:
438:                pdm_preFct.add(xpreFct);
439:                return;
440:            };
441:
442:            public void pcmf_remPreFct(IUnPreDisplayFunction xpreFct) {
443:                if (pdm_preFct != null)
444:                    pdm_preFct.remove(xpreFct);
445:
446:                return;
447:            };
448:
449:            public void pcmf_setPreFct(boolean xPreFct) {
450:                this .pdm_preFctActive = xPreFct;
451:            };
452:
453:            public void pcmf_addPostFct(IUnPostDisplayFunction xpostFct) {
454:                this .pcmf_setPostFct(true);
455:
456:                if (pdm_postFct == null)
457:                    pdm_postFct = new ArrayList();
458:
459:                pdm_postFct.add(xpostFct);
460:                return;
461:            };
462:
463:            public void pcmf_remPostFct(IUnPostDisplayFunction xpostFct) {
464:                if (pdm_postFct != null)
465:                    pdm_postFct.remove(xpostFct);
466:
467:                return;
468:            };
469:
470:            public void pcmf_setPostFct(boolean xPostFct) {
471:                this .pdm_postFctActive = xPostFct;
472:            };
473:
474:            public void pcmf_execPreFcts() throws Exception {
475:                if (this .pdm_preFctActive == false)
476:                    return;
477:
478:                IUnPreDisplayFunction l_preFct = null;
479:                Iterator l_it = null;
480:
481:                // Hier müssen die Kinder aufgerufen werden
482:                KeTreeElement l_btElement = null;
483:
484:                l_it = this .pcmf_getSubIterator();
485:                while (l_it.hasNext()) {
486:                    l_btElement = (KeTreeElement) l_it.next();
487:                    if (l_btElement instanceof  UnComponent)
488:                        ((UnComponent) l_btElement).pcmf_execPreFcts();
489:                }
490:                ;
491:
492:                if (pdm_preFct != null) {
493:                    l_it = pdm_preFct.iterator();
494:                    while (l_it.hasNext()) {
495:                        l_preFct = (IUnPreDisplayFunction) l_it.next();
496:                        l_preFct.pcmf_execPreFct(this );
497:                    }
498:                    ;
499:                }
500:                ;
501:                return;
502:            };
503:
504:            public void pcmf_execPostFcts() throws Exception {
505:                if (this .pdm_postFctActive == false)
506:                    return;
507:
508:                IUnPostDisplayFunction l_postFct = null;
509:                Iterator l_it = null;
510:
511:                // Hier müssen die Kinder aufgerufen werden
512:                KeTreeElement l_btElement = null;
513:
514:                l_it = this .pcmf_getSubIterator();
515:                while (l_it.hasNext()) {
516:                    l_btElement = (KeTreeElement) l_it.next();
517:                    if (l_btElement instanceof  UnComponent)
518:                        ((UnComponent) l_btElement).pcmf_execPostFcts();
519:                }
520:                ;
521:
522:                if (pdm_postFct != null) {
523:                    l_it = pdm_postFct.iterator();
524:                    while (l_it.hasNext()) {
525:                        l_postFct = (IUnPostDisplayFunction) l_it.next();
526:                        l_postFct.pcmf_execPostFct(this );
527:                    }
528:                    ;
529:                }
530:                ;
531:                return;
532:            };
533:
534:            public String toString() {
535:                if (this  instanceof  IUnTreeViewNode)
536:                    return (super .toString());
537:
538:                Object l_obj = super .pcmf_getValue();
539:
540:                if (l_obj == null)
541:                    return (super .toString());
542:
543:                if (l_obj == this )
544:                    return ("this");
545:
546:                if (l_obj instanceof  HoGenericDataContainer)
547:                    return (((HoGenericDataContainer) l_obj).toString(this ));
548:
549:                return (l_obj.toString());
550:            };
551:
552:            public void pcmf_enableSubmit() {
553:                this .pdm_submit = true;
554:
555:                return;
556:            };
557:
558:            public void pcmf_disableSubmit() {
559:                this .pdm_submit = false;
560:
561:                return;
562:            };
563:
564:            public boolean pcmf_isSubmit() {
565:                return (this .pdm_submit);
566:            };
567:
568:            public void pcmf_setDataGetter(ACoDataGetter xDg, String xId,
569:                    boolean xRefresh) {
570:                pdm_callback = xDg;
571:                pdm_cbParam = xId;
572:                pdm_doRefresh = xRefresh;
573:                this .pcmf_setPropChanged(true);
574:
575:                return;
576:            };
577:
578:            public void pcmf_selfRefresh() throws Exception {
579:                if (this .pdm_callback == null)
580:                    return;
581:
582:                this .pcmf_setValue(this .pdm_callback
583:                        .pcmf_getObj(this .pdm_cbParam));
584:
585:                if (this .pdm_doRefresh)
586:                    this .pcmf_setRefresh();
587:
588:                return;
589:            };
590:
591:            public IUnApplication pcmf_getAppl() {
592:                if (this .pem_appl == null)
593:                    return ((IUnApplication) KeRegisteredObject
594:                            .pcmf_getObjByName(IUnApplication.MY_APPL));
595:                else
596:                    return (pem_appl);
597:            };
598:
599:            public void pcmf_setAppl(IUnApplication xAppl) {
600:                if (xAppl == this .pem_appl)
601:                    return;
602:
603:                this .pcmf_setPropChanged(true);
604:                pem_appl = xAppl;
605:
606:                return;
607:            };
608:
609:            public void pcmf_setToolTip(String xTip) {
610:                if (xTip == this .pdm_toolTip || xTip != null
611:                        && xTip.equals(this .pdm_toolTip))
612:                    return;
613:
614:                this .pcmf_setPropChanged(true);
615:                this .pdm_toolTip = xTip;
616:
617:                return;
618:            };
619:
620:            public String pcmf_getToolTip() {
621:                return (this .pdm_toolTip);
622:            };
623:
624:            public void pcmf_setFgColor(String xCol) {
625:                this .pdm_colorSet = true;
626:
627:                if (this .pem_fgColor.equals(xCol) == true)
628:                    return;
629:
630:                this .pcmf_setPropChanged(true);
631:                this .pem_fgColor = xCol;
632:
633:                return;
634:            };
635:
636:            public String pcmf_getFgColor() {
637:                // @@
638:                return (this .pem_fgColor);
639:                // @@
640:            };
641:
642:            public void pcmf_setBgColor(String xCol) {
643:                this .pdm_colorSet = true;
644:
645:                if (this .pem_bgColor.equals(xCol) == true)
646:                    return;
647:
648:                this .pcmf_setPropChanged(true);
649:                this .pem_bgColor = xCol;
650:
651:                return;
652:            };
653:
654:            public String pcmf_getBgColor() {
655:                // @@
656:                return (this .pem_bgColor);
657:                // @@
658:            };
659:
660:            public void pcmf_repaint() {
661:                this .pcmf_setPropChanged(true);
662:                return;
663:            };
664:
665:            public void pcmf_draw() {
666:                this .pcmf_setPropChanged(true);
667:                return;
668:            };
669:
670:            public IMoValue pcmf_setModel(IMoValue xModel) {
671:                IMoValue l_ret = this .pem_model;
672:                this .pem_model = xModel;
673:                return (l_ret);
674:            };
675:
676:            public IMoValue pcmf_getModel() {
677:                return (this .pem_model);
678:            };
679:
680:            public IMoValue pcmf_setModelTpl(IMoValue xModel) {
681:                IMoValue l_ret = this .pem_modelTpl;
682:                this .pem_modelTpl = xModel;
683:                return (l_ret);
684:            };
685:
686:            public IMoValue pcmf_getModelTpl() {
687:                return (this .pem_modelTpl);
688:            };
689:
690:            public IMoValue pcmf_newModelValue(String xName, boolean xChilds) {
691:                return (this .pcmf_newModelValue(xName, xChilds, false));
692:            };
693:
694:            public IMoValue pcmf_newModelValue(String xName, boolean xChilds,
695:                    boolean xFull) {
696:                if (this .pem_modelTpl == null
697:                        || this .pem_modelTpl instanceof  IMoSingleValue)
698:                    return (null);
699:
700:                IMoValue l_mod = null;
701:
702:                try {
703:                    IMoValue l_val = ((IMoValueContainer) this .pem_modelTpl)
704:                            .pcmf_getModelValue(xName);
705:                    if (l_val == null) {
706:                        KeLog.pcmf_log("ug2t",
707:                                "this model-value-type is not allowed: "
708:                                        + xName, this , KeLog.ERROR);
709:                        return (null);
710:                    }
711:                    l_mod = l_val.pcmf_cloneModelValue(xChilds, xFull);
712:                    l_mod.pcmf_setMyTemplate(xName);
713:                    l_mod.pcmf_setMyTemplateObj(l_val);
714:                } catch (Exception e) {
715:                    KeLog.pcmf_logException("ug2t", this , e);
716:                }
717:                ;
718:
719:                return (l_mod);
720:            };
721:
722:            public void pcmf_setFont(UnFontDescriptor xFont) {
723:                if (xFont != null)
724:                    this .pdm_fontSet = true;
725:                else
726:                    this .pdm_fontSet = false;
727:
728:                if (xFont == this .pdm_font)
729:                    return;
730:
731:                this .pcmf_setPropChanged(true);
732:                if (this .pdm_font != null)
733:                    this .pdm_font.pcmf_detach();
734:
735:                this .pdm_font = xFont;
736:                this .pdm_font.pcmf_attach();
737:            }
738:
739:            public UnFontDescriptor pcmf_getFont() {
740:                // @@
741:                return (this .pdm_font);
742:                // @@
743:            }
744:
745:            public void pcmf_requestFocus() {
746:                this .pcmf_setPropChanged(true);
747:                this .pdm_setFocus = true;
748:            };
749:
750:            public boolean pcmf_readFocusRequest() {
751:                boolean l_foc = this .pdm_setFocus;
752:                this .pdm_setFocus = false;
753:                return (l_foc);
754:            };
755:
756:            public void pcmf_setCursor(String xCursor) {
757:                if (xCursor == this .pem_cursor || xCursor != null
758:                        && xCursor.equals(this .pem_cursor))
759:                    return;
760:
761:                this .pem_cursor = xCursor;
762:                this .pcmf_setPropChanged(true);
763:            }
764:
765:            public String pcmf_getCurser() {
766:                return (this .pem_cursor);
767:            }
768:
769:            public void pcmf_setBorder(int xBorder, String xColor, int xWidth) {
770:                if (xBorder != UnComponent.NO_BORDER && xWidth > 0)
771:                    this .pdm_borderSet = true;
772:                else
773:                    this .pdm_borderSet = false;
774:
775:                if (this .pem_border == xBorder
776:                        && xColor.equals(this .pem_borderColor)
777:                        && xWidth == this .pem_borderWidth)
778:                    return;
779:
780:                this .pcmf_setPropChanged(true);
781:                this .pem_border = xBorder;
782:                this .pem_borderColor = xColor;
783:                this .pem_borderWidth = xWidth;
784:            }
785:
786:            public int pcmf_getBorder() {
787:                // @@
788:                return (this .pem_border);
789:                // @@
790:            }
791:
792:            public String pcmf_getBorderColor() {
793:                // @@
794:                return (this .pem_borderColor);
795:                // @@
796:            }
797:
798:            public int pcmf_getBorderWidth() {
799:                // @@
800:                return (this .pem_borderWidth);
801:                // @@
802:            }
803:
804:            public void pcmf_delete() throws Exception {
805:                if (this .pdm_deleted == true)
806:                    return;
807:
808:                if (this .pdm_font != null) {
809:                    this .pdm_font.pcmf_detach();
810:                    this .pdm_font.pcmf_delete();
811:                }
812:                this .pem_appl = null;
813:                super .pcmf_delete();
814:            }
815:
816:            // @@
817:
818:            public void pcmf_setWidgetValue(Object xObj) {
819:                this .pcmf_setValue(xObj);
820:            }
821:
822:            public void pcmf_setRenderIfHidden(boolean xRiH) {
823:                if (xRiH == this .pem_renderIfHidden)
824:                    return;
825:
826:                this .pcmf_setPropChanged(true);
827:
828:                if (xRiH && this .pcmf_getParentNode() != null) {
829:                    KeLog
830:                            .pcmf_log(
831:                                    "ug2t",
832:                                    "can not change renderIfHidden flag if the widget has a parent already",
833:                                    this , KeLog.ERROR);
834:                    return;
835:                }
836:                this .pem_renderIfHidden = xRiH;
837:            }
838:
839:            public boolean pcmf_getRenderIfHidden() {
840:                return (this .pem_renderIfHidden);
841:            }
842:
843:            public void pcmf_setCssClass(String xClass) {
844:                if (xClass != this .pem_class || xClass != null
845:                        && xClass.equals(this .pem_class) == false) {
846:                    this .pem_class = xClass;
847:                    this .pcmf_setPropChanged(true);
848:                }
849:
850:                return;
851:            }
852:
853:            public String pcmf_getCssClass() {
854:                return (pem_class);
855:            }
856:
857:            public void pcmf_setTakeMaxSpace(boolean xSpace) {
858:                if (this .pdm_getMaxSpace == xSpace)
859:                    return;
860:
861:                this .pdm_getMaxSpace = xSpace;
862:            }
863:
864:            public boolean pcmf_getTakeMaxSpace() {
865:                return (this .pdm_getMaxSpace);
866:            }
867:
868:            public void pcmf_consumeEvent() {
869:                this .pem_eventConsumed = true;
870:            }
871:
872:            public void pcmf_setIterativeEventLatency(int xLatency) {
873:                KeLog.pcmf_logNotSupported("pcmf_setIterativeEventLatency");
874:            }
875:
876:            public int pcmf_getIterativeEventLatency() {
877:                return (-1);
878:            }
879:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.