01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 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.jdt.internal.ui.preferences;
11:
12: import org.eclipse.swt.widgets.Composite;
13: import org.eclipse.swt.widgets.Control;
14:
15: /**
16: * Interface for preference configuration blocks which can either be
17: * wrapped by a {@link org.eclipse.jdt.internal.ui.preferences.AbstractConfigurationBlockPreferencePage}
18: * or be included some preference page.
19: * <p>
20: * Clients may implement this interface.
21: * </p>
22: *
23: * @since 3.0
24: */
25: public interface IPreferenceConfigurationBlock {
26:
27: /**
28: * Creates the preference control.
29: *
30: * @param parent the parent composite to which to add the preferences control
31: * @return the control that was added to <code>parent</code>
32: */
33: Control createControl(Composite parent);
34:
35: /**
36: * Called after creating the control. Implementations should load the
37: * preferences values and update the controls accordingly.
38: */
39: void initialize();
40:
41: /**
42: * Called when the <code>OK</code> button is pressed on the preference
43: * page. Implementations should commit the configured preference settings
44: * into their form of preference storage.
45: */
46: void performOk();
47:
48: /**
49: * Called when the <code>Defaults</code> button is pressed on the
50: * preference page. Implementation should reset any preference settings to
51: * their default values and adjust the controls accordingly.
52: */
53: void performDefaults();
54:
55: /**
56: * Called when the preference page is being disposed. Implementations should
57: * free any resources they are holding on to.
58: */
59: void dispose();
60: }
|