/*
 * Created on Oct 6, 2003
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
package APStudio.models;

import org.eclipse.swt.graphics.Image;
/**
 * @author Gong Jun
 *
 * To change the template for this generated type comment go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
public class MyConnectionModel extends BasicSubpart{

	private static int count;
	private BasicSubpart _source;
	private BasicSubpart _target;
	private String _name = "";

	public MyConnectionModel(){
		//set the name
		_name = this.getID();
	}

	/* (non-Javadoc)
	 * @see APStudio.models.BasicSubpart#getIconImage()
	 */
	public Image getIconImage() {
		System.out.println("MyConnectionModel IconImg");
		return new Image(null,
			MyConnectionModel.class.getResourceAsStream("icons/label16.gif"));
	}

	/* (non-Javadoc)
	 * @see APStudio.models.BasicElement#getNewID()
	 */
	protected String getNewID() {
		return Integer.toString(count++);
	}

}
