01: /*******************************************************************************
02: * Copyright (c) 2007 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: ******************************************************************************/package org.eclipse.ui.internal.tweaklets;
11:
12: import org.eclipse.swt.widgets.Display;
13: import org.eclipse.ui.IWorkbenchPart;
14: import org.eclipse.ui.internal.tweaklets.Tweaklets.TweakKey;
15:
16: /**
17: * The tweaklet provider can prevent the workbench page from grabbing focus.
18: *
19: * @since 3.3
20: */
21: public abstract class GrabFocus {
22: public static TweakKey KEY = new Tweaklets.TweakKey(GrabFocus.class);
23:
24: static {
25: Tweaklets.setDefault(GrabFocus.KEY, new AllowGrabFocus());
26: }
27:
28: public abstract boolean grabFocusAllowed(IWorkbenchPart part);
29:
30: public abstract void init(Display display);
31:
32: public abstract void dispose();
33: }
|