source: trunk/gcc/libjava/javax/swing/JSlider.java

Last change on this file was 1389, checked in by bird, 21 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 13.5 KB
Line 
1/* JSlider.java --
2 Copyright (C) 2002 Free Software Foundation, Inc.
3
4This file is part of GNU Classpath.
5
6GNU Classpath is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11GNU Classpath is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU Classpath; see the file COPYING. If not, write to the
18Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1902111-1307 USA.
20
21Linking this library statically or dynamically with other modules is
22making a combined work based on this library. Thus, the terms and
23conditions of the GNU General Public License cover the whole
24combination.
25
26As a special exception, the copyright holders of this library give you
27permission to link this library with independent modules to produce an
28executable, regardless of the license terms of these independent
29modules, and to copy and distribute the resulting executable under
30terms of your choice, provided that you also meet, for each linked
31independent module, the terms and conditions of the license of that
32module. An independent module is a module which is not derived from
33or based on this library. If you modify this library, you may extend
34this exception to your version of the library, but you are not
35obligated to do so. If you do not wish to do so, delete this
36exception statement from your version. */
37
38package javax.swing;
39
40// Imports
41import java.io.*;
42import java.util.*;
43import javax.accessibility.*;
44import javax.swing.event.*;
45import javax.swing.plaf.*;
46
47/**
48 * JSlider
49 * @author Andrew Selkirk
50 * @version 1.0
51 */
52public class JSlider extends JComponent implements SwingConstants, Accessible {
53
54 //-------------------------------------------------------------
55 // Classes ----------------------------------------------------
56 //-------------------------------------------------------------
57
58
59 /**
60 * AccessibleJSlider
61 */
62 protected class AccessibleJSlider extends JComponent.AccessibleJComponent implements AccessibleValue {
63
64 //-------------------------------------------------------------
65 // Variables --------------------------------------------------
66 //-------------------------------------------------------------
67
68
69 //-------------------------------------------------------------
70 // Initialization ---------------------------------------------
71 //-------------------------------------------------------------
72
73 /**
74 * Constructor AccessibleJSlider
75 * @param value0 TODO
76 */
77 protected AccessibleJSlider(JSlider value0) {
78 super(value0);
79 // TODO
80 } // AccessibleJSlider()
81
82
83 //-------------------------------------------------------------
84 // Methods ----------------------------------------------------
85 //-------------------------------------------------------------
86
87 /**
88 * getAccessibleStateSet
89 * @returns AccessibleStateSet
90 */
91 public AccessibleStateSet getAccessibleStateSet() {
92 return null; // TODO
93 } // getAccessibleStateSet()
94
95 /**
96 * getAccessibleRole
97 * @returns AccessibleRole
98 */
99 public AccessibleRole getAccessibleRole() {
100 return null; // TODO
101 } // getAccessibleRole()
102
103 /**
104 * getAccessibleValue
105 * @returns AccessibleValue
106 */
107 public AccessibleValue getAccessibleValue() {
108 return null; // TODO
109 } // getAccessibleValue()
110
111 /**
112 * getCurrentAccessibleValue
113 * @returns Number
114 */
115 public Number getCurrentAccessibleValue() {
116 return null; // TODO
117 } // getCurrentAccessibleValue()
118
119 /**
120 * setCurrentAccessibleValue
121 * @param value0 TODO
122 * @returns boolean
123 */
124 public boolean setCurrentAccessibleValue(Number value0) {
125 return false; // TODO
126 } // setCurrentAccessibleValue()
127
128 /**
129 * getMinimumAccessibleValue
130 * @returns Number
131 */
132 public Number getMinimumAccessibleValue() {
133 return null; // TODO
134 } // getMinimumAccessibleValue()
135
136 /**
137 * getMaximumAccessibleValue
138 * @returns Number
139 */
140 public Number getMaximumAccessibleValue() {
141 return null; // TODO
142 } // getMaximumAccessibleValue()
143
144
145 } // AccessibleJSlider
146
147 /**
148 * ModelListener
149 */
150 private class ModelListener implements ChangeListener, Serializable {
151
152 //-------------------------------------------------------------
153 // Variables --------------------------------------------------
154 //-------------------------------------------------------------
155
156
157 //-------------------------------------------------------------
158 // Initialization ---------------------------------------------
159 //-------------------------------------------------------------
160
161 /**
162 * Constructor ModelListener
163 * @param value0 TODO
164 */
165 private ModelListener(JSlider value0) {
166 // TODO
167 } // ModelListener()
168
169
170 //-------------------------------------------------------------
171 // Methods ----------------------------------------------------
172 //-------------------------------------------------------------
173
174 /**
175 * stateChanged
176 * @param value0 TODO
177 */
178 public void stateChanged(ChangeEvent value0) {
179 // TODO
180 } // stateChanged()
181
182
183 } // ModelListener
184
185
186 //-------------------------------------------------------------
187 // Variables --------------------------------------------------
188 //-------------------------------------------------------------
189
190 /**
191 * uiClassID
192 */
193 private static final String uiClassID = "SliderUI";
194
195 /**
196 * paintTicks
197 */
198 private boolean paintTicks;
199
200 /**
201 * paintTrack
202 */
203 private boolean paintTrack;
204
205 /**
206 * paintLabels
207 */
208 private boolean paintLabels;
209
210 /**
211 * isInverted
212 */
213 private boolean isInverted;
214
215 /**
216 * sliderModel
217 */
218 protected BoundedRangeModel sliderModel;
219
220 /**
221 * majorTickSpacing
222 */
223 protected int majorTickSpacing;
224
225 /**
226 * minorTickSpacing
227 */
228 protected int minorTickSpacing;
229
230 /**
231 * snapToTicks
232 */
233 protected boolean snapToTicks;
234
235 /**
236 * snapToValue
237 */
238 boolean snapToValue;
239
240 /**
241 * orientation
242 */
243 protected int orientation;
244
245 /**
246 * labelTable
247 */
248 private Dictionary labelTable;
249
250 /**
251 * changeListener
252 */
253 protected ChangeListener changeListener;
254
255 /**
256 * changeEvent
257 */
258 protected transient ChangeEvent changeEvent;
259
260
261 //-------------------------------------------------------------
262 // Initialization ---------------------------------------------
263 //-------------------------------------------------------------
264
265 /**
266 * Constructor JSlider
267 */
268 public JSlider() {
269 // TODO
270 } // JSlider()
271
272 /**
273 * Constructor JSlider
274 * @param value0 TODO
275 */
276 public JSlider(int orientation) {
277 // TODO
278 } // JSlider()
279
280 /**
281 * Constructor JSlider
282 * @param minimum TODO
283 * @param maximum TODO
284 */
285 public JSlider(int minimum, int maximum) {
286 // TODO
287 } // JSlider()
288
289 /**
290 * Constructor JSlider
291 * @param minimum TODO
292 * @param maximum TODO
293 * @param value TODO
294 */
295 public JSlider(int minimum, int maximum, int value) {
296 // TODO
297 } // JSlider()
298
299 /**
300 * Constructor JSlider
301 * @param orientation TODO
302 * @param minimum TODO
303 * @param maximum TODO
304 * @param value TODO
305 */
306 public JSlider(int orientation, int minimum, int maximum, int value) {
307 // TODO
308 } // JSlider()
309
310 /**
311 * Constructor JSlider
312 * @param value0 TODO
313 */
314 public JSlider(BoundedRangeModel model) {
315 // TODO
316 } // JSlider()
317
318
319 //-------------------------------------------------------------
320 // Methods ----------------------------------------------------
321 //-------------------------------------------------------------
322
323 /**
324 * writeObject
325 * @param stream TODO
326 * @exception IOException TODO
327 */
328 private void writeObject(ObjectOutputStream stream) throws IOException {
329 // TODO
330 } // writeObject()
331
332 /**
333 * getValue
334 * @returns int
335 */
336 public int getValue() {
337 return 0; // TODO
338 } // getValue()
339
340 /**
341 * setValue
342 * @param value0 TODO
343 */
344 public void setValue(int value) {
345 // TODO
346 } // setValue()
347
348 /**
349 * getUI
350 * @returns SliderUI
351 */
352 public SliderUI getUI() {
353 return (SliderUI) ui;
354 } // getUI()
355
356 /**
357 * setUI
358 * @param ui TODO
359 */
360 public void setUI(SliderUI ui) {
361 super.setUI(ui);
362 } // setUI()
363
364 /**
365 * updateUI
366 */
367 public void updateUI() {
368 setUI((SliderUI) UIManager.get(this));
369 invalidate();
370 } // updateUI()
371
372 /**
373 * getUIClassID
374 * @returns String
375 */
376 public String getUIClassID() {
377 return uiClassID;
378 } // getUIClassID()
379
380 /**
381 * createChangeListener
382 * @returns ChangeListener
383 */
384 protected ChangeListener createChangeListener() {
385 return null; // TODO
386 } // createChangeListener()
387
388 /**
389 * addChangeListener
390 * @param listener TODO
391 */
392 public void addChangeListener(ChangeListener listener) {
393 // TODO
394 } // addChangeListener()
395
396 /**
397 * removeChangeListener
398 * @param listener TODO
399 */
400 public void removeChangeListener(ChangeListener listener) {
401 // TODO
402 } // removeChangeListener()
403
404 /**
405 * fireStateChanged
406 */
407 protected void fireStateChanged() {
408 // TODO
409 } // fireStateChanged()
410
411 /**
412 * getModel
413 * @returns BoundedRangeModel
414 */
415 public BoundedRangeModel getModel() {
416 return null; // TODO
417 } // getModel()
418
419 /**
420 * setModel
421 * @param model TODO
422 */
423 public void setModel(BoundedRangeModel model) {
424 // TODO
425 } // setModel()
426
427 /**
428 * getMinimum
429 * @returns int
430 */
431 public int getMinimum() {
432 return 0; // TODO
433 } // getMinimum()
434
435 /**
436 * setMinimum
437 * @param minimum TODO
438 */
439 public void setMinimum(int minimum) {
440 // TODO
441 } // setMinimum()
442
443 /**
444 * getMaximum
445 * @returns int
446 */
447 public int getMaximum() {
448 return 0; // TODO
449 } // getMaximum()
450
451 /**
452 * setMaximum
453 * @param maximum TODO
454 */
455 public void setMaximum(int maximum) {
456 // TODO
457 } // setMaximum()
458
459 /**
460 * getValueIsAdjusting
461 * @returns boolean
462 */
463 public boolean getValueIsAdjusting() {
464 return false; // TODO
465 } // getValueIsAdjusting()
466
467 /**
468 * setValueIsAdjusting
469 * @param adjusting TODO
470 */
471 public void setValueIsAdjusting(boolean adjusting) {
472 // TODO
473 } // setValueIsAdjusting()
474
475 /**
476 * getExtent
477 * @returns int
478 */
479 public int getExtent() {
480 return 0; // TODO
481 } // getExtent()
482
483 /**
484 * setExtent
485 * @param vextent TODO
486 */
487 public void setExtent(int extent) {
488 // TODO
489 } // setExtent()
490
491 /**
492 * getOrientation
493 * @returns int
494 */
495 public int getOrientation() {
496 return 0; // TODO
497 } // getOrientation()
498
499 /**
500 * setOrientation
501 * @param orientation TODO
502 */
503 public void setOrientation(int orientation) {
504 // TODO
505 } // setOrientation()
506
507 /**
508 * getLabelTable
509 * @returns Dictionary
510 */
511 public Dictionary getLabelTable() {
512 return null; // TODO
513 } // getLabelTable()
514
515 /**
516 * setLabelTable
517 * @param table TODO
518 */
519 public void setLabelTable(Dictionary table) {
520 // TODO
521 } // setLabelTable()
522
523 /**
524 * updateLabelUIs
525 */
526 protected void updateLabelUIs() {
527 // TODO
528 } // updateLabelUIs()
529
530 /**
531 * createStandardLabels
532 * @param increment TODO
533 * @returns Hashtable
534 */
535 public Hashtable createStandardLabels(int increment) {
536 return null; // TODO
537 } // createStandardLabels()
538
539 /**
540 * createStandardLabels
541 * @param increment TODO
542 * @param start TODO
543 * @returns Hashtable
544 */
545 public Hashtable createStandardLabels(int increment, int start) {
546 return null; // TODO
547 } // createStandardLabels()
548
549 /**
550 * getInverted
551 * @returns boolean
552 */
553 public boolean getInverted() {
554 return false; // TODO
555 } // getInverted()
556
557 /**
558 * setInverted
559 * @param inverted TODO
560 */
561 public void setInverted(boolean inverted) {
562 // TODO
563 } // setInverted()
564
565 /**
566 * getMajorTickSpacing
567 * @returns int
568 */
569 public int getMajorTickSpacing() {
570 return 0; // TODO
571 } // getMajorTickSpacing()
572
573 /**
574 * setMajorTickSpacing
575 * @param spacing TODO
576 */
577 public void setMajorTickSpacing(int spacing) {
578 // TODO
579 } // setMajorTickSpacing()
580
581 /**
582 * getMinorTickSpacing
583 * @returns int
584 */
585 public int getMinorTickSpacing() {
586 return 0; // TODO
587 } // getMinorTickSpacing()
588
589 /**
590 * setMinorTickSpacing
591 * @param spacing TODO
592 */
593 public void setMinorTickSpacing(int spacing) {
594 // TODO
595 } // setMinorTickSpacing()
596
597 /**
598 * getSnapToTicks
599 * @returns boolean
600 */
601 public boolean getSnapToTicks() {
602 return false; // TODO
603 } // getSnapToTicks()
604
605 /**
606 * getSnapToValue
607 * @returns boolean
608 */
609 boolean getSnapToValue() {
610 return false; // TODO
611 } // getSnapToValue()
612
613 /**
614 * setSnapToTicks
615 * @param snap TODO
616 */
617 public void setSnapToTicks(boolean snap) {
618 // TODO
619 } // setSnapToTicks()
620
621 /**
622 * getPaintTicks
623 * @returns boolean
624 */
625 public boolean getPaintTicks() {
626 return false; // TODO
627 } // getPaintTicks()
628
629 /**
630 * setPaintTicks
631 * @param paint TODO
632 */
633 public void setPaintTicks(boolean paint) {
634 // TODO
635 } // setPaintTicks()
636
637 /**
638 * getPaintTrack
639 * @returns boolean
640 */
641 public boolean getPaintTrack() {
642 return false; // TODO
643 } // getPaintTrack()
644
645 /**
646 * setPaintTrack
647 * @param paint TODO
648 */
649 public void setPaintTrack(boolean paint) {
650 // TODO
651 } // setPaintTrack()
652
653 /**
654 * getPaintLabels
655 * @returns boolean
656 */
657 public boolean getPaintLabels() {
658 return false; // TODO
659 } // getPaintLabels()
660
661 /**
662 * setPaintLabels
663 * @param paint TODO
664 */
665 public void setPaintLabels(boolean paint) {
666 // TODO
667 } // setPaintLabels()
668
669 /**
670 * paramString
671 * @returns String
672 */
673 protected String paramString() {
674 return null; // TODO
675 } // paramString()
676
677 /**
678 * getAccessibleContext
679 * @returns AccessibleContext
680 */
681 public AccessibleContext getAccessibleContext() {
682 if (accessibleContext == null) {
683 accessibleContext = new AccessibleJSlider(this);
684 } // if
685 return accessibleContext;
686 } // getAccessibleContext()
687
688
689} // JSlider
Note: See TracBrowser for help on using the repository browser.