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.interfaces.*;
038:
039: public final class HtmlEmbeddedPanelRenderer implements IKeView {
040: public boolean pcmf_supportsCaching() {
041: return (false);
042: }
043:
044: public void pcmf_clearCache() {
045: throw (new UnsupportedOperationException());
046: }
047:
048: public void pcmf_activateCache(boolean xAc) {
049: throw (new UnsupportedOperationException());
050: }
051:
052: public Object pcmf_output(KeTreeElement xTreeEl) {
053: MuGenericEmbeddedPanel html_xTreeEl = (MuGenericEmbeddedPanel) xTreeEl;
054:
055: html_xTreeEl.pcmf_evalRepaint();
056:
057: KeStringTemplate l_STRING = html_xTreeEl
058: .pcmf_getMarkupString("MAIN");
059: KeStringTemplate l_FString = html_xTreeEl
060: .pcmf_getMarkupString("FRAME");
061: KeStringTemplate l_menu = html_xTreeEl
062: .pcmf_getMarkupString("MINIT");
063: KeStringTemplate l_string = null;
064:
065: MuGenericApplication l_appl = (MuGenericApplication) html_xTreeEl
066: .pcmf_getAppl();
067:
068: if (l_appl.pcmf_getRootPane().pcmf_getValue().equals(
069: xTreeEl.pcmf_getObjName()))
070: l_string = l_STRING;
071: else
072: l_string = l_FString;
073:
074: Iterator l_it = html_xTreeEl.pcmf_getSubIterator();
075: Object l_obj = null;
076: while (l_it.hasNext()) {
077: l_obj = l_it.next();
078: if (l_obj instanceof IUnMenu) {
079: l_string = KeTools.pcmf_stringSubst(l_string, "$MINIT",
080: l_menu);
081: break;
082: }
083: }
084: l_string = KeTools.pcmf_stringSubst(l_string, "$MINIT", "");
085:
086: l_string = html_xTreeEl.pcmf_insertToolTip(l_string);
087: l_string = html_xTreeEl
088: .pcmf_insertColorandFontandBorder(l_string);
089: l_string = html_xTreeEl.pcmf_insertPosition(l_string);
090: l_string = html_xTreeEl.pcmf_insertChannelandMenu(l_string);
091: l_string = html_xTreeEl.pcmf_insertBgImage(l_string);
092:
093: l_string.pcmf_beginTR();
094:
095: l_string = KeTools.pcmf_stringSubst(l_string, "$URL", l_appl
096: .pcmf_getHostName()
097: + ":"
098: + Integer.toString(l_appl.pcmf_getPort())
099: + "/"
100: + l_appl.pcmf_getRootUrl());
101: l_string = KeTools.pcmf_stringSubst(l_string, "$PROT", l_appl
102: .pcmf_getProtocol());
103: l_string = KeTools.pcmf_stringSubst(l_string, "$STATE", xTreeEl
104: .pcmf_getObjName());
105: l_string = KeTools.pcmf_stringSubst(l_string, "$PG_ID",
106: ((MuGenericApplication) l_appl).pcmf_getRootPane()
107: .pcmf_getObjName());
108: l_string = KeTools.pcmf_stringSubst(l_string, "$NAME",
109: html_xTreeEl.pcmf_getObjName());
110: l_string = KeTools.pcmf_stringSubst(l_string, "$OID",
111: html_xTreeEl.pcmf_getObjName());
112:
113: l_string.pcmf_endTR(true);
114:
115: return (l_string);
116: };
117:
118: public Object pcmf_execView(KeTreeElement xTreeEl) {
119: return (xTreeEl.pcmf_execView());
120: };
121: };
|