public void setSelectedTool(Tool tool){
		if(tool == Tool.FOREGROUND){
			this.toForeground();
			return;
		}
		if(tool == Tool.BACKGROUND){
			this.toBackground();
			return;
		}
		if(tool == Tool.EDIT){
			this.edit();
			return;
		}
		selectedTool = tool;
		for(ToolButton button : toolButtons){
			if(button.getTool() == tool){
				button.setBackground(selectedColor);
			}
			else {
				button.setBackground(null);
			}
		}
		switch (tool) {
		case MOVE:
			this.setCursor(new Cursor(Cursor.MOVE_CURSOR));
			break;
		case RESIZE:
			this.setCursor(new Cursor(Cursor.SE_RESIZE_CURSOR));
			break;
		case DELETE:
			this.setCursor(Toolkit.getDefaultToolkit().createCustomCursor(MauseIcon.delete.getIcon(), new Point(16,16), "deleteCursor"));
			break;
		default:
			this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
			break;
		}
	}