001: // @@
002: // @@
003: /*
004: * Wi.Ser Framework
005: *
006: * Version: 1.8.1, 20-September-2007
007: * Copyright (C) 2005 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.markup.html.renderer;
032:
033: import de.ug2t.channel.markup.generic.*;
034: import de.ug2t.kernel.*;
035: import de.ug2t.unifiedGui.interfaces.*;
036:
037: public final class HtmlRadioButtonRenderer implements IKeView {
038: private MuGenericCache pem_cache = new MuGenericCache();
039:
040: public boolean pcmf_supportsCaching() {
041: return (true);
042: }
043:
044: public void pcmf_clearCache() {
045: this .pem_cache.pcmf_clearCache();
046: }
047:
048: public void pcmf_activateCache(boolean xAc) {
049: this .pem_cache.pcmf_activateThisCache(xAc);
050: return;
051: }
052:
053: public Object pcmf_output(KeTreeElement xTreeEl) {
054: MuGenericRadioButton html_xTreeEl = (MuGenericRadioButton) xTreeEl;
055:
056: // @@
057:
058: KeStringTemplate l_string = html_xTreeEl
059: .pcmf_getMarkupString("MAIN");
060: IUnImage l_ico = html_xTreeEl.pcmf_getIcon();
061:
062: l_string = html_xTreeEl.pcmf_insertToolTip(l_string);
063: l_string = html_xTreeEl
064: .pcmf_insertColorandFontandBorder(l_string);
065: l_string = html_xTreeEl.pcmf_insertPosition(l_string);
066: l_string = html_xTreeEl.pcmf_insertChannelandMenu(l_string);
067: l_string = html_xTreeEl.pcmf_insertTabIndex(l_string);
068:
069: l_string.pcmf_beginTR();
070:
071: if (html_xTreeEl.pcmf_getWrap())
072: l_string = KeTools.pcmf_stringSubst(l_string, "$WRAP", "");
073: else
074: l_string = KeTools.pcmf_stringSubst(l_string, "$WRAP",
075: html_xTreeEl.pcmf_getMarkupString("NOWRAP")
076: .toString());
077:
078: if (html_xTreeEl.pcmf_getGroup().pcmf_getValue().equals(
079: xTreeEl.pcmf_getValue()))
080: l_string = KeTools.pcmf_stringSubst(l_string, "$CHECKED",
081: "checked");
082: else
083: l_string = KeTools.pcmf_stringSubst(l_string, "$CHECKED",
084: "");
085:
086: l_string = KeTools.pcmf_stringSubst(l_string, "$NAME",
087: html_xTreeEl.pcmf_getGroup().pcmf_getObjName());
088: l_string = KeTools.pcmf_stringSubst(l_string, "$OID",
089: html_xTreeEl.pcmf_getObjName());
090: l_string = KeTools.pcmf_stringSubst(l_string, "$VALUE", xTreeEl
091: .pcmf_getValue().toString());
092: l_string = KeTools.pcmf_stringSubst(l_string, "$STRING",
093: IUnKeyAccess.UnInsertHTMLString.pcmf_modValue(
094: (IUnKeyAccess) xTreeEl, html_xTreeEl
095: .pcmf_getLabel()));
096:
097: if (l_ico != null)
098: KeTools.pcmf_stringSubst(l_string, "$ICO", l_ico
099: .pcmf_getUnComponent().pcmf_execView().toString());
100: else
101: KeTools.pcmf_stringSubst(l_string, "$ICO", "");
102:
103: if (html_xTreeEl.pcmf_isDisabled())
104: l_string = KeTools.pcmf_stringSubst(l_string, "$DISABLED",
105: "disabled");
106: else
107: l_string = KeTools.pcmf_stringSubst(l_string, "$DISABLED",
108: "");
109:
110: if (html_xTreeEl.pcmf_isReadOnly())
111: l_string = KeTools.pcmf_stringSubst(l_string, "$READONLY",
112: "readonly");
113: else
114: l_string = KeTools.pcmf_stringSubst(l_string, "$READONLY",
115: "");
116:
117: if (html_xTreeEl.pcmf_isSubmit()) {
118: KeStringTemplate l_stpl = html_xTreeEl
119: .pcmf_getMarkupString("SUBMIT");
120: if (l_stpl != null)
121: l_string = KeTools.pcmf_stringSubst(l_string,
122: "$SUBMIT", l_stpl);
123: else
124: l_string = KeTools.pcmf_stringSubst(l_string,
125: "$SUBMIT", html_xTreeEl.pcmf_getKit()
126: .getSUBMIT());
127: } else
128: l_string = KeTools
129: .pcmf_stringSubst(l_string, "$SUBMIT", "");
130:
131: l_string = IUnKeyAccess.UnInsertHTMLString.pcmf_insert(
132: html_xTreeEl, l_string);
133:
134: l_string.pcmf_endTR(true);
135:
136: // @@
137:
138: return (l_string);
139: };
140:
141: public Object pcmf_execView(KeTreeElement xTreeEl) {
142: return (xTreeEl.pcmf_execView().toString());
143: };
144: };
|