protected Rectangle getAutomatonBounds() {
		SelectionDrawer d = (SelectionDrawer) drawer;
		State[] s = d.getSelected();
		Transition[] t = d.getSelectedTransitions();
		// What if nothing is selected?
		if (s.length + t.length == 0)
			return super.getAutomatonBounds();

		Rectangle rect = null;
		if (s.length != 0) {
			rect = d.getBounds(s[0]);
			for (int i = 1; i < s.length; i++)
				rect.add(d.getBounds(s[i]));
		} else
			rect = d.getBounds(t[0]);
		for (int i = 0; i < t.length; i++)
			rect.add(d.getBounds(t[i]));
		return rect;
	}