Skip to content

Package: SingleColumnRow

SingleColumnRow

nameinstructionbranchcomplexitylinemethod
SingleColumnRow(Control)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
getControl()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getControls()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getMainControl()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2013 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: * Eugen Neufeld - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.edit.internal.swt.util;
15:
16: import java.util.Collections;
17: import java.util.Set;
18:
19: import org.eclipse.emf.ecp.view.spi.renderer.RenderingResultRow;
20: import org.eclipse.swt.widgets.Control;
21:
22: /**
23: * @author Eugen Neufeld
24: *
25: */
26: @Deprecated
27: public class SingleColumnRow implements RenderingResultRow<Control> {
28:
29:         private final Control control;
30:
31:         /**
32:          * A {@link RenderingResultRow} which holds one {@link Control}.
33:          *
34:          * @param control the Control for the Column
35:          */
36:         public SingleColumnRow(Control control) {
37:                 this.control = control;
38:         }
39:
40:         /**
41:          * @return the Control
42:          */
43:         public Control getControl() {
44:                 return control;
45:         }
46:
47:         /**
48:          * {@inheritDoc}
49:          *
50:          * @see org.eclipse.emf.ecp.view.spi.renderer.RenderingResultRow#getMainControl()
51:          */
52:         @Override
53:         @Deprecated
54:         public Control getMainControl() {
55:                 return getControl();
56:         }
57:
58:         /**
59:          * {@inheritDoc}
60:          *
61:          * @see org.eclipse.emf.ecp.view.spi.renderer.RenderingResultRow#getControls()
62:          */
63:         @Override
64:         public Set<Control> getControls() {
65:                 return Collections.singleton(control);
66:         }
67:
68: }