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 hodaka
 */
public class CoordinateView extends ViewPart {
	private CoordinateViewWidget coViewWidget_;
	public static final String ID = "jp.hasc.hasctool.ui.views.CoordinateView";
	
	@Override
	public void createPartControl(Composite parent) {
		coViewWidget_ = new CoordinateViewWidget(parent, SWT.NONE);
	}
	
	@Override
	public void setFocus() {
	}
	
	public MessageProcessor getInputPort() { return coViewWidget_.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 CoordinateViewWidget getCoordinateViewWidget() {
		return coViewWidget_;
	}
}
