org.jvnet.substance
Class SubstanceScrollBarUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.ScrollBarUI
          extended by javax.swing.plaf.basic.BasicScrollBarUI
              extended by javax.swing.plaf.metal.MetalScrollBarUI
                  extended by org.jvnet.substance.SubstanceScrollBarUI
All Implemented Interfaces:
LayoutManager, SwingConstants, Trackable

public class SubstanceScrollBarUI
extends MetalScrollBarUI
implements Trackable

UI for scroll bars in Substance look and feel.

Author:
Kirill Grouchnikov

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicScrollBarUI
BasicScrollBarUI.ArrowButtonListener, BasicScrollBarUI.ModelListener, BasicScrollBarUI.PropertyChangeHandler, BasicScrollBarUI.ScrollListener, BasicScrollBarUI.TrackListener
 
Field Summary
protected  JButton myDecreaseButton
          Decrease button.
protected  JButton myIncreaseButton
          Increase button.
 
Fields inherited from class javax.swing.plaf.metal.MetalScrollBarUI
bumps, decreaseButton, FREE_STANDING_PROP, increaseButton, isFreeStanding, scrollBarWidth
 
Fields inherited from class javax.swing.plaf.basic.BasicScrollBarUI
buttonListener, decrButton, DECREASE_HIGHLIGHT, incrButton, INCREASE_HIGHLIGHT, isDragging, maximumThumbSize, minimumThumbSize, modelListener, NO_HIGHLIGHT, propertyChangeListener, scrollbar, scrollListener, scrollTimer, thumbDarkShadowColor, thumbLightShadowColor, thumbRect, trackColor, trackHighlight, trackHighlightColor, trackListener, trackRect
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Method Summary
protected  JButton createDecreaseButton(int orientation)
           
protected  JButton createIncreaseButton(int orientation)
           
static ComponentUI createUI(JComponent b)
           
protected  void installListeners()
           
 boolean isInside(MouseEvent me)
          Checks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.
protected  void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
           
protected  void paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
           
 
Methods inherited from class javax.swing.plaf.metal.MetalScrollBarUI
configureScrollBarColors, createPropertyChangeListener, getMinimumThumbSize, getPreferredSize, installDefaults, setThumbBounds
 
Methods inherited from class javax.swing.plaf.basic.BasicScrollBarUI
addLayoutComponent, createArrowButtonListener, createModelListener, createScrollListener, createTrackListener, getMaximumSize, getMaximumThumbSize, getSupportsAbsolutePositioning, getThumbBounds, getTrackBounds, installComponents, installKeyboardActions, installUI, isThumbRollover, layoutContainer, layoutHScrollbar, layoutVScrollbar, minimumLayoutSize, paint, paintDecreaseHighlight, paintIncreaseHighlight, preferredLayoutSize, removeLayoutComponent, scrollByBlock, scrollByUnit, setThumbRollover, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getMinimumSize, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myDecreaseButton

protected JButton myDecreaseButton
Decrease button.


myIncreaseButton

protected JButton myIncreaseButton
Increase button.

Method Detail

createUI

public static ComponentUI createUI(JComponent b)

createDecreaseButton

protected JButton createDecreaseButton(int orientation)
Overrides:
createDecreaseButton in class MetalScrollBarUI

createIncreaseButton

protected JButton createIncreaseButton(int orientation)
Overrides:
createIncreaseButton in class MetalScrollBarUI

paintTrack

protected void paintTrack(Graphics g,
                          JComponent c,
                          Rectangle trackBounds)
Overrides:
paintTrack in class MetalScrollBarUI

paintThumb

protected void paintThumb(Graphics g,
                          JComponent c,
                          Rectangle thumbBounds)
Overrides:
paintThumb in class MetalScrollBarUI

installListeners

protected void installListeners()
Overrides:
installListeners in class MetalScrollBarUI

isInside

public boolean isInside(MouseEvent me)
Description copied from interface: Trackable
Checks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.

Specified by:
isInside in interface Trackable
Parameters:
me - Mouse event.
Returns:
true if the mouse position of the specified event lies inside the area of the component designated for transition effects, false otherwise.