KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > viewers > FocusCellHighlighter


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  ******************************************************************************/

11
12 package org.eclipse.jface.viewers;
13
14 /**
15  * @since 3.3
16  *
17  */

18 public abstract class FocusCellHighlighter {
19     private ColumnViewer viewer;
20
21     /**
22      * @param viewer
23      */

24     public FocusCellHighlighter(ColumnViewer viewer) {
25         this.viewer = viewer;
26     }
27
28     /**
29      * @return the focus cell
30      */

31     public ViewerCell getFocusCell() {
32         return viewer.getColumnViewerEditor().getFocusCell();
33     }
34
35     /**
36      * Called by the framework when the focus cell has changed. Subclasses may extend.
37      *
38      * @param cell the new focus cell
39      */

40     protected void focusCellChanged(ViewerCell cell) {
41     }
42
43     /**
44      * This method is called by the framework to initialize this cell
45      * highlighter object. Subclasses may extend.
46      */

47     protected void init() {
48     }
49 }
50
Popular Tags