edu.berkeley.guir.lib.satin.plaf
Class PenSliderUI
java.lang.Object
|
+--javax.swing.plaf.ComponentUI
|
+--javax.swing.plaf.SliderUI
|
+--javax.swing.plaf.basic.BasicSliderUI
|
+--javax.swing.plaf.metal.MetalSliderUI
|
+--edu.berkeley.guir.lib.satin.plaf.PenSliderUI
- public class PenSliderUI
- extends MetalSliderUI
A Pen Look-and-Feel that has the following features:
- A larger thumb value, making it easier to hit it.
- Direct set, where the value of the slider is set by the location
of the mouse, instead of being scrolled. This is particularly
effective if you also call
JSlider.setMajorTickSpacing(int)
,
and JSlider.setSnapToTicks(boolean)
, making the thumb snap
to the value nearest to where you clicked.
- Fixes keyboard access for sliders with major ticks, which lets you
use the arrow keys, as well as the PageUp and PageDown keys, to
correctly adjust slider values. The current Swing implementation does
not do this correctly.
This software is distributed under the
Berkeley Software License.
Revisions: - SATIN-v1.0-1.0.0, Aug 25 1999, JH
Created class
- SATIN-v2.1-1.0.0, Aug 11 2000, JH
Touched for SATIN release
- Since:
- JDK 1.2.2
- Version:
- SATIN-v2.1-1.0.0, Aug 11 2000
- Author:
- Jason Hong (
jasonh@cs.berkeley.edu )
Fields inherited from class javax.swing.plaf.basic.BasicSliderUI |
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 |
Methods inherited from class javax.swing.plaf.metal.MetalSliderUI |
createPropertyChangeListener, createUI, getThumbOverhang, getTickLength, getTrackLength, getTrackWidth, paintFocus, paintMajorTickForHorizSlider, paintMajorTickForVertSlider, paintMinorTickForHorizSlider, paintMinorTickForVertSlider, paintTrack, scrollDueToClickInTrack |
Methods inherited from class javax.swing.plaf.basic.BasicSliderUI |
calculateContentRect, calculateFocusRect, calculateGeometry, calculateLabelRect, calculateThumbLocation, calculateThumbSize, calculateTickRect, calculateTrackBuffer, calculateTrackRect, createChangeListener, createComponentListener, createFocusListener, createScrollListener, createTrackListener, drawInverted, getFocusColor, getHeightOfHighValueLabel, getHeightOfLowValueLabel, getHeightOfTallestLabel, getHighestValueLabel, getHighlightColor, getLowestValueLabel, getMaximumSize, getMinimumHorizontalSize, getMinimumSize, getMinimumVerticalSize, getPreferredHorizontalSize, getPreferredSize, getPreferredVerticalSize, getShadowColor, getWidthOfHighValueLabel, getWidthOfLowValueLabel, getWidthOfWidestLabel, installDefaults, installKeyboardActions, installListeners, paint, paintHorizontalLabel, paintLabels, paintTicks, paintVerticalLabel, recalculateIfInsetsChanged, recalculateIfOrientationChanged, scrollByBlock, scrollByUnit, setThumbLocation, uninstallKeyboardActions, uninstallListeners, valueForXPosition, valueForYPosition, xPositionForValue, yPositionForValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PenSliderUI
public PenSliderUI()
installUI
public void installUI(JComponent c)
- Overrides:
installUI
in class MetalSliderUI
uninstallUI
public void uninstallUI(JComponent c)
- Overrides:
uninstallUI
in class BasicSliderUI
paintThumb
public void paintThumb(Graphics g)
- Overrides:
paintThumb
in class MetalSliderUI
getThumbSize
protected Dimension getThumbSize()
- Overrides:
getThumbSize
in class MetalSliderUI
main
public static void main(String[] argv)
throws Exception