Skip to content

Package: DoubleColumnRow

DoubleColumnRow

nameinstructionbranchcomplexitylinemethod
DoubleColumnRow(Control, Control)
M: 9 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
getControls()
M: 17 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
getLeftControl()
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%
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%
getRightControl()
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.LinkedHashSet;
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 DoubleColumnRow implements RenderingResultRow<Control> {
28:
29:         private final Control leftControl;
30:         private final Control rightControl;
31:
32:         /**
33:          * A {@link RenderingResultRow} which holds two {@link Control Controls}.
34:          *
35:          * @param leftControl the Control for left Column
36:          * @param rightControl the Control for right Column
37:          */
38:         public DoubleColumnRow(Control leftControl, Control rightControl) {
39:                 this.leftControl = leftControl;
40:                 this.rightControl = rightControl;
41:         }
42:
43:         /**
44:          * @return the leftControl
45:          */
46:         public Control getLeftControl() {
47:                 return leftControl;
48:         }
49:
50:         /**
51:          * @return the rightControl
52:          */
53:         public Control getRightControl() {
54:                 return rightControl;
55:         }
56:
57:         /**
58:          * {@inheritDoc}
59:          *
60:          * @see org.eclipse.emf.ecp.view.spi.renderer.RenderingResultRow#getMainControl()
61:          */
62:         @Override
63:         @Deprecated
64:         public Control getMainControl() {
65:                 return getRightControl();
66:         }
67:
68:         /**
69:          * {@inheritDoc}
70:          *
71:          * @see org.eclipse.emf.ecp.view.spi.renderer.RenderingResultRow#getControls()
72:          */
73:         @Override
74:         public Set<Control> getControls() {
75:                 final Set<Control> controls = new LinkedHashSet<Control>(2);
76:                 controls.add(leftControl);
77:                 controls.add(rightControl);
78:                 return controls;
79:         }
80:
81: }