private void refreshGraph() {
		
		Object parent = graph.getDefaultParent();
		graph.removeCells(graph.getChildVertices(parent));
		graph.setCellsLocked(false);
		
		graph.getModel().beginUpdate();		
		try	{
			idToVertexMap = new HashMap<Long, Object>();
			vertexToHardwareMap = new HashMap<Object, NetworkHardware>();
			
			for(NetworkHardware nh : hardwares) {
				Object vertex = graph.insertVertex(parent, null, nh.getName(), 0, 0, 80, 30);
				idToVertexMap.put(nh.getId(), vertex);
				vertexToHardwareMap.put(vertex, nh);
			}
			for(Link l : links) {
				graph.insertEdge(parent, null, l.getType(), idToVertexMap.get(l.getFromId().getId()),
															idToVertexMap.get(l.getToId().getId()),
															"startArrow=none;endArrow=none;strokeColor=#000000");
			}
			for(Alarm a : alarms) {
				((mxCell) idToVertexMap.get(a.getTarget().getId())).setStyle("strokeColor=#FF0000");
			}
		} finally {
			graph.getModel().endUpdate();
		}
		
		graphLayout.execute(parent);
		graph.setCellsLocked(true);
	}