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: 10.11.2005 project: WiSer-Framework
039: *
040: * <p>
041: * This is the common interface to a progress bar widget
042: * </p>
043: */
044: public interface IUnProgressBar extends IUnComponent {
045: /**
046: * @author Dirk
047: *
048: * date: 29.05.2007 project: WiSer-Framework
049: *
050: * <p>
051: * Factory is a convenience class to create components of the surrounding
052: * interface's type without taking care for the WidgetServer MultiChannel API.
053: * It's use is similar to a constructor.
054: * </p>
055: */
056: public static class Factory {
057: /**
058: * Creates a standard version of this component as described in the factory.
059: * If you create masses of components for e.g. within a renderer use
060: * <i> create(IUnApplication xAppl)</i> for performance
061: * reasons.
062: *
063: * @param xMin
064: * minimum value of the progress bar
065: * @param xMax
066: * maximum value of the progress bar
067: * @return new component
068: */
069: public static IUnProgressBar create(int xMin, int xMax) {
070: IUnApplication l_appl = (IUnApplication) KeRegisteredObject
071: .pcmf_getObjByName(IUnApplication.MY_APPL);
072: return (l_appl.pcmf_getComponentFactory()
073: .pcmf_createProgressBar(l_appl.pcmf_getApplType(),
074: "", "0", xMin, xMax, l_appl));
075: }
076:
077: /**
078: * Creates a special version of this component as described in the factory
079: * configuration under the descriptor xFactoryDesc. If you create masses of
080: * components for e.g. within a renderer use <i>
081: * create(IUnApplication xAppl, String xFactoryDesc)</i> for performance
082: * reasons.
083: *
084: * @param xMin
085: * minimum value of the progress bar
086: * @param xMax
087: * maximum value of the progress bar
088: * @param xFactoryDesc
089: * descriptor
090: * @return new component
091: */
092: public static IUnProgressBar create(int xMin, int xMax,
093: String xFactoryDesc) {
094: IUnApplication l_appl = (IUnApplication) KeRegisteredObject
095: .pcmf_getObjByName(IUnApplication.MY_APPL);
096: return (l_appl.pcmf_getComponentFactory()
097: .pcmf_createProgressBarPlugin(l_appl
098: .pcmf_getApplType(), "", "0", xMin, xMax,
099: l_appl, xFactoryDesc));
100: }
101:
102: /**
103: * Creates a standard version of this component as described in the factory
104: * within the given application-context. If you create masses of components
105: * for e.g. within a renderer use this method for performance reasons.
106: *
107: * @param xMin
108: * minimum value of the progress bar
109: * @param xMax
110: * maximum value of the progress bar
111: * @param xAppl
112: * application in which context the component is created
113: * @return new component
114: */
115: public static IUnProgressBar create(int xMin, int xMax,
116: IUnApplication xAppl) {
117: return (xAppl.pcmf_getComponentFactory()
118: .pcmf_createProgressBar(xAppl.pcmf_getApplType(),
119: "", "0", xMin, xMax, xAppl));
120: }
121:
122: /**
123: * Creates a special version of this component as described in the factory
124: * configuration under the descriptor xFactoryDesc. If you create masses of
125: * components for e.g. within a renderer use this function for performance
126: * reasons.
127: *
128: * @param xMin
129: * minimum value of the progress bar
130: * @param xMax
131: * maximum value of the progress bar
132: * @param xFactoryDesc
133: * descriptor
134: * @param xAppl
135: * application in which context the component is created
136: * @return new component
137: */
138: public static IUnProgressBar create(int xMin, int xMax,
139: IUnApplication xAppl, String xFactoryDesc) {
140: return (xAppl.pcmf_getComponentFactory()
141: .pcmf_createProgressBarPlugin(xAppl
142: .pcmf_getApplType(), "", "0", xMin, xMax,
143: xAppl, xFactoryDesc));
144: }
145: }
146:
147: /**
148: * <p>
149: * Sets the minimum value of the progress bar
150: * </p>
151: * <p>
152: *
153: * </p>
154: * <p>
155: *
156: * @param xMin
157: * min value
158: * </p>
159: */
160: public void pcmf_setMin(int xMin);
161:
162: /**
163: * <p>
164: * Sets the maximum value of the progress bar
165: * </p>
166: * <p>
167: *
168: * </p>
169: * <p>
170: *
171: * @param xMax
172: * max value
173: * </p>
174: */
175: public void pcmf_setMax(int xMax);
176:
177: /**
178: * <p>
179: * Sets the progress value of the progress bar (must be between min and max)
180: * </p>
181: * <p>
182: *
183: * </p>
184: * <p>
185: *
186: * @param xProgress
187: * current progress value
188: * </p>
189: */
190: public void pcmf_setProgress(int xProgress);
191:
192: /**
193: * <p>
194: * Gets the progress value of the progress bar
195: * </p>
196: * <p>
197: *
198: * </p>
199: * <p>
200: *
201: * @return progress as int value
202: * </p>
203: */
204: public int pcmf_getProgress();
205: }
|