Spec-Zone.ru › OpenJDK 25

Class MetalScrollBarUI

java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ScrollBarUI
javax.swing.plaf.basic.BasicScrollBarUI
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 declared in class BasicScrollBarUI

BasicScrollBarUI.ArrowButtonListener, BasicScrollBarUI.ModelListener, BasicScrollBarUI.PropertyChangeHandler, BasicScrollBarUI.ScrollListener, BasicScrollBarUI.TrackListener

Field Summary

Modifier and Type Field Description
protected MetalScrollButton decreaseButton
The decrease button.
static final String FREE_STANDING_PROP
The property JScrollBar.isFreeStanding.
protected MetalScrollButton increaseButton
The increase button.
protected boolean isFreeStanding
The value of the property JScrollBar.isFreeStanding.
protected int scrollBarWidth
The width of the scroll bar.

Fields declared in class BasicScrollBarUI

buttonListener, decrButton, DECREASE_HIGHLIGHT, decrGap, incrButton, INCREASE_HIGHLIGHT, incrGap, isDragging, maximumThumbSize, minimumThumbSize, modelListener, NO_HIGHLIGHT, propertyChangeListener, scrollbar, scrollListener, scrollTimer, thumbDarkShadowColor, thumbLightShadowColor, thumbRect, trackColor, trackHighlight, trackHighlightColor, trackListener, trackRect

Fields declared in interface 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

Constructor Description
MetalScrollBarUI()
Constructs a MetalScrollBarUI.

Method Summary

Modifier and Type Method Description
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.
static ComponentUI createUI(JComponent c)
Constructs a new MetalScrollBarUI instance.
protected void setThumbBounds(int x, int y, int width, int height)
This is overridden only to increase the invalid area.

Methods declared in class BasicScrollBarUI

addLayoutComponent, configureScrollBarColors, createArrowButtonListener, createModelListener, createPropertyChangeListener, createScrollListener, createTrackListener, getMaximumSize, getMaximumThumbSize, getMinimumThumbSize, getPreferredSize, getSupportsAbsolutePositioning, getThumbBounds, getTrackBounds, installComponents, installDefaults, installKeyboardActions, installListeners, installUI, isThumbRollover, layoutContainer, layoutHScrollbar, layoutVScrollbar, minimumLayoutSize, paintDecreaseHighlight, paintIncreaseHighlight, paintThumb, paintTrack, preferredLayoutSize, removeLayoutComponent, scrollByBlock, scrollByUnit, setThumbRollover, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI

Methods declared in class ComponentUI

contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMinimumSize, paint, update

Methods declared in class Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

increaseButton

protected MetalScrollButton increaseButton
The increase button.

decreaseButton

protected MetalScrollButton decreaseButton
The decrease button.

scrollBarWidth

protected int scrollBarWidth
The width of the scroll bar.

FREE_STANDING_PROP

public static final String FREE_STANDING_PROP
The property JScrollBar.isFreeStanding.
See Also:
  • Constant Field Values

isFreeStanding

protected boolean isFreeStanding
The value of the property JScrollBar.isFreeStanding.

Constructor Details

MetalScrollBarUI

public MetalScrollBarUI()
Constructs a MetalScrollBarUI.

Method Details

createUI

public static ComponentUI createUI(JComponent c)
Constructs a new MetalScrollBarUI instance.
Parameters:
c - a component
Returns:
a new MetalScrollBarUI instance

createDecreaseButton

protected JButton createDecreaseButton(int orientation)
Returns the view that represents the decrease view.
Overrides:
createDecreaseButton in class BasicScrollBarUI
Parameters:
orientation - the orientation
Returns:
a decrease button

createIncreaseButton

protected JButton createIncreaseButton(int orientation)
Returns the view that represents the increase view.
Overrides:
createIncreaseButton in class BasicScrollBarUI
Parameters:
orientation - the orientation
Returns:
an increase button

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 - set the x location of the thumb
y - set the y location of the thumb
width - set the width of the thumb
height - set the height of the thumb
See Also:
  • BasicScrollBarUI.getThumbBounds()

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Other versions.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2025, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

© 1993, 2025, 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.
https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/javax/swing/plaf/metal/MetalScrollBarUI.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API