Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.gui.lookandfeel
Class SIPCommScrollBarUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.ScrollBarUI
          extended by javax.swing.plaf.basic.BasicScrollBarUI
              extended by javax.swing.plaf.metal.MetalScrollBarUI
                  extended by net.java.sip.communicator.impl.gui.lookandfeel.SIPCommScrollBarUI
All Implemented Interfaces:
LayoutManager, SwingConstants, Skinnable

public class SIPCommScrollBarUI
extends MetalScrollBarUI
implements Skinnable

The SIPCommScrollBarUI implementation.

Author:
Yana Stamcheva, Adam Netocny

Nested 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
 
Fields inherited from class javax.swing.plaf.metal.MetalScrollBarUI
bumps, decreaseButton, FREE_STANDING_PROP, increaseButton, isFreeStanding, 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, thumbDarkShadowColor, 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
SIPCommScrollBarUI()
          Creates an instance of SIPCommScrollBarUI.
 
Method Summary
static ComponentUI createUI(JComponent c)
          Creates the UI for the given JComponent.
protected  Dimension getMinimumThumbSize()
          Returns the minimum scroll thumb size.
 void loadSkin()
          Loads UI resources.
protected  void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
          Paints the thumb of the scroll bar.
protected  void paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
          Paints the track of the scroll bar.
 
Methods inherited from class javax.swing.plaf.metal.MetalScrollBarUI
configureScrollBarColors, createDecreaseButton, createIncreaseButton, createPropertyChangeListener, getPreferredSize, installDefaults, installListeners, setThumbBounds
 
Methods inherited from class javax.swing.plaf.basic.BasicScrollBarUI
addLayoutComponent, createArrowButtonListener, createModelListener, createScrollListener, createTrackListener, getMaximumSize, getMaximumThumbSize, getSupportsAbsolutePositioning, getThumbBounds, getTrackBounds, installComponents, installKeyboardActions, installUI, isThumbRollover, layoutContainer, layoutHScrollbar, layoutVScrollbar, minimumLayoutSize, paint, paintDecreaseHighlight, paintIncreaseHighlight, preferredLayoutSize, removeLayoutComponent, scrollByBlock, scrollByUnit, setThumbRollover, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMinimumSize, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SIPCommScrollBarUI

public SIPCommScrollBarUI()
Creates an instance of SIPCommScrollBarUI.

Method Detail

createUI

public static ComponentUI createUI(JComponent c)
Creates the UI for the given JComponent.

Parameters:
c - the JComponent, for which to create an UI
Returns:
the component UI

paintTrack

protected void paintTrack(Graphics g,
                          JComponent c,
                          Rectangle trackBounds)
Paints the track of the scroll bar.

Overrides:
paintTrack in class MetalScrollBarUI
Parameters:
g - the Graphics object used for painting
c - the component to paint a track for
trackBounds - the bounds of the track to paint

paintThumb

protected void paintThumb(Graphics g,
                          JComponent c,
                          Rectangle thumbBounds)
Paints the thumb of the scroll bar.

Overrides:
paintThumb in class MetalScrollBarUI
Parameters:
g - the Graphics object used for painting
c - the component to paint a thumb for
thumbBounds - the bounds of the thumb to paint

getMinimumThumbSize

protected Dimension getMinimumThumbSize()
Returns the minimum scroll thumb size.

Overrides:
getMinimumThumbSize in class MetalScrollBarUI
Returns:
the minimum scroll thumb size

loadSkin

public void loadSkin()
Loads UI resources.

Specified by:
loadSkin in interface Skinnable

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.