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:
036: public final class HtmlRadioPanelRenderer implements IKeView {
037: private MuGenericCache pem_cache = new MuGenericCache();
038:
039: public boolean pcmf_supportsCaching() {
040: return (true);
041: }
042:
043: public void pcmf_clearCache() {
044: this .pem_cache.pcmf_clearCache();
045: }
046:
047: public void pcmf_activateCache(boolean xAc) {
048: this .pem_cache.pcmf_activateThisCache(xAc);
049: return;
050: }
051:
052: public Object pcmf_output(KeTreeElement xTreeEl) {
053: MuGenericRadioPanel html_xTreeEl = (MuGenericRadioPanel) xTreeEl;
054:
055: // @@
056:
057: KeStringTemplate l_string = new KeStringTemplate("");
058: int l_len = html_xTreeEl.pcmf_getValues().values().size();
059:
060: KeStringTemplate l_tpl = html_xTreeEl
061: .pcmf_getMarkupString("MAIN");
062:
063: l_tpl = html_xTreeEl.pcmf_insertToolTip(l_tpl);
064: l_tpl = html_xTreeEl.pcmf_insertColorandFontandBorder(l_tpl);
065: l_tpl = html_xTreeEl.pcmf_insertPosition(l_tpl);
066: l_tpl = html_xTreeEl.pcmf_insertChannelandMenu(l_tpl);
067: l_tpl = html_xTreeEl.pcmf_insertBgImage(l_tpl);
068:
069: IMuGenericLayoutManager l_layout = html_xTreeEl
070: .pcmf_getLayoutManager();
071: if (l_layout == null) {
072: for (int i = 0; i < l_len; i++)
073: l_string.pcmf_stringAddEnd(html_xTreeEl
074: .pcmf_getOtion(i).toString());
075: } else {
076: l_layout.pcmf_layout();
077: l_string.pcmf_stringAddEnd(l_layout.pcmf_getMarkupString());
078: }
079:
080: l_tpl.pcmf_beginTR();
081:
082: l_tpl = KeTools.pcmf_stringSubst(l_tpl, "$BODY", l_string
083: .toString());
084: l_tpl = KeTools.pcmf_stringSubst(l_tpl, "$PNAME", html_xTreeEl
085: .pcmf_getScrollCrt().pcmf_getObjName());
086: l_tpl = KeTools.pcmf_stringSubst(l_tpl, "$NAME", xTreeEl
087: .pcmf_getObjName());
088:
089: if (html_xTreeEl.pcmf_getScroll()) {
090: l_tpl = KeTools.pcmf_stringSubst(l_tpl, "$SCROLL", "auto");
091: ((MuGenericApplication) html_xTreeEl.pcmf_getAppl())
092: .pcmf_getRenderer().pcmf_addScrollPos(
093: html_xTreeEl.pcmf_getScrollCrt());
094: } else
095: l_tpl = KeTools
096: .pcmf_stringSubst(l_tpl, "$SCROLL", "hidden");
097:
098: l_tpl.pcmf_endTR(true);
099:
100: // @@
101:
102: return (l_tpl);
103: };
104:
105: public Object pcmf_execView(KeTreeElement xTreeEl) {
106: return (xTreeEl.pcmf_execView());
107: };
108: };
|