public Set<Node> getNodesAt(Graphics2D g2, Rectangle rect) {

		Set<Node> nodes = new HashSet<Node>();
		for (Node node : tree.getExternalNodes()) {
			Shape taxonLabelBound = tipLabelBounds.get(node);
			if (taxonLabelBound != null && g2.hit(rect, taxonLabelBound, false)) {
				nodes.add(node);
			}
		}

		for (Node node : tree.getNodes()) {
			Shape branchPath = transform.createTransformedShape(treeLayoutCache.getBranchPath(node));
			if (branchPath != null && g2.hit(rect, branchPath, true)) {
				nodes.add(node);
			}
			Shape collapsedShape = transform.createTransformedShape(treeLayoutCache.getCollapsedShape(node));
			if (collapsedShape != null && g2.hit(rect, collapsedShape, false)) {
				nodes.add(node);
			}
		}

		return nodes;
	}