protected List<Element> getSelectedLeafElements() {
		if (getSelectedText() == null)
			return null;
		List<Element> list = new ArrayList<Element>();
		ElementIterator i = new ElementIterator(getDocument());
		Element e = i.next();
		int start = getSelectionStart();
		int end = getSelectionEnd();
		while (e != null) {
			if (e instanceof AbstractDocument.LeafElement) {
				if (intervalOverlap(e.getStartOffset(), e.getEndOffset(), start, end)) {
					list.add(e);
				}
			}
			e = i.next();
		}
		return list;
	}