org.jdesktop.swingx.plaf.nimbus
Class NimbusScrollBarUI

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.jdesktop.swingx.plaf.nimbus.NimbusScrollBarUI
All Implemented Interfaces:
java.awt.LayoutManager, javax.swing.SwingConstants

public class NimbusScrollBarUI
extends javax.swing.plaf.metal.MetalScrollBarUI

NimbusScrollBarUI - A custom scrollbar ui for nimbus. It is special as it handles all the painting for the buttons as well so that it can cope with the buttons being non-recangular.

Author:
Created by Jasper Potts (Jan 17, 2007)

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicScrollBarUI
javax.swing.plaf.basic.BasicScrollBarUI.ArrowButtonListener, javax.swing.plaf.basic.BasicScrollBarUI.ModelListener, javax.swing.plaf.basic.BasicScrollBarUI.PropertyChangeHandler, javax.swing.plaf.basic.BasicScrollBarUI.ScrollListener, javax.swing.plaf.basic.BasicScrollBarUI.TrackListener
 
Field Summary
 
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
 
Constructor Summary
NimbusScrollBarUI()
           
 
Method Summary
protected  javax.swing.JButton createDecreaseButton(int orientation)
          
protected  javax.swing.JButton createIncreaseButton(int orientation)
          
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
          Creates a new UI deligate for the given component.
protected  java.awt.Dimension getMinimumThumbSize()
          
 void installUI(javax.swing.JComponent c)
          
protected  void paintThumb(java.awt.Graphics g, javax.swing.JComponent c, java.awt.Rectangle thumbBounds)
          
protected  void paintTrack(java.awt.Graphics g, javax.swing.JComponent c, java.awt.Rectangle trackBounds)
          
 
Methods inherited from class javax.swing.plaf.metal.MetalScrollBarUI
configureScrollBarColors, createPropertyChangeListener, getPreferredSize, installDefaults, installListeners, setThumbBounds
 
Methods inherited from class javax.swing.plaf.basic.BasicScrollBarUI
addLayoutComponent, createArrowButtonListener, createModelListener, createScrollListener, createTrackListener, getMaximumSize, getMaximumThumbSize, getSupportsAbsolutePositioning, getThumbBounds, getTrackBounds, installComponents, installKeyboardActions, 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, getBaseline, getBaselineResizeBehavior, getMinimumSize, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NimbusScrollBarUI

public NimbusScrollBarUI()
Method Detail

createUI

public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
Creates a new UI deligate for the given component. It is a standard method that all UI deligates must have.

Parameters:
c - The component that the UI is for
Returns:
a new instance of NimbusScrollBarUI

installUI

public void installUI(javax.swing.JComponent c)

Overrides:
installUI in class javax.swing.plaf.basic.BasicScrollBarUI

getMinimumThumbSize

protected java.awt.Dimension getMinimumThumbSize()

Overrides:
getMinimumThumbSize in class javax.swing.plaf.metal.MetalScrollBarUI

createDecreaseButton

protected javax.swing.JButton createDecreaseButton(int orientation)

Overrides:
createDecreaseButton in class javax.swing.plaf.metal.MetalScrollBarUI

createIncreaseButton

protected javax.swing.JButton createIncreaseButton(int orientation)

Overrides:
createIncreaseButton in class javax.swing.plaf.metal.MetalScrollBarUI

paintTrack

protected void paintTrack(java.awt.Graphics g,
                          javax.swing.JComponent c,
                          java.awt.Rectangle trackBounds)

Overrides:
paintTrack in class javax.swing.plaf.metal.MetalScrollBarUI

paintThumb

protected void paintThumb(java.awt.Graphics g,
                          javax.swing.JComponent c,
                          java.awt.Rectangle thumbBounds)

Overrides:
paintThumb in class javax.swing.plaf.metal.MetalScrollBarUI