com.dlsc.flexgantt.swing.util
Class AutoscrollSupport

java.lang.Object
  extended by com.dlsc.flexgantt.swing.util.AutoscrollSupport
All Implemented Interfaces:
java.awt.dnd.Autoscroll

public class AutoscrollSupport
extends java.lang.Object
implements java.awt.dnd.Autoscroll

A support class, which enables the autoscroll feature for the tree table and the layer container. These components will automatically scroll when the user performs a drag & drop operation and the mouse cursor reaches any one the edges of the component's visible rectangle.

Since:
1.0
Author:
Dirk Lemmermann

Constructor Summary
AutoscrollSupport(javax.swing.JComponent comp)
          Constructs a new autoscroll support object.
AutoscrollSupport(javax.swing.JComponent comp, java.awt.Insets insets)
          Constructs a new autoscroll support object.
AutoscrollSupport(javax.swing.JComponent comp, java.awt.Insets insets, java.awt.Insets scrollUnits)
          Constructs a new autoscroll support object.
 
Method Summary
 void autoscroll(java.awt.Point cursorLoc)
           
 java.awt.Insets getAutoscrollInsets()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoscrollSupport

public AutoscrollSupport(javax.swing.JComponent comp)
Constructs a new autoscroll support object.

Parameters:
comp - the component for which to activate automatic scrolling during drag and drop operations
Since:
1.0

AutoscrollSupport

public AutoscrollSupport(javax.swing.JComponent comp,
                         java.awt.Insets insets)
Constructs a new autoscroll support object.

Parameters:
comp - the component for which to activate automatic scrolling during drag and drop operations
insets - the container insets where autoscrolling should be active
Since:
1.0

AutoscrollSupport

public AutoscrollSupport(javax.swing.JComponent comp,
                         java.awt.Insets insets,
                         java.awt.Insets scrollUnits)
Constructs a new autoscroll support object.

Parameters:
comp - the component for which to activate automatic scrolling during drag and drop operations
insets - the container insets where autoscrolling should be active
scrollUnits - the number of units to scroll when the mouse cursor causes automatic scrolling
Since:
1.0
Method Detail

autoscroll

public void autoscroll(java.awt.Point cursorLoc)
Specified by:
autoscroll in interface java.awt.dnd.Autoscroll

getAutoscrollInsets

public java.awt.Insets getAutoscrollInsets()
Specified by:
getAutoscrollInsets in interface java.awt.dnd.Autoscroll