Quaqua 7.4.2 2011-07-05

ch.randelshofer.quaqua
Class QuaquaScrollPaneUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.ScrollPaneUI
          extended by javax.swing.plaf.basic.BasicScrollPaneUI
              extended by ch.randelshofer.quaqua.QuaquaScrollPaneUI
All Implemented Interfaces:
VisuallyLayoutable, javax.swing.ScrollPaneConstants

public class QuaquaScrollPaneUI
extends javax.swing.plaf.basic.BasicScrollPaneUI
implements VisuallyLayoutable

QuaquaScrollPaneUI.

Version:
$Id: QuaquaScrollPaneUI.java 361 2010-11-21 11:19:20Z wrandelshofer $
Author:
Werner Randelshofer

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicScrollPaneUI
javax.swing.plaf.basic.BasicScrollPaneUI.HSBChangeListener, javax.swing.plaf.basic.BasicScrollPaneUI.MouseWheelHandler, javax.swing.plaf.basic.BasicScrollPaneUI.PropertyChangeHandler, javax.swing.plaf.basic.BasicScrollPaneUI.ViewportChangeHandler, javax.swing.plaf.basic.BasicScrollPaneUI.VSBChangeListener
 
Field Summary
 
Fields inherited from class javax.swing.plaf.basic.BasicScrollPaneUI
hsbChangeListener, scrollpane, spPropertyChangeListener, viewportChangeListener, vsbChangeListener
 
Fields inherited from interface ch.randelshofer.quaqua.VisuallyLayoutable
CLIP_BOUNDS, COMPONENT_BOUNDS, TEXT_BOUNDS
 
Fields inherited from interface javax.swing.ScrollPaneConstants
COLUMN_HEADER, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_POLICY, LOWER_LEADING_CORNER, LOWER_LEFT_CORNER, LOWER_RIGHT_CORNER, LOWER_TRAILING_CORNER, ROW_HEADER, UPPER_LEADING_CORNER, UPPER_LEFT_CORNER, UPPER_RIGHT_CORNER, UPPER_TRAILING_CORNER, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_ALWAYS, VERTICAL_SCROLLBAR_AS_NEEDED, VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_POLICY, VIEWPORT
 
Constructor Summary
QuaquaScrollPaneUI()
          Creates a new instance.
 
Method Summary
protected  javax.swing.event.ChangeListener createHSBChangeListener()
           
protected  java.awt.event.MouseWheelListener createMouseWheelListener()
          Creates an instance of MouseWheelListener, which is added to the JScrollPane by installUI().
protected  java.beans.PropertyChangeListener createPropertyChangeListener()
           
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
           
protected  javax.swing.event.ChangeListener createViewportChangeListener()
           
protected  javax.swing.event.ChangeListener createVSBChangeListener()
           
 int getBaseline(javax.swing.JComponent c, int width, int height)
          Returns the baseline for the specified component, or -1 if the baseline can not be determined.
 java.awt.Rectangle getVisualBounds(javax.swing.JComponent c, int type, int width, int height)
          Returns the visual bounds for the specified component, or null if the visual bounds can not be determined.
 java.awt.Insets getVisualMargin(java.awt.Component c)
           
protected  void installDefaults(javax.swing.JScrollPane scrollpane)
           
protected  void installListeners(javax.swing.JScrollPane c)
           
 void installUI(javax.swing.JComponent c)
           
protected  void syncScrollPaneWithViewport()
           
protected  void uninstallDefaults(javax.swing.JScrollPane scrollpane)
           
protected  void uninstallListeners(javax.swing.JComponent c)
           
 void update(java.awt.Graphics g, javax.swing.JComponent c)
           
 
Methods inherited from class javax.swing.plaf.basic.BasicScrollPaneUI
getBaselineResizeBehavior, getMaximumSize, installKeyboardActions, paint, uninstallKeyboardActions, uninstallUI, updateColumnHeader, updateRowHeader, updateScrollBarDisplayPolicy, updateViewport
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getMinimumSize, getPreferredSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuaquaScrollPaneUI

public QuaquaScrollPaneUI()
Creates a new instance.

Method Detail

createUI

public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)

installUI

public void installUI(javax.swing.JComponent c)
Overrides:
installUI in class javax.swing.plaf.basic.BasicScrollPaneUI

createPropertyChangeListener

protected java.beans.PropertyChangeListener createPropertyChangeListener()
Overrides:
createPropertyChangeListener in class javax.swing.plaf.basic.BasicScrollPaneUI

installDefaults

protected void installDefaults(javax.swing.JScrollPane scrollpane)
Overrides:
installDefaults in class javax.swing.plaf.basic.BasicScrollPaneUI

uninstallDefaults

protected void uninstallDefaults(javax.swing.JScrollPane scrollpane)
Overrides:
uninstallDefaults in class javax.swing.plaf.basic.BasicScrollPaneUI

installListeners

protected void installListeners(javax.swing.JScrollPane c)
Overrides:
installListeners in class javax.swing.plaf.basic.BasicScrollPaneUI

uninstallListeners

protected void uninstallListeners(javax.swing.JComponent c)
Overrides:
uninstallListeners in class javax.swing.plaf.basic.BasicScrollPaneUI

createMouseWheelListener

protected java.awt.event.MouseWheelListener createMouseWheelListener()
Creates an instance of MouseWheelListener, which is added to the JScrollPane by installUI(). The returned MouseWheelListener is used to handle mouse wheel-driven scrolling.

Overrides:
createMouseWheelListener in class javax.swing.plaf.basic.BasicScrollPaneUI
Returns:
MouseWheelListener which implements wheel-driven scrolling

createVSBChangeListener

protected javax.swing.event.ChangeListener createVSBChangeListener()
Overrides:
createVSBChangeListener in class javax.swing.plaf.basic.BasicScrollPaneUI

createHSBChangeListener

protected javax.swing.event.ChangeListener createHSBChangeListener()
Overrides:
createHSBChangeListener in class javax.swing.plaf.basic.BasicScrollPaneUI

createViewportChangeListener

protected javax.swing.event.ChangeListener createViewportChangeListener()
Overrides:
createViewportChangeListener in class javax.swing.plaf.basic.BasicScrollPaneUI

getVisualMargin

public java.awt.Insets getVisualMargin(java.awt.Component c)

update

public void update(java.awt.Graphics g,
                   javax.swing.JComponent c)
Overrides:
update in class javax.swing.plaf.ComponentUI

getBaseline

public int getBaseline(javax.swing.JComponent c,
                       int width,
                       int height)
Description copied from interface: VisuallyLayoutable
Returns the baseline for the specified component, or -1 if the baseline can not be determined. The baseline is measured from the top of the component.

Specified by:
getBaseline in interface VisuallyLayoutable
Overrides:
getBaseline in class javax.swing.plaf.basic.BasicScrollPaneUI
Parameters:
c - JComponent to calculate baseline for
width - Width of the component to determine baseline for.
height - Height of the component to determine baseline for.
Returns:
baseline for the specified component

getVisualBounds

public java.awt.Rectangle getVisualBounds(javax.swing.JComponent c,
                                          int type,
                                          int width,
                                          int height)
Description copied from interface: VisuallyLayoutable
Returns the visual bounds for the specified component, or null if the visual bounds can not be determined.

Specified by:
getVisualBounds in interface VisuallyLayoutable
Parameters:
c - JComponent to calculate visual margin for
type - The type of the visual margin.
width - Width of the component
height - Height of the component
Returns:
The visual bounds in component coordinates.

syncScrollPaneWithViewport

protected void syncScrollPaneWithViewport()
Overrides:
syncScrollPaneWithViewport in class javax.swing.plaf.basic.BasicScrollPaneUI

Copyright 2003-2007 (c) Werner Randelshofer.
All rights reserved.