Project

General

Profile

Download (3.8 KB) Statistics
| Branch: | Tag: | Revision:
1
package eu.etaxonomy.taxeditor.editor;
2

    
3
import org.eclipse.jface.action.IMenuManager;
4
import org.eclipse.jface.action.IToolBarManager;
5
import org.eclipse.jface.resource.ResourceManager;
6
import org.eclipse.swt.SWT;
7
import org.eclipse.swt.layout.FillLayout;
8
import org.eclipse.swt.widgets.Composite;
9
import org.eclipse.swt.widgets.Table;
10
import org.eclipse.swt.widgets.TableColumn;
11
import org.eclipse.swt.widgets.TableItem;
12
import org.eclipse.ui.part.ViewPart;
13

    
14
import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
15

    
16
public class UndoView extends ViewPart {
17

    
18
	public static final String ID = "eu.etaxonomy.taxeditor.editor.undoview"; //$NON-NLS-1$
19
    private Table table;
20

    
21
    /**
22
	 * Create contents of the view part
23
	 * @param parent
24
	 */
25
	@Override
26
	public void createPartControl(Composite parent) {
27
		Composite container = new Composite(parent, SWT.NONE);
28
		container.setLayout(new FillLayout(SWT.VERTICAL));
29

    
30
		table = new Table(container, SWT.NONE);
31
		table.getHorizontalBar().setVisible(false);
32
		table.setLinesVisible(true);
33

    
34
		final TableColumn newColumnTableColumn = new TableColumn(table, SWT.NONE);
35
		newColumnTableColumn.setWidth(19);
36

    
37
		final TableColumn newColumnTableColumn_1 = new TableColumn(table, SWT.NONE);
38
		newColumnTableColumn_1.setWidth(1000);
39
		newColumnTableColumn_1.setText("New column");
40

    
41
		final TableItem newItemTableItem = new TableItem(table, SWT.BORDER);
42
		newItemTableItem.setText(1, "Created taxon \"Pilosella fuscoatra (N�geli & Peter) Soj�k\"");
43

    
44
		final TableItem newItemTableItem_1 = new TableItem(table, SWT.BORDER);
45
		newItemTableItem_1.setText(1, "Added fact (Distribution) \"California deciduous forest ...\" to \"Pilosella fuscoatra (N�geli & Peter) Soj�k\"");
46

    
47
		final TableItem newItemTableItem_2 = new TableItem(table, SWT.BORDER);
48
		newItemTableItem_2.setText(1, "Added fact (Distribution) \"Brazilian (Northerly region)\" to \"Pilosella fuscoatra (N�geli & Peter) Soj�k\"");
49

    
50
		final TableItem newItemTableItem_3 = new TableItem(table, SWT.BORDER);
51
		newItemTableItem_3.setText(1, "Moved taxon \"Pilosella fuscoatra (N�geli & Peter) Soj�k\" to \"Pilosella fuscoatra coll.\"");
52

    
53
		final TableItem newItemTableItem_4 = new TableItem(table, SWT.BORDER);
54
		newItemTableItem_4.setText(1, "Added unknown syn. \"Hieracium fuscoatrum N�geli & Peter\" to \"Pilosella fuscoatra (N�geli & Peter) Soj�k\"");
55

    
56
		final TableItem newItemTableItem_5 = new TableItem(table, SWT.BORDER);
57
		newItemTableItem_5.setText(1, "Changed rel. type to homo. syn. for \"Hieracium fuscoatrum N�geli & Peter\" to \"Pilosella fuscoatra (N�geli & Peter) Soj�k\"");
58

    
59
		final TableItem newItemTableItem_6 = new TableItem(table, SWT.BORDER);
60
		newItemTableItem_6.setText(1, "Edited name \"Hieracium fuscoatrum N�geli & Peter\" to \"Pilosella fuscoatra (N�geli & Peter) Soj�k\"");
61

    
62
		final TableItem newItemTableItem_7 = new TableItem(table, SWT.BORDER);
63
		newItemTableItem_7.setText(new String[] {"Undo the last action"});
64
		//newItemTableItem_7.setImage(0, ResourceManager.getPluginImage(Activator.getDefault(), "icons/undo.gif"));
65
		newItemTableItem_7.setText(1, "Deleted fact (Distribution) \"Brazilian (Northerly region)\" to \"Pilosella fuscoatra (N�geli & Peter) Soj�k\"");
66
		//
67
		createActions();
68
		initializeToolBar();
69
		initializeMenu();
70
	}
71

    
72
	/**
73
	 * Create the actions
74
	 */
75
	private void createActions() {
76
		// Create the actions
77
	}
78

    
79
	/**
80
	 * Initialize the toolbar
81
	 */
82
	private void initializeToolBar() {
83
		IToolBarManager toolbarManager = getViewSite().getActionBars()
84
				.getToolBarManager();
85
	}
86

    
87
	/**
88
	 * Initialize the menu
89
	 */
90
	private void initializeMenu() {
91
		IMenuManager menuManager = getViewSite().getActionBars()
92
				.getMenuManager();
93
	}
94

    
95
	@Override
96
	public void setFocus() {
97
		// Set the focus
98
	}
99

    
100
}
(27-27/30)