Overview  Package   Class  Tree  Index 

be.lassi.ui.color
Class ColorSliderUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.SliderUI
          extended by javax.swing.plaf.basic.BasicSliderUI
              extended by be.lassi.ui.color.ColorSliderUI

public class ColorSliderUI
extends javax.swing.plaf.basic.BasicSliderUI

A custom look and feel implementation of SliderUI, that displays the colors in the slider track that will be choosen if the thumb (an arrow) is moved to that position. The track colors will be updated when the current color selection is changed in using the other sliders or the color wheel.

The default mouse click and mouse drag behavior (that performs scrolling of the thumb to the selected position) are overwritten, so that the slider immediately "jumps" to the selected value.


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
 
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
ColorSliderUI(javax.swing.JSlider b, ColorWheelPresentationModel.ColorAttribute colorAttribute)
           
 
Method Summary
protected  void calculateThumbSize()
          
protected  void calculateTrackRect()
          
protected  void installListeners(javax.swing.JSlider aslider)
          
 void paintFocus(java.awt.Graphics g)
          
 void paintThumb(java.awt.Graphics g)
          
 void paintTrack(java.awt.Graphics g)
          
protected  void uninstallListeners(javax.swing.JSlider aslider)
          
 
Methods inherited from class javax.swing.plaf.basic.BasicSliderUI
calculateContentRect, calculateFocusRect, calculateGeometry, calculateLabelRect, calculateThumbLocation, calculateTickRect, calculateTrackBuffer, 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, installUI, isDragging, paint, paintHorizontalLabel, paintLabels, paintMajorTickForHorizSlider, paintMajorTickForVertSlider, paintMinorTickForHorizSlider, paintMinorTickForVertSlider, paintTicks, paintVerticalLabel, recalculateIfInsetsChanged, recalculateIfOrientationChanged, scrollByBlock, scrollByUnit, scrollDueToClickInTrack, setThumbLocation, uninstallKeyboardActions, uninstallUI, valueForXPosition, valueForYPosition, xPositionForValue, 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
 

Constructor Detail

ColorSliderUI

public ColorSliderUI(javax.swing.JSlider b,
                     ColorWheelPresentationModel.ColorAttribute colorAttribute)
Method Detail

calculateThumbSize

protected void calculateThumbSize()

Overrides:
calculateThumbSize in class javax.swing.plaf.basic.BasicSliderUI

calculateTrackRect

protected void calculateTrackRect()

Overrides:
calculateTrackRect in class javax.swing.plaf.basic.BasicSliderUI

installListeners

protected void installListeners(javax.swing.JSlider aslider)

Overrides:
installListeners 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

paintTrack

public void paintTrack(java.awt.Graphics g)

Overrides:
paintTrack in class javax.swing.plaf.basic.BasicSliderUI

uninstallListeners

protected void uninstallListeners(javax.swing.JSlider aslider)

Overrides:
uninstallListeners in class javax.swing.plaf.basic.BasicSliderUI

Overview  Package   Class  Tree  Index 
Lighting Assistant 1.2