X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignFrame.java;h=7f9bfffe8ca8ae59650cdc9aabffedef03e07126;hb=15c3c0e89d9157187e1ccc6962b115cb255dd04a;hp=ab705c2e152fdb71e8997fbd395678c862f8fd97;hpb=24eb9d2701c4f51c1a3a8ce9536ed579988f0179;p=jalview.git diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index ab705c2..7f9bfff 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -157,7 +157,6 @@ import jalview.viewmodel.AlignmentViewport; import jalview.viewmodel.ViewportRanges; import jalview.ws.DBRefFetcher; import jalview.ws.DBRefFetcher.FetchFinishedListenerI; -import jalview.ws.datamodel.alphafold.PAEContactMatrix; import jalview.ws.jws1.Discoverer; import jalview.ws.jws2.Jws2Discoverer; import jalview.ws.jws2.jabaws2.Jws2Instance; @@ -1456,9 +1455,11 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, protected void htmlMenuItem_actionPerformed(ActionEvent e) { HtmlSvgOutput htmlSVG = new HtmlSvgOutput(alignPanel); - try { + try + { htmlSVG.exportHTML(null); - } catch (ImageOutputException x) { + } catch (ImageOutputException x) + { // report problem to console and raise dialog } } @@ -1467,51 +1468,64 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, public void bioJSMenuItem_actionPerformed(ActionEvent e) { BioJsHTMLOutput bjs = new BioJsHTMLOutput(alignPanel); - try { - bjs.exportHTML(null); - } catch (ImageOutputException x) { - // report problem to console and raise dialog - } + try + { + bjs.exportHTML(null); + } catch (ImageOutputException x) + { + // report problem to console and raise dialog + } } public void createImageMap(File file, String image) { - try { - alignPanel.makePNGImageMap(file, image); - } catch (ImageOutputException x) { + try + { + alignPanel.makePNGImageMap(file, image); + } catch (ImageOutputException x) + { // report problem to console and raise dialog } } @Override - public void createPNG_actionPerformed(ActionEvent e) { - try{ + public void createPNG_actionPerformed(ActionEvent e) + { + try + { createPNG(null); } catch (ImageOutputException ioex) { // raise dialog, and report via console } } + @Override - public void createEPS_actionPerformed(ActionEvent e) { - try{ + public void createEPS_actionPerformed(ActionEvent e) + { + try + { createEPS(null); } catch (ImageOutputException ioex) { // raise dialog, and report via console } - + } + @Override - public void createSVG_actionPerformed(ActionEvent e) { - try{ + public void createSVG_actionPerformed(ActionEvent e) + { + try + { createSVG(null); } catch (ImageOutputException ioex) { // raise dialog, and report via console } - + } + /** * Creates a PNG image of the alignment and writes it to the given file. If * the file is null, the user is prompted to choose a file. @@ -1523,7 +1537,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, createPNG(f, null, BitmapImageSizing.nullBitmapImageSizing()); } - public void createPNG(File f, String renderer, BitmapImageSizing userBis) throws ImageOutputException + public void createPNG(File f, String renderer, BitmapImageSizing userBis) + throws ImageOutputException { alignPanel.makeAlignmentImage(TYPE.PNG, f, renderer, userBis); } @@ -1534,7 +1549,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, * * @param f */ - public void createEPS(File f) throws ImageOutputException + public void createEPS(File f) throws ImageOutputException { createEPS(f, null); } @@ -1550,7 +1565,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, * * @param f */ - public void createSVG(File f) throws ImageOutputException + public void createSVG(File f) throws ImageOutputException { createSVG(f, null); } @@ -2341,12 +2356,14 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, // annotation was duplicated earlier alignment.addAnnotation(sequences[i].getAnnotation()[a]); // take care of contact matrix too - ContactMatrixI cm=sequences[i].getContactMatrixFor(sequences[i].getAnnotation()[a]); - if (cm!=null) + ContactMatrixI cm = sequences[i] + .getContactMatrixFor(sequences[i].getAnnotation()[a]); + if (cm != null) { - alignment.addContactListFor(sequences[i].getAnnotation()[a], cm); + alignment.addContactListFor(sequences[i].getAnnotation()[a], + cm); } - + alignment.setAnnotationIndex(sequences[i].getAnnotation()[a], a); } @@ -3138,10 +3155,15 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, @Override public void wrapMenuItem_actionPerformed(ActionEvent e) { - scaleAbove.setVisible(wrapMenuItem.isSelected()); - scaleLeft.setVisible(wrapMenuItem.isSelected()); - scaleRight.setVisible(wrapMenuItem.isSelected()); - viewport.setWrapAlignment(wrapMenuItem.isSelected()); + setWrapFormat(wrapMenuItem.isSelected()); + } + + public void setWrapFormat(boolean b) + { + scaleAbove.setVisible(b); + scaleLeft.setVisible(b); + scaleRight.setVisible(b); + viewport.setWrapAlignment(b); alignPanel.updateLayout(); } @@ -4239,8 +4261,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, return tp; } - public void showContactMapTree(AlignmentAnnotation aa, - ContactMatrixI cm) + public void showContactMapTree(AlignmentAnnotation aa, ContactMatrixI cm) { int x = 4, y = 5; int w = 400, h = 500;