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 HoSrvGenericToolBox extends AHoSrvGenericComponent
038: implements IUnToolBox {
039: public HoSrvGenericToolBox(String xName, IUnApplication xAppl,
040: String xClass) throws Exception {
041: super (xName);
042: this .pcmf_setAppl(xAppl);
043:
044: this .pcmf_setLocalValue(xName);
045:
046: if (xClass == null)
047: pdm_clientClass = "de.ug2t.channel.ho.client.swing.HoSwingToolBox";
048: else
049: pdm_clientClass = xClass;
050:
051: KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
052: "");
053:
054: if (this .pdm_session.pcmf_isInTransaction()) {
055: ScXmlScript.pcmf_createPBody(l_remCall);
056: } else {
057: ScXmlScript.pcmf_createxScriptString(l_remCall, null);
058: ScXmlScript.pcmf_addProc(l_remCall, null);
059: }
060: ;
061: ScXmlScript.pcmf_addDecl(l_remCall, this .pcmf_getRemName(),
062: this .pdm_clientClass, "global");
063: ScXmlScript.pcmf_addDeclPar(l_remCall, xName, "false",
064: "java.lang.String");
065: ScXmlScript.pcmf_addDeclPar(l_remCall,
066: ((HoSrvGenericApplication) xAppl).pcmf_getRemName(),
067: "true", "de.ug2t.unifiedGui.interfaces.IUnApplication");
068:
069: ScXmlScript.pcmf_endAll(l_remCall);
070:
071: this .pdm_session.pcmf_call(l_remCall.toString(), this );
072:
073: return;
074: };
075:
076: public void pcmf_setBoColor(String xColor) {
077: return;
078: };
079:
080: public AHoSrvGenericComponent pcmf_buildRefObj() throws Exception {
081: AHoSrvGenericComponent l_obj = new HoSrvGenericToolBox(this
082: .pcmf_getName(), this .pcmf_getAppl(),
083: this .pdm_clientClass);
084:
085: l_obj.pcmf_setGlobal(true);
086: l_obj.pcmf_setRefFrom(this );
087: this .pcmf_setGlobal(true);
088: l_obj.pcmf_setAutoEcho(this .pcmf_doAutoEcho());
089: this .pcmf_addRef(l_obj);
090:
091: return (l_obj);
092: };
093:
094: private boolean pem_readOnly = false;
095:
096: public void pcmf_setReadOnly(boolean xReadOnly) {
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_setReadOnly");
109: ScXmlScript.pcmf_addCallPar(l_remCall, Boolean
110: .toString(xReadOnly), "false", "boolean");
111: ScXmlScript.pcmf_endAll(l_remCall);
112:
113: this .pdm_session.pcmf_call(l_remCall.toString(), this );
114: this .pem_readOnly = xReadOnly;
115: }
116:
117: public boolean pcmf_isReadOnly() {
118: return (this.pem_readOnly);
119: }
120: }
|