001: // @@
002: // @@
003: /*
004: * Wi.Ser Framework
005: *
006: * LGPL Version: 1.8.1, 20-September-2007
007: * Copyright (C) 2005-2006 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.channel.ho.server.generic;
032:
033: import de.ug2t.kernel.*;
034: import de.ug2t.unifiedGui.interfaces.*;
035: import de.ug2t.xmlScript.*;
036:
037: public final class HoSrvGenericForm extends AHoSrvGenericContainer
038: implements IUnForm {
039: private boolean pem_noLayout = false;
040: private IUnImage pem_icon = null;
041:
042: public HoSrvGenericForm(String xName, boolean xNoLayout,
043: IUnApplication xAppl, String xClass) throws Exception {
044: super (xName);
045: this .pcmf_setAppl(xAppl);
046:
047: this .pcmf_setLocalValue(xName);
048: this .pem_noLayout = xNoLayout;
049:
050: if (xClass == null)
051: pdm_clientClass = "de.ug2t.channel.ho.client.swing.HoSwingForm";
052: else
053: pdm_clientClass = xClass;
054:
055: KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
056: "");
057:
058: if (this .pdm_session.pcmf_isInTransaction()) {
059: ScXmlScript.pcmf_createPBody(l_remCall);
060: } else {
061: ScXmlScript.pcmf_createxScriptString(l_remCall, null);
062: ScXmlScript.pcmf_addProc(l_remCall, null);
063: }
064: ;
065: ScXmlScript.pcmf_addDecl(l_remCall, this .pcmf_getRemName(),
066: this .pdm_clientClass, "global");
067: ScXmlScript.pcmf_addDeclPar(l_remCall, xName, "false",
068: "java.lang.String");
069: ScXmlScript.pcmf_addDeclPar(l_remCall, xNoLayout ? "true"
070: : "false", "false", "boolean");
071: ScXmlScript.pcmf_addDeclPar(l_remCall,
072: ((HoSrvGenericApplication) xAppl).pcmf_getRemName(),
073: "true", "de.ug2t.unifiedGui.interfaces.IUnApplication");
074:
075: ScXmlScript.pcmf_endAll(l_remCall);
076:
077: this .pdm_session.pcmf_call(l_remCall.toString(), this );
078:
079: return;
080: };
081:
082: public AHoSrvGenericComponent pcmf_buildRefObj() throws Exception {
083: AHoSrvGenericComponent l_obj = new HoSrvGenericForm(this
084: .pcmf_getName(), this .pem_noLayout,
085: this .pcmf_getAppl(), this .pdm_clientClass);
086:
087: l_obj.pcmf_setGlobal(true);
088: l_obj.pcmf_setRefFrom(this );
089: l_obj.pcmf_setAutoEcho(this .pcmf_doAutoEcho());
090: this .pcmf_setGlobal(true);
091: this .pcmf_addRef(l_obj);
092:
093: return (l_obj);
094: };
095:
096: public void pcmf_setIcon(IUnImage xIcon) {
097: KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
098: "");
099:
100: if (this .pdm_session.pcmf_isInTransaction()) {
101: ScXmlScript.pcmf_createPBody(l_remCall);
102: } else {
103: ScXmlScript.pcmf_createxScriptString(l_remCall, null);
104: ScXmlScript.pcmf_addProc(l_remCall, null);
105: }
106: ;
107: ScXmlScript.pcmf_addCall(l_remCall, null, this
108: .pcmf_getRemName(), "pcmf_setIcon");
109: ScXmlScript.pcmf_addCallPar(l_remCall, xIcon
110: .pcmf_getUnComponent().pcmf_getRemName(), "true",
111: "de.ug2t.unifiedGui.interfaces.IUnImage");
112: ScXmlScript.pcmf_endAll(l_remCall);
113:
114: this .pdm_session.pcmf_call(l_remCall.toString(), this );
115:
116: if (this .pem_icon != null)
117: this .pem_icon.pcmf_detach();
118:
119: this .pem_icon = xIcon;
120: this .pem_icon.pcmf_attach();
121: };
122:
123: public IUnImage pcmf_getIcon() {
124: return (this .pem_icon);
125: };
126:
127: public void pcmf_scrollXRel(int xPx) {
128: KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
129: "");
130:
131: if (this .pdm_session.pcmf_isInTransaction()) {
132: ScXmlScript.pcmf_createPBody(l_remCall);
133: } else {
134: ScXmlScript.pcmf_createxScriptString(l_remCall, null);
135: ScXmlScript.pcmf_addProc(l_remCall, null);
136: }
137: ;
138: ScXmlScript.pcmf_addCall(l_remCall, null, this
139: .pcmf_getRemName(), "pcmf_scrollXRel");
140: ScXmlScript.pcmf_addCallPar(l_remCall, Integer.toString(xPx),
141: "false", "int");
142: ScXmlScript.pcmf_endAll(l_remCall);
143:
144: this .pdm_session.pcmf_call(l_remCall.toString(), this );
145:
146: return;
147: }
148:
149: public void pcmf_scrollXAbs(int xPx) {
150: KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
151: "");
152:
153: if (this .pdm_session.pcmf_isInTransaction()) {
154: ScXmlScript.pcmf_createPBody(l_remCall);
155: } else {
156: ScXmlScript.pcmf_createxScriptString(l_remCall, null);
157: ScXmlScript.pcmf_addProc(l_remCall, null);
158: }
159: ;
160: ScXmlScript.pcmf_addCall(l_remCall, null, this
161: .pcmf_getRemName(), "pcmf_scrollXAbs");
162: ScXmlScript.pcmf_addCallPar(l_remCall, Integer.toString(xPx),
163: "false", "int");
164: ScXmlScript.pcmf_endAll(l_remCall);
165:
166: this .pdm_session.pcmf_call(l_remCall.toString(), this );
167:
168: return;
169: }
170:
171: public void pcmf_scrollYRel(int xPy) {
172: KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
173: "");
174:
175: if (this .pdm_session.pcmf_isInTransaction()) {
176: ScXmlScript.pcmf_createPBody(l_remCall);
177: } else {
178: ScXmlScript.pcmf_createxScriptString(l_remCall, null);
179: ScXmlScript.pcmf_addProc(l_remCall, null);
180: }
181: ;
182: ScXmlScript.pcmf_addCall(l_remCall, null, this
183: .pcmf_getRemName(), "pcmf_scrollYRel");
184: ScXmlScript.pcmf_addCallPar(l_remCall, Integer.toString(xPy),
185: "false", "int");
186: ScXmlScript.pcmf_endAll(l_remCall);
187:
188: this .pdm_session.pcmf_call(l_remCall.toString(), this );
189:
190: return;
191: }
192:
193: public void pcmf_scrollYAbs(int xPy) {
194: KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
195: "");
196:
197: if (this .pdm_session.pcmf_isInTransaction()) {
198: ScXmlScript.pcmf_createPBody(l_remCall);
199: } else {
200: ScXmlScript.pcmf_createxScriptString(l_remCall, null);
201: ScXmlScript.pcmf_addProc(l_remCall, null);
202: }
203: ;
204: ScXmlScript.pcmf_addCall(l_remCall, null, this
205: .pcmf_getRemName(), "pcmf_scrollYAbs");
206: ScXmlScript.pcmf_addCallPar(l_remCall, Integer.toString(xPy),
207: "false", "int");
208: ScXmlScript.pcmf_endAll(l_remCall);
209:
210: this .pdm_session.pcmf_call(l_remCall.toString(), this );
211:
212: return;
213: }
214:
215: public int pcmf_getXScroll() {
216: return (this .pdm_xScroll);
217: }
218:
219: public int pcmf_getYScroll() {
220: return (this .pdm_yScroll);
221: }
222:
223: public void pcmf_delete() throws Exception {
224: if (this .pdm_deleted == true)
225: return;
226:
227: if (this.pem_icon != null) {
228: this.pem_icon.pcmf_detach();
229: this.pem_icon.pcmf_getUnComponent().pcmf_delete();
230: }
231:
232: super.pcmf_delete();
233: }
234: }
|