KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > viewers > provisional > AbstractColumnPresentation


1 /*******************************************************************************
2  * Copyright (c) 2006 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 package org.eclipse.debug.internal.ui.viewers.provisional;
12
13 import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation;
14 import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
15 import org.eclipse.jface.resource.ImageDescriptor;
16
17 /**
18  * Common function for a column presentation.
19  * <p>
20  * Clients implementing <code>IColumnPresentation</code> must subclass this class.
21  * </p>
22  * @since 3.2
23  */

24 public abstract class AbstractColumnPresentation implements IColumnPresentation {
25     
26     private IPresentationContext fContext;
27     
28     /**
29      * Empty array of strings
30      */

31     protected static final String JavaDoc[] EMPTY = new String JavaDoc[0];
32
33     /* (non-Javadoc)
34      * @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#init(org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
35      */

36     public void init(IPresentationContext context) {
37         fContext = context;
38     }
39
40     /* (non-Javadoc)
41      * @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#dispose()
42      */

43     public void dispose() {
44         fContext = null;
45     }
46     
47     /* (non-Javadoc)
48      * @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#getImageDescriptor(java.lang.String)
49      */

50     public ImageDescriptor getImageDescriptor(String JavaDoc id) {
51         return null;
52     }
53
54     /**
55      * Returns the context this column presentation is installed in.
56      *
57      * @return presentation context
58      */

59     protected IPresentationContext getPresentationContext() {
60         return fContext;
61     }
62 }
63
Popular Tags