jdk/src/share/classes/sun/swing/LightweightContent.java
changeset 26342 3637212ae8f2
parent 25195 9de77f5b0df2
equal deleted inserted replaced
26341:dff08260db73 26342:3637212ae8f2
    24  */
    24  */
    25 
    25 
    26 package sun.swing;
    26 package sun.swing;
    27 
    27 
    28 import javax.swing.JComponent;
    28 import javax.swing.JComponent;
       
    29 import java.awt.Component;
    29 import java.awt.Cursor;
    30 import java.awt.Cursor;
       
    31 import java.awt.dnd.DragGestureEvent;
       
    32 import java.awt.dnd.DragGestureListener;
       
    33 import java.awt.dnd.DragGestureRecognizer;
       
    34 import java.awt.dnd.DragSource;
       
    35 import java.awt.dnd.DropTarget;
       
    36 import java.awt.dnd.InvalidDnDOperationException;
       
    37 import java.awt.dnd.peer.DragSourceContextPeer;
    30 
    38 
    31 /**
    39 /**
    32  * The interface by means of which the {@link JLightweightFrame} class
    40  * The interface by means of which the {@link JLightweightFrame} class
    33  * communicates to its client application.
    41  * communicates to its client application.
    34  * <p>
    42  * <p>
   207      * {@code JLightweightFrame} calls this method to notify the client
   215      * {@code JLightweightFrame} calls this method to notify the client
   208      * application that in needs to set a cursor
   216      * application that in needs to set a cursor
   209      * @param cursor a cursor to set
   217      * @param cursor a cursor to set
   210      */
   218      */
   211     default public void setCursor(Cursor cursor) { }
   219     default public void setCursor(Cursor cursor) { }
       
   220 
       
   221     /**
       
   222      * Create a drag gesture recognizer for the lightweight frame.
       
   223      */
       
   224     default public <T extends DragGestureRecognizer> T createDragGestureRecognizer(
       
   225             Class<T> abstractRecognizerClass,
       
   226             DragSource ds, Component c, int srcActions,
       
   227             DragGestureListener dgl)
       
   228     {
       
   229         return null;
       
   230     }
       
   231 
       
   232     /**
       
   233      * Create a drag source context peer for the lightweight frame.
       
   234      */
       
   235     default public DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent dge) throws InvalidDnDOperationException
       
   236     {
       
   237         return null;
       
   238     }
       
   239 
       
   240     /**
       
   241      * Adds a drop target to the lightweight frame.
       
   242      */
       
   243     default public void addDropTarget(DropTarget dt) {}
       
   244 
       
   245     /**
       
   246      * Removes a drop target from the lightweight frame.
       
   247      */
       
   248     default public void removeDropTarget(DropTarget dt) {}
   212 }
   249 }