KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > part > components > services > INameable


1 /*******************************************************************************
2  * Copyright (c) 2004, 2005 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.ui.internal.part.components.services;
12
13 import org.eclipse.jface.resource.ImageDescriptor;
14
15 /**
16  * This service allows a part to change its name, content description, image, and tooltip.
17  * Parts can take an INameable in their constructor.
18  * <p>
19  * This interface is typically implemented by an anonymous class in the owner of a part if it
20  * cares about name changes in its children.
21  * </p>
22  *
23  * @since 3.1
24  */

25 public interface INameable {
26     /**
27      * Sets the name of the part. The part name is typically displayed in the part's tab. It is
28      * possible, but not recommended, to set a part's name to the empty string.
29      *
30      * @param newName new part name
31      */

32     public void setName(String JavaDoc newName);
33     
34     /**
35      * Sets the content description. This is a user-readable description of the current contents
36      * of the part. This may be appended to the part name in brackets (or some locale-specific equivalent),
37      * so it should not contain the part name or brackets. Use the empty string (not null) to clear.
38      *
39      * @param contentDescription new content description
40      */

41     public void setContentDescription(String JavaDoc contentDescription);
42     
43     /**
44      * Sets the title image, or null to clear.
45      *
46      * @param theImage new title image or null to clear
47      */

48     public void setImage(ImageDescriptor theImage);
49     
50     /**
51      * Sets the tooltip. Use the empty string (not null) to clear.
52      *
53      * @param toolTip
54      */

55     public void setTooltip(String JavaDoc toolTip);
56 }
57
Popular Tags