|
JavaTM 2 Platform Std. Ed. v1.4.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.plaf.ComponentUI | +--javax.swing.plaf.ScrollBarUI | +--javax.swing.plaf.basic.BasicScrollBarUI | +--javax.swing.plaf.metal.MetalScrollBarUI
Implementation of ScrollBarUI for the Metal Look and Feel
Nested Class Summary |
Nested classes inherited from class javax.swing.plaf.basic.BasicScrollBarUI |
BasicScrollBarUI.ArrowButtonListener, BasicScrollBarUI.ModelListener, BasicScrollBarUI.PropertyChangeHandler, BasicScrollBarUI.ScrollListener, BasicScrollBarUI.TrackListener |
Field Summary | |
protected javax.swing.plaf.metal.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 |
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 |
Constructor Summary | |
MetalScrollBarUI()
|
Method Summary | |
protected void |
configureScrollBarColors()
|
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 |
createPropertyChangeListener()
|
static ComponentUI |
createUI(JComponent c)
Returns an instance of the UI delegate for the specified component. |
protected Dimension |
getMinimumThumbSize()
Return the smallest acceptable size for the thumb. |
Dimension |
getPreferredSize(JComponent c)
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 |
installDefaults()
|
protected void |
installListeners()
|
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.ComponentUI |
contains, getAccessibleChild, getAccessibleChildrenCount, update |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
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
Constructor Detail |
public MetalScrollBarUI()
Method Detail |
public static ComponentUI createUI(JComponent c)
ComponentUI
createUI
method 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.
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)
BasicScrollBarUI
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 us
BasicScrollBarUI.getMaximumSize(javax.swing.JComponent)
,
BasicScrollBarUI.getMinimumSize(javax.swing.JComponent)
protected JButton createDecreaseButton(int orientation)
createDecreaseButton
in class BasicScrollBarUI
protected JButton createIncreaseButton(int orientation)
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()
BasicScrollBarUI
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)
setThumbBounds
in class BasicScrollBarUI
BasicScrollBarUI.getThumbBounds()
|
JavaTM 2 Platform Std. Ed. v1.4.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.