001: // @@
002: // @@
003: /*
004: * Wi.Ser Framework
005: *
006: * LGPL Version: 1.8.1, 20-September-2007
007: * Copyright (C) 2005-2006 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.ho.client.swing;
032:
033: import java.awt.*;
034: import java.net.*;
035:
036: import javax.swing.*;
037:
038: import de.ug2t.kernel.*;
039: import de.ug2t.unifiedGui.interfaces.*;
040:
041: /**
042: * @author Dirk
043: *
044: * date: 30.01.2005
045: *
046: * <p>
047: * Purpose:
048: * </p>
049: */
050: public final class HoSwingSnapShotComponent extends HoSwingComponent
051: implements IUnSnapShotComponent {
052: private JLabel pem_swingObj = null;
053:
054: /**
055: * @param xName
056: * @param xAppl
057: * @throws Exception
058: */
059: public HoSwingSnapShotComponent(String xName, String xValue,
060: IUnApplication xAppl) throws Exception {
061: super (xName, xAppl);
062: super .pcmf_setValue(xValue);
063:
064: this .pem_swingObj = new JLabel(new ImageIcon(new URL(xValue)));
065: this .pdm_realSwingCmp = this .pem_swingObj;
066: ((HoSwingClient) xAppl).pcmf_addKeyDispatcher(this );
067: }
068:
069: /**
070: * <p>
071: * Does...
072: * </p>
073: * <p>
074: *
075: * @return a Type with
076: * </p>
077: * <p>
078: * @param
079: * </p>
080: */
081: public void pcmf_setSnapShotRoot(Component xWdg) {
082: throw (new UnsupportedOperationException());
083: }
084:
085: /**
086: * <p>
087: * Does...
088: * </p>
089: * <p>
090: *
091: * @return a Type with
092: * </p>
093: * <p>
094: * @param
095: * </p>
096: */
097: public void pcmf_setWidgetSize(int x, int y) {
098: throw (new UnsupportedOperationException());
099: }
100:
101: /**
102: * <p>
103: * Does...
104: * </p>
105: * <p>
106: *
107: * @return a Type with
108: * </p>
109: * <p>
110: * @param
111: * </p>
112: */
113: public int pcmf_getWidgetSizeX() {
114: throw (new UnsupportedOperationException());
115: }
116:
117: /**
118: * <p>
119: * Does...
120: * </p>
121: * <p>
122: *
123: * @return a Type with
124: * </p>
125: * <p>
126: * @param
127: * </p>
128: */
129: public int pcmf_getWidgetSizeY() {
130: throw (new UnsupportedOperationException());
131: }
132:
133: /**
134: * <p>
135: * Does...
136: * </p>
137: * <p>
138: *
139: * @return a Type with
140: * </p>
141: * <p>
142: * @param
143: * </p>
144: */
145: public void pcmf_commitWidget() {
146: try {
147: this .pem_swingObj.setIcon(new ImageIcon(new URL(this
148: .pcmf_getValue().toString())));
149: this .pem_swingObj.repaint();
150: } catch (Exception e) {
151: KeLog.pcmf_log("ug2t", "error receiving image for widget",
152: this, KeLog.ERROR);
153: }
154: }
155:
156: }
|