public class MetalSliderUI extends BasicSliderUI
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 XMLEncoder.
| Modifier and Type | Class and Description |
|---|---|
protected class |
MetalSliderUI
|
BasicSliderUI.ActionScroller , BasicSliderUI.ChangeHandler , BasicSliderUI.ComponentHandler , BasicSliderUI.FocusHandler , BasicSliderUI.PropertyChangeHandler , BasicSliderUI.ScrollListener , BasicSliderUI.TrackListener | Modifier and Type | Field and Description |
|---|---|
protected static Color |
darkShadowColor
|
protected boolean |
filledSlider
|
protected static Color |
highlightColor
|
protected static Icon |
horizThumbIcon
A default horizontal thumb
Icon.
|
protected String |
SLIDER_FILL
|
protected static Color |
thumbColor
|
protected int |
TICK_BUFFER
|
protected static int |
tickLength
|
protected static int |
trackWidth
|
protected static Icon |
vertThumbIcon
A default vertical thumb
Icon.
|
changeListener, componentListener, contentRect, focusInsets, focusListener, focusRect, insetCache, labelRect, leftToRightCache, MAX_SCROLL, MIN_SCROLL, NEGATIVE_SCROLL, POSITIVE_SCROLL, propertyChangeListener, scrollListener, scrollTimer, slider, thumbRect, tickRect, trackBuffer, trackListener, trackRect| Constructor and Description |
|---|
MetalSliderUI()
|
| Modifier and Type | Method and Description |
|---|---|
protected PropertyChangeListener |
createPropertyChangeListener(JSlider
|
static ComponentUI |
createUI(JComponent
|
protected int |
getThumbOverhang()
Returns the amount that the thumb goes past the slide bar.
|
protected Dimension |
getThumbSize()
|
int |
getTickLength()
Gets the height of the tick area for horizontal sliders and the width of the tick area for vertical sliders.
|
protected int |
getTrackLength()
Returns the longer dimension of the slide bar.
|
protected int |
getTrackWidth()
Returns the shorter dimension of the track.
|
void |
installUI(JComponent
Configures the specified component appropriately for the look and feel.
|
void |
paintFocus(Graphics
|
protected void |
paintMajorTickForHorizSlider(Graphics
|
protected void |
paintMajorTickForVertSlider(Graphics
|
protected void |
paintMinorTickForHorizSlider(Graphics
|
protected void |
paintMinorTickForVertSlider(Graphics
|
void |
paintThumb(Graphics
|
void |
paintTrack(Graphics
|
protected void |
scrollDueToClickInTrack(int dir)
This function is called when a mousePressed was detected in the track, not in the thumb.
|
calculateContentRect, calculateFocusRect, calculateGeometry, calculateLabelRect, calculateThumbLocation, calculateThumbSize, calculateTickRect, calculateTrackBuffer, calculateTrackRect, createChangeListener, createComponentListener, createFocusListener, createScrollListener, createTrackListener, drawInverted, getBaseline, getBaselineResizeBehavior, getFocusColor, getHeightOfHighValueLabel, getHeightOfLowValueLabel, getHeightOfTallestLabel, getHighestValue, getHighestValueLabel, getHighlightColor, getLowestValue, getLowestValueLabel, getMaximumSize, getMinimumHorizontalSize, getMinimumSize, getMinimumVerticalSize, getPreferredHorizontalSize, getPreferredSize, getPreferredVerticalSize, getShadowColor, getWidthOfHighValueLabel, getWidthOfLowValueLabel, getWidthOfWidestLabel, installDefaults, installKeyboardActions, installListeners, isDragging, labelsHaveSameBaselines, paint, paintHorizontalLabel, paintLabels, paintTicks, paintVerticalLabel, recalculateIfInsetsChanged, recalculateIfOrientationChanged, scrollByBlock, scrollByUnit, setThumbLocation, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, valueForXPosition, valueForYPosition, xPositionForValue, yPositionForValue, yPositionForValuecontains, getAccessibleChild, getAccessibleChildrenCount, updateprotected final int TICK_BUFFER
protected boolean filledSlider
protected static ColorthumbColor
protected static ColorhighlightColor
protected static ColordarkShadowColor
protected static int trackWidth
protected static int tickLength
protected static IconhorizThumbIcon
Icon. This field might not be used. To change the
Icon used by this delegate directly set it using the
Slider.horizontalThumbIcon UIManager property.
protected static IconvertThumbIcon
Icon. This field might not be used. To change the
Icon used by this delegate directly set it using the
Slider.verticalThumbIcon UIManager property.
protected final StringSLIDER_FILL
public static ComponentUIcreateUI(JComponent c)
public void installUI(JComponentc)
ComponentUI
ComponentUI instance is being installed as the UI delegate on the specified component. This method should completely configure the component for the look and feel, including the following:
LayoutManager on the component if necessary. PropertyChangeListener on the component in order to detect and respond to component property changes appropriately. installUI in class
BasicSliderUI
c - the component where this UI delegate is being installed
ComponentUI.uninstallUI(javax.swing.JComponent) ,
JComponent.setUI(javax.swing.plaf.ComponentUI) ,
JComponent.updateUI()
protected PropertyChangeListenercreatePropertyChangeListener(JSlider slider)
public void paintThumb(Graphicsg)
public void paintTrack(Graphicsg)
public void paintFocus(Graphicsg)
protected DimensiongetThumbSize()
public int getTickLength()
protected int getTrackWidth()
protected int getTrackLength()
protected int getThumbOverhang()
protected void scrollDueToClickInTrack(int dir)
BasicSliderUI
protected void paintMinorTickForHorizSlider(Graphicsg, Rectangle tickBounds, int x)
protected void paintMajorTickForHorizSlider(Graphicsg, Rectangle tickBounds, int x)
protected void paintMinorTickForVertSlider(Graphicsg, Rectangle tickBounds, int y)