home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / awt / dnd / Autoscroll.java next >
Encoding:
Java Source  |  1998-03-20  |  2.1 KB  |  70 lines

  1. /*
  2.  * @(#)Autoscroll.java    1.2 98/03/18
  3.  *
  4.  * Copyright 1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.awt.dnd;
  16.  
  17. import java.awt.Insets;
  18. import java.awt.Point;
  19.  
  20. /**
  21.  * <p>
  22.  * During DnD operations it is possible that a user may wish to drop the 
  23.  * subject of the operation on a region of a scrollable GUI control that is
  24.  * not currently visible to the user.
  25.  * </p>
  26.  * <p>
  27.  * In such situations it is desirable that the GUI control detect this
  28.  * and institute a scroll operation in order to make obscured region(s)
  29.  * visible to the user. This feature is known as autoscrolling.
  30.  * </p>
  31.  * <p>
  32.  * If a GUI control is both an active DropTarget and is also scrollable it
  33.  * can receive notifications of autoscrolling gestures, by the user, from
  34.  * the DnD system by implementing this interface.
  35.  * </p>
  36.  * <p>
  37.  * An autoscrolling gesture is initiated by the user by keeping the drag
  38.  * cursor motionless with a border region of the Component, referred to as
  39.  * the "autoscrolling region", for a predefined period of time, this will
  40.  * result in repeated scroll requests to the Component until the Drag cursor
  41.  * resumes its motion.
  42.  * </p>
  43.  *
  44.  * @version 1.2
  45.  * @since JDK1.2
  46.  *
  47.  */
  48.  
  49. public interface Autoscroll {
  50.  
  51.     /**
  52.      * return an Inset describing the autoscrolling region or border relative
  53.      * to the geometry of the associated Component.
  54.      *
  55.      * This value is read once by the DropTarget upon entry of the drag cursor
  56.      * into the associated Component.
  57.      */
  58.  
  59.     public Insets getAutoscrollRegion();
  60.  
  61.     /**
  62.      * notify the Component to autoscroll
  63.      *
  64.      * @param cursorLocn the location of the cursor that triggered this operation
  65.      */
  66.  
  67.     public void autoScroll(Point cursorLocn);
  68.  
  69. }
  70.