OSDN Git Service

2003-06-24 Michael Koch <konqueror@gmx.de>
[pf3gnuchains/gcc-fork.git] / libjava / javax / swing / JProgressBar.java
1 /* JProgressBar.java --
2    Copyright (C) 2002 Free Software Foundation, Inc.
3
4 This file is part of GNU Classpath.
5
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING.  If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA.
20
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library.  Thus, the terms and
23 conditions of the GNU General Public License cover the whole
24 combination.
25
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module.  An independent module is a module which is not derived from
33 or based on this library.  If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so.  If you do not wish to do so, delete this
36 exception statement from your version. */
37
38 package javax.swing;
39
40 // Imports
41 import java.awt.*;
42 import java.io.*;
43 import javax.accessibility.*;
44 import javax.swing.event.*;
45 import javax.swing.plaf.*;
46
47 /**
48  * JProgressBar
49  * @author      Andrew Selkirk
50  * @version     1.0
51  */
52 public class JProgressBar extends JComponent implements SwingConstants, Accessible
53 {
54
55         //-------------------------------------------------------------
56         // Classes ----------------------------------------------------
57         //-------------------------------------------------------------
58
59
60         /**
61          * AccessibleJProgressBar
62          */
63         protected class AccessibleJProgressBar extends AccessibleJComponent 
64                         implements AccessibleValue {
65
66                 //-------------------------------------------------------------
67                 // Variables --------------------------------------------------
68                 //-------------------------------------------------------------
69
70
71                 //-------------------------------------------------------------
72                 // Initialization ---------------------------------------------
73                 //-------------------------------------------------------------
74
75                 /**
76                  * Constructor AccessibleJProgressBar
77                  * @param component TODO
78                  */
79                 protected AccessibleJProgressBar(JProgressBar component) {
80                         super(component);
81                         // TODO
82                 } // AccessibleJProgressBar()
83
84
85                 //-------------------------------------------------------------
86                 // Methods ----------------------------------------------------
87                 //-------------------------------------------------------------
88
89                 /**
90                  * getAccessibleStateSet
91                  * @returns AccessibleStateSet
92                  */
93                 public AccessibleStateSet getAccessibleStateSet() {
94                         return null; // TODO
95                 } // getAccessibleStateSet()
96
97                 /**
98                  * getAccessibleRole
99                  * @returns AccessibleRole
100                  */
101                 public AccessibleRole getAccessibleRole() {
102                         return AccessibleRole.PROGRESS_BAR;
103                 } // getAccessibleRole()
104
105                 /**
106                  * getAccessibleValue
107                  * @returns AccessibleValue
108                  */
109                 public AccessibleValue getAccessibleValue() {
110                         return null; // TODO
111                 } // getAccessibleValue()
112
113                 /**
114                  * getCurrentAccessibleValue
115                  * @returns Number
116                  */
117                 public Number getCurrentAccessibleValue() {
118                         return null; // TODO
119                 } // getCurrentAccessibleValue()
120
121                 /**
122                  * setCurrentAccessibleValue
123                  * @param value0 TODO
124                  * @returns boolean
125                  */
126                 public boolean setCurrentAccessibleValue(Number value0) {
127                         return false; // TODO
128                 } // setCurrentAccessibleValue()
129
130                 /**
131                  * getMinimumAccessibleValue
132                  * @returns Number
133                  */
134                 public Number getMinimumAccessibleValue() {
135                         return null; // TODO
136                 } // getMinimumAccessibleValue()
137
138                 /**
139                  * getMaximumAccessibleValue
140                  * @returns Number
141                  */
142                 public Number getMaximumAccessibleValue() {
143                         return null; // TODO
144                 } // getMaximumAccessibleValue()
145
146
147         } // AccessibleJProgressBar
148
149
150         //-------------------------------------------------------------
151         // Variables --------------------------------------------------
152         //-------------------------------------------------------------
153
154         /**
155          * uiClassID
156          */
157         private static final String uiClassID = "ProgressBarUI";
158
159         /**
160          * orientation
161          */
162         protected int orientation;
163
164         /**
165          * paintBorder
166          */
167         protected boolean paintBorder;
168
169         /**
170          * model
171          */
172         protected BoundedRangeModel model;
173
174         /**
175          * progressString
176          */
177         protected String progressString;
178
179         /**
180          * paintString
181          */
182         protected boolean paintString;
183
184         /**
185          * changeEvent
186          */
187         protected transient ChangeEvent changeEvent;
188
189         /**
190          * changeListener
191          */
192         protected ChangeListener changeListener;
193
194
195         //-------------------------------------------------------------
196         // Initialization ---------------------------------------------
197         //-------------------------------------------------------------
198
199         /**
200          * Constructor JProgressBar
201          */
202         public JProgressBar() {
203                 // TODO
204         } // JProgressBar()
205
206         /**
207          * Constructor JProgressBar
208          * @param orientation TODO
209          */
210         public JProgressBar(int orientation) {
211                 // TODO
212         } // JProgressBar()
213
214         /**
215          * Constructor JProgressBar
216          * @param minimum TODO
217          * @param maximum TODO
218          */
219         public JProgressBar(int minimum, int maximum) {
220                 // TODO
221         } // JProgressBar()
222
223         /**
224          * Constructor JProgressBar
225          * @param minimum TODO
226          * @param maximum TODO
227          * @param orientation TODO
228          */
229         public JProgressBar(int minimum, int maximum, int orientation) {
230                 // TODO
231         } // JProgressBar()
232
233         /**
234          * Constructor JProgressBar
235          * @param model TODO
236          */
237         public JProgressBar(BoundedRangeModel model) {
238                 // TODO
239         } // JProgressBar()
240
241
242         //-------------------------------------------------------------
243         // Methods ----------------------------------------------------
244         //-------------------------------------------------------------
245
246         /**
247          * writeObject
248          * @param stream TODO
249          * @exception IOException TODO
250          */
251         private void writeObject(ObjectOutputStream stream) throws IOException {
252                 // TODO
253         } // writeObject()
254
255         /**
256          * getValue
257          * @returns int
258          */
259         public int getValue() {
260                 return 0; // TODO
261         } // getValue()
262
263         /**
264          * setValue
265          * @param value TODO
266          */
267         public void setValue(int value) {
268                 // TODO
269         } // setValue()
270
271         /**
272          * paintBorder
273          * @param graphics TODO
274          */
275         protected void paintBorder(Graphics graphics) {
276                 // TODO
277         } // paintBorder()
278
279         /**
280          * getOrientation
281          * @returns int
282          */
283         public int getOrientation() {
284                 return 0; // TODO
285         } // getOrientation()
286
287         /**
288          * setOrientation
289          * @param orientation TODO
290          */
291         public void setOrientation(int orientation) {
292                 // TODO
293         } // setOrientation()
294
295         /**
296          * isStringPainted
297          * @returns boolean
298          */
299         public boolean isStringPainted() {
300                 return false; // TODO
301         } // isStringPainted()
302
303         /**
304          * setStringPainted
305          * @param painted TODO
306          */
307         public void setStringPainted(boolean painted) {
308                 // TODO
309         } // setStringPainted()
310
311         /**
312          * getString
313          * @returns String
314          */
315         public String getString() {
316                 return null; // TODO
317         } // getString()
318
319         /**
320          * setString
321          * @param string TODO
322          */
323         public void setString(String string) {
324                 // TODO
325         } // setString()
326
327         /**
328          * getPercentComplete
329          * @returns double
330          */
331         public double getPercentComplete() {
332                 return 0.0; // TODO
333         } // getPercentComplete()
334
335         /**
336          * isBorderPainted
337          * @returns boolean
338          */
339         public boolean isBorderPainted() {
340                 return false; // TODO
341         } // isBorderPainted()
342
343         /**
344          * setBorderPainted
345          * @param painted TODO
346          */
347         public void setBorderPainted(boolean painted) {
348                 // TODO
349         } // setBorderPainted()
350
351         /**
352          * getUI
353          * @returns ProgressBarUI
354          */
355         public ProgressBarUI getUI() {
356                 return (ProgressBarUI) ui;
357         } // getUI()
358
359         /**
360          * setUI
361          * @param ui TODO
362          */
363         public void setUI(ProgressBarUI ui) {
364                 super.setUI(ui);
365                 // TODO
366         } // setUI()
367
368         /**
369          * updateUI
370          */
371         public void updateUI() {
372                 setUI((ProgressBarUI) UIManager.get(this));
373                 invalidate();
374         } // updateUI()
375
376         /**
377          * getUIClassID
378          * @returns String
379          */
380         public String getUIClassID() {
381                 return uiClassID;
382         } // getUIClassID()
383
384         /**
385          * createChangeListener
386          * @returns ChangeListener
387          */
388         protected ChangeListener createChangeListener() {
389                 return null; // TODO
390         } // createChangeListener()
391
392         /**
393          * addChangeListener
394          * @param listener TODO
395          */
396         public void addChangeListener(ChangeListener listener) {
397                 // TODO
398         } // addChangeListener()
399
400         /**
401          * removeChangeListener
402          * @param listener TODO
403          */
404         public void removeChangeListener(ChangeListener valulistener) {
405                 // TODO
406         } // removeChangeListener()
407
408         /**
409          * fireStateChanged
410          */
411         protected void fireStateChanged() {
412                 // TODO
413         } // fireStateChanged()
414
415         /**
416          * getModel
417          * @returns BoundedRangeModel
418          */
419         public BoundedRangeModel getModel() {
420                 return null; // TODO
421         } // getModel()
422
423         /**
424          * setModel
425          * @param model TODO
426          */
427         public void setModel(BoundedRangeModel model) {
428                 // TODO
429         } // setModel()
430
431         /**
432          * getMinimum
433          * @returns int
434          */
435         public int getMinimum() {
436                 return 0; // TODO
437         } // getMinimum()
438
439         /**
440          * setMinimum
441          * @param minimum TODO
442          */
443         public void setMinimum(int minimum) {
444                 // TODO
445         } // setMinimum()
446
447         /**
448          * getMaximum
449          * @returns int
450          */
451         public int getMaximum() {
452                 return 0; // TODO
453         } // getMaximum()
454
455         /**
456          * setMaximum
457          * @param maximum TODO
458          */
459         public void setMaximum(int maximum) {
460                 // TODO
461         } // setMaximum()
462
463         /**
464          * paramString
465          * @returns String
466          */
467         protected String paramString() {
468                 return null; // TODO
469         } // paramString()
470
471         /**
472          * getAccessibleContext
473          * @returns AccessibleContext
474          */
475         public AccessibleContext getAccessibleContext() {
476                 if (accessibleContext == null) {
477                         accessibleContext = new AccessibleJProgressBar(this);
478                 } // if
479                 return accessibleContext;
480         } // getAccessibleContext()
481
482
483 } // JProgressBar