Skip to content

Package: EMFFormsAbstractSpreadsheetRenderer

EMFFormsAbstractSpreadsheetRenderer

nameinstructionbranchcomplexitylinemethod
EMFFormsAbstractSpreadsheetRenderer()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

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: * Eugen Neufeld - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emfforms.spi.spreadsheet.core;
15:
16: import org.apache.poi.ss.usermodel.Workbook;
17: import org.eclipse.emf.ecp.view.spi.context.ViewModelContext;
18: import org.eclipse.emf.ecp.view.spi.model.VElement;
19:
20: /**
21: * Abstract class which is the base class for all Spreadsheet renderer.
22: *
23: * @author Eugen Neufeld
24: *
25: * @param <VELEMENT> The {@link VElement} type this renderer supports
26: */
27: public abstract class EMFFormsAbstractSpreadsheetRenderer<VELEMENT extends VElement> {
28:
29:         /**
30:          * This is called to trigger the rendering.
31:          *
32:          * @param workbook The {@link Workbook} to write to
33:          * @param vElement The {@link VElement} describing the information to write
34:          * @param viewModelContext The {@link ViewModelContext} containing the {@link org.eclipse.emf.ecore.EObject EObject}
35:          * @param renderTarget The {@link EMFFormsSpreadsheetRenderTarget} containing the information where to render to
36:          * @return The number of rendered columns
37:          */
38:         public abstract int render(Workbook workbook, VELEMENT vElement, ViewModelContext viewModelContext,
39:                 EMFFormsSpreadsheetRenderTarget renderTarget);
40: }