Warning
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeans
has been added to the java.beans package.
Please see java..
| Modifier and Type | Class and Description |
|---|---|
| protected class | MetalSliderUI.
|
| Modifier and Type | Field and Description |
|---|---|
| protected static Color | darkShadowColor
The color of dark shadow. |
| protected boolean | filledSlider
The value of the property |
| protected static Color | highlightColor
The color of highlighting.
|
| protected static Icon | horizThumbIcon
A default horizontal thumb |
| private int | |
| protected final String | SLIDER_FILL
Property for |
| protected static Color | thumbColor
The color of a thumb |
| protected final int | TICK_BUFFER
The buffer of a tick. |
| protected static int | tickLength
The length of a tick. |
| protected static int | trackWidth
The width of a track. |
| protected static Icon | vertThumbIcon
A default vertical thumb |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected PropertyChangeListener | Returns: theMetalPropertyListenera slider)JSliderOverrides javax. Constructs |
| public static ComponentUI | Returns: aMetalSliderUI instancea component c)Hides javax. Constructs a |
| private static Icon | |
| private Rectangle | |
| protected int | Returns: the amount that the thumb goes past the slide barReturns the amount that the thumb goes past the slide bar. |
| protected Dimension | |
| public int | getTickLength()
Overrides javax. Gets the height of the tick area for horizontal sliders and the width of the tick area for vertical sliders. |
| protected int | Returns: the longer dimension of the slide barReturns the longer dimension of the slide bar. |
| protected int | Returns: the shorter dimension of the trackReturns the shorter dimension of the track. |
| private static Icon | |
| public void | |
| private void | |
| public void | |
| protected void | paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
Overrides javax. Paints major tick for horizontal slider. |
| protected void | paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
Overrides javax. Paints major tick for vertical slider. |
| protected void | paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
Overrides javax. Paints minor tick for horizontal slider. |
| protected void | paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
Overrides javax. Paints minor tick for vertical slider. |
| public void | |
| public void | |
| private void | |
| protected void | scrollDueToClickInTrack(int dir)
Overrides javax. This function is called when a mousePressed was detected in the track, not in the thumb. |
| darkShadowColor | back to summary |
|---|---|
| protected static Color darkShadowColor The color of dark shadow. | |
| filledSlider | back to summary |
|---|---|
| protected boolean filledSlider The value of the property | |
| highlightColor | back to summary |
|---|---|
| protected static Color highlightColor Hides javax. The color of highlighting. | |
| horizThumbIcon | back to summary |
|---|---|
| protected static Icon horizThumbIcon A default horizontal thumb | |
| safeLength | back to summary |
|---|---|
| private int safeLength | |
| SLIDER_FILL | back to summary |
|---|---|
| protected final String SLIDER_FILL Property for | |
| thumbColor | back to summary |
|---|---|
| protected static Color thumbColor The color of a thumb | |
| TICK_BUFFER | back to summary |
|---|---|
| protected final int TICK_BUFFER The buffer of a tick. | |
| tickLength | back to summary |
|---|---|
| protected static int tickLength The length of a tick. | |
| trackWidth | back to summary |
|---|---|
| protected static int trackWidth The width of a track. | |
| vertThumbIcon | back to summary |
|---|---|
| protected static Icon vertThumbIcon A default vertical thumb | |
| MetalSliderUI | back to summary |
|---|---|
| public MetalSliderUI() Constructs a | |
| createPropertyChangeListener | back to summary |
|---|---|
| protected PropertyChangeListener createPropertyChangeListener(JSlider slider) Overrides javax. Constructs
| |
| createUI | back to summary |
|---|---|
| public static ComponentUI createUI(JComponent c) Hides javax. Constructs a
| |
| getHorizThumbIcon | back to summary |
|---|---|
| private static Icon getHorizThumbIcon() | |
| getPaintTrackRect | back to summary |
|---|---|
| private Rectangle getPaintTrackRect() Returns a rectangle enclosing the track that will be painted. | |
| getThumbOverhang | back to summary |
|---|---|
| protected int getThumbOverhang() Returns the amount that the thumb goes past the slide bar.
| |
| getThumbSize | back to summary |
|---|---|
| protected Dimension getThumbSize() Overrides javax. Doc from javax. Returns the thumb size. | |
| getTickLength | back to summary |
|---|---|
| public int getTickLength() Overrides javax. Gets the height of the tick area for horizontal sliders and the width of the tick area for vertical sliders. BasicSliderUI uses the returned value to determine the tick area rectangle. | |
| getTrackLength | back to summary |
|---|---|
| protected int getTrackLength() Returns the longer dimension of the slide bar. (The slide bar is only the part that runs directly under the thumb)
| |
| getTrackWidth | back to summary |
|---|---|
| protected int getTrackWidth() Returns the shorter dimension of the track.
| |
| getVertThumbIcon | back to summary |
|---|---|
| private static Icon getVertThumbIcon() | |
| installUI | back to summary |
|---|---|
| public void installUI(JComponent c) Overrides javax. Doc from javax. Installs a UI. | |
| oceanPaintTrack | back to summary |
|---|---|
| private void oceanPaintTrack(Graphics g) | |
| paintFocus | back to summary |
|---|---|
| public void paintFocus(Graphics g) Overrides javax. Doc from javax. Paints focus. | |
| paintMajorTickForHorizSlider | back to summary |
|---|---|
| protected void paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x) Overrides javax. Doc from javax. Paints major tick for horizontal slider. | |
| paintMajorTickForVertSlider | back to summary |
|---|---|
| protected void paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y) Overrides javax. Doc from javax. Paints major tick for vertical slider. | |
| paintMinorTickForHorizSlider | back to summary |
|---|---|
| protected void paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x) Overrides javax. Doc from javax. Paints minor tick for horizontal slider. | |
| paintMinorTickForVertSlider | back to summary |
|---|---|
| protected void paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y) Overrides javax. Doc from javax. Paints minor tick for vertical slider. | |
| paintThumb | back to summary |
|---|---|
| public void paintThumb(Graphics g) Overrides javax. Doc from javax. Paints the thumb. | |
| paintTrack | back to summary |
|---|---|
| public void paintTrack(Graphics g) Overrides javax. Doc from javax. Paints track. | |
| prepareFilledSliderField | back to summary |
|---|---|
| private void prepareFilledSliderField() | |
| scrollDueToClickInTrack | back to summary |
|---|---|
| protected void scrollDueToClickInTrack(int dir) Overrides javax. Doc from javax. This function is called when a mousePressed was detected in the track, not in the thumb. The default behavior is to scroll by block. You can override this method to stop it from scrolling or to add additional behavior. | |
PropertyListener for JSlider.isFilled.
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public void | propertyChange(PropertyChangeEvent e)
Overrides javax. Implements java. This method gets called when a bound property is changed. |
| MetalPropertyListener | back to summary |
|---|---|
| protected MetalPropertyListener() Constructs a | |
| propertyChange | back to summary |
|---|---|
| public void propertyChange(PropertyChangeEvent e) Overrides javax. Implements java. Doc from javax. This method gets called when a bound property is changed. | |