KickJava   Java API By Example, From Geeks To Geeks.

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


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.jface.resource.ImageDescriptor;
14
15 /**
16  * Defines the possible set of columns presented in a view for a model.
17  * A column presentation is customizable per presentation context (view) and
18  * view input, and is created by an <code>IColumnPresentationFactoryAdapter</code>.
19  *
20  * @since 3.2
21  */

22 public interface IColumnPresentation {
23     
24     /**
25      * Initializes this column presentation to be used in the
26      * given context.
27      *
28      * @param context
29      */

30     public void init(IPresentationContext context);
31     
32     /**
33      * Disposes this column presentation
34      */

35     public void dispose();
36     
37     /**
38      * Returns an array of all columns supported by this adapter as
39      * column identifiers.
40      *
41      * @return column identifiers
42      */

43     public String JavaDoc[] getAvailableColumns();
44     
45     /**
46      * Returns an ordered array of columns that should be displayed initially for
47      * this presentation as column IDs.
48      *
49      * @return initial columns to display
50      */

51     public String JavaDoc[] getInitialColumns();
52     
53     /**
54      * Returns the column header for the column with the given identifier.
55      *
56      * @param id a column identifier included in <code>getColumns()</code>
57      * @return column header
58      */

59     public String JavaDoc getHeader(String JavaDoc id);
60     
61     /**
62      * Returns the image for the column with the given identifier, or <code>null</code>
63      *
64      * @param id column id
65      * @return image descriptor or <code>null</code>
66      */

67     public ImageDescriptor getImageDescriptor(String JavaDoc id);
68     
69     /**
70      * Returns an identifier for this columns presentation.
71      * The identifier should be unique per kind of column presentation
72      * (for example, the column presentation for Java stack frames
73      * in the variables view). Allows visible column information to be
74      * persisted by the platform.
75      *
76      * @return identifier
77      */

78     public String JavaDoc getId();
79     
80     /**
81      * Returns whether this column presentation is optional. When a column presentation
82      * is optional, the user may toggle columns on/off.
83      *
84      * @return whether this column presentation is optional
85      */

86     public boolean isOptional();
87
88 }
89
Popular Tags