uk.co.keang.swingaddons
Class FocusAutoScroller

java.lang.Object
  extended by uk.co.keang.swingaddons.FocusAutoScroller
All Implemented Interfaces:
java.awt.event.ContainerListener, java.util.EventListener

public class FocusAutoScroller
extends java.lang.Object
implements java.awt.event.ContainerListener

Listener to keep track of the components as they are added and removed from this wizard page.

Author:
rogue

Nested Class Summary
static class FocusAutoScroller.BiasH
           
static class FocusAutoScroller.BiasV
           
static class FocusAutoScroller.ViewComponent
           
 
Constructor Summary
FocusAutoScroller(javax.swing.JScrollPane scrollPane)
          Creates a scroller for this scroll pane based on each child component with horizontal bias of right and vertical bias of center
FocusAutoScroller(javax.swing.JScrollPane scrollPane, FocusAutoScroller.ViewComponent comp, FocusAutoScroller.BiasH h, FocusAutoScroller.BiasV v)
           
 
Method Summary
 void componentAdded(java.awt.event.ContainerEvent e)
           
 void componentRemoved(java.awt.event.ContainerEvent e)
           
 FocusAutoScroller.BiasH getHorizontalBias()
          Gets the horizontal bias
 java.awt.Insets getScrollInsets()
          Gets the insets applied when auto scrolling
 FocusAutoScroller.BiasV getVerticalBias()
          Gets the vertical bias
 void setHorizontalBias(FocusAutoScroller.BiasH align)
          Sets the horizontal bias
 void setScrollInsets(java.awt.Insets ins)
          Sets the insets to apply when auto scrolling
 void setScrollInsets(int top, int left, int bottom, int right)
          Sets the insets to apply when auto scrolling
 void setVerticalBias(FocusAutoScroller.BiasV align)
          Sets the vertical bias
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FocusAutoScroller

public FocusAutoScroller(javax.swing.JScrollPane scrollPane)
Creates a scroller for this scroll pane based on each child component with horizontal bias of right and vertical bias of center

Parameters:
scrollPane - the scrollpane to scroll.

FocusAutoScroller

public FocusAutoScroller(javax.swing.JScrollPane scrollPane,
                         FocusAutoScroller.ViewComponent comp,
                         FocusAutoScroller.BiasH h,
                         FocusAutoScroller.BiasV v)
Method Detail

getScrollInsets

public java.awt.Insets getScrollInsets()
Gets the insets applied when auto scrolling

Returns:
the insets

setScrollInsets

public void setScrollInsets(java.awt.Insets ins)
Sets the insets to apply when auto scrolling

Parameters:
ins - the insets

setScrollInsets

public void setScrollInsets(int top,
                            int left,
                            int bottom,
                            int right)
Sets the insets to apply when auto scrolling

Parameters:
top -
left -
bottom -
right -

componentAdded

public void componentAdded(java.awt.event.ContainerEvent e)
Specified by:
componentAdded in interface java.awt.event.ContainerListener

componentRemoved

public void componentRemoved(java.awt.event.ContainerEvent e)
Specified by:
componentRemoved in interface java.awt.event.ContainerListener

setHorizontalBias

public void setHorizontalBias(FocusAutoScroller.BiasH align)
Sets the horizontal bias

Parameters:
align - the bias

getHorizontalBias

public FocusAutoScroller.BiasH getHorizontalBias()
Gets the horizontal bias

Returns:
align the bias

setVerticalBias

public void setVerticalBias(FocusAutoScroller.BiasV align)
Sets the vertical bias

Parameters:
the - bias

getVerticalBias

public FocusAutoScroller.BiasV getVerticalBias()
Gets the vertical bias

Returns:
the bias