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 java.util.*;
034:
035: import de.ug2t.channel.markup.generic.*;
036: import de.ug2t.kernel.*;
037: import de.ug2t.unifiedGui.*;
038:
039: public final class HtmlToolBoxRenderer implements IKeView {
040: private MuGenericCache pem_cache = new MuGenericCache();
041:
042: public boolean pcmf_supportsCaching() {
043: return (true);
044: }
045:
046: public void pcmf_clearCache() {
047: this .pem_cache.pcmf_clearCache();
048: }
049:
050: public void pcmf_activateCache(boolean xAc) {
051: this .pem_cache.pcmf_activateThisCache(xAc);
052: return;
053: }
054:
055: public Object pcmf_output(KeTreeElement xTreeEl) {
056: MuGenericToolBox html_xTreeEl = (MuGenericToolBox) xTreeEl;
057:
058: // @@
059:
060: KeStringTemplate l_tabtpl = null;
061: KeStringTemplate l_string = null;
062:
063: l_tabtpl = html_xTreeEl.pcmf_getMarkupString("TAB");
064: l_string = html_xTreeEl.pcmf_getMarkupString("MAIN");
065:
066: l_string = html_xTreeEl.pcmf_insertToolTip(l_string);
067: l_string = html_xTreeEl
068: .pcmf_insertColorandFontandBorder(l_string);
069: l_string = html_xTreeEl.pcmf_insertPosition(l_string);
070: l_string = html_xTreeEl.pcmf_insertChannelandMenu(l_string);
071:
072: l_string = KeTools.pcmf_stringSubst(l_string, "$OID",
073: html_xTreeEl.pcmf_getObjName());
074:
075: // Kopf zusammenbauen
076: KeStringTemplate l_headString = new KeStringTemplate("");
077: Iterator l_it = html_xTreeEl.pcmf_getAllSubs().iterator();
078: Object l_obj = null;
079:
080: while (l_it.hasNext()) {
081: l_obj = l_it.next();
082:
083: l_headString.pcmf_stringAddEnd(l_tabtpl);
084:
085: if (l_obj instanceof UnComponent)
086: l_headString = KeTools.pcmf_stringSubst(l_headString,
087: "$ELEMENT", (String) ((UnComponent) l_obj)
088: .pcmf_execView());
089: else
090: l_headString = KeTools.pcmf_stringSubst(l_headString,
091: "$ELEMENT", l_obj.toString());
092: }
093: ;
094:
095: l_string = KeTools.pcmf_stringSubst(l_string, "$TAB",
096: l_headString);
097:
098: // @@
099:
100: return (l_string);
101: };
102:
103: public Object pcmf_execView(KeTreeElement xTreeEl) {
104: return (xTreeEl.pcmf_execView());
105: };
106: };
|