Mercurial > projects > dwt-addons
comparison dwtx/jface/viewers/ViewerColumn.d @ 72:5df4896124c7
JFace and its examples do compile
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 22 May 2008 17:56:17 +0200 |
parents | 46a6e0e6ccd4 |
children |
comparison
equal
deleted
inserted
replaced
71:4878bef4a38e | 72:5df4896124c7 |
---|---|
32 /** | 32 /** |
33 * Instances of this class represent a column of a {@link ColumnViewer}. Label | 33 * Instances of this class represent a column of a {@link ColumnViewer}. Label |
34 * providers and editing support can be configured for each column separately. | 34 * providers and editing support can be configured for each column separately. |
35 * Concrete subclasses of {@link ColumnViewer} should implement a matching | 35 * Concrete subclasses of {@link ColumnViewer} should implement a matching |
36 * concrete subclass of {@link ViewerColumn}. | 36 * concrete subclass of {@link ViewerColumn}. |
37 * | 37 * |
38 * @since 3.3 | 38 * @since 3.3 |
39 * | 39 * |
40 */ | 40 */ |
41 public abstract class ViewerColumn { | 41 public abstract class ViewerColumn { |
42 | 42 |
43 private CellLabelProvider labelProvider; | 43 private CellLabelProvider labelProvider; |
44 | 44 |
52 | 52 |
53 private ColumnViewer viewer; | 53 private ColumnViewer viewer; |
54 | 54 |
55 /** | 55 /** |
56 * Create a new instance of the receiver at columnIndex. | 56 * Create a new instance of the receiver at columnIndex. |
57 * | 57 * |
58 * @param viewer | 58 * @param viewer |
59 * the viewer the column is part of | 59 * the viewer the column is part of |
60 * @param columnOwner | 60 * @param columnOwner |
61 * the widget owning the viewer in case the widget has no columns | 61 * the widget owning the viewer in case the widget has no columns |
62 * this could be the widget itself | 62 * this could be the widget itself |
85 }); | 85 }); |
86 } | 86 } |
87 | 87 |
88 /** | 88 /** |
89 * Return the label provider for the receiver. | 89 * Return the label provider for the receiver. |
90 * | 90 * |
91 * @return ViewerLabelProvider | 91 * @return ViewerLabelProvider |
92 */ | 92 */ |
93 /* package */CellLabelProvider getLabelProvider() { | 93 /* package */CellLabelProvider getLabelProvider() { |
94 return labelProvider; | 94 return labelProvider; |
95 } | 95 } |
96 | 96 |
97 /** | 97 /** |
98 * Set the label provider for the column. Subclasses may extend but must | 98 * Set the label provider for the column. Subclasses may extend but must |
99 * call the super implementation. | 99 * call the super implementation. |
100 * | 100 * |
101 * @param labelProvider | 101 * @param labelProvider |
102 * the new {@link CellLabelProvider} | 102 * the new {@link CellLabelProvider} |
103 */ | 103 */ |
104 public void setLabelProvider(CellLabelProvider labelProvider) { | 104 public void setLabelProvider(CellLabelProvider labelProvider) { |
105 setLabelProvider(labelProvider, true); | 105 setLabelProvider(labelProvider, true); |
120 } | 120 } |
121 | 121 |
122 this.labelProvider = labelProvider; | 122 this.labelProvider = labelProvider; |
123 | 123 |
124 if (registerListener) { | 124 if (registerListener) { |
125 this.labelProvider.initialize(viewer, this); | 125 this.labelProvider.initialize_package(viewer, this); |
126 this.labelProvider.addListener(listener); | 126 this.labelProvider.addListener(listener); |
127 listenerRegistered = true; | 127 listenerRegistered = true; |
128 } | 128 } |
129 } | 129 } |
130 | 130 |
131 /** | 131 /** |
132 * Return the editing support for the receiver. | 132 * Return the editing support for the receiver. |
133 * | 133 * |
134 * @return {@link EditingSupport} | 134 * @return {@link EditingSupport} |
135 */ | 135 */ |
136 /* package */EditingSupport getEditingSupport() { | 136 /* package */EditingSupport getEditingSupport() { |
137 return editingSupport; | 137 return editingSupport; |
138 } | 138 } |
153 | 153 |
154 /** | 154 /** |
155 * Refresh the cell for the given columnIndex. <strong>NOTE:</strong>the | 155 * Refresh the cell for the given columnIndex. <strong>NOTE:</strong>the |
156 * {@link ViewerCell} provided to this method is no longer valid after this | 156 * {@link ViewerCell} provided to this method is no longer valid after this |
157 * method returns. Do not cache the cell for future use. | 157 * method returns. Do not cache the cell for future use. |
158 * | 158 * |
159 * @param cell | 159 * @param cell |
160 * {@link ViewerCell} | 160 * {@link ViewerCell} |
161 */ | 161 */ |
162 /* package */void refresh(ViewerCell cell) { | 162 /* package */void refresh(ViewerCell cell) { |
163 getLabelProvider().update(cell); | 163 getLabelProvider().update(cell); |
186 viewer.clearLegacyEditingSetup(); | 186 viewer.clearLegacyEditingSetup(); |
187 } | 187 } |
188 | 188 |
189 /** | 189 /** |
190 * Returns the viewer of this viewer column. | 190 * Returns the viewer of this viewer column. |
191 * | 191 * |
192 * @return Returns the viewer. | 192 * @return Returns the viewer. |
193 * | 193 * |
194 * @since 3.4 | 194 * @since 3.4 |
195 */ | 195 */ |
196 public ColumnViewer getViewer() { | 196 public ColumnViewer getViewer() { |
197 return viewer; | 197 return viewer; |
198 } | 198 } |