@Override
	public void mousePressed(MouseEvent e) {
		recordRenderer(e.getComponent());
		
 		// Shorthand
 		Node currentNode = textArea.node;
 		JoeTree tree = currentNode.getTree();
 		OutlineLayoutManager layout = tree.getDocument().panel.layout;
		
		// This is detection for Solaris, I think mac does this too.
		if (e.isPopupTrigger() && (currentNode.isAncestorSelected() || (tree.getEditingNode() == currentNode))) {
			//Outliner.macroPopup.show(e.getComponent(),e.getX(), e.getY());
			e.consume();
			return;
		}
		
		// This is to block clicks when a right click is generated in windows.
		if ((PlatformCompatibility.isWindows()) && e.getModifiers() == InputEvent.BUTTON3_MASK) {
			return;
		}
		
		// Handle clicks. The modulo is to deal with rapid clicks that would register as a triple click or more.
		if ((e.getClickCount() % 2) == 1) {
			processSingleClick(e);
			if (MODE_EXPAND_SINGLE_CLICK == expand_mode) {
				processDoubleClick(e);
			}
		} else if ((e.getClickCount() % 2) == 0){
			processDoubleClick(e);
		}
		
		// Record the EditingNode and CursorPosition and ComponentFocus
		tree.setEditingNode(textArea.node);
		tree.setComponentFocus(OutlineLayoutManager.ICON);
		
		// Redraw and set focus
		layout.redraw();
		
		// Consume the current event and then propogate a new event to
		// the DnD listener since if a drawUp() happened, the old event
		// will most likely have an invalid component.
		e.consume();
		
		MouseEvent eNew = new MouseEvent(
			tree.getDocument().panel.layout.getUIComponent(currentNode).button, 
			e.getID(), 
			e.getWhen(), 
			e.getModifiers(), 
			e.getX(), 
			e.getY(), 
			e.getClickCount(), 
			e.isPopupTrigger()
		);
		tree.getDocument().panel.layout.dndListener.mousePressed(eNew);
	}