diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwtx/jface/viewers/FocusCellHighlighter.d	Mon Mar 31 00:47:19 2008 +0200
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ * Port to the D programming language:
+ *     Frank Benoit <benoit@tionex.de>
+ ******************************************************************************/
+
+module dwtx.jface.viewers.FocusCellHighlighter;
+
+import dwtx.jface.viewers.ColumnViewer;
+import dwtx.jface.viewers.ViewerCell;
+
+import dwt.dwthelper.utils;
+
+/**
+ * @since 3.3
+ *
+ */
+public abstract class FocusCellHighlighter {
+    private ColumnViewer viewer;
+
+    /**
+     * @param viewer
+     */
+    public this(ColumnViewer viewer) {
+        this.viewer = viewer;
+    }
+
+    /**
+     * @return the focus cell
+     */
+    public ViewerCell getFocusCell() {
+        return viewer.getColumnViewerEditor().getFocusCell();
+    }
+
+    /**
+     * Called by the framework when the focus cell has changed. Subclasses may extend.
+     *
+     * @param cell the new focus cell
+     */
+    protected void focusCellChanged(ViewerCell cell) {
+    }
+    package void focusCellChanged_package(ViewerCell cell){
+        focusCellChanged(cell);
+    }
+
+    /**
+     * This method is called by the framework to initialize this cell
+     * highlighter object. Subclasses may extend.
+     */
+    protected void init() {
+    }
+
+    package void init_package() {
+        init();
+    }
+}