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: 30.08.2003 project: WiSer-Framework
039: *
040: * <p>
041: * This is the common interface to dialogs
042: * </p>
043: */
044: public interface IUnDialog extends IUnContainer, IUnLayouted,
045: IUnComponent, IUnPanel, IUnGuiEventListener {
046: public static final String DIALOG_CLOSED = "CLOSED";
047: public static final String DIALOG_CLOSING = "CLOSING";
048: public static final String DIALOG_ACTIVATED = "ACTIVATED";
049: public static final String DIALOG_ICONIFIED = "ICONIFIED";
050: public static final String DIALOG_DEICONIFIED = "DEICONIFIED";
051: public static final String DIALOG_DEACTIVATED = "DEACTIVATED";
052: public static final String DIALOG_OPENED = "OPENED";
053: public static final String DIALOG_GETFOCUS = "GETFOCUS";
054: public static final String DIALOG_LOSTFOCUS = "LOSTFOCUS";
055: public static final String DIALOG_RESIZED = "RESIZED";
056: public static final String DIALOG_MOVED = "MOVED";
057:
058: /**
059: * @author Dirk
060: *
061: * date: 29.05.2007 project: WiSer-Framework
062: *
063: * <p>
064: * Factory is a convenience class to create components of the surrounding
065: * interface's type without taking care for the WidgetServer MultiChannel API.
066: * It's use is similar to a constructor.
067: * </p>
068: */
069: public static class Factory {
070: /**
071: * Creates a standard version of this component as described in the factory.
072: * If you create masses of components for e.g. within a renderer use
073: * <i> create(IUnApplication xAppl)</i> for performance
074: * reasons.
075: *
076: * @param xTitle
077: * dialog title
078: * @return new component
079: */
080: public static IUnDialog create(String xTitle) {
081: IUnApplication l_appl = (IUnApplication) KeRegisteredObject
082: .pcmf_getObjByName(IUnApplication.MY_APPL);
083: return (l_appl.pcmf_getComponentFactory()
084: .pcmf_createDialog(l_appl.pcmf_getApplType(),
085: xTitle, false, l_appl));
086: }
087:
088: /**
089: * Creates a special version of this component as described in the factory
090: * configuration under the descriptor xFactoryDesc. If you create masses of
091: * components for e.g. within a renderer use <i>
092: * create(IUnApplication xAppl, String xFactoryDesc)</i> for performance
093: * reasons.
094: *
095: * @param xTitle
096: * dialog title
097: * @param xFactoryDesc
098: * descriptor
099: * @return new component
100: */
101: public static IUnDialog create(String xTitle,
102: String xFactoryDesc) {
103: IUnApplication l_appl = (IUnApplication) KeRegisteredObject
104: .pcmf_getObjByName(IUnApplication.MY_APPL);
105: return (l_appl.pcmf_getComponentFactory()
106: .pcmf_createDialogPlugin(l_appl.pcmf_getApplType(),
107: xTitle, false, l_appl, xFactoryDesc));
108: }
109:
110: /**
111: * Creates a standard version of this component as described in the factory
112: * within the given application-context. If you create masses of components
113: * for e.g. within a renderer use this method for performance reasons.
114: *
115: * @param xTitle
116: * dialog title
117: * @param xAppl
118: * application in which context the component is created
119: * @return new component
120: */
121: public static IUnDialog create(String xTitle,
122: IUnApplication xAppl) {
123: return (xAppl.pcmf_getComponentFactory().pcmf_createDialog(
124: xAppl.pcmf_getApplType(), xTitle, false, xAppl));
125: }
126:
127: /**
128: * Creates a special version of this component as described in the factory
129: * configuration under the descriptor xFactoryDesc. If you create masses of
130: * components for e.g. within a renderer use this function for performance
131: * reasons.
132: *
133: * @param xTitle
134: * dialog title
135: * @param xFactoryDesc
136: * descriptor
137: * @param xAppl
138: * application in which context the component is created
139: * @return new component
140: */
141: public static IUnDialog create(String xTitle,
142: IUnApplication xAppl, String xFactoryDesc) {
143: return (xAppl.pcmf_getComponentFactory()
144: .pcmf_createDialogPlugin(xAppl.pcmf_getApplType(),
145: xTitle, false, xAppl, xFactoryDesc));
146: }
147: }
148:
149: /**
150: * <p>
151: * This function activates the dialog, that means the next render positions
152: * the dialogue of the active page.
153: * </p>
154: */
155: public void pcmf_displayDialog();
156:
157: /**
158: * <p>
159: * Deactivates an activated dialog.
160: * </p>
161: */
162: public void pcmf_hideDialog();
163:
164: /**
165: * <p>
166: * Brings the dialog to front.
167: * </p>
168: */
169: public void pcmf_toFront();
170:
171: /**
172: * <p>
173: * Informs the caller whether the dialog is currently displayed or not.
174: * </p>
175: */
176: public boolean pcmf_isDisplay();
177:
178: /**
179: * <p>
180: * Sets the dialog to be resizable
181: * </p>
182: * <p>
183: *
184: * @param xSizable
185: * true indicates that the dialogue is resizable, false does the
186: * opposite
187: * </p>
188: */
189: public void pcmf_setResizable(boolean xSizable);
190:
191: /**
192: * <p>
193: * Informs about the resizability of the dialog
194: * </p>
195: */
196: public boolean pcmf_isResizable();
197:
198: /**
199: * <p>
200: * Sets the dialog to have no decoration
201: * </p>
202: * <p>
203: *
204: * @param xDeco
205: * true indicates that the dialog has a decoration, false does the
206: * opposite
207: * </p>
208: */
209: public void pcmf_setDecoration(boolean xDeco);
210:
211: /**
212: * <p>
213: * Sets the dialog to modal
214: * </p>
215: * <p>
216: *
217: * @param xModal
218: * true indicates modal otherwise non modal
219: * </p>
220: */
221: public void pcmf_setModal(boolean xModal);
222:
223: /**
224: * <p>
225: * Returns whether the dialog is modal or not
226: * </p>
227: */
228: public boolean pcmf_isModal();
229:
230: /**
231: * <p>
232: * If a dialog is used within a mdi environment it may be reshaped. Because
233: * the corresponding events lead to massive network traffic, they can be
234: * enabled and disabled separately.
235: * </p>
236: * <p>
237: *
238: * @param xReshapes
239: * true or false
240: * </p>
241: */
242: public void pcmf_setGenerateReshapeEvents(boolean xReshapes);
243:
244: /**
245: * <p>
246: * Returns whether reshape events are generated or not
247: * </p>
248: * <p>
249: *
250: * @return true or false
251: * </p>
252: */
253: public boolean pcmf_getGenerateReshapeEvents();
254:
255: /**
256: * <p>
257: * Sets the position of the dialog
258: * </p>
259: * <p>
260: *
261: * @param xPos
262: * position in x-direction
263: * @param yPos
264: * position in y-direction
265: * @param xWi
266: * width of the object
267: * @param xHi
268: * height of the object
269: * </p>
270: */
271: public void pcmf_setPosition(int xPos, int yPos, int xWi, int xHi);
272:
273: /**
274: * <p>
275: * Sets the title of the dialog. This can only be done while the dialog is not
276: * connected to a component tree
277: * </p>
278: * <p>
279: *
280: * @param xTitle
281: * title of the dialog
282: * </p>
283: */
284: public void pcmf_setTitle(String xTitle);
285:
286: /**
287: * <p>
288: * Gets the title of the dialog.
289: * </p>
290: * <p>
291: *
292: * @return xTitle
293: * </p>
294: */
295: public String pcmf_getTitle();
296: }
|