01: // The contents of this file are subject to the Mozilla Public License Version
02: // 1.1
03: //(the "License"); you may not use this file except in compliance with the
04: //License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
05: //
06: //Software distributed under the License is distributed on an "AS IS" basis,
07: //WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
08: //for the specific language governing rights and
09: //limitations under the License.
10: //
11: //The Original Code is "The Columba Project"
12: //
13: //The Initial Developers of the Original Code are Frederik Dietz and Timo
14: // Stich.
15: //Portions created by Frederik Dietz and Timo Stich are Copyright (C) 2003.
16: //
17: //All Rights Reserved.
18: package org.columba.api.selection;
19:
20: import org.columba.api.command.ICommandReference;
21:
22: public interface ISelectionManager {
23:
24: /**
25: * Register selection listener at selecton handler with id.
26: *
27: * @param id
28: * ID of selection handler
29: * @param l
30: * listener interested in selection changes
31: */
32: public abstract void registerSelectionListener(String id,
33: ISelectionListener l);
34:
35: /**
36: * Remove selection listener.
37: *
38: * @param id id of selection handler
39: * @param l listener
40: */
41: public abstract void removeSelectionListener(String id,
42: ISelectionListener l);
43:
44: /**
45: * Set current selection.
46: *
47: * @param id
48: * ID of selection handler
49: * @param selection
50: * new selection for this handler
51: */
52: public abstract void setSelection(String id,
53: ICommandReference selection);
54:
55: /**
56: * Get current selection of specific selection handler.
57: *
58: * @param id
59: * ID of selection handler
60: * @return reference of current selection of this handler
61: */
62: public abstract ICommandReference getSelection(String id);
63:
64: /**
65: * Get selection handler.
66: *
67: * @param id
68: * ID of selection handler
69: * @return SelectionHandler
70: */
71: public abstract ISelectionHandler getHandler(String id);
72:
73: /**
74: * Add selection handler
75: *
76: * @param handler
77: */
78: public abstract void addSelectionHandler(ISelectionHandler handler);
79:
80: }
|