OSDN Git Service

2004-01-28 Michael Koch <konqueror@gmx.de>
[pf3gnuchains/gcc-fork.git] / libjava / javax / swing / JProgressBar.java
1 /* JProgressBar.java --
2    Copyright (C) 2002, 2004 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 import java.awt.Graphics;
41 import java.io.IOException;
42 import java.io.ObjectOutputStream;
43 import javax.accessibility.Accessible;
44 import javax.accessibility.AccessibleContext;
45 import javax.accessibility.AccessibleRole;
46 import javax.accessibility.AccessibleStateSet;
47 import javax.accessibility.AccessibleValue;
48 import javax.swing.event.ChangeEvent;
49 import javax.swing.event.ChangeListener;
50 import javax.swing.plaf.ProgressBarUI;
51
52 /**
53  * JProgressBar
54  * @author      Andrew Selkirk
55  * @version     1.0
56  */
57 public class JProgressBar extends JComponent implements SwingConstants, Accessible
58 {
59
60         //-------------------------------------------------------------
61         // Classes ----------------------------------------------------
62         //-------------------------------------------------------------
63
64
65         /**
66          * AccessibleJProgressBar
67          */
68         protected class AccessibleJProgressBar extends AccessibleJComponent 
69                         implements AccessibleValue {
70
71                 //-------------------------------------------------------------
72                 // Variables --------------------------------------------------
73                 //-------------------------------------------------------------
74
75
76                 //-------------------------------------------------------------
77                 // Initialization ---------------------------------------------
78                 //-------------------------------------------------------------
79
80                 /**
81                  * Constructor AccessibleJProgressBar
82                  * @param component TODO
83                  */
84                 protected AccessibleJProgressBar(JProgressBar component) {
85                         super(component);
86                         // TODO
87                 } // AccessibleJProgressBar()
88
89
90                 //-------------------------------------------------------------
91                 // Methods ----------------------------------------------------
92                 //-------------------------------------------------------------
93
94                 /**
95                  * getAccessibleStateSet
96                  * @returns AccessibleStateSet
97                  */
98                 public AccessibleStateSet getAccessibleStateSet() {
99                         return null; // TODO
100                 } // getAccessibleStateSet()
101
102                 /**
103                  * getAccessibleRole
104                  * @returns AccessibleRole
105                  */
106                 public AccessibleRole getAccessibleRole() {
107                         return AccessibleRole.PROGRESS_BAR;
108                 } // getAccessibleRole()
109
110                 /**
111                  * getAccessibleValue
112                  * @returns AccessibleValue
113                  */
114                 public AccessibleValue getAccessibleValue() {
115                         return null; // TODO
116                 } // getAccessibleValue()
117
118                 /**
119                  * getCurrentAccessibleValue
120                  * @returns Number
121                  */
122                 public Number getCurrentAccessibleValue() {
123                         return null; // TODO
124                 } // getCurrentAccessibleValue()
125
126                 /**
127                  * setCurrentAccessibleValue
128                  * @param value0 TODO
129                  * @returns boolean
130                  */
131                 public boolean setCurrentAccessibleValue(Number value0) {
132                         return false; // TODO
133                 } // setCurrentAccessibleValue()
134
135                 /**
136                  * getMinimumAccessibleValue
137                  * @returns Number
138                  */
139                 public Number getMinimumAccessibleValue() {
140                         return null; // TODO
141                 } // getMinimumAccessibleValue()
142
143                 /**
144                  * getMaximumAccessibleValue
145                  * @returns Number
146                  */
147                 public Number getMaximumAccessibleValue() {
148                         return null; // TODO
149                 } // getMaximumAccessibleValue()
150
151
152         } // AccessibleJProgressBar
153
154
155         //-------------------------------------------------------------
156         // Variables --------------------------------------------------
157         //-------------------------------------------------------------
158
159         /**
160          * uiClassID
161          */
162         private static final String uiClassID = "ProgressBarUI";
163
164         /**
165          * orientation
166          */
167         protected int orientation;
168
169         /**
170          * paintBorder
171          */
172         protected boolean paintBorder;
173
174         /**
175          * model
176          */
177         protected BoundedRangeModel model;
178
179         /**
180          * progressString
181          */
182         protected String progressString;
183
184         /**
185          * paintString
186          */
187         protected boolean paintString;
188
189         /**
190          * changeEvent
191          */
192         protected transient ChangeEvent changeEvent;
193
194         /**
195          * changeListener
196          */
197         protected ChangeListener changeListener;
198
199
200         //-------------------------------------------------------------
201         // Initialization ---------------------------------------------
202         //-------------------------------------------------------------
203
204         /**
205          * Constructor JProgressBar
206          */
207         public JProgressBar() {
208                 // TODO
209         } // JProgressBar()
210
211         /**
212          * Constructor JProgressBar
213          * @param orientation TODO
214          */
215         public JProgressBar(int orientation) {
216                 // TODO
217         } // JProgressBar()
218
219         /**
220          * Constructor JProgressBar
221          * @param minimum TODO
222          * @param maximum TODO
223          */
224         public JProgressBar(int minimum, int maximum) {
225                 // TODO
226         } // JProgressBar()
227
228         /**
229          * Constructor JProgressBar
230          * @param minimum TODO
231          * @param maximum TODO
232          * @param orientation TODO
233          */
234         public JProgressBar(int minimum, int maximum, int orientation) {
235                 // TODO
236         } // JProgressBar()
237
238         /**
239          * Constructor JProgressBar
240          * @param model TODO
241          */
242         public JProgressBar(BoundedRangeModel model) {
243                 // TODO
244         } // JProgressBar()
245
246
247         //-------------------------------------------------------------
248         // Methods ----------------------------------------------------
249         //-------------------------------------------------------------
250
251         /**
252          * writeObject
253          * @param stream TODO
254          * @exception IOException TODO
255          */
256         private void writeObject(ObjectOutputStream stream) throws IOException {
257                 // TODO
258         } // writeObject()
259
260         /**
261          * getValue
262          * @returns int
263          */
264         public int getValue() {
265                 return 0; // TODO
266         } // getValue()
267
268         /**
269          * setValue
270          * @param value TODO
271          */
272         public void setValue(int value) {
273                 // TODO
274         } // setValue()
275
276         /**
277          * paintBorder
278          * @param graphics TODO
279          */
280         protected void paintBorder(Graphics graphics) {
281                 // TODO
282         } // paintBorder()
283
284         /**
285          * getOrientation
286          * @returns int
287          */
288         public int getOrientation() {
289                 return 0; // TODO
290         } // getOrientation()
291
292         /**
293          * setOrientation
294          * @param orientation TODO
295          */
296         public void setOrientation(int orientation) {
297                 // TODO
298         } // setOrientation()
299
300         /**
301          * isStringPainted
302          * @returns boolean
303          */
304         public boolean isStringPainted() {
305                 return false; // TODO
306         } // isStringPainted()
307
308         /**
309          * setStringPainted
310          * @param painted TODO
311          */
312         public void setStringPainted(boolean painted) {
313                 // TODO
314         } // setStringPainted()
315
316         /**
317          * getString
318          * @returns String
319          */
320         public String getString() {
321                 return null; // TODO
322         } // getString()
323
324         /**
325          * setString
326          * @param string TODO
327          */
328         public void setString(String string) {
329                 // TODO
330         } // setString()
331
332         /**
333          * getPercentComplete
334          * @returns double
335          */
336         public double getPercentComplete() {
337                 return 0.0; // TODO
338         } // getPercentComplete()
339
340         /**
341          * isBorderPainted
342          * @returns boolean
343          */
344         public boolean isBorderPainted() {
345                 return false; // TODO
346         } // isBorderPainted()
347
348         /**
349          * setBorderPainted
350          * @param painted TODO
351          */
352         public void setBorderPainted(boolean painted) {
353                 // TODO
354         } // setBorderPainted()
355
356         /**
357          * getUI
358          * @returns ProgressBarUI
359          */
360         public ProgressBarUI getUI() {
361                 return (ProgressBarUI) ui;
362         } // getUI()
363
364         /**
365          * setUI
366          * @param ui TODO
367          */
368         public void setUI(ProgressBarUI ui) {
369                 super.setUI(ui);
370                 // TODO
371         } // setUI()
372
373         /**
374          * updateUI
375          */
376         public void updateUI() {
377                 setUI((ProgressBarUI) UIManager.get(this));
378                 invalidate();
379         } // updateUI()
380
381         /**
382          * getUIClassID
383          * @returns String
384          */
385         public String getUIClassID() {
386                 return uiClassID;
387         } // getUIClassID()
388
389         /**
390          * createChangeListener
391          * @returns ChangeListener
392          */
393         protected ChangeListener createChangeListener() {
394                 return null; // TODO
395         } // createChangeListener()
396
397         /**
398          * addChangeListener
399          * @param listener TODO
400          */
401         public void addChangeListener(ChangeListener listener) {
402                 // TODO
403         } // addChangeListener()
404
405         /**
406          * removeChangeListener
407          * @param listener TODO
408          */
409         public void removeChangeListener(ChangeListener valulistener) {
410                 // TODO
411         } // removeChangeListener()
412
413         /**
414          * fireStateChanged
415          */
416         protected void fireStateChanged() {
417                 // TODO
418         } // fireStateChanged()
419
420         /**
421          * getModel
422          * @returns BoundedRangeModel
423          */
424         public BoundedRangeModel getModel() {
425                 return null; // TODO
426         } // getModel()
427
428         /**
429          * setModel
430          * @param model TODO
431          */
432         public void setModel(BoundedRangeModel model) {
433                 // TODO
434         } // setModel()
435
436         /**
437          * getMinimum
438          * @returns int
439          */
440         public int getMinimum() {
441                 return 0; // TODO
442         } // getMinimum()
443
444         /**
445          * setMinimum
446          * @param minimum TODO
447          */
448         public void setMinimum(int minimum) {
449                 // TODO
450         } // setMinimum()
451
452         /**
453          * getMaximum
454          * @returns int
455          */
456         public int getMaximum() {
457                 return 0; // TODO
458         } // getMaximum()
459
460         /**
461          * setMaximum
462          * @param maximum TODO
463          */
464         public void setMaximum(int maximum) {
465                 // TODO
466         } // setMaximum()
467
468         /**
469          * paramString
470          * @returns String
471          */
472         protected String paramString() {
473                 return null; // TODO
474         } // paramString()
475
476         /**
477          * getAccessibleContext
478          * @returns AccessibleContext
479          */
480         public AccessibleContext getAccessibleContext() {
481                 if (accessibleContext == null) {
482                         accessibleContext = new AccessibleJProgressBar(this);
483                 } // if
484                 return accessibleContext;
485         } // getAccessibleContext()
486
487
488 } // JProgressBar