private void findSelectedImages() {
		selectedImages.clear();
		if (getSelectedText() == null)
			return;
		Element elem = null;
		AttributeSet attributes = null;
		StyledDocument doc = getStyledDocument();
		Enumeration e = null;
		Object attr = null;
		int start = getSelectionStart();
		int end = getSelectionEnd();
		for (int i = start; i < end; i++) {
			elem = doc.getCharacterElement(i);
			attributes = elem.getAttributes();
			e = attributes.getAttributeNames();
			while (e.hasMoreElements()) {
				attr = attributes.getAttribute(e.nextElement());
				if (attr instanceof Icon)
					selectedImages.add((Icon) attr);
				else if (attr instanceof IconWrapper)
					selectedImages.add(((IconWrapper) attr).getIcon());
			}
		}
	}