GNU Classpath (0.95) | |
Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.SliderUI
javax.swing.plaf.basic.BasicSliderUI
javax.swing.plaf.metal.MetalSliderUI
public class MetalSliderUI
extends BasicSliderUI
JSlider
component.
Nested Class Summary | |
protected class |
|
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicSliderUI | |
BasicSliderUI.ActionScroller , BasicSliderUI.ChangeHandler , BasicSliderUI.ComponentHandler , BasicSliderUI.FocusHandler , BasicSliderUI.PropertyChangeHandler , BasicSliderUI.ScrollListener , BasicSliderUI.TrackListener |
Field Summary | |
protected String |
|
protected int |
|
protected static Color |
|
protected boolean |
|
protected static Color |
|
protected static Icon |
|
protected static Color |
|
protected static int |
|
protected static int |
|
protected static Icon |
|
Fields inherited from class javax.swing.plaf.basic.BasicSliderUI | |
MAX_SCROLL , MIN_SCROLL , NEGATIVE_SCROLL , POSITIVE_SCROLL , changeListener , componentListener , contentRect , focusInsets , focusListener , focusRect , insetCache , labelRect , leftToRightCache , propertyChangeListener , scrollListener , scrollTimer , slider , thumbRect , tickRect , trackBuffer , trackListener , trackRect |
Constructor Summary | |
|
Method Summary | |
protected PropertyChangeListener |
|
static ComponentUI |
|
protected int |
|
protected Dimension |
|
int |
|
protected int |
|
protected int |
|
void |
|
void |
|
protected void |
|
protected void |
|
protected void |
|
protected void |
|
void |
|
void |
|
protected void |
|
Methods inherited from class javax.swing.plaf.ComponentUI | |
contains , createUI , getAccessibleChild , getAccessibleChildrenCount , getMaximumSize , getMinimumSize , getPreferredSize , installUI , paint , uninstallUI , update |
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
protected final String SLIDER_FILL
A key to look up the filledSlider setting in theUIManager
.
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 static Color thumbColor
The thumb color (unused, because an icon is used to draw the thumb).
protected static Icon vertThumbIcon
The icon used for the thumb control of vertically oriented sliders.
protected PropertyChangeListener createPropertyChangeListener(JSlider slider)
Creates a property change listener for the slider.
- Overrides:
- createPropertyChangeListener in interface BasicSliderUI
- Parameters:
slider
- the slider.
- Returns:
- A new instance of
MetalSliderUI.MetalPropertyListener
.
public static ComponentUI createUI(JComponent component)
Returns a new instance ofMetalSliderUI
.
- Overrides:
- createUI in interface BasicSliderUI
- Parameters:
component
- the component (ignored).
- Returns:
- A new instance of
MetalSliderUI
.
protected int getThumbOverhang()
Returns the thumb overhang.
- Returns:
- The thumb overhang.
protected Dimension getThumbSize()
Returns the size of the thumb icon.
- Overrides:
- getThumbSize in interface BasicSliderUI
- Returns:
- The size of the thumb icon.
public int getTickLength()
Returns the length of the major tick marks.
- Overrides:
- getTickLength in interface BasicSliderUI
- Returns:
- The length of the major tick marks.
public void installUI(JComponent c)
Installs the default for this UI delegate in the supplied component.
- Overrides:
- installUI in interface BasicSliderUI
- Parameters:
c
- the component.
public void paintFocus(Graphics g)
Draws the focus rectangle for the slider. The Metal look and feel indicates that theJSlider
has the focus by changing the color of the thumb control - this is handled elsewhere and so this method is empty (it overrides the method in theBasicSliderUI
class to prevent a default focus highlight from being drawn).
- Overrides:
- paintFocus in interface BasicSliderUI
- Parameters:
g
- the graphics device.
protected void paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
Paints the major ticks for a slider with a horizontal orientation.
- Overrides:
- paintMajorTickForHorizSlider in interface BasicSliderUI
- Parameters:
g
- the graphics device.tickBounds
- the tick bounds.x
- the x value for the tick.
protected void paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
Paints the major ticks for a slider with a vertical orientation.
- Overrides:
- paintMajorTickForVertSlider in interface BasicSliderUI
- Parameters:
g
- the graphics device.tickBounds
- the tick bounds.y
- the y value for the tick.
protected void paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
Paints the minor ticks for a slider with a horizontal orientation.
- Overrides:
- paintMinorTickForHorizSlider in interface BasicSliderUI
- Parameters:
g
- the graphics device.tickBounds
- the tick bounds.x
- the x value for the tick.
protected void paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
Paints the minor ticks for a slider with a vertical orientation.
- Overrides:
- paintMinorTickForVertSlider in interface BasicSliderUI
- Parameters:
g
- the graphics device.tickBounds
- the tick bounds.y
- the y value for the tick.
public void paintThumb(Graphics g)
Paints the thumb icon for the slider.
- Overrides:
- paintThumb in interface BasicSliderUI
- Parameters:
g
- the graphics device.
public void paintTrack(Graphics g)
Paints the track along which the thumb control moves.
- Overrides:
- paintTrack in interface BasicSliderUI
- Parameters:
g
- the graphics device.
protected void scrollDueToClickInTrack(int dir)
This method is called when there has been a click in the track and the thumb needs to be scrolled on regular intervals. This method is only responsible for starting the timer and not for stopping it.
- Overrides:
- scrollDueToClickInTrack in interface BasicSliderUI
- Parameters:
dir
- The direction to move in.
GNU Classpath (0.95) |