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.unifiedGui.interfaces;
032:
033: import de.ug2t.kernel.*;
034:
035: /**
036: * @author Dirk
037: *
038: * date: 24.11.2003 project: WiSer-Framework
039: *
040: * <p>
041: * IUnForm is the common interface to a gui-form, a form contains other widgets
042: * </p>
043: */
044: public interface IUnForm extends IUnIconView, IUnContainer,
045: IUnLayouted, IUnComponent, IUnScrollController, IUnPanel {
046: /**
047: * @author Dirk
048: *
049: * date: 29.05.2007 project: WiSer-Framework
050: *
051: * <p>
052: * Factory is a convenience class to create components of the surrounding interface's type without
053: * taking care for the WidgetServer MultiChannel API. It's use is similar to a
054: * constructor.
055: * </p>
056: */
057: public static class Factory {
058: /**
059: * Creates a standard version of this component as described in the factory.
060: * If you create masses of components for e.g. within a renderer use
061: * <i> create(IUnApplication xAppl)</i> for performance
062: * reasons.
063: *
064: * @return new component
065: */
066: public static IUnForm create() {
067: IUnApplication l_appl = (IUnApplication) KeRegisteredObject
068: .pcmf_getObjByName(IUnApplication.MY_APPL);
069: return (l_appl.pcmf_getComponentFactory().pcmf_createForm(
070: l_appl.pcmf_getApplType(), "", false, l_appl));
071: }
072:
073: /**
074: * Creates a special version of this component as described in the factory
075: * configuration under the descriptor xFactoryDesc. If you create masses of
076: * components for e.g. within a renderer use <i>
077: * create(IUnApplication xAppl, String xFactoryDesc)</i> for performance
078: * reasons.
079: *
080: * @param xFactoryDesc
081: * descriptor
082: * @return new component
083: */
084: public static IUnForm create(String xFactoryDesc) {
085: IUnApplication l_appl = (IUnApplication) KeRegisteredObject
086: .pcmf_getObjByName(IUnApplication.MY_APPL);
087: return (l_appl.pcmf_getComponentFactory()
088: .pcmf_createFormPlugin(l_appl.pcmf_getApplType(),
089: "", false, l_appl, xFactoryDesc));
090: }
091:
092: /**
093: * Creates a standard version of this component as described in the factory
094: * within the given application-context. If you create masses of components
095: * for e.g. within a renderer use this method for performance reasons.
096: *
097: * @param xAppl
098: * application in which context the component is created
099: * @return new component
100: */
101: public static IUnForm create(IUnApplication xAppl) {
102: return (xAppl.pcmf_getComponentFactory().pcmf_createForm(
103: xAppl.pcmf_getApplType(), "", false, xAppl));
104: }
105:
106: /**
107: * Creates a special version of this component as described in the factory
108: * configuration under the descriptor xFactoryDesc. If you create masses of
109: * components for e.g. within a renderer use this function for performance
110: * reasons.
111: *
112: * @param xFactoryDesc
113: * descriptor
114: * @param xAppl
115: * application in which context the component is created
116: * @return new component
117: */
118: public static IUnForm create(IUnApplication xAppl,
119: String xFactoryDesc) {
120: return (xAppl.pcmf_getComponentFactory()
121: .pcmf_createFormPlugin(xAppl.pcmf_getApplType(),
122: "", false, xAppl, xFactoryDesc));
123: }
124: }
125:
126: /**
127: * <p>
128: * Gets the associated icon of the form. An icon may be associated to a form
129: * if it is inserted into a tabPane or any other icon-view of the form is
130: * displayed
131: * </p>
132: * <p>
133: *
134: * @return IUnImage interface to an image object
135: * </p>
136: * <p>
137: * </p>
138: */
139: public IUnImage pcmf_getIcon();
140: }
|