package me.teaisaweso.client.graphmanagers;

import java.util.Collection;

import me.teaisaweso.client.EdgeDrawable;
import me.teaisaweso.client.VertexDrawable;
import me.teaisaweso.shared.Edge;
import me.teaisaweso.shared.Graph;
import me.teaisaweso.shared.Vertex;
import me.teaisaweso.shared.VertexDirection;

public interface GraphManager2d {

	/**
	 * gets the underlying graph for this 2d representation
	 * 
	 * @return a new graph instance
	 */
	public Graph getUnderlyingGraph();

	/**
	 * adds a vertex to the graph
	 * 
	 * the vertex may not be centered at the passed location
	 * 
	 * @param v
	 *            the vertex to be added
	 * @param xPosition
	 *            the center x position of the vertex
	 * @param yPosition
	 *            the center y position of the vertex
	 */
	public void addVertex(Vertex v, int xPosition, int yPosition, int size);

	/**
	 * removes a vertex from the graph
	 * 
	 * @param v
	 *            the vertex to be removed
	 */
	public void removeVertex(Vertex v);

	/**
	 * moves a vertex to a given position
	 * 
	 * the vertex may not be centered at the passed location
	 * 
	 * @param v
	 *            the vertex to be moved
	 * @param xPosition
	 *            the new center x position of the vertex
	 * @param yPosition
	 *            the new center y position of the vertex
	 */
	public void moveVertexTo(Vertex v, int xPosition, int yPosition);

	/**
	 * changes the size of a vertex
	 * 
	 * may displace this or other vertices
	 * 
	 * @param v
	 *            the vertex to have it's size changed
	 * @param newSize
	 *            the new size of the vertex in pixels
	 */
	public void scaleVertex(Vertex v, int newSize);

	/**
	 * adds an edge between two vertices
	 * 
	 * @param v1
	 *            the "from" vertex
	 * @param v2
	 *            the "to" vertex
	 * @param dir
	 *            the edge direction
	 */
	public void addEdge(Vertex v1, Vertex v2, VertexDirection dir);

}

@@ -1930,10 +1930,703 @@
  dir);%0A%0A
+%09/**%0A%09 * removes an edge from the graphmanager%0A%09 * %0A%09 * @param e%0A%09 *            the edge to be removed%0A%09 */%0A%09public void removeEdge(Edge e);%0A%0A%09/**%0A%09 * removes all the edges between v1 and v2%0A%09 * %0A%09 * @param v1%0A%09 * @param v2%0A%09 */%0A%09public void removeAllEdges(Vertex v1, Vertex v2);%0A%0A%09/**%0A%09 * generates a list of drawable vertices%0A%09 * %0A%09 * @return a list of VertexDrawable objects representing the vertices in%0A%09 *         this graph%0A%09 */%0A%09public Collection%3CVertexDrawable%3E getVertexDrawables();%0A%0A%09/**%0A%09 * generates a list of drawable edges%0A%09 * %0A%09 * @return a list of EdgeDrawable objects representing the edges in this%0A%09 *         graph%0A%09 */%0A%09public Collection%3CEdgeDrawable%3E getEdgeDrawables();%0A%0A
 %7D%0A

add some methods to the graphmanager interface