// @@
// @@
/*
* Wi.Ser Framework
*
* LGPL Version: 1.8.1, 20-September-2007
* Copyright (C) 2005-2006 Dirk von der Weiden <dvdw@imail.de>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library located in LGPL.txt in the
* license directory; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* If this agreement does not cover your requirements, please contact us
* via email to get detailed information about the commercial license
* or our service offerings!
*
*/
// @@
package de.ug2t.channel.ho.server.generic;
import de.ug2t.kernel.*;
import de.ug2t.unifiedGui.interfaces.*;
import de.ug2t.xmlScript.*;
public final class HoSrvGenericForm extends AHoSrvGenericContainer implements IUnForm
{
private boolean pem_noLayout = false;
private IUnImage pem_icon = null;
public HoSrvGenericForm(String xName, boolean xNoLayout, IUnApplication xAppl, String xClass) throws Exception
{
super(xName);
this.pcmf_setAppl(xAppl);
this.pcmf_setLocalValue(xName);
this.pem_noLayout = xNoLayout;
if (xClass == null)
pdm_clientClass = "de.ug2t.channel.ho.client.swing.HoSwingForm";
else
pdm_clientClass = xClass;
KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper("");
if (this.pdm_session.pcmf_isInTransaction())
{
ScXmlScript.pcmf_createPBody(l_remCall);
}
else
{
ScXmlScript.pcmf_createxScriptString(l_remCall, null);
ScXmlScript.pcmf_addProc(l_remCall, null);
};
ScXmlScript.pcmf_addDecl(l_remCall, this.pcmf_getRemName(), this.pdm_clientClass, "global");
ScXmlScript.pcmf_addDeclPar(l_remCall, xName, "false", "java.lang.String");
ScXmlScript.pcmf_addDeclPar(l_remCall, xNoLayout ? "true" : "false", "false", "boolean");
ScXmlScript.pcmf_addDeclPar(l_remCall, ((HoSrvGenericApplication) xAppl).pcmf_getRemName(), "true", "de.ug2t.unifiedGui.interfaces.IUnApplication");
ScXmlScript.pcmf_endAll(l_remCall);
this.pdm_session.pcmf_call(l_remCall.toString(), this);
return;
};
public AHoSrvGenericComponent pcmf_buildRefObj() throws Exception
{
AHoSrvGenericComponent l_obj = new HoSrvGenericForm(this.pcmf_getName(), this.pem_noLayout, this.pcmf_getAppl(), this.pdm_clientClass);
l_obj.pcmf_setGlobal(true);
l_obj.pcmf_setRefFrom(this);
l_obj.pcmf_setAutoEcho(this.pcmf_doAutoEcho());
this.pcmf_setGlobal(true);
this.pcmf_addRef(l_obj);
return (l_obj);
};
public void pcmf_setIcon(IUnImage xIcon)
{
KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper("");
if (this.pdm_session.pcmf_isInTransaction())
{
ScXmlScript.pcmf_createPBody(l_remCall);
}
else
{
ScXmlScript.pcmf_createxScriptString(l_remCall, null);
ScXmlScript.pcmf_addProc(l_remCall, null);
};
ScXmlScript.pcmf_addCall(l_remCall, null, this.pcmf_getRemName(), "pcmf_setIcon");
ScXmlScript.pcmf_addCallPar(l_remCall, xIcon.pcmf_getUnComponent().pcmf_getRemName(), "true", "de.ug2t.unifiedGui.interfaces.IUnImage");
ScXmlScript.pcmf_endAll(l_remCall);
this.pdm_session.pcmf_call(l_remCall.toString(), this);
if (this.pem_icon != null)
this.pem_icon.pcmf_detach();
this.pem_icon = xIcon;
this.pem_icon.pcmf_attach();
};
public IUnImage pcmf_getIcon()
{
return (this.pem_icon);
};
public void pcmf_scrollXRel(int xPx)
{
KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper("");
if (this.pdm_session.pcmf_isInTransaction())
{
ScXmlScript.pcmf_createPBody(l_remCall);
}
else
{
ScXmlScript.pcmf_createxScriptString(l_remCall, null);
ScXmlScript.pcmf_addProc(l_remCall, null);
};
ScXmlScript.pcmf_addCall(l_remCall, null, this.pcmf_getRemName(), "pcmf_scrollXRel");
ScXmlScript.pcmf_addCallPar(l_remCall, Integer.toString(xPx), "false", "int");
ScXmlScript.pcmf_endAll(l_remCall);
this.pdm_session.pcmf_call(l_remCall.toString(), this);
return;
}
public void pcmf_scrollXAbs(int xPx)
{
KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper("");
if (this.pdm_session.pcmf_isInTransaction())
{
ScXmlScript.pcmf_createPBody(l_remCall);
}
else
{
ScXmlScript.pcmf_createxScriptString(l_remCall, null);
ScXmlScript.pcmf_addProc(l_remCall, null);
};
ScXmlScript.pcmf_addCall(l_remCall, null, this.pcmf_getRemName(), "pcmf_scrollXAbs");
ScXmlScript.pcmf_addCallPar(l_remCall, Integer.toString(xPx), "false", "int");
ScXmlScript.pcmf_endAll(l_remCall);
this.pdm_session.pcmf_call(l_remCall.toString(), this);
return;
}
public void pcmf_scrollYRel(int xPy)
{
KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper("");
if (this.pdm_session.pcmf_isInTransaction())
{
ScXmlScript.pcmf_createPBody(l_remCall);
}
else
{
ScXmlScript.pcmf_createxScriptString(l_remCall, null);
ScXmlScript.pcmf_addProc(l_remCall, null);
};
ScXmlScript.pcmf_addCall(l_remCall, null, this.pcmf_getRemName(), "pcmf_scrollYRel");
ScXmlScript.pcmf_addCallPar(l_remCall, Integer.toString(xPy), "false", "int");
ScXmlScript.pcmf_endAll(l_remCall);
this.pdm_session.pcmf_call(l_remCall.toString(), this);
return;
}
public void pcmf_scrollYAbs(int xPy)
{
KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper("");
if (this.pdm_session.pcmf_isInTransaction())
{
ScXmlScript.pcmf_createPBody(l_remCall);
}
else
{
ScXmlScript.pcmf_createxScriptString(l_remCall, null);
ScXmlScript.pcmf_addProc(l_remCall, null);
};
ScXmlScript.pcmf_addCall(l_remCall, null, this.pcmf_getRemName(), "pcmf_scrollYAbs");
ScXmlScript.pcmf_addCallPar(l_remCall, Integer.toString(xPy), "false", "int");
ScXmlScript.pcmf_endAll(l_remCall);
this.pdm_session.pcmf_call(l_remCall.toString(), this);
return;
}
public int pcmf_getXScroll()
{
return (this.pdm_xScroll);
}
public int pcmf_getYScroll()
{
return (this.pdm_yScroll);
}
public void pcmf_delete() throws Exception
{
if (this.pdm_deleted == true)
return;
if (this.pem_icon != null)
{
this.pem_icon.pcmf_detach();
this.pem_icon.pcmf_getUnComponent().pcmf_delete();
}
super.pcmf_delete();
}
}
|