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
Implementation of ScrollBarUI for the Metal Look and Feel
-
Nested Class Summary
Nested classes/interfaces declared in class javax.swing.plaf.basic.BasicScrollBarUI
BasicScrollBarUI.ArrowButtonListener, BasicScrollBarUI.ModelListener, BasicScrollBarUI.PropertyChangeHandler, BasicScrollBarUI.ScrollListener, BasicScrollBarUI.TrackListener
-
Field Summary
Modifier and TypeFieldDescriptionprotected MetalScrollButton
The decrease button.static final String
The propertyJScrollBar.isFreeStanding
.protected MetalScrollButton
The increase button.protected boolean
The value of the propertyJScrollBar.isFreeStanding
.protected int
The width of the scroll bar.Fields declared in class javax.swing.plaf.basic.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 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
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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
Constructs a newMetalScrollBarUI
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 javax.swing.plaf.basic.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 javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMinimumSize, paint, update
-
Field Details
-
increaseButton
The increase button. -
decreaseButton
The decrease button. -
scrollBarWidth
protected int scrollBarWidthThe width of the scroll bar. -
FREE_STANDING_PROP
-
isFreeStanding
protected boolean isFreeStandingThe value of the propertyJScrollBar.isFreeStanding
.
-
-
Constructor Details
-
MetalScrollBarUI
public MetalScrollBarUI()Constructs aMetalScrollBarUI
.
-
-
Method Details
-
createUI
Constructs a newMetalScrollBarUI
instance.- Parameters:
c
- a component- Returns:
- a new
MetalScrollBarUI
instance
-
createDecreaseButton
Returns the view that represents the decrease view.- Overrides:
createDecreaseButton
in classBasicScrollBarUI
- Parameters:
orientation
- the orientation- Returns:
- a decrease button
-
createIncreaseButton
Returns the view that represents the increase view.- Overrides:
createIncreaseButton
in classBasicScrollBarUI
- 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 classBasicScrollBarUI
- Parameters:
x
- set the x location of the thumby
- set the y location of the thumbwidth
- set the width of the thumbheight
- set the height of the thumb- See Also:
-