KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > tweaklets > GrabFocus


1 /*******************************************************************************
2  * Copyright (c) 2007 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.ui.internal.tweaklets;
13
14 import org.eclipse.swt.widgets.Display;
15 import org.eclipse.ui.IWorkbenchPart;
16 import org.eclipse.ui.internal.tweaklets.Tweaklets.TweakKey;
17
18 /**
19  * The tweaklet provider can prevent the workbench page from grabbing focus.
20  *
21  * @since 3.3
22  */

23 public abstract class GrabFocus {
24     public static TweakKey KEY = new Tweaklets.TweakKey(GrabFocus.class);
25
26     static {
27         Tweaklets.setDefault(GrabFocus.KEY, new AllowGrabFocus());
28     }
29
30     public abstract boolean grabFocusAllowed(IWorkbenchPart part);
31
32     public abstract void init(Display display);
33
34     public abstract void dispose();
35 }
36
Popular Tags