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