Skip to content

Package: GridTableViewerSWTBuilder

GridTableViewerSWTBuilder

nameinstructionbranchcomplexitylinemethod
GridTableViewerSWTBuilder(Composite, int, Object, IObservableValue, IObservableValue)
M: 8 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
build()
M: 16 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /**
2: * Copyright (c) 2011-2019 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: * jonas - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.view.spi.table.nebula.grid.rap;
15:
16: import org.eclipse.core.databinding.observable.value.IObservableValue;
17: import org.eclipse.emfforms.spi.swt.table.TableViewerSWTBuilder;
18: import org.eclipse.swt.widgets.Composite;
19:
20: /**
21: * @author Jonas Helming
22: *
23: */
24: public class GridTableViewerSWTBuilder extends TableViewerSWTBuilder {
25:
26:         /**
27:          * Contructs a new instance.
28:          *
29:          * @param composite the parent composite
30:          * @param swtStyleBits the style to apply
31:          * @param input the input object
32:          * @param title the title of the table viewer
33:          * @param tooltip the tooltip
34:          */
35:         public GridTableViewerSWTBuilder(Composite composite, int swtStyleBits, Object input,
36:                 IObservableValue title,
37:                 IObservableValue tooltip) {
38:                 super(composite, swtStyleBits, input, title, tooltip);
39:         }
40:
41:         /**
42:          * Call this method after all desired customizations have been passed to the builder. The will create a new
43:          * {@link GridTableViewerComposite} with the desired customizations.
44:          *
45:          * @return the {@link GridTableViewerComposite}
46:          */
47:         @Override
48:         public GridTableViewerComposite build() {
49:                 return new GridTableViewerComposite(getComposite(), getSwtStyleBits(), getInput(), getCustomization(),
50:                         getTitle(), getTooltip());
51:         }
52: }