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: DropFilter.java,v 1.4 2007/01/07 19:11:20 jesper Exp $
23: package net.infonode.docking.drop;
24:
25: /**
26: * <p>
27: * Interface for filtering drops when a drag and drop is in progress.
28: * </p>
29: *
30: * <p>
31: * There are 4 kinds of drop types, see
32: * {@link net.infonode.docking.drop.SplitDropInfo},
33: * {@link net.infonode.docking.drop.ChildDropInfo},
34: * {@link net.infonode.docking.drop.InteriorDropInfo} and
35: * {@link net.infonode.docking.drop.InsertTabDropInfo}.
36: * </p>
37: *
38: * <p>
39: * A drop filter is used to filter drops. The filter may decide if a
40: * drop of a window into another window is to be accepted or not. This
41: * makes it possible to tailor the drop behavior of a
42: * {@link net.infonode.docking.DockingWindow}. The window (called drop window)
43: * into which another window is beeing dropped is asked if it will accept a
44: * drop of that window. The filter is asked continuously during a drag operation
45: * i.e. it may be asked many times during a drag operation.
46: * </p>
47: *
48: * @author $Author: jesper $
49: * @version $Revision: 1.4 $
50: * @since IDW 1.4.0
51: */
52: public interface DropFilter {
53:
54: /**
55: * Return true if the drop should be accepted, otherwise false.
56: *
57: * @param dropInfo information about the current drop
58: * @return true if drop is to be accepted, otherwise false
59: */
60: boolean acceptDrop(DropInfo dropInfo);
61: }
|