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 de.ug2t.kernel.*;
034: import de.ug2t.unifiedGui.interfaces.*;
035:
036: public final class HoSwingForm extends HoSwingContainer implements
037: IUnForm {
038: private IUnImage pem_icon = null;
039:
040: public HoSwingForm(String xName, boolean xNoLayout,
041: IUnApplication xAppl) throws Exception {
042: super (xName, xAppl);
043: super .pcmf_setGuiObjNoLayout(xNoLayout);
044:
045: this .pcmf_setLocalValue(xName);
046: ((HoSwingClient) xAppl).pcmf_addKeyDispatcher(this );
047:
048: return;
049: };
050:
051: public KeTreeNode pcmf_addNode(String xName, KeTreeNode xNode) {
052: if (xNode instanceof HoSwingMenu)
053: this .pdm_mainPanel
054: .add(((HoSwingComponent) xNode).pdm_realSwingCmp);
055:
056: return (super .pcmf_addNode(xName, xNode));
057: };
058:
059: public KeTreeElement pcmf_addElement(String xName,
060: KeTreeElement xNode) {
061: if (xNode instanceof HoSwingMenu)
062: this .pdm_mainPanel
063: .add(((HoSwingComponent) xNode).pdm_realSwingCmp);
064:
065: return (super .pcmf_addElement(xName, xNode));
066: };
067:
068: public void pcmf_setIcon(IUnImage xIcon) {
069: pem_icon = xIcon;
070: };
071:
072: public IUnImage pcmf_getIcon() {
073: return (this .pem_icon);
074: }
075:
076: public void pcmf_scrollXRel(int xPx) {
077: int l_x = this .pdm_mainPane.getHorizontalScrollBar().getValue();
078: l_x += xPx;
079: this .pdm_mainPane.getHorizontalScrollBar().setValue(l_x);
080: }
081:
082: public void pcmf_scrollXAbs(int xPx) {
083: this .pdm_mainPane.getHorizontalScrollBar().setValue(xPx);
084: }
085:
086: public void pcmf_scrollYRel(int xPy) {
087: int l_y = this .pdm_mainPane.getVerticalScrollBar().getValue();
088: l_y += xPy;
089: this .pdm_mainPane.getVerticalScrollBar().setValue(l_y);
090: }
091:
092: public void pcmf_scrollYAbs(int xPy) {
093: this .pdm_mainPane.getVerticalScrollBar().setValue(xPy);
094: }
095:
096: public int pcmf_getXScroll() {
097: return (this .pdm_mainPane.getHorizontalScrollBar().getValue());
098: }
099:
100: public int pcmf_getYScroll() {
101: return (this.pdm_mainPane.getVerticalScrollBar().getValue());
102: }
103: }
|