1 |
/* BasicSliderUI.java |
/* BasicSliderUI.java -- |
2 |
Copyright (C) 2004 Free Software Foundation, Inc. |
Copyright (C) 2004 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
35 |
obligated to do so. If you do not wish to do so, delete this |
obligated to do so. If you do not wish to do so, delete this |
36 |
exception statement from your version. */ |
exception statement from your version. */ |
37 |
|
|
38 |
|
|
39 |
package javax.swing.plaf.basic; |
package javax.swing.plaf.basic; |
40 |
|
|
41 |
import java.awt.Color; |
import java.awt.Color; |
59 |
import java.beans.PropertyChangeListener; |
import java.beans.PropertyChangeListener; |
60 |
import java.util.Dictionary; |
import java.util.Dictionary; |
61 |
import java.util.Enumeration; |
import java.util.Enumeration; |
62 |
|
|
63 |
import javax.swing.BoundedRangeModel; |
import javax.swing.BoundedRangeModel; |
64 |
import javax.swing.JComponent; |
import javax.swing.JComponent; |
65 |
import javax.swing.JLabel; |
import javax.swing.JLabel; |
74 |
import javax.swing.plaf.ComponentUI; |
import javax.swing.plaf.ComponentUI; |
75 |
import javax.swing.plaf.SliderUI; |
import javax.swing.plaf.SliderUI; |
76 |
|
|
|
|
|
77 |
/** |
/** |
78 |
* <p> |
* <p> |
79 |
* BasicSliderUI.java This is the UI delegate in the Basic look and feel that |
* BasicSliderUI.java This is the UI delegate in the Basic look and feel that |
321 |
/** |
/** |
322 |
* Helper class that listens for mouse events. |
* Helper class that listens for mouse events. |
323 |
*/ |
*/ |
324 |
protected class TrackListener extends MouseInputAdapter |
public class TrackListener extends MouseInputAdapter |
325 |
{ |
{ |
326 |
/** The current X position of the mouse. */ |
/** The current X position of the mouse. */ |
327 |
protected int currentMouseX; |
protected int currentMouseX; |
1956 |
} |
} |
1957 |
|
|
1958 |
g.setColor(Color.WHITE); |
g.setColor(Color.WHITE); |
1959 |
g.drawPolygon(bright); |
g.drawPolyline(bright.xpoints, bright.ypoints, bright.npoints); |
1960 |
|
|
1961 |
g.setColor(Color.BLACK); |
g.setColor(Color.BLACK); |
1962 |
g.drawPolygon(dark); |
g.drawPolyline(dark.xpoints, dark.ypoints, dark.npoints); |
1963 |
|
|
1964 |
g.setColor(Color.GRAY); |
g.setColor(Color.GRAY); |
1965 |
g.fillPolygon(all); |
g.fillPolygon(all); |