Home » openjdk-7 » javax » swing » plaf » basic » [javadoc | source]
javax.swing.plaf.basic
public class: BasicScrollBarUI [javadoc | source]
java.lang.Object
   javax.swing.plaf.ComponentUI
      javax.swing.plaf.ScrollBarUI
         javax.swing.plaf.basic.BasicScrollBarUI

All Implemented Interfaces:
    LayoutManager, SwingConstants

Direct Known Subclasses:
    MetalScrollBarUI, SynthScrollBarUI

Implementation of ScrollBarUI for the Basic Look and Feel
Nested Class Summary:
protected class  BasicScrollBarUI.ModelListener  A listener to listen for model changes. 
protected class  BasicScrollBarUI.TrackListener  Track mouse drags. 
protected class  BasicScrollBarUI.ArrowButtonListener  Listener for cursor keys. 
protected class  BasicScrollBarUI.ScrollListener  Listener for scrolling events initiated in the ScrollPane
public class  BasicScrollBarUI.PropertyChangeHandler   
Field Summary
protected  Dimension minimumThumbSize     
protected  Dimension maximumThumbSize     
protected  Color thumbHighlightColor     
protected  Color thumbLightShadowColor     
protected  Color thumbDarkShadowColor     
protected  Color thumbColor     
protected  Color trackColor     
protected  Color trackHighlightColor     
protected  JScrollBar scrollbar     
protected  JButton incrButton     
protected  JButton decrButton     
protected  boolean isDragging     
protected  TrackListener trackListener     
protected  ArrowButtonListener buttonListener     
protected  ModelListener modelListener     
protected  Rectangle thumbRect     
protected  Rectangle trackRect     
protected  int trackHighlight     
protected static final  int NO_HIGHLIGHT     
protected static final  int DECREASE_HIGHLIGHT     
protected static final  int INCREASE_HIGHLIGHT     
protected  ScrollListener scrollListener     
protected  PropertyChangeListener propertyChangeListener     
protected  Timer scrollTimer     
protected  int scrollBarWidth    Hint as to what width (when vertical) or height (when horizontal) should be.
    since: 1.7 -
 
protected  int incrGap    Distance between the increment button and the track. This may be a negative number. If negative, then an overlap between the button and track will occur, which is useful for shaped buttons.
    since: 1.7 -
 
protected  int decrGap    Distance between the decrement button and the track. This may be a negative number. If negative, then an overlap between the button and track will occur, which is useful for shaped buttons.
    since: 1.7 -
 
Method from javax.swing.plaf.basic.BasicScrollBarUI Summary:
addLayoutComponent,   configureScrollBarColors,   createArrowButtonListener,   createDecreaseButton,   createIncreaseButton,   createModelListener,   createPropertyChangeListener,   createScrollListener,   createTrackListener,   createUI,   getMaximumSize,   getMaximumThumbSize,   getMinimumThumbSize,   getPreferredSize,   getSupportsAbsolutePositioning,   getThumbBounds,   getTrackBounds,   installComponents,   installDefaults,   installKeyboardActions,   installListeners,   installUI,   isThumbRollover,   layoutContainer,   layoutHScrollbar,   layoutVScrollbar,   loadActionMap,   minimumLayoutSize,   paint,   paintDecreaseHighlight,   paintIncreaseHighlight,   paintThumb,   paintTrack,   preferredLayoutSize,   removeLayoutComponent,   scrollByBlock,   scrollByBlock,   scrollByUnit,   scrollByUnits,   setThumbBounds,   setThumbRollover,   uninstallComponents,   uninstallDefaults,   uninstallKeyboardActions,   uninstallListeners,   uninstallUI
Methods from javax.swing.plaf.ComponentUI:
contains,   createUI,   getAccessibleChild,   getAccessibleChildrenCount,   getBaseline,   getBaselineResizeBehavior,   getMaximumSize,   getMinimumSize,   getPreferredSize,   installUI,   paint,   uninstallUI,   update
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.plaf.basic.BasicScrollBarUI Detail:
 public  void addLayoutComponent(String name,
    Component child) 
 protected  void configureScrollBarColors() 
 protected ArrowButtonListener createArrowButtonListener() 
 protected JButton createDecreaseButton(int orientation) 
 protected JButton createIncreaseButton(int orientation) 
 protected ModelListener createModelListener() 
 protected PropertyChangeListener createPropertyChangeListener() 
 protected ScrollListener createScrollListener() 
 protected TrackListener createTrackListener() 
 public static ComponentUI createUI(JComponent c) 
 public Dimension getMaximumSize(JComponent c) 
 protected Dimension getMaximumThumbSize() 
    Returns the largest acceptable size for the thumb. To create a fixed size thumb one make this method and getMinimumThumbSize return the same value.

    Warning : the value returned by this method should not be be modified, it's a shared static constant.

 protected Dimension getMinimumThumbSize() 
    Returns the smallest acceptable size for the thumb. If the scrollbar becomes so small that this size isn't available, the thumb will be hidden.

    Warning : the value returned by this method should not be be modified, it's a shared static constant.

 public Dimension getPreferredSize(JComponent c) 
    A vertical scrollbar's preferred width is the maximum of preferred widths of the (non null) increment/decrement buttons, and the minimum width of the thumb. The preferred height is the sum of the preferred heights of the same parts. The basis for the preferred size of a horizontal scrollbar is similar.

    The preferredSize is only computed once, subsequent calls to this method just return a cached size.

 public boolean getSupportsAbsolutePositioning() 
    Indicates whether the user can absolutely position the thumb with a mouse gesture (usually the middle mouse button).
 protected Rectangle getThumbBounds() 
    Return the current size/location of the thumb.

    Warning : the value returned by this method should not be be modified, it's a reference to the actual rectangle, not a copy.

 protected Rectangle getTrackBounds() 
    Returns the current bounds of the track, i.e. the space in between the increment and decrement buttons, less the insets. The value returned by this method is updated each time the scrollbar is laid out (validated).

    Warning : the value returned by this method should not be be modified, it's a reference to the actual rectangle, not a copy.

 protected  void installComponents() 
 protected  void installDefaults() 
 protected  void installKeyboardActions() 
 protected  void installListeners() 
 public  void installUI(JComponent c) 
 public boolean isThumbRollover() 
    Returns true if the mouse is currently over the thumb.
 public  void layoutContainer(Container scrollbarContainer) 
 protected  void layoutHScrollbar(JScrollBar sb) 
 protected  void layoutVScrollbar(JScrollBar sb) 
 static  void loadActionMap(LazyActionMap map) 
 public Dimension minimumLayoutSize(Container scrollbarContainer) 
 public  void paint(Graphics g,
    JComponent c) 
 protected  void paintDecreaseHighlight(Graphics g) 
 protected  void paintIncreaseHighlight(Graphics g) 
 protected  void paintThumb(Graphics g,
    JComponent c,
    Rectangle thumbBounds) 
 protected  void paintTrack(Graphics g,
    JComponent c,
    Rectangle trackBounds) 
 public Dimension preferredLayoutSize(Container scrollbarContainer) 
 public  void removeLayoutComponent(Component child) 
 protected  void scrollByBlock(int direction) 
 static  void scrollByBlock(JScrollBar scrollbar,
    int direction) 
 protected  void scrollByUnit(int direction) 
 static  void scrollByUnits(JScrollBar scrollbar,
    int direction,
    int units,
    boolean limitToBlock) 
 protected  void setThumbBounds(int x,
    int y,
    int width,
    int height) 
    Set the bounds of the thumb and force a repaint that includes the old thumbBounds and the new one.
 protected  void setThumbRollover(boolean active) 
    Sets whether or not the mouse is currently over the thumb.
 protected  void uninstallComponents() 
 protected  void uninstallDefaults() 
 protected  void uninstallKeyboardActions() 
 protected  void uninstallListeners() 
 public  void uninstallUI(JComponent c)