protected void updateGraph() {
	
	if( CommonState.getTime() != GraphObserver.time ||
	    (CDState.isCD() && (CDState.getCycleT() != GraphObserver.ctime)) ||
	    CommonState.getPhase() != GraphObserver.phase ||
	    pid != GraphObserver.lastpid )
	{
		// we need to update the graphs
		
		GraphObserver.lastpid = pid;
		GraphObserver.time = CommonState.getTime();
		if( CDState.isCD() ) GraphObserver.ctime = CDState.getCycleT();
		GraphObserver.phase = CommonState.getPhase();

		GraphObserver.dirg = new OverlayGraph(pid);
		if( GraphObserver.needUndir )
		{
			if( fast )
				GraphObserver.undirg =
				new FastUndirGraph(GraphObserver.dirg);
			else
				GraphObserver.undirg =
				new ConstUndirGraph(GraphObserver.dirg);
		}
	}
	
	if( undir ) g = GraphObserver.undirg;
	else g = GraphObserver.dirg;
}