Mercurial > projects > dwt2
comparison org.eclipse.jface/src/org/eclipse/jface/viewers/FocusCellHighlighter.d @ 12:bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 14 Mar 2009 18:23:29 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
11:43904fec5dca | 12:bc29606a740c |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2007 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 * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation | |
11 * bugfix in: 182800 | |
12 * Port to the D programming language: | |
13 * Frank Benoit <benoit@tionex.de> | |
14 ******************************************************************************/ | |
15 | |
16 module org.eclipse.jface.viewers.FocusCellHighlighter; | |
17 | |
18 import org.eclipse.jface.viewers.ColumnViewer; | |
19 import org.eclipse.jface.viewers.ViewerCell; | |
20 | |
21 import java.lang.all; | |
22 | |
23 /** | |
24 * @since 3.3 | |
25 * | |
26 */ | |
27 public abstract class FocusCellHighlighter { | |
28 private ColumnViewer viewer; | |
29 | |
30 /** | |
31 * @param viewer | |
32 */ | |
33 public this(ColumnViewer viewer) { | |
34 this.viewer = viewer; | |
35 } | |
36 | |
37 /** | |
38 * @return the focus cell | |
39 */ | |
40 public ViewerCell getFocusCell() { | |
41 return viewer.getColumnViewerEditor().getFocusCell(); | |
42 } | |
43 | |
44 /** | |
45 * Called by the framework when the focus cell has changed. Subclasses may | |
46 * extend. | |
47 * | |
48 * @param cell | |
49 * the new focus cell | |
50 * @deprecated use {@link #focusCellChanged(ViewerCell, ViewerCell)} instead | |
51 */ | |
52 protected void focusCellChanged(ViewerCell cell) { | |
53 } | |
54 package void focusCellChanged_package(ViewerCell cell){ | |
55 focusCellChanged(cell); | |
56 } | |
57 | |
58 /** | |
59 * Called by the framework when the focus cell has changed. Subclasses may | |
60 * extend. | |
61 * <p> | |
62 * <b>The default implementation for this method calls | |
63 * focusCellChanged(ViewerCell). Subclasses should override this method | |
64 * rather than {@link #focusCellChanged(ViewerCell)} .</b> | |
65 * | |
66 * @param newCell | |
67 * the new focus cell or <code>null</code> if no new cell | |
68 * receives the focus | |
69 * @param oldCell | |
70 * the old focus cell or <code>null</code> if no cell has been | |
71 * focused before | |
72 * @since 3.4 | |
73 */ | |
74 protected void focusCellChanged(ViewerCell newCell, ViewerCell oldCell) { | |
75 focusCellChanged(newCell); | |
76 } | |
77 package void focusCellChanged_package(ViewerCell newCell, ViewerCell oldCell){ | |
78 focusCellChanged(newCell,oldCell); | |
79 } | |
80 | |
81 /** | |
82 * This method is called by the framework to initialize this cell | |
83 * highlighter object. Subclasses may extend. | |
84 */ | |
85 protected void init() { | |
86 } | |
87 | |
88 package void init_package() { | |
89 init(); | |
90 } | |
91 } |