package org.dawnsci.freehep.views.demo; import java.awt.Frame; import java.io.IOException; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.IToolBarManager; import org.eclipse.swt.SWT; import org.eclipse.swt.awt.SWT_AWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.part.ViewPart; import org.freehep.j3d.plot.demo.DemoGUI; public class FreeHepExampleView extends ViewPart { public FreeHepExampleView() { } /** * Create contents of the view part. * @param parent */ @Override public void createPartControl(Composite parent) { Composite container = new Composite(parent, SWT.EMBEDDED | SWT.NO_BACKGROUND); final Frame frame = SWT_AWT.new_Frame(container); DemoGUI plot; try { plot = new DemoGUI(); frame.add(plot); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } createActions(); initializeToolBar(); initializeMenu(); } /** * Create the actions. */ private void createActions() { // Create the actions } /** * Initialize the toolbar. */ private void initializeToolBar() { IToolBarManager toolbarManager = getViewSite().getActionBars() .getToolBarManager(); } /** * Initialize the menu. */ private void initializeMenu() { IMenuManager menuManager = getViewSite().getActionBars() .getMenuManager(); } @Override public void setFocus() { // Set the focus } }