2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / libjava / javax / swing / JProgressBar.java
blob2c4d834a6dd334cf2b3156dcf6b8fb32b2398ca9
1 /* JProgressBar.java --
2 Copyright (C) 2002 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
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.
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.
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.
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.
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. */
38 package javax.swing;
40 // Imports
41 import java.awt.*;
42 import java.io.*;
43 import javax.accessibility.*;
44 import javax.swing.event.*;
45 import javax.swing.plaf.*;
47 /**
48 * JProgressBar
49 * @author Andrew Selkirk
50 * @version 1.0
52 public class JProgressBar extends JComponent implements SwingConstants, Accessible
55 //-------------------------------------------------------------
56 // Classes ----------------------------------------------------
57 //-------------------------------------------------------------
60 /**
61 * AccessibleJProgressBar
63 protected class AccessibleJProgressBar extends AccessibleJComponent
64 implements AccessibleValue {
66 //-------------------------------------------------------------
67 // Variables --------------------------------------------------
68 //-------------------------------------------------------------
71 //-------------------------------------------------------------
72 // Initialization ---------------------------------------------
73 //-------------------------------------------------------------
75 /**
76 * Constructor AccessibleJProgressBar
77 * @param component TODO
79 protected AccessibleJProgressBar(JProgressBar component) {
80 super(component);
81 // TODO
82 } // AccessibleJProgressBar()
85 //-------------------------------------------------------------
86 // Methods ----------------------------------------------------
87 //-------------------------------------------------------------
89 /**
90 * getAccessibleStateSet
91 * @returns AccessibleStateSet
93 public AccessibleStateSet getAccessibleStateSet() {
94 return null; // TODO
95 } // getAccessibleStateSet()
97 /**
98 * getAccessibleRole
99 * @returns AccessibleRole
101 public AccessibleRole getAccessibleRole() {
102 return AccessibleRole.PROGRESS_BAR;
103 } // getAccessibleRole()
106 * getAccessibleValue
107 * @returns AccessibleValue
109 public AccessibleValue getAccessibleValue() {
110 return null; // TODO
111 } // getAccessibleValue()
114 * getCurrentAccessibleValue
115 * @returns Number
117 public Number getCurrentAccessibleValue() {
118 return null; // TODO
119 } // getCurrentAccessibleValue()
122 * setCurrentAccessibleValue
123 * @param value0 TODO
124 * @returns boolean
126 public boolean setCurrentAccessibleValue(Number value0) {
127 return false; // TODO
128 } // setCurrentAccessibleValue()
131 * getMinimumAccessibleValue
132 * @returns Number
134 public Number getMinimumAccessibleValue() {
135 return null; // TODO
136 } // getMinimumAccessibleValue()
139 * getMaximumAccessibleValue
140 * @returns Number
142 public Number getMaximumAccessibleValue() {
143 return null; // TODO
144 } // getMaximumAccessibleValue()
147 } // AccessibleJProgressBar
150 //-------------------------------------------------------------
151 // Variables --------------------------------------------------
152 //-------------------------------------------------------------
155 * uiClassID
157 private static final String uiClassID = "ProgressBarUI";
160 * orientation
162 protected int orientation;
165 * paintBorder
167 protected boolean paintBorder;
170 * model
172 protected BoundedRangeModel model;
175 * progressString
177 protected String progressString;
180 * paintString
182 protected boolean paintString;
185 * changeEvent
187 protected transient ChangeEvent changeEvent;
190 * changeListener
192 protected ChangeListener changeListener;
195 //-------------------------------------------------------------
196 // Initialization ---------------------------------------------
197 //-------------------------------------------------------------
200 * Constructor JProgressBar
202 public JProgressBar() {
203 // TODO
204 } // JProgressBar()
207 * Constructor JProgressBar
208 * @param orientation TODO
210 public JProgressBar(int orientation) {
211 // TODO
212 } // JProgressBar()
215 * Constructor JProgressBar
216 * @param minimum TODO
217 * @param maximum TODO
219 public JProgressBar(int minimum, int maximum) {
220 // TODO
221 } // JProgressBar()
224 * Constructor JProgressBar
225 * @param minimum TODO
226 * @param maximum TODO
227 * @param orientation TODO
229 public JProgressBar(int minimum, int maximum, int orientation) {
230 // TODO
231 } // JProgressBar()
234 * Constructor JProgressBar
235 * @param model TODO
237 public JProgressBar(BoundedRangeModel model) {
238 // TODO
239 } // JProgressBar()
242 //-------------------------------------------------------------
243 // Methods ----------------------------------------------------
244 //-------------------------------------------------------------
247 * writeObject
248 * @param stream TODO
249 * @exception IOException TODO
251 private void writeObject(ObjectOutputStream stream) throws IOException {
252 // TODO
253 } // writeObject()
256 * getValue
257 * @returns int
259 public int getValue() {
260 return 0; // TODO
261 } // getValue()
264 * setValue
265 * @param value TODO
267 public void setValue(int value) {
268 // TODO
269 } // setValue()
272 * paintBorder
273 * @param graphics TODO
275 protected void paintBorder(Graphics graphics) {
276 // TODO
277 } // paintBorder()
280 * getOrientation
281 * @returns int
283 public int getOrientation() {
284 return 0; // TODO
285 } // getOrientation()
288 * setOrientation
289 * @param orientation TODO
291 public void setOrientation(int orientation) {
292 // TODO
293 } // setOrientation()
296 * isStringPainted
297 * @returns boolean
299 public boolean isStringPainted() {
300 return false; // TODO
301 } // isStringPainted()
304 * setStringPainted
305 * @param painted TODO
307 public void setStringPainted(boolean painted) {
308 // TODO
309 } // setStringPainted()
312 * getString
313 * @returns String
315 public String getString() {
316 return null; // TODO
317 } // getString()
320 * setString
321 * @param string TODO
323 public void setString(String string) {
324 // TODO
325 } // setString()
328 * getPercentComplete
329 * @returns double
331 public double getPercentComplete() {
332 return 0.0; // TODO
333 } // getPercentComplete()
336 * isBorderPainted
337 * @returns boolean
339 public boolean isBorderPainted() {
340 return false; // TODO
341 } // isBorderPainted()
344 * setBorderPainted
345 * @param painted TODO
347 public void setBorderPainted(boolean painted) {
348 // TODO
349 } // setBorderPainted()
352 * getUI
353 * @returns ProgressBarUI
355 public ProgressBarUI getUI() {
356 return (ProgressBarUI) ui;
357 } // getUI()
360 * setUI
361 * @param ui TODO
363 public void setUI(ProgressBarUI ui) {
364 super.setUI(ui);
365 // TODO
366 } // setUI()
369 * updateUI
371 public void updateUI() {
372 setUI((ProgressBarUI) UIManager.get(this));
373 invalidate();
374 } // updateUI()
377 * getUIClassID
378 * @returns String
380 public String getUIClassID() {
381 return uiClassID;
382 } // getUIClassID()
385 * createChangeListener
386 * @returns ChangeListener
388 protected ChangeListener createChangeListener() {
389 return null; // TODO
390 } // createChangeListener()
393 * addChangeListener
394 * @param listener TODO
396 public void addChangeListener(ChangeListener listener) {
397 // TODO
398 } // addChangeListener()
401 * removeChangeListener
402 * @param listener TODO
404 public void removeChangeListener(ChangeListener valulistener) {
405 // TODO
406 } // removeChangeListener()
409 * fireStateChanged
411 protected void fireStateChanged() {
412 // TODO
413 } // fireStateChanged()
416 * getModel
417 * @returns BoundedRangeModel
419 public BoundedRangeModel getModel() {
420 return null; // TODO
421 } // getModel()
424 * setModel
425 * @param model TODO
427 public void setModel(BoundedRangeModel model) {
428 // TODO
429 } // setModel()
432 * getMinimum
433 * @returns int
435 public int getMinimum() {
436 return 0; // TODO
437 } // getMinimum()
440 * setMinimum
441 * @param minimum TODO
443 public void setMinimum(int minimum) {
444 // TODO
445 } // setMinimum()
448 * getMaximum
449 * @returns int
451 public int getMaximum() {
452 return 0; // TODO
453 } // getMaximum()
456 * setMaximum
457 * @param maximum TODO
459 public void setMaximum(int maximum) {
460 // TODO
461 } // setMaximum()
464 * paramString
465 * @returns String
467 protected String paramString() {
468 return null; // TODO
469 } // paramString()
472 * getAccessibleContext
473 * @returns AccessibleContext
475 public AccessibleContext getAccessibleContext() {
476 if (accessibleContext == null) {
477 accessibleContext = new AccessibleJProgressBar(this);
478 } // if
479 return accessibleContext;
480 } // getAccessibleContext()
483 } // JProgressBar