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.tests.views.properties.tabbed.override.tablist;
11:
12: import org.eclipse.swt.widgets.Composite;
13: import org.eclipse.ui.tests.views.properties.tabbed.model.Element;
14: import org.eclipse.ui.tests.views.properties.tabbed.override.items.IOverrideTestsItem;
15: import org.eclipse.ui.views.properties.tabbed.IOverridableTabList;
16:
17: /**
18: * Interface for a tab list used by the tabbed properties view for the override
19: * tests example.
20: * <p>
21: * The OverrideTestsView TabbedPropertySheetPage example is a look at the
22: * properties view after the migration of a TabFolder/TabItem framework to the
23: * tabbed properties view. In the case of a TabFolder, the folder (provider)
24: * knows both the tab labels and tab items. This aligns to the tabbed properties
25: * view, but the tab labels are tab descriptors and tab items are section
26: * descriptions. This does not work with the default framework as the tabs
27: * provide the sections. In this case, the IOverridableTabListContentProvider
28: * framework has been provided.
29: * <p>
30: * The overridable tab list is a content provider that provides both the
31: * sections and the tab labels.
32: *
33: * @author Anthony Hunter
34: * @since 3.4
35: */
36: public interface IOverrideTestsTabList extends IOverridableTabList {
37:
38: /**
39: * Determines if this tab list applies to the element.
40: *
41: * @param element
42: * the element.
43: * @return <code>true</code> if this folder applies to the element.
44: */
45: public boolean appliesTo(Element element);
46:
47: /**
48: * Creates the controls for the tab list.
49: *
50: * @param parent
51: * the parent composite for the contents.
52: */
53: public void createControls(Composite parent);
54:
55: /**
56: * Dispose the controls for the tab list.
57: */
58: public void dispose();
59:
60: /**
61: * Get the items for this tab list.
62: *
63: * @return the items for this tab list.
64: */
65: public IOverrideTestsItem[] getItems();
66:
67: /**
68: * Notifies the tab list that the selected element has changed.
69: *
70: * @param element
71: * the selected element.
72: */
73: public void selectionChanged(Element element);
74:
75: }
|