]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/utils/NoProjectPage.java
Option for exporting tg and pgraph with sharedlibrary
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / utils / NoProjectPage.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3  * in Industry THTH ry.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.modeling.ui.utils;
13
14 import org.eclipse.jface.wizard.WizardPage;
15 import org.eclipse.swt.SWT;
16 import org.eclipse.swt.layout.GridLayout;
17 import org.eclipse.swt.widgets.Composite;
18
19 /**
20  * @author Tuukka Lehtonen
21  */
22 public class NoProjectPage extends WizardPage {
23
24     public NoProjectPage(String pageName) {
25         super(pageName, "No project open", null);
26     }
27
28     @Override
29     public void createControl(Composite parent) {
30         Composite container = new Composite(parent, SWT.NONE);
31         {
32             GridLayout layout = new GridLayout();
33             layout.horizontalSpacing = 20;
34             layout.verticalSpacing = 10;
35             layout.numColumns = 1;
36             container.setLayout(layout);
37         }
38
39         setErrorMessage("No project is open, unable to export.");
40
41         setControl(container);
42         setPageComplete(false);
43     }
44
45 }