Mercurial > projects > dwt-addons
comparison dwtx/jface/viewers/ISelectionProvider.d @ 10:b6c35faf97c8
Viewers
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 31 Mar 2008 00:47:19 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
9:6c14e54dfc11 | 10:b6c35faf97c8 |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2000, 2006 IBM Corporation and others. | |
3 * All rights reserved. This program and the accompanying materials | |
4 * are made available under the terms of the Eclipse Public License v1.0 | |
5 * which accompanies this distribution, and is available at | |
6 * http://www.eclipse.org/legal/epl-v10.html | |
7 * | |
8 * Contributors: | |
9 * IBM Corporation - initial API and implementation | |
10 * Port to the D programming language: | |
11 * Frank Benoit <benoit@tionex.de> | |
12 *******************************************************************************/ | |
13 module dwtx.jface.viewers.ISelectionProvider; | |
14 | |
15 import dwtx.jface.viewers.ISelectionChangedListener; | |
16 import dwtx.jface.viewers.ISelection; | |
17 | |
18 /** | |
19 * Interface common to all objects that provide a selection. | |
20 * | |
21 * @see ISelection | |
22 * @see ISelectionChangedListener | |
23 * @see SelectionChangedEvent | |
24 */ | |
25 public interface ISelectionProvider { | |
26 /** | |
27 * Adds a listener for selection changes in this selection provider. | |
28 * Has no effect if an identical listener is already registered. | |
29 * | |
30 * @param listener a selection changed listener | |
31 */ | |
32 public void addSelectionChangedListener(ISelectionChangedListener listener); | |
33 | |
34 /** | |
35 * Returns the current selection for this provider. | |
36 * | |
37 * @return the current selection | |
38 */ | |
39 public ISelection getSelection(); | |
40 | |
41 /** | |
42 * Removes the given selection change listener from this selection provider. | |
43 * Has no affect if an identical listener is not registered. | |
44 * | |
45 * @param listener a selection changed listener | |
46 */ | |
47 public void removeSelectionChangedListener( | |
48 ISelectionChangedListener listener); | |
49 | |
50 /** | |
51 * Sets the current selection for this selection provider. | |
52 * | |
53 * @param selection the new selection | |
54 */ | |
55 public void setSelection(ISelection selection); | |
56 } |