X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignFrame.java;h=2d02e7958513194675c6aef3cb7a39d0e72c95a2;hb=8288438dd58cfc2d1fe18a060afda0d647b85c32;hp=82ec1d2e7e193bda914d529d1c431ae1961cbeb9;hpb=c2e6335a319d61b641fb6fcbb0a4a5dc88a58014;p=jalview.git diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 82ec1d2..2d02e79 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -2636,6 +2636,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, { viewport.invertColumnSelection(); alignPanel.paintAlignment(true, false); + PaintRefresher.Refresh(alignPanel, viewport.getSequenceSetId()); viewport.sendSelection(); } @@ -4189,34 +4190,50 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, { int x = 4, y = 5; int w = 400, h = 500; + try { NewickFile fin = new NewickFile( - new FileParse(cm.getNewickString(), DataSourceType.PASTE)); - fin.parse(); - if (fin.getTree() == null) - { - return; - } + new FileParse(cm.getNewick(), DataSourceType.PASTE)); String title = "PAE Matrix Tree for " + cm.getReferenceSeq().getDisplayId(false); - TreePanel tp = new TreePanel(alignPanel, fin, aa, title); - - tp.setSize(w, h); - if (x > 0 && y > 0) - { - tp.setLocation(x, y); - } - - Desktop.addInternalFrame(tp, title, w, h); + showColumnWiseTree(fin, aa, title, w,h, x,y); } catch (Throwable xx) { Console.error("Unexpected exception showing tree for contact matrix", xx); } + } + public TreePanel showColumnWiseTree(NewickFile nf, AlignmentAnnotation aa, String treeTitle, + int w, int h, int x, int y) + { + try + { + nf.parse(); + if (nf.getTree() == null) + { + return null; + } + TreePanel tp = new TreePanel(alignPanel, nf, aa, title); + + tp.setSize(w, h); + + if (x > 0 && y > 0) + { + tp.setLocation(x, y); + } + Desktop.addInternalFrame(tp, title, w, h); + return tp; + } catch (Throwable xx) + { + Console.error("Unexpected exception showing tree for contact matrix", + xx); + } + return null; } + private boolean buildingMenu = false; /**