KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > part > services > NullActionBars


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.services;
12
13 import org.eclipse.jface.action.IAction;
14 import org.eclipse.jface.action.ICoolBarManager;
15 import org.eclipse.jface.action.IMenuManager;
16 import org.eclipse.jface.action.IStatusLineManager;
17 import org.eclipse.jface.action.IToolBarManager;
18 import org.eclipse.ui.IActionBars2;
19
20 /**
21  * Null implementation of the IActionBars2 interface
22  *
23  * @since 3.1
24  */

25 public class NullActionBars implements IActionBars2 {
26
27     private NullCoolBarManager coolbarManager = new NullCoolBarManager();
28     private NullMenuManager menuManager = new NullMenuManager();
29     private NullToolBarManager toolbarManager = new NullToolBarManager();
30     private NullStatusLineManager statusLineManager = new NullStatusLineManager();
31     
32     /* (non-Javadoc)
33      * @see org.eclipse.ui.IActionBars#clearGlobalActionHandlers()
34      */

35     public void clearGlobalActionHandlers() {
36     }
37     
38     /* (non-Javadoc)
39      * @see org.eclipse.ui.IActionBars2#getCoolBarManager()
40      */

41     public ICoolBarManager getCoolBarManager() {
42         return coolbarManager;
43     }
44
45     /* (non-Javadoc)
46      * @see org.eclipse.ui.IActionBars#getGlobalActionHandler(java.lang.String)
47      */

48     public IAction getGlobalActionHandler(String JavaDoc actionId) {
49         return null;
50     }
51
52     /* (non-Javadoc)
53      * @see org.eclipse.ui.IActionBars#getMenuManager()
54      */

55     public IMenuManager getMenuManager() {
56         return menuManager;
57     }
58
59     /* (non-Javadoc)
60      * @see org.eclipse.ui.IActionBars#getStatusLineManager()
61      */

62     public IStatusLineManager getStatusLineManager() {
63         return statusLineManager;
64     }
65
66     /* (non-Javadoc)
67      * @see org.eclipse.ui.IActionBars#getToolBarManager()
68      */

69     public IToolBarManager getToolBarManager() {
70         return toolbarManager;
71     }
72
73     /* (non-Javadoc)
74      * @see org.eclipse.ui.IActionBars#setGlobalActionHandler(java.lang.String, org.eclipse.jface.action.IAction)
75      */

76     public void setGlobalActionHandler(String JavaDoc actionId, IAction handler) {
77     }
78
79     /* (non-Javadoc)
80      * @see org.eclipse.ui.IActionBars#updateActionBars()
81      */

82     public void updateActionBars() {
83     }
84
85 }
86
Popular Tags