GNU Classpath (0.95) | |
Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ScrollBarUI
javax.swing.plaf.basic.BasicScrollBarUI
Nested Class Summary | |
protected class |
|
protected class |
|
class |
|
protected class |
|
protected class |
|
Field Summary | |
protected static int |
|
protected static int |
|
protected static int |
|
protected BasicScrollBarUI.ArrowButtonListener |
|
protected JButton |
|
protected JButton |
|
protected boolean |
|
protected Dimension |
|
protected Dimension |
|
protected BasicScrollBarUI.ModelListener |
|
protected PropertyChangeListener |
|
protected BasicScrollBarUI.ScrollListener |
|
protected Timer |
|
protected JScrollBar |
|
protected Color |
|
protected Color |
|
protected Color |
|
protected Color |
|
protected Rectangle |
|
protected Color |
|
protected int |
|
protected Color |
|
protected BasicScrollBarUI.TrackListener |
|
protected Rectangle |
|
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 | |
void |
|
protected void |
|
protected BasicScrollBarUI.ArrowButtonListener |
|
protected JButton |
|
protected JButton |
|
protected BasicScrollBarUI.ModelListener |
|
protected PropertyChangeListener |
|
protected BasicScrollBarUI.ScrollListener |
|
protected BasicScrollBarUI.TrackListener |
|
static ComponentUI |
|
Dimension |
|
protected Dimension |
|
Dimension |
|
protected Dimension |
|
Dimension |
|
boolean |
|
protected Rectangle |
|
protected Rectangle |
|
protected void |
|
protected void |
|
protected void |
|
protected void |
|
void |
|
boolean |
|
void |
|
protected void |
|
protected void |
|
Dimension |
|
void |
|
protected void |
|
protected void |
|
protected void |
|
protected void |
|
Dimension |
|
void |
|
protected void |
|
protected void |
|
protected void |
|
protected void |
|
protected void |
|
protected void |
|
protected void |
|
protected void |
|
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 |
protected static final int DECREASE_HIGHLIGHT
Indicates that the decrease highlight should be painted.
- Field Value:
- 1
protected static final int INCREASE_HIGHLIGHT
Indicates that the increase highlight should be painted.
- Field Value:
- 2
protected static final int NO_HIGHLIGHT
Indicates that no highlight should be painted.
- Field Value:
- 0
protected BasicScrollBarUI.ArrowButtonListener buttonListener
The listener that listens to the JButtons.
protected BasicScrollBarUI.ModelListener modelListener
The listener that listens to the model.
protected PropertyChangeListener propertyChangeListener
The listener that listens to the scrollbar for property changes.
protected BasicScrollBarUI.ScrollListener scrollListener
The listener that listens to the timer.
protected Color trackHighlightColor
The color that is used when the mouse press occurs in the track.
protected BasicScrollBarUI.TrackListener trackListener
The listener that listens for MouseEvents on the track.
public void addLayoutComponent(String name, Component child)
This method adds a component to the layout.
- Specified by:
- addLayoutComponent in interface LayoutManager
- Parameters:
name
- The name to associate with the component that is added.child
- The Component to add.
protected void configureScrollBarColors()
This method configures the scrollbar's colors. This can be done by looking up the standard colors from the Look and Feel defaults.
protected BasicScrollBarUI.ArrowButtonListener createArrowButtonListener()
This method creates an ArrowButtonListener.
- Returns:
- A new ArrowButtonListener.
protected JButton createDecreaseButton(int orientation)
This method creates a new JButton with the appropriate icon for the orientation.
- Parameters:
orientation
- The orientation this JButton uses.
- Returns:
- The decrease JButton.
protected JButton createIncreaseButton(int orientation)
This method creates a new JButton with the appropriate icon for the orientation.
- Parameters:
orientation
- The orientation this JButton uses.
- Returns:
- The increase JButton.
protected BasicScrollBarUI.ModelListener createModelListener()
This method creates a new ModelListener.
- Returns:
- A new ModelListener.
protected PropertyChangeListener createPropertyChangeListener()
This method creates a new PropertyChangeListener.
- Returns:
- A new PropertyChangeListener.
protected BasicScrollBarUI.ScrollListener createScrollListener()
This method creates a new ScrollListener.
- Returns:
- A new ScrollListener.
protected BasicScrollBarUI.TrackListener createTrackListener()
This method creates a new TrackListener.
- Returns:
- A new TrackListener.
public static ComponentUI createUI(JComponent c)
This method returns a new BasicScrollBarUI.
- Overrides:
- createUI in interface ComponentUI
- Parameters:
c
- The JComponent to create a UI for.
- Returns:
- A new BasicScrollBarUI.
public Dimension getMaximumSize(JComponent c)
This method returns the maximum size for this JComponent.
- Overrides:
- getMaximumSize in interface ComponentUI
- Parameters:
c
- The JComponent to measure the maximum size for.
- Returns:
- The maximum size for the component.
protected Dimension getMaximumThumbSize()
This method returns the maximum thumb size.
- Returns:
- The maximum thumb size.
public Dimension getMinimumSize(JComponent c)
This method returns the minimum size for this JComponent.
- Overrides:
- getMinimumSize in interface ComponentUI
- Parameters:
c
- The JComponent to measure the minimum size for.
- Returns:
- The minimum size for the component.
protected Dimension getMinimumThumbSize()
This method returns the minimum thumb size.
- Returns:
- The minimum thumb size.
public Dimension getPreferredSize(JComponent c)
This method returns a cached value of the preferredSize. The only restrictions are: If the scrollbar is horizontal, the height should be the maximum of the height of the JButtons and the minimum width of the thumb. For vertical scrollbars, the calculation is similar (swap width for height and vice versa).
- Overrides:
- getPreferredSize in interface ComponentUI
- Parameters:
c
- The JComponent to measure.
- Returns:
- The preferredSize.
public boolean getSupportsAbsolutePositioning()
Indicates whether the user can position the thumb with a mouse click (i.e. middle button).
- Returns:
- true if the user can position the thumb with a mouse click.
- Since:
- 1.5
protected Rectangle getThumbBounds()
This method returns the thumb's bounds based on the current value of the scrollbar. This method updates the cached value and returns that.
- Returns:
- The thumb bounds.
protected Rectangle getTrackBounds()
This method calculates the bounds of the track. This method updates the cached value and returns it.
- Returns:
- The track's bounds.
protected void installComponents()
This method installs any addition Components that are a part of or related to this scrollbar.
protected void installDefaults()
This method installs the defaults for the scrollbar specified by the Basic Look and Feel.
protected void installKeyboardActions()
Installs the input map from the look and feel defaults, and a corresponding action map. Note the the keyboard bindings will only work when theJScrollBar
component has the focus, which is rare.
protected void installListeners()
This method installs any listeners for the scrollbar. This method also installs listeners for things such as the JButtons and the timer.
public void installUI(JComponent c)
This method installs the UI for the component. This can include setting up listeners, defaults, and components. This also includes initializing any data objects.
- Overrides:
- installUI in interface ComponentUI
- Parameters:
c
- The JComponent to install.
public boolean isThumbRollover()
Returns true if the mouse is over the thumb.
- Returns:
- true if the mouse is over the thumb.
- Since:
- 1.5
public void layoutContainer(Container scrollbarContainer)
This method lays out the scrollbar.
- Specified by:
- layoutContainer in interface LayoutManager
- Parameters:
scrollbarContainer
- The Container to layout.
protected void layoutHScrollbar(JScrollBar sb)
This method lays out the scrollbar horizontally.
- Parameters:
sb
- The JScrollBar to layout.
protected void layoutVScrollbar(JScrollBar sb)
This method lays out the scrollbar vertically.
- Parameters:
sb
- The JScrollBar to layout.
public Dimension minimumLayoutSize(Container scrollbarContainer)
This method returns the minimum size required for the layout.
- Specified by:
- minimumLayoutSize in interface LayoutManager
- Parameters:
scrollbarContainer
- The Container that is laid out.
- Returns:
- The minimum size.
public void paint(Graphics g, JComponent c)
This method is called when the component is painted.
- Overrides:
- paint in interface ComponentUI
- Parameters:
g
- The Graphics object to paint with.c
- The JComponent to paint.
protected void paintDecreaseHighlight(Graphics g)
This method is called when repainting and the mouse is pressed in the track. It paints the track below the thumb with the trackHighlight color.
- Parameters:
g
- The Graphics object to paint with.
protected void paintIncreaseHighlight(Graphics g)
This method is called when repainting and the mouse is pressed in the track. It paints the track above the thumb with the trackHighlight color.
- Parameters:
g
- The Graphics objet to paint with.
protected void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
This method paints the thumb.
- Parameters:
g
- The Graphics object to paint with.c
- The Component that is being painted.thumbBounds
- The thumb bounds.
protected void paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
This method paints the track.
- Parameters:
g
- The Graphics object to paint with.c
- The JComponent being painted.trackBounds
- The track's bounds.
public Dimension preferredLayoutSize(Container scrollbarContainer)
This method returns the preferred size for the layout.
- Specified by:
- preferredLayoutSize in interface LayoutManager
- Parameters:
scrollbarContainer
- The Container to find a size for.
- Returns:
- The preferred size for the layout.
public void removeLayoutComponent(Component child)
This method removes a child component from the layout.
- Specified by:
- removeLayoutComponent in interface LayoutManager
- Parameters:
child
- The child to remove.
protected void scrollByBlock(int direction)
The method scrolls the thumb by a block in the direction specified.
- Parameters:
direction
- The direction to scroll.
protected void scrollByUnit(int direction)
The method scrolls the thumb by a unit in the direction specified.
- Parameters:
direction
- The direction to scroll.
protected void setThumbBounds(int x, int y, int width, int height)
This method sets the thumb's bounds.
- Parameters:
x
- The X position of the thumb.y
- The Y position of the thumb.width
- The width of the thumb.height
- The height of the thumb.
protected void setThumbRollover(boolean active)
Set thumbRollover to active. This indicates whether or not the mouse is over the thumb.
- Parameters:
active
- - true if the mouse is over the thumb.
- Since:
- 1.5
protected void uninstallComponents()
This method uninstalls any components that are a part of or related to this scrollbar.
protected void uninstallDefaults()
This method uninstalls any defaults that this scrollbar acquired from the Basic Look and Feel defaults.
protected void uninstallKeyboardActions()
Uninstalls the input map and action map installed byinstallKeyboardActions()
.
protected void uninstallListeners()
This method uninstalls any listeners that were registered during install.
public void uninstallUI(JComponent c)
This method uninstalls the UI. This includes removing any defaults, listeners, and components that this UI may have initialized. It also nulls any instance data.
- Overrides:
- uninstallUI in interface ComponentUI
- Parameters:
c
- The Component to uninstall for.
GNU Classpath (0.95) |