public void setSelectedTool(Class<? extends Tool> toolClass) { Tool tool = toolMap.get(toolClass); if (tool != null && tool.isAvailable()) { tool.setSelected(true); setSelectedTool(tool); } }
public void updateTools() { for (Tool tool : toolMap.values()) { tool.setEnabled(tool.isAvailable()); } }