Skip to content

Package: LabelRapRenderer

LabelRapRenderer

nameinstructionbranchcomplexitylinemethod
LabelRapRenderer(VLabel, ViewModelContext, ReportService, EMFFormsDatabinding, VTViewTemplateProvider)
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%
applyStyle(Label)
M: 14 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-2014 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: */
14: package org.eclipse.emf.ecp.view.label.rap;
15:
16: import javax.inject.Inject;
17:
18: import org.eclipse.emf.ecp.view.spi.context.ViewModelContext;
19: import org.eclipse.emf.ecp.view.spi.label.model.VLabel;
20: import org.eclipse.emf.ecp.view.spi.label.swt.LabelSWTRenderer;
21: import org.eclipse.emf.ecp.view.template.model.VTViewTemplateProvider;
22: import org.eclipse.emfforms.spi.common.report.ReportService;
23: import org.eclipse.emfforms.spi.core.services.databinding.EMFFormsDatabinding;
24: import org.eclipse.swt.widgets.Label;
25:
26: /**
27: * @author Alexandra Buzila
28: *
29: */
30: public class LabelRapRenderer extends LabelSWTRenderer {
31:
32:         /**
33:          * Default Constructor.
34:          *
35:          * @param vElement the view element to be rendered
36:          * @param viewContext The view model context
37:          * @param reportService the ReportService to use
38:          * @param emfFormsDatabinding the EMFFormsDatabinding to use
39:          * @param vtViewTemplateProvider the VTViewTemplateProvider to use
40:          */
41:         @Inject
42:         public LabelRapRenderer(final VLabel vElement, final ViewModelContext viewContext, ReportService reportService,
43:                 EMFFormsDatabinding emfFormsDatabinding, VTViewTemplateProvider vtViewTemplateProvider) {
44:                 super(vElement, viewContext, reportService, emfFormsDatabinding, vtViewTemplateProvider);
45:         }
46:
47:         /*
48:          * (non-Javadoc)
49:          * @see org.eclipse.emf.ecp.view.spi.label.swt.LabelSWTRenderer#applyStyle(org.eclipse.swt.widgets.Label)
50:          */
51:         @Override
52:         protected void applyStyle(Label label) {
53:                 label.setData(CUSTOM_VARIANT, "org_eclipse_emf_ecp_ui_" + getVElement().getStyle()); //$NON-NLS-1$
54:         }
55:
56: }