public class MetalScrollBarUI extends BasicScrollBarUI
Implementation of ScrollBarUI for the Metal Look and Feel
BasicScrollBarUI.ArrowButtonListener, BasicScrollBarUI.ModelListener, BasicScrollBarUI.PropertyChangeHandler, BasicScrollBarUI.ScrollListener, BasicScrollBarUI.TrackListener
protected javax.swing.plaf.metal.MetalBumps bumps
protected MetalScrollButton increaseButton
protected MetalScrollButton decreaseButton
protected int scrollBarWidth
public static final String FREE_STANDING_PROP
protected boolean isFreeStanding
public MetalScrollBarUI()
public static ComponentUI createUI(JComponent c)
protected void installDefaults()
installDefaults
in class BasicScrollBarUI
protected void installListeners()
installListeners
in class BasicScrollBarUI
protected PropertyChangeListener createPropertyChangeListener()
createPropertyChangeListener
in class BasicScrollBarUI
protected void configureScrollBarColors()
configureScrollBarColors
in class BasicScrollBarUI
public Dimension getPreferredSize(JComponent c)
Description copied from class: BasicScrollBarUI
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.
getPreferredSize
in class BasicScrollBarUI
c
- the JScrollBar
that's delegating this method to usBasicScrollBarUI.getMaximumSize(javax.swing.JComponent)
, ComponentUI.getMinimumSize(javax.swing.JComponent)
protected JButton createDecreaseButton(int orientation)
Returns the view that represents the decrease view.
createDecreaseButton
in class BasicScrollBarUI
protected JButton createIncreaseButton(int orientation)
Returns the view that represents the increase view.
createIncreaseButton
in class BasicScrollBarUI
protected void paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
paintTrack
in class BasicScrollBarUI
protected void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
paintThumb
in class BasicScrollBarUI
protected Dimension getMinimumThumbSize()
Description copied from class: BasicScrollBarUI
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.
getMinimumThumbSize
in class BasicScrollBarUI
BasicScrollBarUI.getMaximumThumbSize()
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
setThumbBounds
in class BasicScrollBarUI
BasicScrollBarUI.getThumbBounds()
© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.