Mercurial > projects > dwt-addons
comparison dwtx/jface/viewers/FocusCellHighlighter.d @ 10:b6c35faf97c8
Viewers
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 31 Mar 2008 00:47:19 +0200 |
parents | |
children | 46a6e0e6ccd4 |
comparison
equal
deleted
inserted
replaced
9:6c14e54dfc11 | 10:b6c35faf97c8 |
---|---|
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 * Port to the D programming language: | |
11 * Frank Benoit <benoit@tionex.de> | |
12 ******************************************************************************/ | |
13 | |
14 module dwtx.jface.viewers.FocusCellHighlighter; | |
15 | |
16 import dwtx.jface.viewers.ColumnViewer; | |
17 import dwtx.jface.viewers.ViewerCell; | |
18 | |
19 import dwt.dwthelper.utils; | |
20 | |
21 /** | |
22 * @since 3.3 | |
23 * | |
24 */ | |
25 public abstract class FocusCellHighlighter { | |
26 private ColumnViewer viewer; | |
27 | |
28 /** | |
29 * @param viewer | |
30 */ | |
31 public this(ColumnViewer viewer) { | |
32 this.viewer = viewer; | |
33 } | |
34 | |
35 /** | |
36 * @return the focus cell | |
37 */ | |
38 public ViewerCell getFocusCell() { | |
39 return viewer.getColumnViewerEditor().getFocusCell(); | |
40 } | |
41 | |
42 /** | |
43 * Called by the framework when the focus cell has changed. Subclasses may extend. | |
44 * | |
45 * @param cell the new focus cell | |
46 */ | |
47 protected void focusCellChanged(ViewerCell cell) { | |
48 } | |
49 package void focusCellChanged_package(ViewerCell cell){ | |
50 focusCellChanged(cell); | |
51 } | |
52 | |
53 /** | |
54 * This method is called by the framework to initialize this cell | |
55 * highlighter object. Subclasses may extend. | |
56 */ | |
57 protected void init() { | |
58 } | |
59 | |
60 package void init_package() { | |
61 init(); | |
62 } | |
63 } |