About to add additional MultiPage views for "New name ..." and "Carduus L."
[taxeditor.git] / eclipseprojects / eu.etaxonomy.taxeditor.designproposal1 / src / eu / etaxonomy / taxeditor / designproposal1 / view / UndoView.java
1 package eu.etaxonomy.taxeditor.designproposal1.view;
2
3 import org.eclipse.jface.action.IMenuManager;
4 import org.eclipse.jface.action.IToolBarManager;
5 import org.eclipse.swt.SWT;
6 import org.eclipse.swt.events.PaintEvent;
7 import org.eclipse.swt.events.PaintListener;
8 import org.eclipse.swt.events.SelectionAdapter;
9 import org.eclipse.swt.events.SelectionEvent;
10 import org.eclipse.swt.graphics.Image;
11 import org.eclipse.swt.graphics.Rectangle;
12 import org.eclipse.swt.layout.FillLayout;
13 import org.eclipse.swt.layout.GridData;
14 import org.eclipse.swt.layout.GridLayout;
15 import org.eclipse.swt.widgets.Button;
16 import org.eclipse.swt.widgets.Canvas;
17 import org.eclipse.swt.widgets.Combo;
18 import org.eclipse.swt.widgets.Composite;
19 import org.eclipse.swt.widgets.Display;
20 import org.eclipse.swt.widgets.FileDialog;
21 import org.eclipse.swt.widgets.Group;
22 import org.eclipse.swt.widgets.Label;
23 import org.eclipse.swt.widgets.List;
24 import org.eclipse.swt.widgets.Table;
25 import org.eclipse.swt.widgets.TableColumn;
26 import org.eclipse.swt.widgets.TableItem;
27 import org.eclipse.swt.widgets.Text;
28 import org.eclipse.ui.part.ViewPart;
29 import com.swtdesigner.ResourceManager;
30 import com.swtdesigner.SWTResourceManager;
31 import eu.etaxonomy.taxeditor.designproposal1.Activator;
32
33 public class UndoView extends ViewPart {
34
35 public static final String ID = "eu.etaxonomy.taxeditor.designproposal1.view.undoview"; //$NON-NLS-1$
36 private Table table;
37
38 /**
39 * Create contents of the view part
40 * @param parent
41 */
42 @Override
43 public void createPartControl(Composite parent) {
44 Composite container = new Composite(parent, SWT.NONE);
45 container.setLayout(new FillLayout(SWT.VERTICAL));
46
47 table = new Table(container, SWT.NONE);
48 table.getHorizontalBar().setVisible(false);
49 table.setLinesVisible(true);
50
51 final TableColumn newColumnTableColumn = new TableColumn(table, SWT.NONE);
52 newColumnTableColumn.setWidth(19);
53
54 final TableColumn newColumnTableColumn_1 = new TableColumn(table, SWT.NONE);
55 newColumnTableColumn_1.setWidth(1000);
56 newColumnTableColumn_1.setText("New column");
57
58 final TableItem newItemTableItem = new TableItem(table, SWT.BORDER);
59 newItemTableItem.setText(1, "Created taxon \"Pilosella fuscoatra (Nägeli & Peter) Soják\"");
60
61 final TableItem newItemTableItem_1 = new TableItem(table, SWT.BORDER);
62 newItemTableItem_1.setText(1, "Added fact (Distribution) \"California deciduous forest ...\" to \"Pilosella fuscoatra (Nägeli & Peter) Soják\"");
63
64 final TableItem newItemTableItem_2 = new TableItem(table, SWT.BORDER);
65 newItemTableItem_2.setText(1, "Added fact (Distribution) \"Brazilian (Northerly region)\" to \"Pilosella fuscoatra (Nägeli & Peter) Soják\"");
66
67 final TableItem newItemTableItem_3 = new TableItem(table, SWT.BORDER);
68 newItemTableItem_3.setText(1, "Moved taxon \"Pilosella fuscoatra (Nägeli & Peter) Soják\" to \"Pilosella fuscoatra coll.\"");
69
70 final TableItem newItemTableItem_4 = new TableItem(table, SWT.BORDER);
71 newItemTableItem_4.setText(1, "Added unknown syn. \"Hieracium fuscoatrum Nägeli & Peter\" to \"Pilosella fuscoatra (Nägeli & Peter) Soják\"");
72
73 final TableItem newItemTableItem_5 = new TableItem(table, SWT.BORDER);
74 newItemTableItem_5.setText(1, "Changed rel. type to homo. syn. for \"Hieracium fuscoatrum Nägeli & Peter\" to \"Pilosella fuscoatra (Nägeli & Peter) Soják\"");
75
76 final TableItem newItemTableItem_6 = new TableItem(table, SWT.BORDER);
77 newItemTableItem_6.setText(1, "Edited name \"Hieracium fuscoatrum Nägeli & Peter\" to \"Pilosella fuscoatra (Nägeli & Peter) Soják\"");
78
79 final TableItem newItemTableItem_7 = new TableItem(table, SWT.BORDER);
80 newItemTableItem_7.setText(new String[] {"Undo the last action"});
81 newItemTableItem_7.setImage(0, ResourceManager.getPluginImage(Activator.getDefault(), "icons/undo.gif"));
82 newItemTableItem_7.setText(1, "Deleted fact (Distribution) \"Brazilian (Northerly region)\" to \"Pilosella fuscoatra (Nägeli & Peter) Soják\"");
83 //
84 createActions();
85 initializeToolBar();
86 initializeMenu();
87 }
88
89 /**
90 * Create the actions
91 */
92 private void createActions() {
93 // Create the actions
94 }
95
96 /**
97 * Initialize the toolbar
98 */
99 private void initializeToolBar() {
100 IToolBarManager toolbarManager = getViewSite().getActionBars()
101 .getToolBarManager();
102 }
103
104 /**
105 * Initialize the menu
106 */
107 private void initializeMenu() {
108 IMenuManager menuManager = getViewSite().getActionBars()
109 .getMenuManager();
110 }
111
112 @Override
113 public void setFocus() {
114 // Set the focus
115 }
116
117 }