X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FVamsasApplication.java;h=011f24eceaf64896992a4f07980c2b7d0e7465b1;hp=abb170f03297f7e37c6608438518eff97a2a5077;hb=797df64fa2a0a30773d0f48f5494d4155e5a8be3;hpb=d423f22792e47dbc800ae220a58677f988971d06 diff --git a/src/jalview/gui/VamsasApplication.java b/src/jalview/gui/VamsasApplication.java index abb170f..011f24e 100644 --- a/src/jalview/gui/VamsasApplication.java +++ b/src/jalview/gui/VamsasApplication.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) - * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7) + * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle * * This file is part of Jalview. * @@ -27,6 +27,7 @@ import jalview.structure.SelectionListener; import jalview.structure.SelectionSource; import jalview.structure.StructureSelectionManager; import jalview.structure.VamsasListener; +import jalview.structure.VamsasSource; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; @@ -61,7 +62,7 @@ import uk.ac.vamsas.objects.core.Seg; * @author jimp * */ -public class VamsasApplication implements SelectionSource +public class VamsasApplication implements SelectionSource,VamsasSource { IClient vclient = null; @@ -222,14 +223,12 @@ public class VamsasApplication implements SelectionSource } catch (Error e) { Cache.log - .warn( - "Probable SERIOUS VAMSAS client incompatibility - carrying on regardless", + .warn("Probable SERIOUS VAMSAS client incompatibility - carrying on regardless", e); } catch (Exception e) { Cache.log - .warn( - "Probable VAMSAS client incompatibility - carrying on regardless", + .warn("Probable VAMSAS client incompatibility - carrying on regardless", e); } } @@ -241,8 +240,8 @@ public class VamsasApplication implements SelectionSource */ private ClientHandle getJalviewHandle() { - return new ClientHandle("jalview.bin.Jalview", jalview.bin.Cache - .getProperty("VERSION")); + return new ClientHandle("jalview.bin.Jalview", + jalview.bin.Cache.getProperty("VERSION")); } /** @@ -305,8 +304,7 @@ public class VamsasApplication implements SelectionSource } catch (Exception e) { Cache.log - .warn( - "Exception whilst refreshing jalview windows after a vamsas document update.", + .warn("Exception whilst refreshing jalview windows after a vamsas document update.", e); } } @@ -758,8 +756,8 @@ public class VamsasApplication implements SelectionSource { final IPickManager pm = vclient.getPickManager(); final StructureSelectionManager ssm = StructureSelectionManager - .getStructureSelectionManager(); - final SelectionSource me = this; + .getStructureSelectionManager(Desktop.instance); + final VamsasApplication me = this; pm.registerMessageHandler(new IMessageHandler() { String last = null; @@ -791,8 +789,8 @@ public class VamsasApplication implements SelectionSource // Cache.log.debug("Handling Mouse over "+mm.getVorbaID()+" // bound to "+jvobj+" at "+mm.getPosition()); // position is character position in aligned sequence - ssm.mouseOverVamsasSequence((SequenceI) jvobj, mm - .getPosition()); + ssm.mouseOverVamsasSequence((SequenceI) jvobj, + mm.getPosition(), me); } } if (message instanceof uk.ac.vamsas.client.picking.SelectionMessage) @@ -960,7 +958,7 @@ public class VamsasApplication implements SelectionSource int i = -1; - public void mouseOver(SequenceI seq, int index) + public void mouseOver(SequenceI seq, int index, VamsasSource source) { if (jv2vobj == null) return; @@ -1064,8 +1062,8 @@ public class VamsasApplication implements SelectionSource } else { - int[] intervals = colsel.getVisibleContigs(seqsel - .getStartRes(), seqsel.getEndRes() + 1); + int[] intervals = colsel.getVisibleContigs( + seqsel.getStartRes(), seqsel.getEndRes() + 1); for (int iv = 0; iv < intervals.length; iv += 2) { Seg s = new Seg();