javax.swing.plaf.metal
public class MetalSliderUI extends BasicSliderUI
| Nested Class Summary | |
|---|---|
| protected class | MetalSliderUI.MetalPropertyListener
A property change handler that updates the rendered component in response
to specific property change events. |
| Field Summary | |
|---|---|
| protected static Color | darkShadowColor
The shadow color used for drawing the track rect when the slider is
enabled. |
| protected boolean | filledSlider
A flag that controls whether or not the track is filled up to the value
of the slider. |
| protected static Color | highlightColor
The highlight color used for drawing the track rect when the slider is
enabled. |
| protected static Icon | horizThumbIcon The icon used for the thumb control of horizontally oriented sliders. |
| protected String | SLIDER_FILL A key to look up the filledSlider setting in the {@link UIManager}. |
| protected static Color | thumbColor The thumb color (unused, because an icon is used to draw the thumb). |
| protected static int | tickLength The length of the major tick marks. |
| protected static int | trackWidth The track width. |
| protected int | TICK_BUFFER The gap between the track and the tick marks. |
| protected static Icon | vertThumbIcon The icon used for the thumb control of vertically oriented sliders. |
| Constructor Summary | |
|---|---|
| MetalSliderUI()
Constructs a new instance. | |
| Method Summary | |
|---|---|
| protected PropertyChangeListener | createPropertyChangeListener(JSlider slider)
Creates a property change listener for the slider.
|
| static ComponentUI | createUI(JComponent component)
Returns a new instance of MetalSliderUI.
|
| protected int | getThumbOverhang()
Returns the thumb overhang.
|
| protected Dimension | getThumbSize()
Returns the size of the thumb icon.
|
| int | getTickLength()
Returns the length of the major tick marks.
|
| protected int | getTrackLength()
Returns the track length.
|
| protected int | getTrackWidth()
Returns the track width.
|
| void | installUI(JComponent c)
Installs the default for this UI delegate in the supplied component.
|
| void | paintFocus(Graphics g)
Draws the focus rectangle for the slider. |
| protected void | paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
Paints the major ticks for a slider with a horizontal orientation.
|
| protected void | paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
Paints the major ticks for a slider with a vertical orientation.
|
| protected void | paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
Paints the minor ticks for a slider with a horizontal orientation.
|
| protected void | paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
Paints the minor ticks for a slider with a vertical orientation.
|
| void | paintThumb(Graphics g)
Paints the thumb icon for the slider.
|
| void | paintTrack(Graphics g)
Paints the track along which the thumb control moves.
|
| protected void | scrollDueToClickInTrack(int dir) |
Parameters: slider the slider.
Returns: A new instance of {@link MetalPropertyListener}.
MetalSliderUI.
Parameters: component the component (ignored).
Returns: A new instance of MetalSliderUI.
Returns: The thumb overhang.
Returns: The size of the thumb icon.
Returns: The length of the major tick marks.
Returns: The track length.
Returns: The track width.
Parameters: c the component.
Parameters: g the graphics device.
Parameters: g the graphics device. tickBounds the tick bounds. x the x value for the tick.
Parameters: g the graphics device. tickBounds the tick bounds. y the y value for the tick.
Parameters: g the graphics device. tickBounds the tick bounds. x the x value for the tick.
Parameters: g the graphics device. tickBounds the tick bounds. y the y value for the tick.
Parameters: g the graphics device.
Parameters: g the graphics device.