Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: ee52d4e45c7837977b79694ababcbbb4ab8046ee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*******************************************************************************
 * Copyright (c) 2007, 2008 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *     Anton Leherbauer (Wind River Systems)
 *******************************************************************************/
package org.eclipse.cdt.internal.ui.preferences.formatter;

import java.util.Map;

import org.eclipse.core.runtime.IStatus;

import org.eclipse.swt.widgets.Composite;

/**
 * @since 5.0
 */
public interface IModifyDialogTabPage {

	public interface IModificationListener {
	
		void updateStatus(IStatus status);
	
		void valuesModified();
	
	}

	/**
	 * A map containing key value pairs this tab page
	 * is must modify.
	 * 
	 * @param workingValues the values to work with
	 */
	public void setWorkingValues(Map workingValues);

	/**
	 * A modify listener which must be informed whenever
	 * a value in the map passed to {@link #setWorkingValues(Map)}
	 * changes. The listener can also be informed about status
	 * changes.
	 * 
	 * @param modifyListener the listener to inform
	 */
	public void setModifyListener(IModificationListener modifyListener);

	/**
	 * Create the contents of this tab page.
	 * 
	 * @param parent the parent composite
	 * @return created content control
	 */
	public Composite createContents(Composite parent);

	/**
	 * This is called when the page becomes visible. 
	 * Common tasks to do include:
	 * <ul><li>Updating the preview.</li>
	 * <li>Setting the focus</li>
	 * </ul>
	 */
	public void makeVisible();

	/**
	 * Each tab page should remember where its last focus was, and reset it
	 * correctly within this method. This method is only called after
	 * initialization on the first tab page to be displayed in order to restore
	 * the focus of the last session.
	 */
	public void setInitialFocus();

}

Back to the top