Skip to content

Package: DetailRenderingFunction

DetailRenderingFunction

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2019 Christian W. Damus 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: * Christian W. Damus - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.view.spi.swt.masterdetail;
15:
16: import org.eclipse.emf.ecp.ui.view.ECPRendererException;
17: import org.eclipse.emf.ecp.ui.view.swt.ECPSWTView;
18: import org.eclipse.emf.ecp.view.spi.context.ViewModelContext;
19: import org.eclipse.swt.widgets.Composite;
20:
21: /**
22: * Rendering function for detail views.
23: *
24: * @since 1.22
25: */
26: @FunctionalInterface
27: public interface DetailRenderingFunction {
28:
29:         /**
30:          * Creates a view with the attributes of the domain object. The layout of the view is specified by the view
31:          * model set in the view model context.
32:          *
33:          * @param parent the parent SWT composite to render the view on
34:          * @param viewModelContext the {@link ViewModelContext} to use
35:          * @return an ECPSWTView providing an interface to the rendered view
36:          * @throws ECPRendererException if there is an exception during rendering
37:          */
38:         ECPSWTView render(Composite parent, ViewModelContext viewModelContext) throws ECPRendererException;
39:
40: }