public void setCurrentTool(RegionOfInterestTool regionOfInterestTool) { for (Component c : this.getComponents()) { if (c instanceof DataPanel) { ((DataPanel) c).setCurrentTool(regionOfInterestTool); } } }