home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &n…he Search for Life DVD 2 / DVD-ROM.iso / install / jre1_3 / lib / rt.jar / java / awt / dnd / DropTargetDragEvent.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  1.5 KB  |  59 lines

  1. package java.awt.dnd;
  2.  
  3. import java.awt.Point;
  4. import java.awt.datatransfer.DataFlavor;
  5. import java.util.List;
  6.  
  7. public class DropTargetDragEvent extends DropTargetEvent {
  8.    private Point location;
  9.    private int actions;
  10.    private int dropAction;
  11.  
  12.    public DropTargetDragEvent(DropTargetContext var1, Point var2, int var3, int var4) {
  13.       super(var1);
  14.       if (var2 == null) {
  15.          throw new NullPointerException("cursorLocn");
  16.       } else if (var3 != 0 && var3 != 1 && var3 != 2 && var3 != 1073741824) {
  17.          throw new IllegalArgumentException("dropAction" + var3);
  18.       } else if ((var4 & -1073741828) != 0) {
  19.          throw new IllegalArgumentException("srcActions");
  20.       } else {
  21.          this.location = var2;
  22.          this.actions = var4;
  23.          this.dropAction = var3;
  24.       }
  25.    }
  26.  
  27.    public Point getLocation() {
  28.       return this.location;
  29.    }
  30.  
  31.    public DataFlavor[] getCurrentDataFlavors() {
  32.       return ((DropTargetEvent)this).getDropTargetContext().getCurrentDataFlavors();
  33.    }
  34.  
  35.    public List getCurrentDataFlavorsAsList() {
  36.       return ((DropTargetEvent)this).getDropTargetContext().getCurrentDataFlavorsAsList();
  37.    }
  38.  
  39.    public boolean isDataFlavorSupported(DataFlavor var1) {
  40.       return ((DropTargetEvent)this).getDropTargetContext().isDataFlavorSupported(var1);
  41.    }
  42.  
  43.    public int getSourceActions() {
  44.       return this.actions;
  45.    }
  46.  
  47.    public int getDropAction() {
  48.       return this.dropAction;
  49.    }
  50.  
  51.    public void acceptDrag(int var1) {
  52.       ((DropTargetEvent)this).getDropTargetContext().acceptDrag(var1);
  53.    }
  54.  
  55.    public void rejectDrag() {
  56.       ((DropTargetEvent)this).getDropTargetContext().rejectDrag();
  57.    }
  58. }
  59.