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 / DropTargetDropEvent.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  2.0 KB  |  83 lines

  1. package java.awt.dnd;
  2.  
  3. import java.awt.Point;
  4. import java.awt.datatransfer.DataFlavor;
  5. import java.awt.datatransfer.Transferable;
  6. import java.util.List;
  7.  
  8. public class DropTargetDropEvent extends DropTargetEvent {
  9.    private static final Point zero = new Point(0, 0);
  10.    private Point location;
  11.    private int actions;
  12.    private int dropAction;
  13.    private boolean isLocalTx;
  14.  
  15.    public DropTargetDropEvent(DropTargetContext var1, Point var2, int var3, int var4) {
  16.       super(var1);
  17.       this.location = zero;
  18.       this.actions = 0;
  19.       this.dropAction = 0;
  20.       this.isLocalTx = false;
  21.       if (var2 == null) {
  22.          throw new NullPointerException("cursorLocn");
  23.       } else if (var3 != 0 && var3 != 1 && var3 != 2 && var3 != 1073741824) {
  24.          throw new IllegalArgumentException("dropAction = " + var3);
  25.       } else if ((var4 & -1073741828) != 0) {
  26.          throw new IllegalArgumentException("srcActions");
  27.       } else {
  28.          this.location = var2;
  29.          this.actions = var4;
  30.          this.dropAction = var3;
  31.       }
  32.    }
  33.  
  34.    public DropTargetDropEvent(DropTargetContext var1, Point var2, int var3, int var4, boolean var5) {
  35.       this(var1, var2, var3, var4);
  36.       this.isLocalTx = var5;
  37.    }
  38.  
  39.    public Point getLocation() {
  40.       return this.location;
  41.    }
  42.  
  43.    public DataFlavor[] getCurrentDataFlavors() {
  44.       return ((DropTargetEvent)this).getDropTargetContext().getCurrentDataFlavors();
  45.    }
  46.  
  47.    public List getCurrentDataFlavorsAsList() {
  48.       return ((DropTargetEvent)this).getDropTargetContext().getCurrentDataFlavorsAsList();
  49.    }
  50.  
  51.    public boolean isDataFlavorSupported(DataFlavor var1) {
  52.       return ((DropTargetEvent)this).getDropTargetContext().isDataFlavorSupported(var1);
  53.    }
  54.  
  55.    public int getSourceActions() {
  56.       return this.actions;
  57.    }
  58.  
  59.    public int getDropAction() {
  60.       return this.dropAction;
  61.    }
  62.  
  63.    public Transferable getTransferable() {
  64.       return ((DropTargetEvent)this).getDropTargetContext().getTransferable();
  65.    }
  66.  
  67.    public void acceptDrop(int var1) {
  68.       ((DropTargetEvent)this).getDropTargetContext().acceptDrop(var1);
  69.    }
  70.  
  71.    public void rejectDrop() {
  72.       ((DropTargetEvent)this).getDropTargetContext().rejectDrop();
  73.    }
  74.  
  75.    public void dropComplete(boolean var1) {
  76.       ((DropTargetEvent)this).getDropTargetContext().dropComplete(var1);
  77.    }
  78.  
  79.    public boolean isLocalTransfer() {
  80.       return this.isLocalTx;
  81.    }
  82. }
  83.