01: /*
02: * Copyright (C) 2004 NNL Technology AB
03: * Visit www.infonode.net for information about InfoNode(R)
04: * products and how to contact NNL Technology AB.
05: *
06: * This program is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU General Public License
08: * as published by the Free Software Foundation; either version 2
09: * of the License, or (at your option) any later version.
10: *
11: * This program is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: * GNU General Public License for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with this program; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
19: * MA 02111-1307, USA.
20: */
21:
22: // $Id: DropInfo.java,v 1.4 2005/12/04 13:46:04 jesper Exp $
23: package net.infonode.docking.drop;
24:
25: import net.infonode.docking.DockingWindow;
26:
27: import java.awt.*;
28:
29: /**
30: * <p>
31: * Super class for all drop infos
32: * </p>
33: *
34: * <p>
35: * A drop info is passed on to a {@link net.infonode.docking.drop.DropFilter}
36: * when a drag and drop operation is in progress. This makes it possible for
37: * the drop filter to decide if a drop is accepted or.
38: * </p>
39: *
40: * @author $Author: jesper $
41: * @version $Revision: 1.4 $
42: * @since IDW 1.4.0
43: */
44: public class DropInfo {
45: private DockingWindow window;
46: private DockingWindow dropWindow;
47: private Point point;
48:
49: DropInfo(DockingWindow window, DockingWindow dropWindow, Point point) {
50: this .window = window;
51: this .dropWindow = dropWindow;
52: this .point = point;
53: }
54:
55: /**
56: * Returns the window that is beeing dragged, i.e. the window that could be
57: * dropped.
58: *
59: * @return the window beeing dragged
60: */
61: public DockingWindow getWindow() {
62: return window;
63: }
64:
65: /**
66: * Returns the window that is asked (via the {@link DropFilter} if a drop of
67: * the dragged window is accepted.
68: *
69: * @return the window that is asked if a drop of the dragged window is accepted
70: */
71: public DockingWindow getDropWindow() {
72: return dropWindow;
73: }
74:
75: /**
76: * Returns the current mouse point relative to the drop window.
77: *
78: * @return the mouse point relative to the drop window
79: */
80: public Point getPoint() {
81: return point;
82: }
83: }
|