78
|
1 /*******************************************************************************
|
|
2 * Copyright (c) 2005, 2008 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 * Brad Reynolds - bug 137877
|
|
11 * Brad Reynolds - bug 164653
|
|
12 * Brad Reynolds - bug 147515
|
|
13 * Ashley Cambrell - bug 198906
|
|
14 *******************************************************************************/
|
|
15
|
|
16 module org.eclipse.jface.internal.databinding.viewers.ViewerMultipleSelectionObservableList;
|
85
|
17 import org.eclipse.jface.internal.databinding.viewers.SelectionProviderMultipleSelectionObservableList;
|
78
|
18
|
|
19 import java.lang.all;
|
85
|
20 import java.util.Collection;
|
|
21 import java.util.Iterator;
|
78
|
22
|
|
23 import org.eclipse.core.databinding.observable.Realm;
|
|
24 import org.eclipse.jface.databinding.viewers.IViewerObservableList;
|
|
25 import org.eclipse.jface.viewers.Viewer;
|
|
26
|
|
27 /**
|
|
28 * Observes single selection of a <code>Viewer</code>.
|
|
29 *
|
|
30 * @since 1.2
|
|
31 */
|
|
32 public class ViewerMultipleSelectionObservableList :
|
|
33 SelectionProviderMultipleSelectionObservableList ,
|
|
34 IViewerObservableList {
|
85
|
35 public override Object getElementType(){
|
|
36 return super.getElementType();
|
|
37 }
|
|
38 public override bool add(Object o){
|
|
39 return super.add(o);
|
|
40 }
|
|
41 public override bool add(String o){
|
|
42 return add(stringcast(o));
|
|
43 }
|
|
44 public override bool addAll(Collection o){
|
|
45 return super.addAll(o);
|
|
46 }
|
|
47 public override void clear(){
|
|
48 return super.clear();
|
|
49 }
|
|
50 public override bool contains(Object o){
|
|
51 return super.contains(o);
|
|
52 }
|
|
53 public override bool containsAll(Collection o){
|
|
54 return super.containsAll(o);
|
|
55 }
|
|
56 public override int size(){
|
|
57 return super.size();
|
|
58 }
|
|
59 public override bool isEmpty(){
|
|
60 return super.isEmpty();
|
|
61 }
|
|
62 public override hash_t toHash(){
|
|
63 return super.toHash();
|
|
64 }
|
|
65 public override equals_t opEquals(Object o){
|
|
66 return super.opEquals(o);
|
|
67 }
|
|
68 public override bool remove(String o){
|
|
69 return super.remove(o);
|
|
70 }
|
|
71 public override bool remove(Object o){
|
|
72 return super.remove(o);
|
|
73 }
|
|
74 public override Object remove(int o){
|
|
75 return super.remove(o);
|
|
76 }
|
|
77 public override Iterator iterator(){
|
|
78 return super.iterator();
|
|
79 }
|
|
80 public override bool removeAll(Collection o){
|
|
81 return super.removeAll(o);
|
|
82 }
|
|
83 public override bool retainAll(Collection o){
|
|
84 return super.retainAll(o);
|
|
85 }
|
|
86 public override int opApply (int delegate(ref Object value) dg){
|
|
87 return super.opApply(dg);
|
|
88 }
|
|
89 public override Object[] toArray( Object[] a ){
|
|
90 return super.toArray(a);
|
|
91 }
|
|
92 public override Object[] toArray(){
|
|
93 return super.toArray();
|
|
94 }
|
|
95 public override String[] toArray( String[] a ){
|
|
96 return super.toArray(a);
|
|
97 }
|
78
|
98
|
|
99 private Viewer viewer;
|
|
100
|
|
101 /**
|
|
102 * @param realm
|
|
103 * @param viewer
|
|
104 * @param elementType
|
|
105 */
|
|
106 public this(Realm realm, Viewer viewer,
|
|
107 Object elementType) {
|
|
108 super(realm, viewer, elementType);
|
|
109 this.viewer = viewer;
|
|
110 }
|
|
111
|
|
112 public Viewer getViewer() {
|
|
113 return viewer;
|
|
114 }
|
|
115 }
|