001: /*
002: * Copyright (C) 2004 NNL Technology AB
003: * Visit www.infonode.net for information about InfoNode(R)
004: * products and how to contact NNL Technology AB.
005: *
006: * This program is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU General Public License
008: * as published by the Free Software Foundation; either version 2
009: * of the License, or (at your option) any later version.
010: *
011: * This program is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
014: * GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
019: * MA 02111-1307, USA.
020: */
021:
022: // $Id: DockingWindowDropFilterProperties.java,v 1.4 2007/01/28 21:25:10 jesper Exp $
023: package net.infonode.docking.properties;
024:
025: import net.infonode.docking.drop.DropFilter;
026: import net.infonode.docking.drop.DropFilterProperty;
027: import net.infonode.properties.propertymap.*;
028:
029: /**
030: * Properties and property values for {@link net.infonode.docking.drop.DropFilter}s
031: * for all types of {@link net.infonode.docking.DockingWindow}s.
032: *
033: * @author $Author: jesper $
034: * @version $Revision: 1.4 $
035: * @since IDW 1.4.0
036: */
037: public class DockingWindowDropFilterProperties extends
038: PropertyMapContainer {
039:
040: /**
041: * Property group containing all docking window drop filter properties.
042: */
043: public static final PropertyMapGroup PROPERTIES = new PropertyMapGroup(
044: "Docking Window Drop Filter Properties", "");
045:
046: /**
047: * The {@link net.infonode.docking.drop.DropFilter} that is called when a
048: * split drop is in progress.
049: */
050: public static final DropFilterProperty SPLIT_DROP_FILTER = new DropFilterProperty(
051: PROPERTIES,
052: "Split Drop Filter",
053: "The drop filter that is called when a split drop is in progress.",
054: PropertyMapValueHandler.INSTANCE);
055:
056: /**
057: * The {@link net.infonode.docking.drop.DropFilter} that is called when a
058: * child window will be asked for accept drop.
059: */
060: public static final DropFilterProperty CHILD_DROP_FILTER = new DropFilterProperty(
061: PROPERTIES,
062: "Child Drop Filter",
063: "The drop filter that is called when a child window will be asked for accept drop.",
064: PropertyMapValueHandler.INSTANCE);
065:
066: /**
067: * The {@link net.infonode.docking.drop.DropFilter} that is called when an
068: * interior drop is in progress.
069: */
070: public static final DropFilterProperty INTERIOR_DROP_FILTER = new DropFilterProperty(
071: PROPERTIES,
072: "Interior Drop Filter",
073: "The drop filter that is called when an interior drop is in progress.",
074: PropertyMapValueHandler.INSTANCE);
075:
076: /**
077: * The {@link net.infonode.docking.drop.DropFilter} that is called when an
078: * insert tab drop is in progress.
079: */
080: public static final DropFilterProperty INSERT_TAB_DROP_FILTER = new DropFilterProperty(
081: PROPERTIES,
082: "Insert Tab Drop Filter",
083: "The drop filter that is called when an insert tab drop is in progress.",
084: PropertyMapValueHandler.INSTANCE);
085:
086: /**
087: * Creates an empty property object.
088: */
089: public DockingWindowDropFilterProperties() {
090: super (PropertyMapFactory.create(PROPERTIES));
091: }
092:
093: /**
094: * Creates a property object containing the map.
095: *
096: * @param map the property map
097: */
098: public DockingWindowDropFilterProperties(PropertyMap map) {
099: super (map);
100: }
101:
102: /**
103: * Creates a property object that inherit values from another property object.
104: *
105: * @param inheritFrom the object from which to inherit property values
106: */
107: public DockingWindowDropFilterProperties(
108: DockingWindowDropFilterProperties inheritFrom) {
109: super (PropertyMapFactory.create(inheritFrom.getMap()));
110: }
111:
112: /**
113: * Adds a super object from which property values are inherited.
114: *
115: * @param properties the object from which to inherit property values
116: * @return this
117: */
118: public DockingWindowDropFilterProperties addSuperObject(
119: DockingWindowDropFilterProperties properties) {
120: getMap().addSuperMap(properties.getMap());
121:
122: return this ;
123: }
124:
125: /**
126: * Removes a super object.
127: *
128: * @param superObject the super object to remove
129: * @return this
130: */
131: public DockingWindowDropFilterProperties removeSuperObject(
132: DockingWindowDropFilterProperties super Object) {
133: getMap().removeSuperMap(super Object.getMap());
134: return this ;
135: }
136:
137: /**
138: * Sets the split drop filter to be used when a split drop is in progress.
139: *
140: * @param filter the split drop filter
141: * @return this
142: */
143: public DockingWindowDropFilterProperties setSplitDropFilter(
144: DropFilter filter) {
145: SPLIT_DROP_FILTER.set(getMap(), filter);
146: return this ;
147: }
148:
149: /**
150: * Returns the split drop filter that is used when a split drop is in
151: * progress.
152: *
153: * @return the split drop filter
154: */
155: public DropFilter getSplitDropFilter() {
156: return SPLIT_DROP_FILTER.get(getMap());
157: }
158:
159: /**
160: * Sets the child drop filter to be used when a child window will be asked
161: * for accept drop.
162: *
163: * @param filter the child drop filter
164: * @return this
165: */
166: public DockingWindowDropFilterProperties setChildDropFilter(
167: DropFilter filter) {
168: CHILD_DROP_FILTER.set(getMap(), filter);
169: return this ;
170: }
171:
172: /**
173: * Returns the child drop filter that is used when a child window will be asked
174: * for accept drop.
175: *
176: * @return the child drop filter
177: */
178: public DropFilter getChildDropFilter() {
179: return CHILD_DROP_FILTER.get(getMap());
180: }
181:
182: /**
183: * Sets the interior drop filter to be used when an interior drop is in progress.
184: *
185: * @param filter the interior drop filter
186: * @return this
187: */
188: public DockingWindowDropFilterProperties setInteriorDropFilter(
189: DropFilter filter) {
190: INTERIOR_DROP_FILTER.set(getMap(), filter);
191: return this ;
192: }
193:
194: /**
195: * Returns the interior drop filter that is used when an interior drop is in progress.
196: *
197: * @return the interior drop filter
198: */
199: public DropFilter getInteriorDropFilter() {
200: return INTERIOR_DROP_FILTER.get(getMap());
201: }
202:
203: /**
204: * Sets the insert tab drop filter to be used when an insert tab drop is in progress.
205: *
206: * @param filter the insert tab drop filter
207: * @return this
208: */
209: public DockingWindowDropFilterProperties setInsertTabDropFilter(
210: DropFilter filter) {
211: INSERT_TAB_DROP_FILTER.set(getMap(), filter);
212: return this ;
213: }
214:
215: /**
216: * Returns the insert tab drop filter that is used when an insert tab drop is in progress.
217: *
218: * @return the child drop filter
219: */
220: public DropFilter getInsertTabDropFilter() {
221: return INSERT_TAB_DROP_FILTER.get(getMap());
222: }
223: }
|