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


0001:        // @@
0002:        // @@
0003:        /*
0004:         * Wi.Ser Framework
0005:         *
0006:         * LGPL Version: 1.8.1, 20-September-2007  
0007:         * Copyright (C) 2005-2006 Dirk von der Weiden <dvdw@imail.de>
0008:         *
0009:         * This library is free software; you can redistribute it and/or
0010:         * modify it under the terms of the GNU Lesser General Public
0011:         * License as published by the Free Software Foundation; either
0012:         * version 2 of the License, or (at your option) any later version.
0013:         *
0014:         * This library is distributed in the hope that it will be useful,
0015:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
0016:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0017:         * Lesser General Public License for more details.
0018:         *
0019:         * You should have received a copy of the GNU Lesser General Public
0020:         * License along with this library located in LGPL.txt in the 
0021:         * license directory; if not, write to the 
0022:         * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
0023:         * Boston, MA  02111-1307, USA.
0024:         * 
0025:         * If this agreement does not cover your requirements, please contact us
0026:         * via email to get detailed information about the commercial license 
0027:         * or our service offerings!
0028:         *
0029:         */
0030:        // @@
0031:        package de.ug2t.channel.ho.server.generic;
0032:
0033:        import java.util.*;
0034:
0035:        import de.ug2t.channel.ho.*;
0036:        import de.ug2t.kernel.*;
0037:        import de.ug2t.unifiedGui.*;
0038:        import de.ug2t.unifiedGui.interfaces.*;
0039:        import de.ug2t.xmlScript.*;
0040:
0041:        public final class HoSrvGenericTable extends AHoSrvGenericComponent
0042:                implements  IUnTable {
0043:            private boolean pem_sel;
0044:            private ArrayList pem_header = null;
0045:            private ArrayList pem_rows = null;
0046:            private char pem_sep = '^';
0047:            private int pem_spacing = 0;
0048:            private int pem_padding = 0;
0049:            private int pem_tableBorder = 0;
0050:            private boolean pem_multiSelection = false;
0051:            private HoGenericDataContainer pem_container = null;
0052:            private int pem_xScroll = 0;
0053:            private int pem_yScroll = 0;
0054:            private IKeExecutable pem_cHandler = null;
0055:            private ArrayList pem_hidden = null;
0056:
0057:            public void pcmf_hideRow(int xRow) {
0058:                if (xRow == 0)
0059:                    return;
0060:
0061:                if (this .pem_hidden == null)
0062:                    this .pem_hidden = new ArrayList();
0063:
0064:                this .pem_hidden.add(this .pem_rows.get(xRow - 1));
0065:
0066:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
0067:                        "");
0068:
0069:                if (this .pdm_session.pcmf_isInTransaction()) {
0070:                    ScXmlScript.pcmf_createPBody(l_remCall);
0071:                } else {
0072:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
0073:                    ScXmlScript.pcmf_addProc(l_remCall, null);
0074:                }
0075:                ;
0076:                ScXmlScript.pcmf_addCall(l_remCall, null, this 
0077:                        .pcmf_getRemName(), "pcmf_hideRow");
0078:                ScXmlScript.pcmf_addCallPar(l_remCall, Integer
0079:                        .toString(xRow - 1), "false", "int");
0080:                ScXmlScript.pcmf_endAll(l_remCall);
0081:
0082:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
0083:            };
0084:
0085:            public boolean pcmf_isHiddenRow(int xRow) {
0086:                if (this .pem_hidden == null || xRow == 0)
0087:                    return (false);
0088:
0089:                return (this .pem_hidden.contains(this .pem_rows.get(xRow - 1)));
0090:            }
0091:
0092:            public void pcmf_unHideRow(int xRow) {
0093:                if (this .pem_hidden == null || xRow == 0)
0094:                    return;
0095:
0096:                this .pem_hidden.remove(this .pem_rows.get(xRow - 1));
0097:
0098:                if (this .pem_hidden.size() == 0)
0099:                    this .pem_hidden = null;
0100:
0101:                if (this .pem_hidden == null)
0102:                    this .pem_hidden = new ArrayList();
0103:
0104:                this .pem_hidden.add(this .pem_rows.get(xRow - 1));
0105:
0106:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
0107:                        "");
0108:
0109:                if (this .pdm_session.pcmf_isInTransaction()) {
0110:                    ScXmlScript.pcmf_createPBody(l_remCall);
0111:                } else {
0112:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
0113:                    ScXmlScript.pcmf_addProc(l_remCall, null);
0114:                }
0115:                ;
0116:                ScXmlScript.pcmf_addCall(l_remCall, null, this 
0117:                        .pcmf_getRemName(), "pcmf_unHideRow");
0118:                ScXmlScript.pcmf_addCallPar(l_remCall, Integer
0119:                        .toString(xRow - 1), "false", "int");
0120:                ScXmlScript.pcmf_endAll(l_remCall);
0121:
0122:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
0123:            };
0124:
0125:            public boolean pcmf_setMultiSelection(boolean xMulti) {
0126:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
0127:                        "");
0128:
0129:                if (xMulti == true && this .pem_container == null)
0130:                    this .pem_container = new HoGenericDataContainer();
0131:
0132:                if (this .pdm_session.pcmf_isInTransaction()) {
0133:                    ScXmlScript.pcmf_createPBody(l_remCall);
0134:                } else {
0135:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
0136:                    ScXmlScript.pcmf_addProc(l_remCall, null);
0137:                }
0138:                ;
0139:                ScXmlScript.pcmf_addCall(l_remCall, null, this 
0140:                        .pcmf_getRemName(), "pcmf_setMultiSelection");
0141:
0142:                if (xMulti == true)
0143:                    ScXmlScript.pcmf_addCallPar(l_remCall, this .pem_container
0144:                            .pcmf_getRemName(), "true",
0145:                            "de.ug2t.channel.ho.HoGenericDataContainer");
0146:                else
0147:                    ScXmlScript.pcmf_addCallPar(l_remCall, "false", "false",
0148:                            "boolean");
0149:
0150:                ScXmlScript.pcmf_endAll(l_remCall);
0151:
0152:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
0153:
0154:                boolean l_old = this .pem_multiSelection;
0155:                this .pem_multiSelection = xMulti;
0156:
0157:                return (l_old);
0158:            };
0159:
0160:            public boolean pcmf_isMultiSelection() {
0161:                return (this .pem_multiSelection);
0162:            }
0163:
0164:            public void pcmf_setValues(HoGenericDataContainer xValues) {
0165:                this .pcmf_setValue(xValues);
0166:            }
0167:
0168:            public void pcmf_clearSelection() {
0169:                if (this .pem_multiSelection)
0170:                    this .pem_container.pcmf_clearValues();
0171:
0172:                super .pcmf_setValue("");
0173:            }
0174:
0175:            public void pcmf_setValue(Object xObj) {
0176:                Object l_obj = null;
0177:
0178:                if (xObj != null
0179:                        && xObj instanceof  HoGenericDataContainer == false) {
0180:                    l_obj = KeRegisteredObject.pcmf_getObjByLongName(xObj
0181:                            .toString());
0182:                    if (l_obj != null)
0183:                        xObj = l_obj;
0184:                }
0185:
0186:                super .pcmf_setValue(xObj);
0187:
0188:                return;
0189:            };
0190:
0191:            public void pcmf_setLocalValue(Object xValue) {
0192:                Object l_obj = null;
0193:
0194:                if (xValue instanceof  HoGenericDataContainer == false)
0195:                    l_obj = KeRegisteredObject.pcmf_getObjByLongName(xValue
0196:                            .toString());
0197:
0198:                if (l_obj != null)
0199:                    xValue = l_obj;
0200:
0201:                super .pcmf_setLocalValue(xValue);
0202:
0203:                return;
0204:            };
0205:
0206:            public void pcmf_echoValue(Object xValue) {
0207:                Object l_obj = null;
0208:
0209:                if (xValue instanceof  HoGenericDataContainer == false)
0210:                    l_obj = KeRegisteredObject.pcmf_getObjByLongName(xValue
0211:                            .toString());
0212:
0213:                if (l_obj != null)
0214:                    xValue = l_obj;
0215:
0216:                if (xValue instanceof  HoGenericDataContainer)
0217:                    ((HoGenericDataContainer) xValue).pcmf_echoValues();
0218:
0219:                super .pcmf_echoValue(xValue);
0220:            }
0221:
0222:            public HoSrvGenericTable(String xName, Collection xRows,
0223:                    boolean xSel, IUnApplication xAppl, String xClass)
0224:                    throws Exception {
0225:                super (xName);
0226:                this .pcmf_setAppl(xAppl);
0227:                this .pem_sel = xSel;
0228:
0229:                ArrayList l_header = null;
0230:                ArrayList l_row = null;
0231:                ArrayList l_rows = new ArrayList();
0232:
0233:                Iterator l_it = null;
0234:
0235:                if (xClass == null)
0236:                    pdm_clientClass = "de.ug2t.channel.ho.client.swing.HoSwingTable";
0237:                else
0238:                    pdm_clientClass = xClass;
0239:
0240:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
0241:                        "");
0242:                // Deklaration
0243:                if (this .pdm_session.pcmf_isInTransaction()) {
0244:                    ScXmlScript.pcmf_createPBody(l_remCall);
0245:                } else {
0246:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
0247:                    ScXmlScript.pcmf_addProc(l_remCall, null);
0248:                }
0249:                ;
0250:                ScXmlScript.pcmf_addDecl(l_remCall, this .pcmf_getRemName(),
0251:                        "de.ug2t.channel.ho.client.swing.HoSwingTable",
0252:                        "global");
0253:                ScXmlScript.pcmf_addDeclPar(l_remCall, xName, "false",
0254:                        "java.lang.String");
0255:                ScXmlScript.pcmf_addDeclPar(l_remCall, xSel ? "true" : "false",
0256:                        "false", "boolean");
0257:                ScXmlScript.pcmf_addDeclPar(l_remCall,
0258:                        ((HoSrvGenericApplication) xAppl).pcmf_getRemName(),
0259:                        "true", "de.ug2t.unifiedGui.interfaces.IUnApplication");
0260:                ScXmlScript.pcmf_endDeclPar(l_remCall);
0261:                ScXmlScript.pcmf_endDecl(l_remCall);
0262:
0263:                // Zeilen einfügen
0264:                if (xRows != null) {
0265:                    l_it = xRows.iterator();
0266:                    l_header = new ArrayList((Collection) l_it.next());
0267:
0268:                    // Header setzen
0269:                    ScXmlScript.pcmf_addCall(l_remCall, null, this 
0270:                            .pcmf_getRemName(), "pcmf_setHeader");
0271:                    ScXmlScript.pcmf_addCallPar(l_remCall, this 
0272:                            .pcmf_col2String(l_header), "false",
0273:                            "java.lang.String");
0274:                    ScXmlScript.pcmf_endCallPar(l_remCall);
0275:                    ScXmlScript.pcmf_endCall(l_remCall);
0276:
0277:                    while (l_it.hasNext()) {
0278:                        l_row = new ArrayList((Collection) l_it.next());
0279:                        l_rows.add(l_row);
0280:
0281:                        ScXmlScript.pcmf_addCall(l_remCall, null, this 
0282:                                .pcmf_getRemName(), "pcmf_addRow");
0283:                        ScXmlScript.pcmf_addCallPar(l_remCall, this 
0284:                                .pcmf_col2String(l_row), "false",
0285:                                "java.lang.String");
0286:                        ScXmlScript.pcmf_endCallPar(l_remCall);
0287:                        ScXmlScript.pcmf_endCall(l_remCall);
0288:                    }
0289:                    ;
0290:
0291:                    // Commit
0292:                    ScXmlScript.pcmf_addCall(l_remCall, null, this 
0293:                            .pcmf_getRemName(), "pcmf_commitTable");
0294:                }
0295:                ;
0296:
0297:                ScXmlScript.pcmf_endAll(l_remCall);
0298:
0299:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
0300:
0301:                this .pem_header = l_header;
0302:                this .pem_rows = l_rows;
0303:            };
0304:
0305:            private String pcmf_col2String(ArrayList xCol) {
0306:                Iterator l_it = xCol.iterator();
0307:                StringBuffer l_res = new StringBuffer(xCol.size() * 80);
0308:                Object l_obj = null;
0309:                String l_el = null;
0310:                String l_remName = null;
0311:
0312:                while (l_it.hasNext()) {
0313:                    l_obj = l_it.next();
0314:
0315:                    if (l_obj == null)
0316:                        l_obj = "NULL";
0317:
0318:                    if (l_obj instanceof  HoGenericTreeNode
0319:                            || l_obj instanceof  AHoSrvGenericComponent) {
0320:                        l_remName = ((KeRegisteredObject) l_obj)
0321:                                .pcmf_getRemName();
0322:                        if (l_remName == null)
0323:                            l_el = l_obj.toString();
0324:                        else
0325:                            l_el = "~" + l_remName;
0326:                    } else {
0327:                        l_el = l_obj.toString();
0328:                        if (l_el.equals(""))
0329:                            l_el = " ";
0330:                    }
0331:
0332:                    l_el.replace(pem_sep, '°');
0333:
0334:                    l_res.append(l_el);
0335:                    if (l_it.hasNext())
0336:                        l_res.append(pem_sep);
0337:                }
0338:                ;
0339:
0340:                return (l_res.toString());
0341:            };
0342:
0343:            public void pcmf_setSpacing(int xSpace) {
0344:                this .pem_spacing = xSpace;
0345:
0346:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
0347:                        "");
0348:
0349:                if (this .pdm_session.pcmf_isInTransaction()) {
0350:                    ScXmlScript.pcmf_createPBody(l_remCall);
0351:                } else {
0352:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
0353:                    ScXmlScript.pcmf_addProc(l_remCall, null);
0354:                }
0355:                ;
0356:                ScXmlScript.pcmf_addCall(l_remCall, null, this 
0357:                        .pcmf_getRemName(), "pcmf_setSpacing");
0358:                ScXmlScript.pcmf_addCallPar(l_remCall,
0359:                        Integer.toString(xSpace), "false", "int");
0360:                ScXmlScript.pcmf_endAll(l_remCall);
0361:
0362:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
0363:
0364:                return;
0365:            };
0366:
0367:            public int pcmf_getSpacing() {
0368:                return (this .pem_spacing);
0369:            }
0370:
0371:            public int pcmf_getPadding() {
0372:                return (this .pem_padding);
0373:            }
0374:
0375:            public int pcmf_getTableBorder() {
0376:                return (this .pem_tableBorder);
0377:            }
0378:
0379:            public void pcmf_setPadding(int xPad) {
0380:                this .pem_padding = xPad;
0381:
0382:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
0383:                        "");
0384:
0385:                if (this .pdm_session.pcmf_isInTransaction()) {
0386:                    ScXmlScript.pcmf_createPBody(l_remCall);
0387:                } else {
0388:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
0389:                    ScXmlScript.pcmf_addProc(l_remCall, null);
0390:                }
0391:                ;
0392:                ScXmlScript.pcmf_addCall(l_remCall, null, this 
0393:                        .pcmf_getRemName(), "pcmf_setPadding");
0394:                ScXmlScript.pcmf_addCallPar(l_remCall, Integer.toString(xPad),
0395:                        "false", "int");
0396:                ScXmlScript.pcmf_endAll(l_remCall);
0397:
0398:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
0399:
0400:                return;
0401:            };
0402:
0403:            public void pcmf_setTableBorder(int xBorder) {
0404:                this .pem_tableBorder = xBorder;
0405:
0406:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
0407:                        "");
0408:
0409:                if (this .pdm_session.pcmf_isInTransaction()) {
0410:                    ScXmlScript.pcmf_createPBody(l_remCall);
0411:                } else {
0412:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
0413:                    ScXmlScript.pcmf_addProc(l_remCall, null);
0414:                }
0415:                ;
0416:                ScXmlScript.pcmf_addCall(l_remCall, null, this 
0417:                        .pcmf_getRemName(), "pcmf_setTableBorder");
0418:                ScXmlScript.pcmf_addCallPar(l_remCall, Integer
0419:                        .toString(xBorder), "false", "int");
0420:                ScXmlScript.pcmf_endAll(l_remCall);
0421:
0422:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
0423:            };
0424:
0425:            public void pcmf_setClass(String xClass) {
0426:                return;
0427:            };
0428:
0429:            public Iterator pcmf_getRows() {
0430:                ArrayList l_rows = new ArrayList(this .pem_header);
0431:                l_rows.addAll(this .pem_rows);
0432:
0433:                return (l_rows.iterator());
0434:            };
0435:
0436:            public void pcmf_refresh(Collection xRows) {
0437:                ArrayList l_row = null;
0438:                ArrayList l_rows = new ArrayList();
0439:
0440:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
0441:                        "");
0442:
0443:                if (this .pdm_session.pcmf_isInTransaction()) {
0444:                    ScXmlScript.pcmf_createPBody(l_remCall);
0445:                } else {
0446:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
0447:                    ScXmlScript.pcmf_addProc(l_remCall, null);
0448:                }
0449:                ;
0450:                ScXmlScript.pcmf_addCall(l_remCall, null, this 
0451:                        .pcmf_getRemName(), "pcmf_clearModel");
0452:                ScXmlScript.pcmf_endCallPar(l_remCall);
0453:                ScXmlScript.pcmf_endCall(l_remCall);
0454:
0455:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
0456:
0457:                this .pem_rows.clear();
0458:
0459:                Iterator l_it = xRows.iterator();
0460:
0461:                pem_header = new ArrayList((Collection) l_it.next());
0462:                this .pcmf_addRowRemote(pem_header);
0463:
0464:                while (l_it.hasNext()) {
0465:                    l_row = new ArrayList((Collection) l_it.next());
0466:                    l_rows.add(l_row);
0467:                    this .pcmf_addRow(l_row);
0468:                }
0469:                ;
0470:
0471:                this .pcmf_commitTable();
0472:
0473:                return;
0474:            };
0475:
0476:            public void pcmf_refresh() {
0477:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
0478:                        "");
0479:
0480:                if (this .pdm_session.pcmf_isInTransaction()) {
0481:                    ScXmlScript.pcmf_createPBody(l_remCall);
0482:                } else {
0483:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
0484:                    ScXmlScript.pcmf_addProc(l_remCall, null);
0485:                }
0486:                ;
0487:                ScXmlScript.pcmf_addCall(l_remCall, null, this 
0488:                        .pcmf_getRemName(), "pcmf_clearModel");
0489:                ScXmlScript.pcmf_endCallPar(l_remCall);
0490:                ScXmlScript.pcmf_endCall(l_remCall);
0491:
0492:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
0493:
0494:                Iterator l_it = this .pem_rows.iterator();
0495:
0496:                this .pcmf_addRowRemote(pem_header);
0497:
0498:                while (l_it.hasNext()) {
0499:                    this .pcmf_addRowRemote((Collection) l_it.next());
0500:                }
0501:                ;
0502:
0503:                this .pcmf_commitTable();
0504:
0505:                return;
0506:            };
0507:
0508:            public void pcmf_addRow(Collection xRow) {
0509:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
0510:                        "");
0511:
0512:                if (this .pdm_session.pcmf_isInTransaction()) {
0513:                    ScXmlScript.pcmf_createPBody(l_remCall);
0514:                } else {
0515:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
0516:                    ScXmlScript.pcmf_addProc(l_remCall, null);
0517:                }
0518:                ;
0519:                ScXmlScript.pcmf_addCall(l_remCall, null, this 
0520:                        .pcmf_getRemName(), "pcmf_addRow");
0521:                ScXmlScript.pcmf_addCallPar(l_remCall, this 
0522:                        .pcmf_col2String(new ArrayList(xRow)), "false",
0523:                        "java.lang.String");
0524:                ScXmlScript.pcmf_endAll(l_remCall);
0525:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
0526:
0527:                if (this .pem_header == null)
0528:                    this .pem_header = new ArrayList(xRow);
0529:                else
0530:                    this .pem_rows.add(new ArrayList(xRow));
0531:
0532:                return;
0533:            };
0534:
0535:            public void pcmf_addRow(Collection xRow, int xIdx) {
0536:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
0537:                        "");
0538:
0539:                if (this .pdm_session.pcmf_isInTransaction()) {
0540:                    ScXmlScript.pcmf_createPBody(l_remCall);
0541:                } else {
0542:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
0543:                    ScXmlScript.pcmf_addProc(l_remCall, null);
0544:                }
0545:                ;
0546:                ScXmlScript.pcmf_addCall(l_remCall, null, this 
0547:                        .pcmf_getRemName(), "pcmf_addRow");
0548:                ScXmlScript.pcmf_addCallPar(l_remCall, this 
0549:                        .pcmf_col2String(new ArrayList(xRow)), "false",
0550:                        "java.lang.String");
0551:                ScXmlScript.pcmf_addCallPar(l_remCall, Integer.toString(xIdx),
0552:                        "false", "int");
0553:                ScXmlScript.pcmf_endAll(l_remCall);
0554:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
0555:
0556:                if (xIdx == 0)
0557:                    this .pem_header = new ArrayList(xRow);
0558:                else
0559:                    this .pem_rows.add(xIdx - 1, new ArrayList(xRow));
0560:
0561:                return;
0562:            };
0563:
0564:            public void pcmf_addRowRemote(Collection xRow) {
0565:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
0566:                        "");
0567:
0568:                if (this .pdm_session.pcmf_isInTransaction()) {
0569:                    ScXmlScript.pcmf_createPBody(l_remCall);
0570:                } else {
0571:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
0572:                    ScXmlScript.pcmf_addProc(l_remCall, null);
0573:                }
0574:                ;
0575:                ScXmlScript.pcmf_addCall(l_remCall, null, this 
0576:                        .pcmf_getRemName(), "pcmf_addRow");
0577:                ScXmlScript.pcmf_addCallPar(l_remCall, this 
0578:                        .pcmf_col2String(new ArrayList(xRow)), "false",
0579:                        "java.lang.String");
0580:                ScXmlScript.pcmf_endAll(l_remCall);
0581:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
0582:
0583:                return;
0584:            };
0585:
0586:            public Collection pcmf_removeRow(int xIdx) {
0587:                Collection l_ret = null;
0588:                if (xIdx == 0) {
0589:                    l_ret = this .pem_header;
0590:                    this .pem_header = (ArrayList) this .pem_rows.get(0);
0591:                    this .pem_rows.remove(0);
0592:                } else {
0593:                    l_ret = (Collection) this .pem_rows.get(xIdx - 1);
0594:                    this .pem_rows.remove(xIdx - 1);
0595:                }
0596:                ;
0597:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
0598:                        "");
0599:
0600:                if (this .pdm_session.pcmf_isInTransaction()) {
0601:                    ScXmlScript.pcmf_createPBody(l_remCall);
0602:                } else {
0603:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
0604:                    ScXmlScript.pcmf_addProc(l_remCall, null);
0605:                }
0606:                ;
0607:                ScXmlScript.pcmf_addCall(l_remCall, null, this 
0608:                        .pcmf_getRemName(), "pcmf_removeRow");
0609:                ScXmlScript.pcmf_addCallPar(l_remCall, Integer.toString(xIdx),
0610:                        "false", "int");
0611:                ScXmlScript.pcmf_endCallPar(l_remCall);
0612:                ScXmlScript.pcmf_endCall(l_remCall);
0613:
0614:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
0615:
0616:                return (l_ret);
0617:            };
0618:
0619:            public Object pcmf_getCellValue(int xRow, int xCol) {
0620:                if (xRow == 0)
0621:                    return (this .pem_header.get(xCol));
0622:                else
0623:                    return ((ArrayList) this .pem_rows.get(xRow - 1)).get(xCol);
0624:            };
0625:
0626:            public Object pcmf_modCell(int xRow, int xCol, Object xObj) {
0627:                Object l_ret = null;
0628:
0629:                if (xRow == 0) {
0630:                    l_ret = this .pem_header.get(xCol);
0631:                    this .pem_header.set(xCol, xObj);
0632:                } else {
0633:                    l_ret = ((ArrayList) this .pem_rows.get(xRow - 1)).get(xCol);
0634:                    ((ArrayList) this .pem_rows.get(xRow - 1)).set(xCol, xObj);
0635:                }
0636:                ;
0637:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
0638:                        "");
0639:
0640:                if (this .pdm_session.pcmf_isInTransaction()) {
0641:                    ScXmlScript.pcmf_createPBody(l_remCall);
0642:                } else {
0643:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
0644:                    ScXmlScript.pcmf_addProc(l_remCall, null);
0645:                }
0646:                ;
0647:                ScXmlScript.pcmf_addCall(l_remCall, null, this 
0648:                        .pcmf_getRemName(), "pcmf_modCell");
0649:                ScXmlScript.pcmf_addCallPar(l_remCall, Integer.toString(xRow),
0650:                        "false", "int");
0651:                ScXmlScript.pcmf_addCallPar(l_remCall, Integer.toString(xCol),
0652:                        "false", "int");
0653:
0654:                if (xObj instanceof  KeRegisteredObject
0655:                        && ((KeRegisteredObject) xObj).pcmf_isRemoted())
0656:                    ScXmlScript.pcmf_addCallPar(l_remCall,
0657:                            ((KeRegisteredObject) xObj).pcmf_getRemName(),
0658:                            "true", "java.lang.Object");
0659:                else
0660:                    ScXmlScript.pcmf_addCallPar(l_remCall, xObj.toString(),
0661:                            "false", "java.lang.String");
0662:
0663:                ScXmlScript.pcmf_endCallPar(l_remCall);
0664:                ScXmlScript.pcmf_endCall(l_remCall);
0665:
0666:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
0667:
0668:                return (l_ret);
0669:            };
0670:
0671:            public AHoSrvGenericComponent pcmf_buildRefObj() throws Exception {
0672:                ArrayList l_el = null;
0673:
0674:                if (this .pem_header != null) {
0675:                    l_el = new ArrayList();
0676:                    l_el.add(this .pem_header);
0677:                    if (this .pem_rows != null)
0678:                        l_el.addAll(this .pem_rows);
0679:                }
0680:                ;
0681:                HoSrvGenericTable l_obj = new HoSrvGenericTable(this 
0682:                        .pcmf_getName(), l_el, pem_sel, this .pcmf_getAppl(),
0683:                        this .pdm_clientClass);
0684:
0685:                l_obj.pcmf_setGlobal(true);
0686:                this .pcmf_setGlobal(true);
0687:                l_obj.pcmf_setAutoEcho(this .pcmf_doAutoEcho());
0688:                l_obj.pcmf_setRefFrom(this );
0689:                this .pcmf_addRef(l_obj);
0690:
0691:                return (l_obj);
0692:            };
0693:
0694:            public void pcmf_selfRefresh() {
0695:                int rowcnt = 0;
0696:                Collection newrow = null;
0697:                Object rawrow = null;
0698:
0699:                if (this .pdm_callback == null)
0700:                    return;
0701:
0702:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
0703:                        "");
0704:
0705:                if (this .pdm_session.pcmf_isInTransaction()) {
0706:                    ScXmlScript.pcmf_createPBody(l_remCall);
0707:                } else {
0708:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
0709:                    ScXmlScript.pcmf_addProc(l_remCall, null);
0710:                }
0711:                ;
0712:                ScXmlScript.pcmf_addCall(l_remCall, null, this 
0713:                        .pcmf_getRemName(), "pcmf_clearModel");
0714:                ScXmlScript.pcmf_endCallPar(l_remCall);
0715:                ScXmlScript.pcmf_endCall(l_remCall);
0716:
0717:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
0718:
0719:                while (true) {
0720:                    try {
0721:                        rawrow = this .pdm_callback.pcmf_getObj(rowcnt++);
0722:                    } catch (Exception e) {
0723:                        rawrow = null;
0724:                    }
0725:                    ;
0726:                    if (rawrow == null)
0727:                        break;
0728:
0729:                    if (rawrow instanceof  Collection)
0730:                        newrow = (Collection) rawrow;
0731:                    else {
0732:                        newrow = new ArrayList();
0733:                        newrow.add(rawrow);
0734:                    }
0735:                    ;
0736:
0737:                    this .pcmf_addRow(newrow);
0738:                }
0739:                ;
0740:
0741:                if (this .pdm_doRefresh)
0742:                    this .pcmf_setRefresh();
0743:
0744:                this .pcmf_commitTable();
0745:
0746:                return;
0747:            };
0748:
0749:            public void pcmf_setCommitHandler(IKeExecutable xHandler) {
0750:                this .pem_cHandler = xHandler;
0751:            }
0752:
0753:            public void pcmf_clearCommitHandler() {
0754:                this .pem_cHandler = null;
0755:            }
0756:
0757:            public void pcmf_commitTable() {
0758:                if (this .pem_cHandler != null)
0759:                    this .pem_cHandler.pcmf_execObj(this );
0760:
0761:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
0762:                        "");
0763:
0764:                if (this .pdm_session.pcmf_isInTransaction()) {
0765:                    ScXmlScript.pcmf_createPBody(l_remCall);
0766:                } else {
0767:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
0768:                    ScXmlScript.pcmf_addProc(l_remCall, null);
0769:                }
0770:                ;
0771:                ScXmlScript.pcmf_addCall(l_remCall, null, this 
0772:                        .pcmf_getRemName(), "pcmf_commitTable");
0773:                ScXmlScript.pcmf_endAll(l_remCall);
0774:
0775:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
0776:
0777:                return;
0778:            };
0779:
0780:            public Object pcmf_getValue() {
0781:                Object l_obj = super .pcmf_getValue();
0782:                if (l_obj instanceof  HoGenericDataContainer) {
0783:                    ArrayList l_vect = ((HoGenericDataContainer) l_obj)
0784:                            .pcmf_getValueArray();
0785:                    if (l_vect.size() > 0)
0786:                        return (l_vect.get(l_vect.size() - 1));
0787:                }
0788:                return (l_obj);
0789:            }
0790:
0791:            public HoGenericDataContainer pcmf_getValues() {
0792:                Object l_obj = super .pcmf_getValue();
0793:                if (l_obj instanceof  HoGenericDataContainer)
0794:                    return (((HoGenericDataContainer) l_obj));
0795:                else
0796:                    return (null);
0797:
0798:            }
0799:
0800:            public void pcmf_setComplete(KeTable xTable) {
0801:                this .pcmf_refresh(xTable.pcmf_getHeaderAndTableValues());
0802:            }
0803:
0804:            public KeTable pcmf_getComplete() {
0805:                KeTable l_ret = new KeTable();
0806:                Iterator l_it = this .pem_rows.iterator();
0807:                int l_row = 1;
0808:
0809:                l_ret.pcmf_setHeader(this .pem_header);
0810:
0811:                while (l_it.hasNext()) {
0812:                    l_ret.pcmf_addRowArrayList((ArrayList) l_it.next());
0813:                    if (this .pcmf_isHiddenRow(l_row))
0814:                        l_ret.pcmf_hideRow(l_row - 1);
0815:
0816:                    l_row++;
0817:                }
0818:
0819:                return (l_ret);
0820:            }
0821:
0822:            public void finalize() throws Throwable {
0823:                try {
0824:                    if (this .pem_container != null)
0825:                        this .pem_container.pcmf_delete();
0826:
0827:                    super .finalize();
0828:                } catch (Exception e) {
0829:                    KeLog.pcmf_logException("ug2t", this , e);
0830:                }
0831:            }
0832:
0833:            public void pcmf_setRowsOnly(Collection xRows) {
0834:                this .pem_rows = new ArrayList(xRows);
0835:                this .pcmf_refresh();
0836:
0837:                return;
0838:            }
0839:
0840:            public void pcmf_setRowsOnly(KeTable xRows) {
0841:                this .pem_rows = new ArrayList(xRows.pcmf_getTableValues());
0842:                this .pcmf_refresh();
0843:
0844:                return;
0845:            }
0846:
0847:            public void pcmf_setHeader(Collection xHead) {
0848:                this .pem_header = new ArrayList(xHead);
0849:                this .pcmf_refresh();
0850:            }
0851:
0852:            public Collection pcmf_getRowsOnly() {
0853:                return (new ArrayList(this .pem_rows));
0854:            }
0855:
0856:            public Collection pcmf_getHeader() {
0857:                if (this .pem_header == null)
0858:                    return (null);
0859:
0860:                return (new ArrayList(this .pem_header));
0861:            }
0862:
0863:            public void pcmf_addRows(Collection xRow) {
0864:                if (this .pem_header == null) {
0865:                    this .pcmf_refresh(xRow);
0866:                    return;
0867:                }
0868:                if (this .pem_rows == null)
0869:                    this .pem_rows = new ArrayList();
0870:
0871:                this .pem_rows.addAll(xRow);
0872:                this .pcmf_refresh();
0873:
0874:                return;
0875:            }
0876:
0877:            public void pcmf_scrollXRel(int xPx) {
0878:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
0879:                        "");
0880:
0881:                if (this .pdm_session.pcmf_isInTransaction()) {
0882:                    ScXmlScript.pcmf_createPBody(l_remCall);
0883:                } else {
0884:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
0885:                    ScXmlScript.pcmf_addProc(l_remCall, null);
0886:                }
0887:                ;
0888:                ScXmlScript.pcmf_addCall(l_remCall, null, this 
0889:                        .pcmf_getRemName(), "pcmf_scrollXRel");
0890:                ScXmlScript.pcmf_addCallPar(l_remCall, Integer.toString(xPx),
0891:                        "false", "int");
0892:                ScXmlScript.pcmf_endAll(l_remCall);
0893:
0894:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
0895:
0896:                return;
0897:            }
0898:
0899:            public void pcmf_scrollXAbs(int xPx) {
0900:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
0901:                        "");
0902:
0903:                if (this .pdm_session.pcmf_isInTransaction()) {
0904:                    ScXmlScript.pcmf_createPBody(l_remCall);
0905:                } else {
0906:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
0907:                    ScXmlScript.pcmf_addProc(l_remCall, null);
0908:                }
0909:                ;
0910:                ScXmlScript.pcmf_addCall(l_remCall, null, this 
0911:                        .pcmf_getRemName(), "pcmf_scrollXAbs");
0912:                ScXmlScript.pcmf_addCallPar(l_remCall, Integer.toString(xPx),
0913:                        "false", "int");
0914:                ScXmlScript.pcmf_endAll(l_remCall);
0915:
0916:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
0917:
0918:                return;
0919:            }
0920:
0921:            public void pcmf_scrollYRel(int xPy) {
0922:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
0923:                        "");
0924:
0925:                if (this .pdm_session.pcmf_isInTransaction()) {
0926:                    ScXmlScript.pcmf_createPBody(l_remCall);
0927:                } else {
0928:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
0929:                    ScXmlScript.pcmf_addProc(l_remCall, null);
0930:                }
0931:                ;
0932:                ScXmlScript.pcmf_addCall(l_remCall, null, this 
0933:                        .pcmf_getRemName(), "pcmf_scrollYRel");
0934:                ScXmlScript.pcmf_addCallPar(l_remCall, Integer.toString(xPy),
0935:                        "false", "int");
0936:                ScXmlScript.pcmf_endAll(l_remCall);
0937:
0938:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
0939:
0940:                return;
0941:            }
0942:
0943:            public void pcmf_scrollYAbs(int xPy) {
0944:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
0945:                        "");
0946:
0947:                if (this .pdm_session.pcmf_isInTransaction()) {
0948:                    ScXmlScript.pcmf_createPBody(l_remCall);
0949:                } else {
0950:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
0951:                    ScXmlScript.pcmf_addProc(l_remCall, null);
0952:                }
0953:                ;
0954:                ScXmlScript.pcmf_addCall(l_remCall, null, this 
0955:                        .pcmf_getRemName(), "pcmf_scrollYAbs");
0956:                ScXmlScript.pcmf_addCallPar(l_remCall, Integer.toString(xPy),
0957:                        "false", "int");
0958:                ScXmlScript.pcmf_endAll(l_remCall);
0959:
0960:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
0961:
0962:                return;
0963:            }
0964:
0965:            public int pcmf_getXScroll() {
0966:                return (this .pem_xScroll);
0967:            }
0968:
0969:            public int pcmf_getYScroll() {
0970:                return (this .pem_yScroll);
0971:            }
0972:
0973:            public ArrayList pcmf_getCol(int xCol) {
0974:                Iterator l_it = this .pem_rows.iterator();
0975:                ArrayList l_ret = new ArrayList(this .pcmf_getColCount());
0976:                l_ret.add(this .pem_header.get(xCol));
0977:                while (l_it.hasNext())
0978:                    l_ret.add(((ArrayList) l_it.next()).get(xCol));
0979:
0980:                return (l_ret);
0981:            }
0982:
0983:            public ArrayList pcmf_getSelectedTableRow() {
0984:                String l_value = this .pcmf_getValue().toString();
0985:                int l_idx = Integer.parseInt(l_value);
0986:
0987:                return ((ArrayList) this .pem_rows.get(l_idx));
0988:            }
0989:
0990:            public ArrayList pcmf_getSelectedTableRows() {
0991:                ArrayList l_ret = new ArrayList();
0992:                HoGenericDataContainer l_rows = this .pcmf_getValues();
0993:
0994:                if (l_rows == null)
0995:                    return (l_ret);
0996:
0997:                Iterator l_it = l_rows.pcmf_getValueIt();
0998:                int l_idx = 0;
0999:
1000:                while (l_it.hasNext()) {
1001:                    l_idx = Integer.parseInt(l_it.next().toString());
1002:                    l_ret.add((ArrayList) this .pem_rows.get(l_idx));
1003:                }
1004:
1005:                return (l_ret);
1006:            }
1007:
1008:            public int pcmf_getRowCount() {
1009:                return (this .pem_rows.size() + 1);
1010:            }
1011:
1012:            public int pcmf_getColCount() {
1013:                if (this .pem_header == null)
1014:                    return (0);
1015:
1016:                return (this .pem_header.size());
1017:            }
1018:
1019:            public void pcmf_clearTableBody() {
1020:                this .pcmf_setRowsOnly(new ArrayList());
1021:            }
1022:
1023:            public Object pcmf_getSelectedObject() {
1024:                return (this .pcmf_getSelectedTableRow());
1025:            }
1026:
1027:            public Object pcmf_setSelectedRow(int xRow) {
1028:                this .pcmf_setSelected(xRow);
1029:                return (this .pcmf_getSelectedTableRow());
1030:            }
1031:
1032:            public ArrayList pcmf_setSelectedRows(int[] xRows) {
1033:                this .pcmf_setSelected(xRows);
1034:                return (this .pcmf_getSelectedTableRows());
1035:            }
1036:
1037:            public void pcmf_setSelected(int xRow) {
1038:                this .pcmf_setValue(Integer.toString(xRow));
1039:            }
1040:
1041:            public void pcmf_setSelected(int[] xRows) {
1042:                HoGenericDataContainer l_cont = this .pcmf_getValues();
1043:                for (int i = 0; i < xRows.length; i++) {
1044:                    l_cont.pcmf_clearValues();
1045:                    l_cont.pcmf_addValue(Integer.toString(xRows[i]));
1046:                }
1047:                this .pcmf_setValues(l_cont);
1048:            }
1049:
1050:            public int pcmf_getSelectedRow() {
1051:                try {
1052:                    return (Integer.parseInt(this .pcmf_getValue().toString()));
1053:                } catch (Exception e) {
1054:                    return (-1);
1055:                }
1056:            }
1057:
1058:            public void pcmf_setCellCssClass(int xRow, int xCol, String xClass) {
1059:                KeLog.pcmf_logNotSupported("pcmf_setCellCssClass");
1060:            }
1061:
1062:            public void pcmf_setCellBgColor(int xRow, int xCol, String xColor) {
1063:                Object l_obj = null;
1064:                if (xRow == 0)
1065:                    l_obj = this .pem_header.get(xCol);
1066:                else
1067:                    l_obj = ((ArrayList) this .pem_rows.get(xRow - 1)).get(xCol);
1068:
1069:                if (l_obj instanceof  IUnComponent)
1070:                    ((IUnComponent) l_obj).pcmf_setBgColor(xColor);
1071:                else {
1072:                    try {
1073:                        IUnComponent l_label = new HoSrvGenericLabel("", l_obj
1074:                                .toString(), this .pcmf_getAppl(), null);
1075:                        l_label.pcmf_getUnComponent().pcmf_setEarlyAutoDelete(
1076:                                true);
1077:                        l_label.pcmf_setBgColor(xColor);
1078:                        this .pcmf_modCell(xRow, xCol, l_label);
1079:                    } catch (Exception e) {
1080:                        KeLog.pcmf_logException("ug2t", this , e);
1081:                    }
1082:                }
1083:            }
1084:
1085:            public void pcmf_setCellFgColor(int xRow, int xCol, String xColor) {
1086:                Object l_obj = null;
1087:                if (xRow == 0)
1088:                    l_obj = this .pem_header.get(xCol);
1089:                else
1090:                    l_obj = ((ArrayList) this .pem_rows.get(xRow - 1)).get(xCol);
1091:
1092:                if (l_obj instanceof  IUnComponent)
1093:                    ((IUnComponent) l_obj).pcmf_setFgColor(xColor);
1094:                else {
1095:                    try {
1096:                        IUnComponent l_label = new HoSrvGenericLabel("", l_obj
1097:                                .toString(), this .pcmf_getAppl(), null);
1098:                        l_label.pcmf_getUnComponent().pcmf_setEarlyAutoDelete(
1099:                                true);
1100:                        l_label.pcmf_setFgColor(xColor);
1101:                        this .pcmf_modCell(xRow, xCol, l_label);
1102:                    } catch (Exception e) {
1103:                        KeLog.pcmf_logException("ug2t", this , e);
1104:                    }
1105:                }
1106:            }
1107:
1108:            private IUnBox pemf_getCellBox(int xRow, int xCol) {
1109:                Object l_obj = null;
1110:                if (xRow == 0)
1111:                    l_obj = this .pem_header.get(xCol);
1112:                else
1113:                    l_obj = ((ArrayList) this .pem_rows.get(xRow - 1)).get(xCol);
1114:
1115:                if (l_obj instanceof  IUnBox)
1116:                    return ((IUnBox) l_obj);
1117:                else if (l_obj instanceof  IUnComponent) {
1118:                    try {
1119:                        IUnBox l_box = new HoSrvGenericBox("IL", this 
1120:                                .pcmf_getAppl(), null);
1121:                        l_box.pcmf_getUnComponent().pcmf_setEarlyAutoDelete(
1122:                                true);
1123:                        l_box.pcmf_setBgColor(((IUnComponent) l_obj)
1124:                                .pcmf_getBgColor());
1125:                        l_box.pcmf_addWidget(((IUnComponent) l_obj)
1126:                                .pcmf_getUnComponent().pcmf_getName(),
1127:                                (IUnComponent) l_obj);
1128:                        this .pcmf_modCell(xRow, xCol, l_box);
1129:                        return (l_box);
1130:                    } catch (Exception e) {
1131:                        KeLog.pcmf_log("ug2t", "error creating inline box",
1132:                                this , KeLog.ERROR);
1133:                    }
1134:                } else {
1135:                    try {
1136:                        IUnBox l_box = new HoSrvGenericBox("IL", this 
1137:                                .pcmf_getAppl(), null);
1138:                        l_box.pcmf_getUnComponent().pcmf_setEarlyAutoDelete(
1139:                                true);
1140:                        IUnComponent l_label = new HoSrvGenericLabel("", l_obj
1141:                                .toString(), this .pcmf_getAppl(), null);
1142:                        l_label.pcmf_getUnComponent().pcmf_setEarlyAutoDelete(
1143:                                true);
1144:                        l_box.pcmf_addWidget("ILL", l_label);
1145:                        this .pcmf_modCell(xRow, xCol, l_box);
1146:                        return (l_box);
1147:                    } catch (Exception e) {
1148:                        KeLog.pcmf_log("ug2t",
1149:                                "error creating inline label box", this ,
1150:                                KeLog.ERROR);
1151:                    }
1152:                }
1153:                return (null);
1154:            }
1155:
1156:            public void pcmf_setCellBorder(int xRow, int xCol, int xDir,
1157:                    String xColor, int xWidth, int xStyle) {
1158:                IUnBox l_box = this .pemf_getCellBox(xRow, xCol);
1159:                if (l_box != null)
1160:                    l_box.pcmf_setBorder(xDir, xColor, xWidth, xStyle);
1161:                else
1162:                    KeLog.pcmf_log("ug2t", "no inline box", this , KeLog.ERROR);
1163:            }
1164:
1165:            public void pcmf_setCellPadding(int xRow, int xCol, int xDir,
1166:                    int xWidth) {
1167:                IUnBox l_box = this .pemf_getCellBox(xRow, xCol);
1168:                if (l_box != null)
1169:                    l_box.pcmf_setPadding(xDir, xWidth);
1170:                else
1171:                    KeLog.pcmf_log("ug2t", "no inline box", this , KeLog.ERROR);
1172:            }
1173:
1174:            public void pcmf_setCellMargin(int xRow, int xCol, int xDir,
1175:                    int xWidth) {
1176:                IUnBox l_box = this .pemf_getCellBox(xRow, xCol);
1177:                if (l_box != null)
1178:                    l_box.pcmf_setMargin(xDir, xWidth);
1179:                else
1180:                    KeLog.pcmf_log("ug2t", "no inline box", this , KeLog.ERROR);
1181:            }
1182:
1183:            public void pcmf_setCellAlign(int xRow, int xCol, String xAlign) {
1184:                IUnBox l_box = this .pemf_getCellBox(xRow, xCol);
1185:                if (l_box != null)
1186:                    l_box.pcmf_setBoxAlign(xAlign);
1187:                else
1188:                    KeLog.pcmf_log("ug2t", "no inline box", this , KeLog.ERROR);
1189:            }
1190:
1191:            public void pcmf_lockColumn(int xCol, boolean xLock) {
1192:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
1193:                        "");
1194:
1195:                if (this .pdm_session.pcmf_isInTransaction()) {
1196:                    ScXmlScript.pcmf_createPBody(l_remCall);
1197:                } else {
1198:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
1199:                    ScXmlScript.pcmf_addProc(l_remCall, null);
1200:                }
1201:                ;
1202:                ScXmlScript.pcmf_addCall(l_remCall, null, this 
1203:                        .pcmf_getRemName(), "pcmf_lockColumn");
1204:                ScXmlScript.pcmf_addCallPar(l_remCall, Integer.toString(xCol),
1205:                        "false", "int");
1206:                ScXmlScript.pcmf_addCallPar(l_remCall,
1207:                        xLock ? "true" : "false", "false", "boolean");
1208:                ScXmlScript.pcmf_endAll(l_remCall);
1209:
1210:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
1211:
1212:                return;
1213:            }
1214:
1215:            public void pcmf_relockCol() {
1216:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
1217:                        "");
1218:
1219:                if (this .pdm_session.pcmf_isInTransaction()) {
1220:                    ScXmlScript.pcmf_createPBody(l_remCall);
1221:                } else {
1222:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
1223:                    ScXmlScript.pcmf_addProc(l_remCall, null);
1224:                }
1225:                ;
1226:                ScXmlScript.pcmf_addCall(l_remCall, null, this 
1227:                        .pcmf_getRemName(), "pcmf_relockCol");
1228:                ScXmlScript.pcmf_endAll(l_remCall);
1229:
1230:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
1231:
1232:                return;
1233:            }
1234:
1235:            public void pcmf_setSpan(int xRow, int xColumn, int xRowSpan,
1236:                    int xColumnSpan) {
1237:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
1238:                        "");
1239:
1240:                if (this .pdm_session.pcmf_isInTransaction()) {
1241:                    ScXmlScript.pcmf_createPBody(l_remCall);
1242:                } else {
1243:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
1244:                    ScXmlScript.pcmf_addProc(l_remCall, null);
1245:                }
1246:                ;
1247:                ScXmlScript.pcmf_addCall(l_remCall, null, this 
1248:                        .pcmf_getRemName(), "pcmf_setSpan");
1249:                ScXmlScript.pcmf_addCallPar(l_remCall, Integer.toString(xRow),
1250:                        "false", "int");
1251:                ScXmlScript.pcmf_addCallPar(l_remCall, Integer
1252:                        .toString(xColumn), "false", "int");
1253:                ScXmlScript.pcmf_addCallPar(l_remCall, Integer
1254:                        .toString(xRowSpan), "false", "int");
1255:                ScXmlScript.pcmf_addCallPar(l_remCall, Integer
1256:                        .toString(xColumnSpan), "false", "int");
1257:                ScXmlScript.pcmf_endAll(l_remCall);
1258:
1259:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
1260:
1261:                return;
1262:            }
1263:
1264:            public void pcmf_removeSpan(int xRow, int xColumn) {
1265:                KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
1266:                        "");
1267:
1268:                if (this .pdm_session.pcmf_isInTransaction()) {
1269:                    ScXmlScript.pcmf_createPBody(l_remCall);
1270:                } else {
1271:                    ScXmlScript.pcmf_createxScriptString(l_remCall, null);
1272:                    ScXmlScript.pcmf_addProc(l_remCall, null);
1273:                }
1274:                ;
1275:                ScXmlScript.pcmf_addCall(l_remCall, null, this 
1276:                        .pcmf_getRemName(), "pcmf_removeSpan");
1277:                ScXmlScript.pcmf_addCallPar(l_remCall, Integer.toString(xRow),
1278:                        "false", "int");
1279:                ScXmlScript.pcmf_addCallPar(l_remCall, Integer
1280:                        .toString(xColumn), "false", "int");
1281:                ScXmlScript.pcmf_endAll(l_remCall);
1282:
1283:                this .pdm_session.pcmf_call(l_remCall.toString(), this );
1284:
1285:                return;
1286:            }
1287:
1288:            public boolean pcmf_isSelectable() {
1289:                return (this .pem_sel);
1290:            }
1291:
1292:            public void pcmf_removeSelected() {
1293:                if (this .pcmf_isMultiSelection()) {
1294:                    try {
1295:                        Collection l_all = this .pcmf_getRowsOnly();
1296:                        l_all.removeAll(this .pcmf_getSelectedTableRows());
1297:
1298:                        this .pcmf_setRowsOnly(l_all);
1299:                    } catch (Exception e) {
1300:                        KeLog.pcmf_log("ug2t",
1301:                                "cannot remove row - invalid index: "
1302:                                        + this .pcmf_getValue(), this ,
1303:                                KeLog.DEBUG);
1304:                    }
1305:                } else {
1306:                    try {
1307:                        this .pcmf_removeRow(Integer.parseInt(this 
1308:                                .pcmf_getValue().toString()) + 1);
1309:                    } catch (Exception e) {
1310:                        KeLog.pcmf_log("ug2t",
1311:                                "cannot remove row - invalid index: "
1312:                                        + this .pcmf_getValue(), this ,
1313:                                KeLog.DEBUG);
1314:                    }
1315:                }
1316:                this .pcmf_clearSelection();
1317:            }
1318:
1319:            public void pcmf_setScrollInfo(int xX, int xY) {
1320:                if (xX != this .pem_xScroll || xY != this .pem_yScroll) {
1321:                    this .pem_xScroll = xX;
1322:                    this .pem_yScroll = xY;
1323:
1324:                    Iterator l_it = this .pcmf_getSubIterator();
1325:                    while (l_it.hasNext()) {
1326:                        Object l_obj = l_it.next();
1327:                        if (l_obj instanceof  IUnEventChannel) {
1328:                            if (((IUnEventChannel) l_obj).pcmf_getType() == IUnEventChannel.EVENT_SCROLL) {
1329:                                IUnEventChannel l_ch = (IUnEventChannel) l_obj;
1330:                                l_ch
1331:                                        .pcmf_getUnComponent()
1332:                                        .pcmf_setValue(
1333:                                                IUnEventChannel.EVENTs[IUnEventChannel.EVENT_SCROLL]
1334:                                                        + ":" + xX + "," + xY);
1335:                                l_ch.pcmf_getUnComponent().pcmf_setRefresh();
1336:
1337:                                if (l_ch.pcmf_isRefreshParent())
1338:                                    ((UnComponent) l_ch.pcmf_getUnComponent()
1339:                                            .pcmf_getParentNode())
1340:                                            .pcmf_setRefresh();
1341:
1342:                                try {
1343:                                    if (l_ch.pcmf_getUnComponent()
1344:                                            .pcmf_isSubmit())
1345:                                        l_ch.pcmf_getUnComponent()
1346:                                                .pcmf_dispatchEvent();
1347:                                } catch (Exception e) {
1348:                                    KeLog.pcmf_logException("ug2t", this , e);
1349:                                    KeLog.pcmf_log("ug2t",
1350:                                            "error dispatch scroll event",
1351:                                            this, KeLog.ERROR);
1352:                                }
1353:                            }
1354:                            break;
1355:                        }
1356:                    }
1357:                }
1358:            }
1359:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.