protected String isHyperlinked(Point p) {
		String href = null;
		int pos = viewToModel(p);
		if (pos >= 0) {
			Rectangle rect = null;
			/*
			 * FIXME: viewToModel() returns the NEAREST representative location in the model. If the element is indented or non-left-aligned, there will be a problem. try { rect=modelToView(pos); } catch(BadLocationException e){ e.printStackTrace(); } if(rect!=null){ if(!getElementName(pos).equals("icon")){ if(p.x<rect.x-2) return null; } }
			 */
			href = getHyperlink(pos);
			if (pos == 0)
				return href;
			if (href == null) {
				href = getHyperlink(pos - 1);
				if (href != null) {
					String name = getElementName(pos - 1);
					if (name.equals("icon") || name.equals("component")) {
						try {
							rect = modelToView(pos - 1);
						} catch (BadLocationException e) {
							e.printStackTrace();
						}
						if (rect != null) {
							Icon icon = getIcon(pos - 1);
							if (icon != null) {
								rect.width = icon.getIconWidth();
								rect.height = icon.getIconHeight();
								if (!rect.contains(p))
									href = null;
							}
						}
					} else {
						href = null;
					}
				}
			} else {
				// detect if the previous element is an icon
				Icon icon2 = getIcon(pos - 1);
				if (icon2 != null) {
					try {
						rect = modelToView(pos - 1);
					} catch (BadLocationException e) {
						e.printStackTrace();
					}
					// detect if the click point falls in the previous icon. If so, return the previous hyperlink on it
					if (rect != null) {
						rect.width = icon2.getIconWidth();
						rect.height = icon2.getIconHeight();
						if (rect.contains(p))
							return getHyperlink(pos - 1);
					}
				}
			}
		}
		return href;
	}