private Icon getIcon(int location) {
		StyledDocument doc = getStyledDocument();
		if (doc != null) {
			Element elem = doc.getCharacterElement(location);
			if (elem != null) {
				AttributeSet a = elem.getAttributes();
				Object obj = a.getAttribute(StyleConstants.IconAttribute);
				if (obj instanceof Icon) {
					return (Icon) obj;
				}
				obj = a.getAttribute(StyleConstants.ComponentAttribute);
				if (obj instanceof IconWrapper) {
					Icon icon = ((IconWrapper) obj).getIcon();
					if (!(icon instanceof LineIcon))
						return icon;
				}
			}
		}
		return null;
	}