javax.swing.plaf.metal
Class MetalSliderUI
A UI delegate for the
JSlider
component.
protected String | SLIDER_FILL - A key to look up the filledSlider setting in the
UIManager .
|
protected int | TICK_BUFFER - The gap between the track and the tick marks.
|
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 int | tickLength - The length of the major tick marks.
|
protected static int | trackWidth - The track width.
|
protected static Icon | vertThumbIcon - The icon used for the thumb control of vertically oriented sliders.
|
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 |
calculateContentRect , calculateFocusRect , calculateGeometry , calculateLabelRect , calculateThumbLocation , calculateThumbSize , calculateTickRect , calculateTrackBuffer , calculateTrackRect , createChangeListener , createComponentListener , createFocusListener , createPropertyChangeListener , createScrollListener , createTrackListener , createUI , drawInverted , getFocusColor , getHeightOfHighValueLabel , getHeightOfLowValueLabel , getHeightOfTallestLabel , getHighestValueLabel , getHighlightColor , getLowestValueLabel , getMaximumSize , getMinimumHorizontalSize , getMinimumSize , getMinimumVerticalSize , getPreferredHorizontalSize , getPreferredSize , getPreferredVerticalSize , getShadowColor , getThumbSize , getTickLength , getWidthOfHighValueLabel , getWidthOfLowValueLabel , getWidthOfWidestLabel , installDefaults , installKeyboardActions , installListeners , installUI , isDragging , paint , paintFocus , paintHorizontalLabel , paintLabels , paintMajorTickForHorizSlider , paintMajorTickForVertSlider , paintMinorTickForHorizSlider , paintMinorTickForVertSlider , paintThumb , paintTicks , paintTrack , paintVerticalLabel , recalculateIfInsetsChanged , recalculateIfOrientationChanged , scrollByBlock , scrollByUnit , scrollDueToClickInTrack , setThumbLocation , uninstallKeyboardActions , uninstallListeners , uninstallUI , valueForXPosition , valueForYPosition , xPositionForValue , yPositionForValue |
contains , createUI , getAccessibleChild , getAccessibleChildrenCount , getMaximumSize , getMinimumSize , getPreferredSize , installUI , paint , uninstallUI , update |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
TICK_BUFFER
protected final int TICK_BUFFER
The gap between the track and the tick marks.
darkShadowColor
protected static Color darkShadowColor
The shadow color used for drawing the track rect when the slider is
enabled.
filledSlider
protected boolean filledSlider
A flag that controls whether or not the track is filled up to the value
of the slider.
highlightColor
protected static Color highlightColor
The highlight color used for drawing the track rect when the slider is
enabled.
horizThumbIcon
protected static Icon horizThumbIcon
The icon used for the thumb control of horizontally oriented sliders.
thumbColor
protected static Color thumbColor
The thumb color (unused, because an icon is used to draw the thumb).
tickLength
protected static int tickLength
The length of the major tick marks.
trackWidth
protected static int trackWidth
The track width.
vertThumbIcon
protected static Icon vertThumbIcon
The icon used for the thumb control of vertically oriented sliders.
getTrackLength
protected int getTrackLength()
Returns the track length.
getTrackWidth
protected int getTrackWidth()
Returns the track width.
paintFocus
public void paintFocus(Graphics g)
Draws the focus rectangle for the slider. The Metal look and feel
indicates that the
JSlider
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 the
BasicSliderUI
class to prevent
a default focus highlight from being drawn).
- paintFocus in interface BasicSliderUI
scrollDueToClickInTrack
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.
- scrollDueToClickInTrack in interface BasicSliderUI
dir
- The direction to move in.
MetalSliderUI.java
Copyright (C) 2005, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.