com.alee.laf.slider
Class WebSliderUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.SliderUI
          extended by javax.swing.plaf.basic.BasicSliderUI
              extended by com.alee.laf.slider.WebSliderUI
All Implemented Interfaces:
BorderMethods, SwingMethods

public class WebSliderUI
extends javax.swing.plaf.basic.BasicSliderUI
implements BorderMethods

User: mgarin Date: 26.05.11 Time: 18:03


Nested Class Summary
 
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
protected  boolean angledThumb
           
protected  boolean animated
           
protected  javax.swing.event.ChangeListener changeListener
           
protected  boolean drawProgress
           
protected  boolean drawThumb
           
protected  java.awt.Insets margin
           
static int MAX_DARKNESS
           
protected  java.awt.event.MouseAdapter mouseAdapter
           
protected  java.awt.event.MouseWheelListener mouseWheelListener
           
protected  Painter painter
           
protected  int progressRound
           
protected  int progressShadeWidth
           
protected  java.beans.PropertyChangeListener propertyChangeListener
          Slider listeners.
protected  boolean rollover
          Runtime variables.
protected  boolean rolloverDarkBorderOnly
           
protected  int rolloverDarkness
           
protected  WebTimer rolloverTimer
           
protected  boolean sharpThumbAngle
           
protected  int thumbAngleLength
           
protected  java.awt.Color thumbBgBottom
           
protected  java.awt.Color thumbBgTop
           
protected  int thumbHeight
           
protected  int thumbRound
           
protected  int thumbShadeWidth
           
protected  int thumbWidth
           
protected  java.awt.Color trackBgBottom
           
protected  java.awt.Color trackBgTop
           
protected  int trackHeight
           
protected  int trackRound
           
protected  int trackShadeWidth
           
 
Fields inherited from class javax.swing.plaf.basic.BasicSliderUI
componentListener, contentRect, focusInsets, focusListener, focusRect, insetCache, labelRect, leftToRightCache, MAX_SCROLL, MIN_SCROLL, NEGATIVE_SCROLL, POSITIVE_SCROLL, scrollListener, scrollTimer, slider, thumbRect, tickRect, trackBuffer, trackListener, trackRect
 
Constructor Summary
WebSliderUI(javax.swing.JSlider b)
           
 
Method Summary
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
           
protected  java.awt.Color getBorderColor()
           
 java.awt.Insets getMargin()
           
 Painter getPainter()
           
protected  float getProgress()
           
 int getProgressRound()
           
 int getProgressShadeWidth()
           
protected  java.awt.Shape getProgressShape()
           
 int getThumbAngleLength()
           
 java.awt.Color getThumbBgBottom()
           
 java.awt.Color getThumbBgTop()
           
 int getThumbHeight()
           
 int getThumbRound()
           
 int getThumbShadeWidth()
           
protected  java.awt.Shape getThumbShape()
           
protected  java.awt.Dimension getThumbSize()
           
 int getThumbWidth()
           
 java.awt.Color getTrackBgBottom()
           
 java.awt.Color getTrackBgTop()
           
 int getTrackHeight()
           
 int getTrackRound()
           
 int getTrackShadeWidth()
           
protected  java.awt.Shape getTrackShape()
           
 void installUI(javax.swing.JComponent c)
           
 boolean isAngledThumb()
           
 boolean isAnimated()
           
 boolean isDrawProgress()
           
 boolean isDrawThumb()
           
 boolean isRolloverDarkBorderOnly()
           
 boolean isSharpThumbAngle()
           
 void paint(java.awt.Graphics g, javax.swing.JComponent c)
           
 void paintFocus(java.awt.Graphics g)
           
 void paintThumb(java.awt.Graphics g)
           
 void paintTrack(java.awt.Graphics g)
           
 void setAngledThumb(boolean angledThumb)
           
 void setAnimated(boolean animated)
           
 void setDrawProgress(boolean drawProgress)
           
 void setDrawThumb(boolean drawThumb)
           
 void setMargin(java.awt.Insets margin)
           
 void setPainter(Painter painter)
           
 void setProgressRound(int progressRound)
           
 void setProgressShadeWidth(int progressShadeWidth)
           
 void setRolloverDarkBorderOnly(boolean rolloverDarkBorderOnly)
           
 void setSharpThumbAngle(boolean sharpThumbAngle)
           
 void setThumbAngleLength(int thumbAngleLength)
           
 void setThumbBgBottom(java.awt.Color thumbBgBottom)
           
 void setThumbBgTop(java.awt.Color thumbBgTop)
           
 void setThumbHeight(int thumbHeight)
           
 void setThumbRound(int thumbRound)
           
 void setThumbShadeWidth(int thumbShadeWidth)
           
 void setThumbWidth(int thumbWidth)
           
 void setTrackBgBottom(java.awt.Color trackBgBottom)
           
 void setTrackBgTop(java.awt.Color trackBgTop)
           
 void setTrackHeight(int trackHeight)
           
 void setTrackRound(int trackRound)
           
 void setTrackShadeWidth(int trackShadeWidth)
           
 void uninstallUI(javax.swing.JComponent c)
           
 void updateBorder()
          Updates custom WebLaF border.
 
Methods inherited from class javax.swing.plaf.basic.BasicSliderUI
calculateContentRect, calculateFocusRect, calculateGeometry, calculateLabelRect, calculateThumbLocation, calculateThumbSize, calculateTickRect, calculateTrackBuffer, calculateTrackRect, createChangeListener, createComponentListener, createFocusListener, createPropertyChangeListener, createScrollListener, createTrackListener, drawInverted, getBaseline, getBaselineResizeBehavior, getFocusColor, getHeightOfHighValueLabel, getHeightOfLowValueLabel, getHeightOfTallestLabel, getHighestValue, getHighestValueLabel, getHighlightColor, getLowestValue, getLowestValueLabel, getMaximumSize, getMinimumHorizontalSize, getMinimumSize, getMinimumVerticalSize, getPreferredHorizontalSize, getPreferredSize, getPreferredVerticalSize, getShadowColor, getTickLength, getWidthOfHighValueLabel, getWidthOfLowValueLabel, getWidthOfWidestLabel, installDefaults, installKeyboardActions, installListeners, isDragging, labelsHaveSameBaselines, paintHorizontalLabel, paintLabels, paintMajorTickForHorizSlider, paintMajorTickForVertSlider, paintMinorTickForHorizSlider, paintMinorTickForVertSlider, paintTicks, paintVerticalLabel, recalculateIfInsetsChanged, recalculateIfOrientationChanged, scrollByBlock, scrollByUnit, scrollDueToClickInTrack, setThumbLocation, uninstallKeyboardActions, uninstallListeners, 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

MAX_DARKNESS

public static final int MAX_DARKNESS
See Also:
Constant Field Values

trackBgTop

protected java.awt.Color trackBgTop

trackBgBottom

protected java.awt.Color trackBgBottom

trackHeight

protected int trackHeight

trackRound

protected int trackRound

trackShadeWidth

protected int trackShadeWidth

drawProgress

protected boolean drawProgress

progressRound

protected int progressRound

progressShadeWidth

protected int progressShadeWidth

drawThumb

protected boolean drawThumb

thumbBgTop

protected java.awt.Color thumbBgTop

thumbBgBottom

protected java.awt.Color thumbBgBottom

thumbWidth

protected int thumbWidth

thumbHeight

protected int thumbHeight

thumbRound

protected int thumbRound

thumbShadeWidth

protected int thumbShadeWidth

angledThumb

protected boolean angledThumb

sharpThumbAngle

protected boolean sharpThumbAngle

thumbAngleLength

protected int thumbAngleLength

animated

protected boolean animated

rolloverDarkBorderOnly

protected boolean rolloverDarkBorderOnly

margin

protected java.awt.Insets margin

painter

protected Painter painter

propertyChangeListener

protected java.beans.PropertyChangeListener propertyChangeListener
Slider listeners.


mouseWheelListener

protected java.awt.event.MouseWheelListener mouseWheelListener

changeListener

protected javax.swing.event.ChangeListener changeListener

mouseAdapter

protected java.awt.event.MouseAdapter mouseAdapter

rollover

protected boolean rollover
Runtime variables.


rolloverDarkness

protected int rolloverDarkness

rolloverTimer

protected WebTimer rolloverTimer
Constructor Detail

WebSliderUI

public WebSliderUI(javax.swing.JSlider b)
Method Detail

createUI

public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)

installUI

public void installUI(javax.swing.JComponent c)
Overrides:
installUI in class javax.swing.plaf.basic.BasicSliderUI

uninstallUI

public void uninstallUI(javax.swing.JComponent c)
Overrides:
uninstallUI in class javax.swing.plaf.basic.BasicSliderUI

updateBorder

public void updateBorder()
Description copied from interface: BorderMethods
Updates custom WebLaF border.

Specified by:
updateBorder in interface BorderMethods

isAnimated

public boolean isAnimated()

setAnimated

public void setAnimated(boolean animated)

isRolloverDarkBorderOnly

public boolean isRolloverDarkBorderOnly()

setRolloverDarkBorderOnly

public void setRolloverDarkBorderOnly(boolean rolloverDarkBorderOnly)

getTrackBgTop

public java.awt.Color getTrackBgTop()

setTrackBgTop

public void setTrackBgTop(java.awt.Color trackBgTop)

getTrackBgBottom

public java.awt.Color getTrackBgBottom()

setTrackBgBottom

public void setTrackBgBottom(java.awt.Color trackBgBottom)

getTrackHeight

public int getTrackHeight()

setTrackHeight

public void setTrackHeight(int trackHeight)

getTrackRound

public int getTrackRound()

setTrackRound

public void setTrackRound(int trackRound)

getTrackShadeWidth

public int getTrackShadeWidth()

setTrackShadeWidth

public void setTrackShadeWidth(int trackShadeWidth)

isDrawProgress

public boolean isDrawProgress()

setDrawProgress

public void setDrawProgress(boolean drawProgress)

getProgressRound

public int getProgressRound()

setProgressRound

public void setProgressRound(int progressRound)

getProgressShadeWidth

public int getProgressShadeWidth()

setProgressShadeWidth

public void setProgressShadeWidth(int progressShadeWidth)

isDrawThumb

public boolean isDrawThumb()

setDrawThumb

public void setDrawThumb(boolean drawThumb)

getThumbBgTop

public java.awt.Color getThumbBgTop()

setThumbBgTop

public void setThumbBgTop(java.awt.Color thumbBgTop)

getThumbBgBottom

public java.awt.Color getThumbBgBottom()

setThumbBgBottom

public void setThumbBgBottom(java.awt.Color thumbBgBottom)

getThumbWidth

public int getThumbWidth()

setThumbWidth

public void setThumbWidth(int thumbWidth)

getThumbHeight

public int getThumbHeight()

setThumbHeight

public void setThumbHeight(int thumbHeight)

getThumbRound

public int getThumbRound()

setThumbRound

public void setThumbRound(int thumbRound)

getThumbShadeWidth

public int getThumbShadeWidth()

setThumbShadeWidth

public void setThumbShadeWidth(int thumbShadeWidth)

isAngledThumb

public boolean isAngledThumb()

setAngledThumb

public void setAngledThumb(boolean angledThumb)

isSharpThumbAngle

public boolean isSharpThumbAngle()

setSharpThumbAngle

public void setSharpThumbAngle(boolean sharpThumbAngle)

getThumbAngleLength

public int getThumbAngleLength()

setThumbAngleLength

public void setThumbAngleLength(int thumbAngleLength)

getMargin

public java.awt.Insets getMargin()

setMargin

public void setMargin(java.awt.Insets margin)

getPainter

public Painter getPainter()

setPainter

public void setPainter(Painter painter)

getThumbSize

protected java.awt.Dimension getThumbSize()
Overrides:
getThumbSize in class javax.swing.plaf.basic.BasicSliderUI

paint

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

paintFocus

public void paintFocus(java.awt.Graphics g)
Overrides:
paintFocus in class javax.swing.plaf.basic.BasicSliderUI

paintThumb

public void paintThumb(java.awt.Graphics g)
Overrides:
paintThumb in class javax.swing.plaf.basic.BasicSliderUI

getBorderColor

protected java.awt.Color getBorderColor()

getProgress

protected float getProgress()

getThumbShape

protected java.awt.Shape getThumbShape()

paintTrack

public void paintTrack(java.awt.Graphics g)
Overrides:
paintTrack in class javax.swing.plaf.basic.BasicSliderUI

getTrackShape

protected java.awt.Shape getTrackShape()

getProgressShape

protected java.awt.Shape getProgressShape()