KickJava   Java API By Example, From Geeks To Geeks.

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


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
12 package org.eclipse.jface.internal.provisional.action;
13
14 import org.eclipse.jface.action.CoolBarManager;
15 import org.eclipse.swt.widgets.Composite;
16 import org.eclipse.swt.widgets.Control;
17 import org.eclipse.swt.widgets.CoolBar;
18
19 /**
20  * Extends <code>CoolBarManager</code> to implement <code>ICoolBarManager2</code>
21  *
22  * <p>
23  * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
24  * part of a work in progress. There is a guarantee neither that this API will
25  * work nor that it will remain the same. Please do not use this API without
26  * consulting with the Platform/UI team.
27  * </p>
28  *
29  * @since 3.2
30 */

31 public class CoolBarManager2 extends CoolBarManager implements ICoolBarManager2 {
32
33     /**
34      * Creates a new cool bar manager with the default style. Equivalent to
35      * <code>CoolBarManager(SWT.NONE)</code>.
36      */

37     public CoolBarManager2() {
38         super();
39     }
40
41     /**
42      * Creates a cool bar manager for an existing cool bar control. This
43      * manager becomes responsible for the control, and will dispose of it when
44      * the manager is disposed.
45      *
46      * @param coolBar
47      * the cool bar control
48      */

49     public CoolBarManager2(CoolBar coolBar) {
50         super(coolBar);
51     }
52
53     /**
54      * Creates a cool bar manager with the given SWT style. Calling <code>createControl</code>
55      * will create the cool bar control.
56      *
57      * @param style
58      * the cool bar item style; see
59      * {@link org.eclipse.swt.widgets.CoolBar CoolBar}for for valid
60      * style bits
61      */

62     public CoolBarManager2(int style) {
63        super(style);
64     }
65     
66     /**
67      * Creates and returns this manager's cool bar control. Does not create a
68      * new control if one already exists.
69      *
70      * @param parent
71      * the parent control
72      * @return the cool bar control
73      * @since 3.2
74      */

75     public Control createControl2(Composite parent) {
76         return createControl(parent);
77     }
78     
79     /**
80      * Returns the control for this manager.
81      *
82      * @return the control, or <code>null</code> if none
83      * @since 3.2
84      */

85     public Control getControl2() {
86         return getControl();
87     }
88
89 }
90
Popular Tags