This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing.plaf.metal
class MetalScrollBarUI

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
All Implemented Interfaces:
LayoutManager, SwingConstants

public class MetalScrollBarUI
extends BasicScrollBarUI

Implementation of ScrollBarUI for the Metal Look and Feel


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 MetalBumps bumps
          
protected MetalScrollButton decreaseButton
          
static String FREE_STANDING_PROP
          
protected MetalScrollButton increaseButton
          
protected boolean isFreeStanding
          
protected int 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, thumbColor, thumbDarkShadowColor, thumbHighlightColor, thumbLightShadowColor, thumbRect, trackColor, trackHighlight, trackHighlightColor, trackListener, trackRect
 
Constructor Summary

          
 
Method Summary
protected void

          
protected JButton
createDecreaseButton(int orientation)

          Returns the view that represents the decrease view.
protected JButton
createIncreaseButton(int orientation)

          Returns the view that represents the increase view.
protected PropertyChangeListener

          
static ComponentUI

          
protected Dimension

          Return the smallest acceptable size for the thumb.
 Dimension

          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.
protected void

          
protected void

          
protected void
paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)

          
protected void
paintTrack(Graphics g, JComponent c, Rectangle trackBounds)

          
protected void
setThumbBounds(int x, int y, int width, int height)

          This is overridden only to increase the invalid area.
 
Methods inherited from class javax.swing.plaf.basic.BasicScrollBarUI
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, minimumLayoutSize, paint, paintDecreaseHighlight, paintIncreaseHighlight, paintThumb, paintTrack, preferredLayoutSize, removeLayoutComponent, scrollByBlock, scrollByUnit, setThumbBounds, setThumbRollover, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bumps

protected MetalBumps bumps

decreaseButton

protected MetalScrollButton decreaseButton

FREE_STANDING_PROP

public static final String FREE_STANDING_PROP

increaseButton

protected MetalScrollButton increaseButton

isFreeStanding

protected boolean isFreeStanding

scrollBarWidth

protected int scrollBarWidth
Constructor Detail

MetalScrollBarUI

public MetalScrollBarUI()
Method Detail

configureScrollBarColors

protected void configureScrollBarColors()
Overrides:
configureScrollBarColors in class BasicScrollBarUI

createDecreaseButton

protected JButton createDecreaseButton(int orientation)
Returns the view that represents the decrease view.

Overrides:
createDecreaseButton in class BasicScrollBarUI
Parameters:
orientation

createIncreaseButton

protected JButton createIncreaseButton(int orientation)
Returns the view that represents the increase view.

Overrides:
createIncreaseButton in class BasicScrollBarUI
Parameters:
orientation

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()
Overrides:
createPropertyChangeListener in class BasicScrollBarUI

createUI

public static ComponentUI createUI(JComponent c)
Parameters:
c

getMinimumThumbSize

protected Dimension getMinimumThumbSize()
Overrides:
getMinimumThumbSize in class BasicScrollBarUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class BasicScrollBarUI
Parameters:
c

installDefaults

protected void installDefaults()
Overrides:
installDefaults in class BasicScrollBarUI

installListeners

protected void installListeners()
Overrides:
installListeners in class BasicScrollBarUI

paintThumb

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

paintTrack

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

setThumbBounds

protected void setThumbBounds(int x,
                              int y,
                              int width,
                              int height)
This is overridden only to increase the invalid area. This ensures that the "Shadow" below the thumb is invalidated

Overrides:
setThumbBounds in class BasicScrollBarUI
Parameters:
x
y
width
height


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.