merge-update from trunk
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / src / main / java / eu / etaxonomy / taxeditor / editor / molecular / PherogramMouseListener.java
1 /**
2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9 package eu.etaxonomy.taxeditor.editor.molecular;
10
11
12 import info.bioinfweb.commons.tic.input.TICMouseAdapter;
13 import info.bioinfweb.commons.tic.input.TICMouseEvent;
14
15 import java.net.URI;
16
17 import eu.etaxonomy.taxeditor.editor.handler.ShowPherogramHandler;
18 import eu.etaxonomy.taxeditor.model.MessagingUtils;
19
20
21
22 /**
23 * Listens to mouse events on data areas displaying a pherogram in {@link AlignmentEditor}.
24 *
25 * @author Ben Stöver
26 * @date 25.11.2014
27 */
28 public class PherogramMouseListener extends TICMouseAdapter {
29 private URI uri;
30
31
32 public PherogramMouseListener(URI uri) {
33 super();
34 this.uri = uri;
35 }
36
37
38 @Override
39 public void mousePressed(TICMouseEvent event) {
40 if (event.getClickCount() == 2) { // Double click
41 ShowPherogramHandler.showPherogram(uri);
42 }
43 }
44 }