| Java Doc By Examples | |
| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectjavax.swing.plaf.ComponentUIjavax.swing.plaf.ScrollBarUIjavax.swing.plaf.basic.BasicScrollBarUIjavax.swing.plaf.metal.MetalScrollBarUIpublic class MetalScrollBarUIextends BasicScrollBarUINested 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 | |
static String | |
protected javax.swing.plaf.metal.MetalBumps | |
protected MetalScrollButton | |
protected MetalScrollButton | |
protected boolean | |
protected int |
|
Fields inherited from class javax.swing.plaf.basic.BasicScrollBarUI | |
DECREASE_HIGHLIGHT, INCREASE_HIGHLIGHT, NO_HIGHLIGHT, buttonListener, decrButton, incrButton, isDragging, maximumThumbSize, minimumThumbSize, modelListener, propertyChangeListener, scrollListener, scrollTimer, scrollbar, thumbColor, thumbDarkShadowColor, thumbHighlightColor, thumbLightShadowColor, thumbRect, trackColor, trackHighlight, trackHighlightColor, trackListener, trackRect | |
Fields inherited from 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 | |
Method Summary | |
protected void | |
protected JButton |
|
protected JButton |
|
protected PropertyChangeListener | |
static ComponentUI |
|
protected Dimension |
|
Dimension |
|
protected void | |
protected void | |
protected void |
|
protected void |
|
protected void |
|
Methods inherited from class javax.swing.plaf.ComponentUI | |
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update | |
Methods inherited from class java.lang.Object | |
clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait | |
public static final String FREE_STANDING_PROP
- Field Value:
- "JScrollBar.isFreeStanding"
protected int scrollBarWidth
Hint as to what width (when vertical) or height (when horizontal) should be.
protected void configureScrollBarColors()
- Overrides:
- configureScrollBarColors in interface BasicScrollBarUI
protected JButton createDecreaseButton(int orientation)
Returns the view that represents the decrease view.
- Overrides:
- createDecreaseButton in interface BasicScrollBarUI
protected JButton createIncreaseButton(int orientation)
Returns the view that represents the increase view.
- Overrides:
- createIncreaseButton in interface BasicScrollBarUI
protected PropertyChangeListener createPropertyChangeListener()
- Overrides:
- createPropertyChangeListener in interface BasicScrollBarUI
public static ComponentUI createUI(JComponent c)
Returns an instance of the UI delegate for the specified component. Each subclass must provide its own staticcreateUImethod that returns an instance of that UI delegate subclass. If the UI delegate subclass is stateless, it may return an instance that is shared by multiple components. If the UI delegate is stateful, then it should return a new instance per component. The default implementation of this method throws an error, as it should never be invoked.
- Overrides:
- createUI in interface BasicScrollBarUI
protected Dimension getMinimumThumbSize()
Return 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.
- Overrides:
- getMinimumThumbSize in interface BasicScrollBarUI
- Returns:
- The smallest acceptable size for the thumb.
public Dimension getPreferredSize(JComponent c)
A vertical scrollbar's preferred width is the maximum of preferred widths of the (nonnull) 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. ThepreferredSizeis only computed once, subsequent calls to this method just return a cached size.
- Overrides:
- getPreferredSize in interface BasicScrollBarUI
- Parameters:
c- theJScrollBarthat's delegating this method to us
- Returns:
- the preferred size of a Basic JScrollBar
- See Also:
BasicScrollBarUI.getMaximumSize(JComponent),BasicScrollBarUI
protected void installDefaults()
- Overrides:
- installDefaults in interface BasicScrollBarUI
protected void installListeners()
- Overrides:
- installListeners in interface BasicScrollBarUI
protected void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
- Overrides:
- paintThumb in interface BasicScrollBarUI
protected void paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
- Overrides:
- paintTrack in interface BasicScrollBarUI
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 interface BasicScrollBarUI