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: import de.ug2t.unifiedGui.*;
035:
036: /**
037: * @author Dirk
038: *
039: * date: 08.02.2004 project: WiSer-Framework
040: *
041: * <p>
042: * This is the common interface to some simple modal dialogues
043: * </p>
044: */
045: public interface IUnOptionDialog {
046: public static final String DLG_CONFIRMED = "CONFIRMED";
047: public static final String DLG_NOTCONFIRMED = "NOTCONFIRMED";
048:
049: /**
050: * Only in Half-Object based channels!
051: */
052: public static final String DLG_CANCELED = "CANCELED";
053:
054: /**
055: * @author Dirk
056: *
057: * date: 29.05.2007 project: WiSer-Framework
058: *
059: * <p>
060: * Factory is a convenience class to create components of the surrounding interface's type without
061: * taking care for the WidgetServer MultiChannel API. It's use is similar to a
062: * constructor.
063: * </p>
064: */
065: public static class Factory {
066: /**
067: * Creates a standard version of this component as described in the factory.
068: * If you create masses of components for e.g. within a renderer use
069: * <i> create(IUnApplication xAppl)</i> for performance
070: * reasons.
071: *
072: * @return new component
073: */
074: public static IUnOptionDialog create() {
075: IUnApplication l_appl = (IUnApplication) KeRegisteredObject
076: .pcmf_getObjByName(IUnApplication.MY_APPL);
077: return (l_appl.pcmf_getComponentFactory()
078: .pcmf_createOptDlg(l_appl.pcmf_getApplType(), "",
079: l_appl));
080: }
081:
082: /**
083: * Creates a special version of this component as described in the factory
084: * configuration under the descriptor xFactoryDesc. If you create masses of
085: * components for e.g. within a renderer use <i>
086: * create(IUnApplication xAppl, String xFactoryDesc)</i> for performance
087: * reasons.
088: *
089: * @param xFactoryDesc
090: * descriptor
091: * @return new component
092: */
093: public static IUnOptionDialog create(String xFactoryDesc) {
094: IUnApplication l_appl = (IUnApplication) KeRegisteredObject
095: .pcmf_getObjByName(IUnApplication.MY_APPL);
096: return (l_appl.pcmf_getComponentFactory()
097: .pcmf_createOptDlgPlugin(l_appl.pcmf_getApplType(),
098: "", l_appl, xFactoryDesc));
099: }
100:
101: /**
102: * Creates a standard version of this component as described in the factory
103: * within the given application-context. If you create masses of components
104: * for e.g. within a renderer use this method for performance reasons.
105: *
106: * @param xAppl
107: * application in which context the component is created
108: * @return new component
109: */
110: public static IUnOptionDialog create(IUnApplication xAppl) {
111: return (xAppl.pcmf_getComponentFactory().pcmf_createOptDlg(
112: xAppl.pcmf_getApplType(), "", xAppl));
113: }
114:
115: /**
116: * Creates a special version of this component as described in the factory
117: * configuration under the descriptor xFactoryDesc. If you create masses of
118: * components for e.g. within a renderer use this function for performance
119: * reasons.
120: *
121: * @param xFactoryDesc
122: * descriptor
123: * @param xAppl
124: * application in which context the component is created
125: * @return new component
126: */
127: public static IUnOptionDialog create(IUnApplication xAppl,
128: String xFactoryDesc) {
129: return (xAppl.pcmf_getComponentFactory()
130: .pcmf_createOptDlgPlugin(xAppl.pcmf_getApplType(),
131: "", xAppl, xFactoryDesc));
132: }
133: }
134:
135: /**
136: * <p>
137: * Gets the associated gui-object which implements all common methods.
138: * </p>
139: * <p>
140: *
141: * @return gui-object
142: * </p>
143: * <p>
144: * </p>
145: */
146: public UnComponent pcmf_getUnComponent();
147:
148: /**
149: * <p>
150: * Shows an alert dialogue with a single line of text.
151: * </p>
152: * <p>
153: *
154: * </p>
155: * <p>
156: *
157: * @param xMessage
158: * alert message
159: * </p>
160: */
161: public void pcmf_showAlert(String xMessage);
162:
163: /**
164: * <p>
165: * Shows a simple do, do not dialogue with a single line of text.
166: * </p>
167: * <p>
168: *
169: * </p>
170: * <p>
171: *
172: * @param xMessage
173: * closed question
174: * </p>
175: */
176: public void pcmf_showOption(String xMessage);
177:
178: /**
179: * <p>
180: * Shows a simple input dialogue which can be used to enter a value.
181: * </p>
182: * <p>
183: *
184: * </p>
185: * <p>
186: *
187: * @param xMessage
188: * message
189: * </p>
190: */
191: public void pcmf_showTextInput(String xMessage);
192: }
|