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 HoSrvGenericBorder extends AHoSrvGenericContainer
038: implements IUnBorder {
039: private boolean pem_noLayout = false;
040:
041: public HoSrvGenericBorder(String xName, boolean xNoLayout,
042: IUnApplication xAppl, String xClass) throws Exception {
043: super (xName);
044: this .pcmf_setAppl(xAppl);
045:
046: this .pcmf_setLocalValue(xName);
047: this .pem_noLayout = xNoLayout;
048:
049: if (xClass == null)
050: pdm_clientClass = "de.ug2t.channel.ho.client.swing.HoSwingBorder";
051: else
052: pdm_clientClass = xClass;
053:
054: KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
055: "");
056:
057: if (this .pdm_session.pcmf_isInTransaction()) {
058: ScXmlScript.pcmf_createPBody(l_remCall);
059: } else {
060: ScXmlScript.pcmf_createxScriptString(l_remCall, null);
061: ScXmlScript.pcmf_addProc(l_remCall, null);
062: }
063: ;
064: ScXmlScript.pcmf_addDecl(l_remCall, this .pcmf_getRemName(),
065: pdm_clientClass, "global");
066: ScXmlScript.pcmf_addDeclPar(l_remCall, xName, "false",
067: "java.lang.String");
068: ScXmlScript.pcmf_addDeclPar(l_remCall, xNoLayout ? "true"
069: : "false", "false", "boolean");
070: ScXmlScript.pcmf_addDeclPar(l_remCall,
071: ((HoSrvGenericApplication) xAppl).pcmf_getRemName(),
072: "true", "de.ug2t.unifiedGui.interfaces.IUnApplication");
073:
074: ScXmlScript.pcmf_endAll(l_remCall);
075:
076: this .pdm_session.pcmf_call(l_remCall.toString(), this );
077:
078: return;
079: };
080:
081: public void pcmf_setBorderLine(int xBorder) {
082: KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
083: "");
084:
085: if (this .pdm_session.pcmf_isInTransaction()) {
086: ScXmlScript.pcmf_createPBody(l_remCall);
087: } else {
088: ScXmlScript.pcmf_createxScriptString(l_remCall, null);
089: ScXmlScript.pcmf_addProc(l_remCall, null);
090: }
091: ;
092: ScXmlScript.pcmf_addCall(l_remCall, null, this
093: .pcmf_getRemName(), "pcmf_setBorderLine");
094: ScXmlScript.pcmf_addCallPar(l_remCall, Integer
095: .toString(xBorder), "false", "int");
096: ScXmlScript.pcmf_endAll(l_remCall);
097:
098: this .pdm_session.pcmf_call(l_remCall.toString(), this );
099:
100: return;
101: };
102:
103: public void pcmf_setBoColor(String xColor) {
104: KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
105: "");
106:
107: if (this .pdm_session.pcmf_isInTransaction()) {
108: ScXmlScript.pcmf_createPBody(l_remCall);
109: } else {
110: ScXmlScript.pcmf_createxScriptString(l_remCall, null);
111: ScXmlScript.pcmf_addProc(l_remCall, null);
112: }
113: ;
114: ScXmlScript.pcmf_addCall(l_remCall, null, this
115: .pcmf_getRemName(), "pcmf_setBoColor");
116: ScXmlScript.pcmf_addCallPar(l_remCall, xColor, "false",
117: "java.lang.String");
118: ScXmlScript.pcmf_endAll(l_remCall);
119:
120: this .pdm_session.pcmf_call(l_remCall.toString(), this );
121:
122: return;
123: };
124:
125: public void pcmf_setBoStyle(int xStyle) {
126: KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
127: "");
128:
129: if (this .pdm_session.pcmf_isInTransaction()) {
130: ScXmlScript.pcmf_createPBody(l_remCall);
131: } else {
132: ScXmlScript.pcmf_createxScriptString(l_remCall, null);
133: ScXmlScript.pcmf_addProc(l_remCall, null);
134: }
135: ;
136: ScXmlScript.pcmf_addCall(l_remCall, null, this
137: .pcmf_getRemName(), "pcmf_setBoStyle");
138: ScXmlScript.pcmf_addCallPar(l_remCall,
139: Integer.toString(xStyle), "false", "int");
140: ScXmlScript.pcmf_endAll(l_remCall);
141:
142: this .pdm_session.pcmf_call(l_remCall.toString(), this );
143:
144: return;
145: }
146:
147: public void pcmf_setClass(String xClass) {
148: KeLog.pcmf_log("ug2t", "setClass is not implemented in class",
149: this , KeLog.DEBUG);
150: return;
151: };
152:
153: public AHoSrvGenericComponent pcmf_buildRefObj() throws Exception {
154: AHoSrvGenericComponent l_obj = new HoSrvGenericBorder(this
155: .pcmf_getName(), this .pem_noLayout,
156: this .pcmf_getAppl(), this .pdm_clientClass);
157:
158: l_obj.pcmf_setGlobal(true);
159: l_obj.pcmf_setRefFrom(this );
160: l_obj.pcmf_setAutoEcho(this .pcmf_doAutoEcho());
161: this .pcmf_setGlobal(true);
162: this.pcmf_addRef(l_obj);
163:
164: return (l_obj);
165: };
166: }
|