2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the recentNamesComposite of this package for the full license terms.
10 package eu
.etaxonomy
.taxeditor
.navigation
;
12 import org
.apache
.log4j
.Logger
;
13 import org
.eclipse
.jface
.action
.IMenuManager
;
14 import org
.eclipse
.jface
.action
.IToolBarManager
;
15 import org
.eclipse
.swt
.SWT
;
16 import org
.eclipse
.swt
.layout
.FillLayout
;
17 import org
.eclipse
.swt
.layout
.GridLayout
;
18 import org
.eclipse
.swt
.widgets
.Composite
;
19 import org
.eclipse
.swt
.widgets
.Display
;
20 import org
.eclipse
.ui
.part
.ViewPart
;
23 * The left navigation pane.
29 public class RecentNamesView
extends ViewPart
{
30 private static final Logger logger
= Logger
.getLogger(RecentNamesView
.class);
32 private Composite recentNamesComposite
= null;
33 public static final String ID
= "eu.etaxonomy.taxeditor.navigation.recentnamesview"; //$NON-NLS-1$
36 * Create contents of the view part
40 public void createPartControl(Composite parent
) {
42 parent
.setLayout(new FillLayout());
43 GridLayout gridLayout
= new GridLayout();
44 gridLayout
.horizontalSpacing
= 0;
45 gridLayout
.marginWidth
= 0;
46 gridLayout
.marginHeight
= 0;
47 gridLayout
.verticalSpacing
= 0;
49 recentNamesComposite
= new Composite(parent
, SWT
.NONE
);
50 recentNamesComposite
.setBackground(Display
.getCurrent().getSystemColor(SWT
.COLOR_WHITE
));
51 recentNamesComposite
.setLayout(new FillLayout());
53 new RecentNamesTableViewer(recentNamesComposite
);
60 private void createActions() {
65 * Initialize the toolbar
67 private void initializeToolBar() {
68 IToolBarManager toolbarManager
= getViewSite().getActionBars()
75 private void initializeMenu() {
76 IMenuManager menuManager
= getViewSite().getActionBars()
81 public void setFocus() {