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.interfaces.*;
037:
038: public final class MuGenericLink extends MuGenericComponent implements
039: IUnLink, IKePoolable {
040: protected char pdm_accKey = ' ';
041: private IKeView pem_view = new HtmlLinkRenderer();
042: protected IUnImage pdm_icon = null;
043: private boolean pem_wrap = true;
044:
045: public MuGenericLink(String xValue, ACoDataGetter xTplGetter,
046: Object xTplName, MuGenericApplication xAppl)
047: throws Exception {
048: super (xValue, xTplGetter, xTplName, xAppl);
049:
050: this .pcmf_setEventOnChange(true);
051: this .pcmf_setView(pem_view);
052: this .pcmf_setValue(xValue);
053:
054: return;
055: };
056:
057: // @@
058:
059: private int pem_talign = IUnInputField.TEXT_ALIGN_WEST;
060:
061: public void pcmf_setTextAlign(int xAlign) {
062: this .pem_talign = xAlign;
063: }
064:
065: public int pcmf_getTextAlign() {
066: return (this .pem_talign);
067: }
068:
069: public void pcmf_setIcon(IUnImage xIcon) {
070: if (xIcon == this .pdm_icon)
071: return;
072:
073: if (this .pdm_icon != null)
074: this .pdm_icon.pcmf_detach();
075:
076: this .pdm_icon = xIcon;
077: this .pdm_icon.pcmf_attach();
078:
079: this .pcmf_setPropChanged(true);
080: }
081:
082: public IUnImage pcmf_getIcon() {
083: return (this .pdm_icon);
084: }
085:
086: public void pcmf_setKeyAccess(int xKey) {
087: if (this .pdm_accKey == (char) xKey)
088: return;
089:
090: this .pdm_accKey = (char) xKey;
091: this .pcmf_setPropChanged(true);
092: };
093:
094: public int pcmf_getAccKey() {
095: return (this .pdm_accKey);
096: }
097:
098: public void pcmf_delete() throws Exception {
099: if (this .pdm_deleted == true)
100: return;
101:
102: if (this .pdm_icon != null) {
103: this .pdm_icon.pcmf_detach();
104: this .pdm_icon.pcmf_getUnComponent().pcmf_delete();
105: }
106:
107: super .pcmf_delete();
108: }
109:
110: public void pcmf_setWrap(boolean xWrap) {
111: this .pem_wrap = xWrap;
112: }
113:
114: public boolean pcmf_getWrap() {
115: return (this .pem_wrap);
116: }
117:
118: // @@
119:
120: };
|