| /******************************************************************************* |
| * Copyright (c) 2018 Agence spatiale canadienne / Canadian Space Agency |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Pierre Allard, |
| * Regent L'Archeveque - initial API and implementation |
| * |
| * SPDX-License-Identifier: EPL-1.0 |
| * |
| *******************************************************************************/ |
| package org.eclipse.apogy.core.environment.ui.toolcontrols; |
| |
| import javax.annotation.PostConstruct; |
| import javax.annotation.PreDestroy; |
| import javax.inject.Inject; |
| |
| import org.eclipse.apogy.core.environment.ui.composites.TimeSourceSelectionComposite; |
| import org.eclipse.e4.core.commands.ECommandService; |
| import org.eclipse.e4.core.commands.EHandlerService; |
| import org.eclipse.swt.SWT; |
| import org.eclipse.swt.widgets.Composite; |
| |
| @SuppressWarnings("restriction") |
| public class TimeSourceToolControl { |
| |
| private Composite composite; |
| |
| @Inject |
| ECommandService commandService; |
| |
| @Inject |
| EHandlerService handlerService; |
| |
| @PostConstruct |
| public void createControls(Composite parent) { |
| this.composite = new TimeSourceSelectionComposite(parent, SWT.None, this.handlerService, this.commandService); |
| } |
| |
| /** |
| * Disposes the actual parentComposite. |
| */ |
| @PreDestroy |
| public void dispose() { |
| this.composite.dispose(); |
| } |
| |
| public Composite getComposite() { |
| return this.composite; |
| } |
| |
| } |