KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > action > IContributionManagerOverrides


1 /*******************************************************************************
2  * Copyright (c) 2000, 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.jface.action;
12
13 /**
14  * This interface is used by instances of <code>IContributionItem</code>
15  * to determine if the values for certain properties have been overriden
16  * by their manager.
17  * <p>
18  * This interface is internal to the framework; it should not be implemented outside
19  * the framework.
20  * </p>
21  *
22  * @since 2.0
23  */

24 public interface IContributionManagerOverrides {
25     /**
26      * Id for the enabled property. Value is <code>"enabled"</code>.
27      *
28      * @since 2.0
29      */

30     public final static String JavaDoc P_ENABLED = "enabled"; //$NON-NLS-1$
31

32     /**
33      * Find out the enablement of the item
34      * @param item the contribution item for which the enable override value is
35      * determined
36      * @return <ul>
37      * <li><code>Boolean.TRUE</code> if the given contribution item should be enabled</li>
38      * <li><code>Boolean.FALSE</code> if the item should be disabled</li>
39      * <li><code>null</code> if the item may determine its own enablement</li>
40      * </ul>
41      * @since 2.0
42      */

43     public Boolean JavaDoc getEnabled(IContributionItem item);
44
45     /**
46      * This is not intended to be called outside of the workbench. This method
47      * is intended to be deprecated in 3.1.
48      *
49      * TODO deprecate for 3.1
50      * @param item the contribution item for which the accelerator value is determined
51      * @return the accelerator
52      */

53     public Integer JavaDoc getAccelerator(IContributionItem item);
54
55     /**
56      * This is not intended to be called outside of the workbench. This method
57      * is intended to be deprecated in 3.1.
58      *
59      * TODO deprecate for 3.1
60      * @param item the contribution item for which the accelerator text is determined
61      * @return the text for the accelerator
62      */

63     public String JavaDoc getAcceleratorText(IContributionItem item);
64
65     /**
66      * This is not intended to be called outside of the workbench. This method
67      * is intended to be deprecated in 3.1.
68      *
69      * TODO deprecate for 3.1
70      * @param item the contribution item for which the text is determined
71      * @return the text
72      */

73     public String JavaDoc getText(IContributionItem item);
74 }
75
Popular Tags