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: 11.06.2004
045: *
046: * <p>
047: * Purpose:
048: * </p>
049: */
050: public final class HoSwingDrawPane extends HoSwingComponent implements
051: IUnDrawPane {
052: private JLabel pem_swingObj = null;
053:
054: /**
055: * @param xName
056: * @param xAppl
057: * @throws Exception
058: */
059: public HoSwingDrawPane(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_clearDrawPane() {
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 Graphics pcmf_getGraphics() {
098: return null;
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 void pcmf_commitDrawPane() {
114: try {
115: this .pem_swingObj.setIcon(new ImageIcon(new URL(this
116: .pcmf_getValue().toString())));
117: this .pem_swingObj.repaint();
118: } catch (Exception e) {
119: KeLog.pcmf_log("ug2t",
120: "error receiving image for drawPane", this ,
121: KeLog.ERROR);
122: }
123: }
124:
125: public void pcmf_setDrawPaneSize(int x, int y) {
126: throw (new UnsupportedOperationException());
127: }
128:
129: public int pcmf_getDrawPaneSizeX() {
130: throw (new UnsupportedOperationException());
131: }
132:
133: public int pcmf_getDrawPaneSizeY() {
134: throw (new UnsupportedOperationException());
135: }
136: }
|