KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > internal > provisional > action > IToolBarManager2


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.jface.internal.provisional.action;
12
13 import org.eclipse.jface.action.IContributionManagerOverrides;
14 import org.eclipse.jface.action.IToolBarManager;
15 import org.eclipse.jface.util.IPropertyChangeListener;
16 import org.eclipse.swt.widgets.Composite;
17 import org.eclipse.swt.widgets.Control;
18 import org.eclipse.swt.widgets.ToolBar;
19
20 /**
21  * The <code>IToolBarManager2</code> extends <code>IToolBarManager</code> to
22  * allow clients to be isolated from the actual kind of SWT control used by the
23  * manager.
24  * <p>
25  * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
26  * part of a work in progress. There is a guarantee neither that this API will
27  * work nor that it will remain the same. Please do not use this API without
28  * consulting with the Platform/UI team.
29  * </p>
30  *
31  * @since 3.2
32  */

33 public interface IToolBarManager2 extends IToolBarManager {
34
35     /**
36      * The property id for changes to the control's layout
37      */

38     public static final String JavaDoc PROP_LAYOUT = "PROP_LAYOUT"; //$NON-NLS-1$
39

40     /**
41      * Creates and returns this manager's toolbar control. Does not create a new
42      * control if one already exists.
43      *
44      * @param parent
45      * the parent control
46      * @return the toolbar control
47      */

48     public ToolBar createControl(Composite parent);
49
50     /**
51      * Creates and returns this manager's control. Does not create a new control
52      * if one already exists.
53      *
54      * @param parent
55      * the parent control
56      * @return the control
57      */

58     public Control createControl2(Composite parent);
59
60     /**
61      * Returns the toolbar control for this manager.
62      *
63      * @return the toolbar control, or <code>null</code> if none
64      */

65     public ToolBar getControl();
66
67     /**
68      * Returns the control for this manager.
69      *
70      * @return the control, or <code>null</code> if none
71      */

72     public Control getControl2();
73
74     /**
75      * Disposes the resources for this manager.
76      */

77     public void dispose();
78
79     /**
80      * Returns the item count of the control used by this manager.
81      *
82      * @return the number of items in the control
83      */

84     public int getItemCount();
85
86     /**
87      * Registers a property change listner with this manager.
88      *
89      * @param listener
90      */

91     public void addPropertyChangeListener(IPropertyChangeListener listener);
92
93     /**
94      * Removes a property change listner from this manager.
95      *
96      * @param listener
97      */

98     public void removePropertyChangeListener(IPropertyChangeListener listener);
99
100     /**
101      * Sets the overrides for this contribution manager
102      *
103      * @param newOverrides
104      * the overrides for the items of this manager
105      */

106     public void setOverrides(IContributionManagerOverrides newOverrides);
107
108 }
109
Popular Tags