Class MetalRangeSliderUI


  • public class MetalRangeSliderUI
    extends javax.swing.plaf.metal.MetalSliderUI
    BasicRangeSliderUI implementation
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected class  MetalRangeSliderUI.RangeTrackListener  
      • Nested classes/interfaces inherited from class javax.swing.plaf.metal.MetalSliderUI

        javax.swing.plaf.metal.MetalSliderUI.MetalPropertyListener
      • Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicSliderUI

        javax.swing.plaf.basic.BasicSliderUI.ActionScroller, javax.swing.plaf.basic.BasicSliderUI.ChangeHandler, javax.swing.plaf.basic.BasicSliderUI.ComponentHandler, javax.swing.plaf.basic.BasicSliderUI.FocusHandler, javax.swing.plaf.basic.BasicSliderUI.PropertyChangeHandler, javax.swing.plaf.basic.BasicSliderUI.ScrollListener, javax.swing.plaf.basic.BasicSliderUI.TrackListener
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean hover  
      protected static int MOUSE_HANDLE_BOTH  
      protected static int MOUSE_HANDLE_LOWER  
      protected static int MOUSE_HANDLE_MAX  
      protected static int MOUSE_HANDLE_MIDDLE  
      protected static int MOUSE_HANDLE_MIN  
      protected static int MOUSE_HANDLE_NONE  
      protected static int MOUSE_HANDLE_UPPER  
      protected boolean pressed1  
      protected boolean pressed2  
      protected boolean rollover1  
      protected boolean rollover2  
      protected boolean second  
      • Fields inherited from class javax.swing.plaf.metal.MetalSliderUI

        darkShadowColor, filledSlider, highlightColor, horizThumbIcon, SLIDER_FILL, thumbColor, TICK_BUFFER, tickLength, trackWidth, vertThumbIcon
      • 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
    • Constructor Summary

      Constructors 
      Constructor Description
      MetalRangeSliderUI​(javax.swing.JSlider slider)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void adjustSnapHighValue()  
      protected java.awt.Point adjustThumbForHighValue()  
      protected void calculateThumbLocation()  
      protected javax.swing.plaf.basic.BasicSliderUI.TrackListener createTrackListener​(javax.swing.JSlider slider)  
      static javax.swing.plaf.ComponentUI createUI​(javax.swing.JComponent slider)  
      protected int getMouseHandle​(int x, int y)  
      void paint​(java.awt.Graphics g, javax.swing.JComponent c)  
      void paintThumb​(java.awt.Graphics g)  
      protected void restoreThumbForLowValue​(java.awt.Point p)  
      void scrollByBlock​(int direction)  
      void scrollByUnit​(int direction)  
      protected void setMousePressed​(int handle)  
      protected void setMouseReleased​(int handle)  
      protected void setMouseRollover​(int handle)  
      • Methods inherited from class javax.swing.plaf.metal.MetalSliderUI

        createPropertyChangeListener, getThumbOverhang, getThumbSize, getTickLength, getTrackLength, getTrackWidth, installUI, paintFocus, paintMajorTickForHorizSlider, paintMajorTickForVertSlider, paintMinorTickForHorizSlider, paintMinorTickForVertSlider, paintTrack, scrollDueToClickInTrack
      • Methods inherited from class javax.swing.plaf.basic.BasicSliderUI

        calculateContentRect, calculateFocusRect, calculateGeometry, calculateLabelRect, calculateThumbSize, calculateTickRect, calculateTrackBuffer, calculateTrackRect, createChangeListener, createComponentListener, createFocusListener, createScrollListener, 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, paintHorizontalLabel, paintLabels, paintTicks, paintVerticalLabel, recalculateIfInsetsChanged, recalculateIfOrientationChanged, setThumbLocation, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, valueForXPosition, valueForYPosition, xPositionForValue, yPositionForValue, yPositionForValue
      • Methods inherited from class javax.swing.plaf.ComponentUI

        contains, getAccessibleChild, getAccessibleChildrenCount, update
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • hover

        protected boolean hover
      • second

        protected boolean second
      • rollover1

        protected boolean rollover1
      • pressed1

        protected boolean pressed1
      • rollover2

        protected boolean rollover2
      • pressed2

        protected boolean pressed2
    • Constructor Detail

      • MetalRangeSliderUI

        public MetalRangeSliderUI​(javax.swing.JSlider slider)
    • Method Detail

      • createUI

        public static javax.swing.plaf.ComponentUI createUI​(javax.swing.JComponent slider)
      • paint

        public void paint​(java.awt.Graphics g,
                          javax.swing.JComponent c)
        Overrides:
        paint in class javax.swing.plaf.basic.BasicSliderUI
      • restoreThumbForLowValue

        protected void restoreThumbForLowValue​(java.awt.Point p)
      • adjustThumbForHighValue

        protected java.awt.Point adjustThumbForHighValue()
      • adjustSnapHighValue

        protected void adjustSnapHighValue()
      • calculateThumbLocation

        protected void calculateThumbLocation()
        Overrides:
        calculateThumbLocation in class javax.swing.plaf.basic.BasicSliderUI
      • createTrackListener

        protected javax.swing.plaf.basic.BasicSliderUI.TrackListener createTrackListener​(javax.swing.JSlider slider)
        Overrides:
        createTrackListener in class javax.swing.plaf.basic.BasicSliderUI
      • getMouseHandle

        protected int getMouseHandle​(int x,
                                     int y)
      • paintThumb

        public void paintThumb​(java.awt.Graphics g)
        Overrides:
        paintThumb in class javax.swing.plaf.metal.MetalSliderUI
      • setMouseRollover

        protected void setMouseRollover​(int handle)
      • setMousePressed

        protected void setMousePressed​(int handle)
      • setMouseReleased

        protected void setMouseReleased​(int handle)
      • scrollByBlock

        public void scrollByBlock​(int direction)
        Overrides:
        scrollByBlock in class javax.swing.plaf.basic.BasicSliderUI
      • scrollByUnit

        public void scrollByUnit​(int direction)
        Overrides:
        scrollByUnit in class javax.swing.plaf.basic.BasicSliderUI