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.generic;
032:
033: import de.ug2t.channel.markup.html.renderer.*;
034: import de.ug2t.connector.*;
035: import de.ug2t.kernel.*;
036: import de.ug2t.unifiedGui.*;
037: import de.ug2t.unifiedGui.interfaces.*;
038:
039: public final class MuGenericAnchoredPopup extends MuGenericComponent
040: implements IUnAnchoredPopUp {
041: private IKeView pem_view = new HtmlAnchoredPopupRenderer();
042: private MuGenericImage pem_icon = null;
043: private boolean pem_display = false;
044: private int pem_hoff = 0;
045: private int pem_voff = 0;
046:
047: public MuGenericAnchoredPopup(String xID, ACoDataGetter xTplGetter,
048: Object xTplName, MuGenericApplication xAppl)
049: throws Exception {
050: super (xID, xTplGetter, xTplName, xAppl);
051:
052: this .pcmf_setView(pem_view);
053: this .pcmf_setValue("");
054:
055: return;
056: };
057:
058: // @@
059:
060: public void pcmf_setComponent(IUnComponent xComp) {
061: this .pcmf_clear();
062: this .pcmf_addNode("POPUP", xComp.pcmf_getUnComponent());
063: }
064:
065: public void pcmf_setComponent(UnComponent xComp) {
066: this .pcmf_clear();
067: this .pcmf_addNode("POPUP", xComp.pcmf_getUnComponent());
068: }
069:
070: public int pcmf_getPopUpHorizontalOffset() {
071: return (this .pem_hoff);
072: }
073:
074: public void pcmf_setPopUpHorizontalOffset(int xOffs) {
075: this .pem_hoff = xOffs;
076: }
077:
078: public int pcmf_getPopUpVerticalOffset() {
079: return (this .pem_voff);
080: }
081:
082: public void pcmf_setPopUpVerticalOffset(int xOffs) {
083: this .pem_voff = xOffs;
084: }
085:
086: public boolean pcmf_isDisplay() {
087: return this .pem_display;
088: }
089:
090: public void pcmf_displayPopup() {
091: this .pcmf_setPropChanged(true);
092:
093: if (this .pem_display == true)
094: return;
095:
096: this .pem_display = true;
097: }
098:
099: public void pcmf_hidePopup() {
100: this .pcmf_setPropChanged(true);
101:
102: if (this .pem_display == false)
103: return;
104:
105: this .pem_display = false;
106: }
107:
108: public void pcmf_setIcon(IUnImage xIcon) {
109: if (xIcon == this .pem_icon)
110: return;
111:
112: if (this .pem_icon != null)
113: this .pem_icon.pcmf_detach();
114:
115: this .pem_icon = (MuGenericImage) xIcon;
116:
117: if (this .pem_icon != null)
118: this .pem_icon.pcmf_attach();
119:
120: this .pcmf_setPropChanged(true);
121: }
122:
123: public IUnImage pcmf_getIcon() {
124: return (this .pem_icon);
125: }
126:
127: public void pcmf_delete() throws Exception {
128: if (this .pdm_deleted == true)
129: return;
130:
131: if (this .pem_icon != null) {
132: this .pem_icon.pcmf_detach();
133: this .pem_icon.pcmf_getUnComponent().pcmf_delete();
134: }
135:
136: super .pcmf_delete();
137: }
138:
139: // @@
140:
141: }
|