< prev index next >

src/java.desktop/share/classes/java/awt/dnd/Autoscroll.java

Print this page




  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.awt.dnd;
  27 
  28 import java.awt.Insets;
  29 import java.awt.Point;
  30 
  31 /**
  32  * During DnD operations it is possible that a user may wish to drop the
  33  * subject of the operation on a region of a scrollable GUI control that is
  34  * not currently visible to the user.
  35  * <p>
  36  * In such situations it is desirable that the GUI control detect this
  37  * and institute a scroll operation in order to make obscured region(s)
  38  * visible to the user. This feature is known as autoscrolling.
  39  * <p>
  40  * If a GUI control is both an active <code>DropTarget</code>
  41  * and is also scrollable, it
  42  * can receive notifications of autoscrolling gestures by the user from
  43  * the DnD system by implementing this interface.
  44  * <p>
  45  * An autoscrolling gesture is initiated by the user by keeping the drag
  46  * cursor motionless with a border region of the <code>Component</code>,
  47  * referred to as
  48  * the "autoscrolling region", for a predefined period of time, this will
  49  * result in repeated scroll requests to the <code>Component</code>
  50  * until the drag <code>Cursor</code> resumes its motion.
  51  *
  52  * @since 1.2
  53  */
  54 
  55 public interface Autoscroll {
  56 
  57     /**
  58      * This method returns the <code>Insets</code> describing
  59      * the autoscrolling region or border relative
  60      * to the geometry of the implementing Component.
  61      * <P>
  62      * This value is read once by the <code>DropTarget</code>
  63      * upon entry of the drag <code>Cursor</code>
  64      * into the associated <code>Component</code>.
  65      *
  66      * @return the Insets
  67      */
  68 
  69     public Insets getAutoscrollInsets();
  70 
  71     /**
  72      * notify the <code>Component</code> to autoscroll
  73      *
  74      * @param cursorLocn A <code>Point</code> indicating the
  75      * location of the cursor that triggered this operation.
  76      */
  77 
  78     public void autoscroll(Point cursorLocn);
  79 
  80 }


  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.awt.dnd;
  27 
  28 import java.awt.Insets;
  29 import java.awt.Point;
  30 
  31 /**
  32  * During DnD operations it is possible that a user may wish to drop the
  33  * subject of the operation on a region of a scrollable GUI control that is
  34  * not currently visible to the user.
  35  * <p>
  36  * In such situations it is desirable that the GUI control detect this
  37  * and institute a scroll operation in order to make obscured region(s)
  38  * visible to the user. This feature is known as autoscrolling.
  39  * <p>
  40  * If a GUI control is both an active {@code DropTarget}
  41  * and is also scrollable, it
  42  * can receive notifications of autoscrolling gestures by the user from
  43  * the DnD system by implementing this interface.
  44  * <p>
  45  * An autoscrolling gesture is initiated by the user by keeping the drag
  46  * cursor motionless with a border region of the {@code Component},
  47  * referred to as
  48  * the "autoscrolling region", for a predefined period of time, this will
  49  * result in repeated scroll requests to the {@code Component}
  50  * until the drag {@code Cursor} resumes its motion.
  51  *
  52  * @since 1.2
  53  */
  54 
  55 public interface Autoscroll {
  56 
  57     /**
  58      * This method returns the {@code Insets} describing
  59      * the autoscrolling region or border relative
  60      * to the geometry of the implementing Component.
  61      * <P>
  62      * This value is read once by the {@code DropTarget}
  63      * upon entry of the drag {@code Cursor}
  64      * into the associated {@code Component}.
  65      *
  66      * @return the Insets
  67      */
  68 
  69     public Insets getAutoscrollInsets();
  70 
  71     /**
  72      * notify the {@code Component} to autoscroll
  73      *
  74      * @param cursorLocn A {@code Point} indicating the
  75      * location of the cursor that triggered this operation.
  76      */
  77 
  78     public void autoscroll(Point cursorLocn);
  79 
  80 }
< prev index next >