package jp.hasc.hasctool.ui.views;

import jp.hasc.hasctool.core.messaging.MessageProcessor;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.part.ViewPart;

/**
 * 折れ線グラフを表示するビューです
 * @author iwasaki
 */
public class WaveView extends ViewPart {

	private WaveViewWidget waveViewWidget_;
	public static final String ID = "jp.hasc.hasctool.ui.views.WaveView";
	
	@Override
	public void createPartControl(Composite parent) {
		waveViewWidget_=new WaveViewWidget(parent, SWT.NONE);
	}
	
	@Override
	public void setFocus() {
	}
	
	public MessageProcessor getInputPort() { return waveViewWidget_.getInputPort(); }
	
	private void onInit(IViewSite site) {
	}
	
	@Override
	public void init(IViewSite site, IMemento memento) throws PartInitException {
		super.init(site, memento);
		onInit(site);
	}

	@Override
	public void init(IViewSite site) throws PartInitException {
		super.init(site);
		onInit(site);
	}

	public WaveViewWidget getWaveViewWidget() {
		return waveViewWidget_;
	}
}
