Skip to content

Package: TableViewerSWTCustomization

TableViewerSWTCustomization

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2015 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Alexandra Buzila - initial API and implementation
13: * Johannes Faltermeier - initial API and implementation
14: ******************************************************************************/
15: package org.eclipse.emfforms.spi.swt.table;
16:
17: import java.util.List;
18:
19: import org.eclipse.emfforms.common.Optional;
20: import org.eclipse.emfforms.spi.swt.table.action.ActionBarProvider;
21: import org.eclipse.emfforms.spi.swt.table.action.ActionConfigurationProvider;
22: import org.eclipse.jface.viewers.AbstractTableViewer;
23: import org.eclipse.jface.viewers.IContentProvider;
24: import org.eclipse.jface.viewers.ViewerComparator;
25:
26: /**
27: * The TableViewerSWTCustomization is used by the {@link TableViewerComposite} to create the UI with its behaviour.
28: *
29: * @author Alexandra Buzila
30: * @author Johannes Faltermeier
31: *
32: * @param <T> the TableViewer implementation to use
33: */
34: public interface TableViewerSWTCustomization<T extends AbstractTableViewer>
35:         extends TableViewerCompositeBuilder, TableViewerCreator<T>, ActionBarProvider<T>, ActionConfigurationProvider,
36:         DNDProvider {
37:
38:         /**
39:          * Returns the comparator to use.
40:          *
41:          * @return the {@link ViewerComparator} which will be set on the viewer, if present
42:          */
43:         Optional<ViewerComparator> getComparator();
44:
45:         /**
46:          * Returns the content provider to use.
47:          *
48:          * @return the {@link IContentProvider} which will be set on the viewer
49:          */
50:         IContentProvider createContentProvider();
51:
52:         /**
53:          * Returns the table configuration which will be used to configure the table instance.
54:          * May be null as long as the configuration is incomplete.
55:          *
56:          * @return the {@link TableConfiguration}
57:          */
58:         TableConfiguration getTableConfiguration();
59:
60:         /**
61:          * Returns the column configurations which will be used to configure columns.
62:          *
63:          * @return the {@link ColumnConfiguration}
64:          */
65:         List<ColumnConfiguration> getColumnConfigurations();
66:
67: }