performed javacscript:fix and worked on documentation
[taxeditor.git] / taxeditor-store / src / main / java / eu / etaxonomy / taxeditor / newWizards / NewGenericReferenceWizardPage.java
1 // $Id$
2 /**
3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
9 */
10
11 package eu.etaxonomy.taxeditor.newWizards;
12
13 import org.eclipse.jface.wizard.WizardPage;
14 import org.eclipse.swt.SWT;
15 import org.eclipse.swt.layout.GridData;
16 import org.eclipse.swt.layout.GridLayout;
17 import org.eclipse.swt.widgets.Combo;
18 import org.eclipse.swt.widgets.Composite;
19 import org.eclipse.swt.widgets.Control;
20 import org.eclipse.swt.widgets.Label;
21 import org.eclipse.swt.widgets.Text;
22
23 import eu.etaxonomy.cdm.model.agent.AgentBase;
24
25 /**
26 * <p>NewGenericReferenceWizardPage class.</p>
27 *
28 * @author n.hoffmann
29 * @created Apr 16, 2010
30 * @version 1.0
31 */
32 public class NewGenericReferenceWizardPage extends WizardPage {
33
34 private Combo combo_referenceType;
35 private Text text_title;
36 private AgentBase selection_agent;
37 private Text text_editor;
38 private Text text_series;
39 private Text text_volume;
40 private Text text_pages;
41
42 /**
43 * <p>Constructor for NewGenericReferenceWizardPage.</p>
44 *
45 * @param pageName a {@link java.lang.String} object.
46 */
47 protected NewGenericReferenceWizardPage(String pageName) {
48 super(pageName);
49 }
50
51 /** {@inheritDoc} */
52 public void createControl(Composite parent) {
53 setTitle("General");
54 setDescription("General information for a reference.");
55
56 Composite container = new Composite(parent, SWT.NULL);
57 container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
58
59 container.setLayout(new GridLayout(2, false));
60
61 createLabel(container, "Reference Type");
62 combo_referenceType = new Combo(container, SWT.NULL);
63 top(combo_referenceType);
64
65 createLabel(container, "Title");
66 text_title = new Text(container, SWT.NULL);
67 top(text_title);
68
69 // createLabel(container, "Author Team");
70 // selection_agent = FilteredAgentSelectionDialog.selectAgent(getShell(), null);
71
72 // composite_timePeriod
73
74 createLabel(container, "Editor");
75 text_editor = new Text(container, SWT.NULL);
76 top(text_editor);
77
78 createLabel(container, "Series");
79 text_series = new Text(container, SWT.NULL);
80 top(text_series);
81
82 createLabel(container, "Volume");
83 text_volume = new Text(container, SWT.NULL);
84 top(text_volume);
85
86 createLabel(container, "Pages");
87 text_pages = new Text(container, SWT.NULL);
88 top(text_pages);
89
90 setControl(container);
91 }
92
93
94 private Label createLabel(Composite parent, String labelString){
95 Label label = new Label(parent, SWT.NULL);
96 label.setText(labelString);
97 return label;
98 }
99
100 private void top(Control control){
101 control.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
102 }
103 }