private MouseAdapter treeMouseController() {
		return new MouseAdapter () {
			
			@Override
			public void mouseClicked(MouseEvent event) {
			
				JTree tree =  (JTree) event.getSource();
				TreePath selectionPath =  tree.getPathForLocation(event.getX(), event.getY());
				if (selectionPath != null) {
					selectedAnnotation = -1;
					
					DefaultMutableTreeNode selection = (DefaultMutableTreeNode) selectionPath.getLastPathComponent();
					if (selection.getParent() == annotations) { 
						selectedAnnotation = annotations.getIndex(selection);
						annotationTextArea.setText(EMediumMetadataUI.this.delegate.getAnnotationText(pageNum, selectedAnnotation));
					} 

					if (event.getClickCount() >= 2)
						if (selection.getParent() == bookmarks && documentUI != null)
							try {
								documentUI.showPage(Integer.parseInt((String) selection.getUserObject()));
							} catch (NumberFormatException e) {
								JOptionPane.showMessageDialog(frame, "Invalid bookmark number", "Invalid bookmark", JOptionPane.ERROR_MESSAGE);
							} catch (NoSuchPageException e) {
								JOptionPane.showMessageDialog(frame, "No shuch page", "Error reading page", JOptionPane.ERROR_MESSAGE);
							}
				}
			}
		};
	}