01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package java.awt.dnd;
19:
20: import java.awt.Point;
21: import java.awt.datatransfer.DataFlavor;
22: import java.awt.datatransfer.Transferable;
23: import java.util.List;
24:
25: public class DropTargetDragEvent extends DropTargetEvent {
26:
27: private static final long serialVersionUID = -8422265619058953682L;
28:
29: public DropTargetDragEvent(DropTargetContext dtc, Point cursorLocn,
30: int dropAction, int srcActions) {
31: super (dtc, cursorLocn, dropAction, srcActions);
32: }
33:
34: @Override
35: public Point getLocation() {
36: return super .getLocation();
37: }
38:
39: public int getSourceActions() {
40: return super .getSourceAction();
41: }
42:
43: public int getDropAction() {
44: return super .getUserAction();
45: }
46:
47: public void acceptDrag(int dragOperation) {
48: context.acceptDrag(dragOperation);
49: }
50:
51: public void rejectDrag() {
52: context.rejectDrag();
53: }
54:
55: public List<DataFlavor> getCurrentDataFlavorsAsList() {
56: return context.getCurrentDataFlavorsAsList();
57: }
58:
59: public boolean isDataFlavorSupported(DataFlavor df) {
60: return context.isDataFlavorSupported(df);
61: }
62:
63: public DataFlavor[] getCurrentDataFlavors() {
64: return context.getCurrentDataFlavors();
65: }
66:
67: public Transferable getTransferable() {
68: return context.getTransferable();
69: }
70: }
|