| /* |
| * |
| * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * Florian Pirchner - Initial implementation |
| * Loetz GmbH&Co.KG |
| * |
| */ |
| package org.eclipse.osbp.vaadin.emf.api; |
| |
| import org.eclipse.emf.ecore.EObject; |
| |
| // TODO: Auto-generated Javadoc - check the links in the description |
| /** |
| * This class is a Vaadin session singleton and allows parties to enable the |
| * layout click event dispatching by event admin.<br> |
| * If activated, several components of the modeled workbench will send click |
| * events. See { link #TOPIC} and { link EventData} for details. |
| * |
| * @Scope(session-singleton) |
| * @NoImplementByClients |
| */ |
| public class EmfModelElementClickEvent { |
| |
| /** The ui element. */ |
| private final Object uiElement; |
| |
| /** The model element. */ |
| private final EObject modelElement; |
| |
| /** |
| * Instantiates a new emf model element click event. |
| * |
| * @param uiElement |
| * the ui element |
| * @param modelElement |
| * the model element |
| */ |
| public EmfModelElementClickEvent(Object uiElement, EObject modelElement) { |
| this.uiElement = uiElement; |
| this.modelElement = modelElement; |
| } |
| |
| /** |
| * The UI element that was clicked. |
| * |
| * @return the ui element |
| */ |
| public Object getUiElement() { |
| return uiElement; |
| } |
| |
| /** |
| * The model element associated with the ui element. |
| * |
| * @return the model element |
| */ |
| public EObject getModelElement() { |
| return modelElement; |
| } |
| } |