X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignFrame.java;h=9aa8733e36920b13d36d5fe58c6e533b1cee57d1;hb=HEAD;hp=ac8ffb930f19ca8fc6d61735a6802e8c58ec920d;hpb=bd2ad93a3ea4075bc45528e3505e9510ffde835d;p=jalview.git diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index ac8ffb9..9aa8733 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -3572,8 +3572,12 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, final OverviewPanel overview = new OverviewPanel(alignPanel, frame, showHidden); frame.setContentPane(overview); - Desktop.addInternalFrame(frame, "", true, frame.getWidth(), - frame.getHeight(), true, true); + + alignPanel.setOverviewPanel(overview); + alignPanel.setOverviewTitle(this); + + Desktop.addInternalFrame(frame, overview.getTitle(), true, + frame.getWidth(), frame.getHeight(), true, true); frame.pack(); frame.setLayer(JLayeredPane.PALETTE_LAYER); final AlignmentPanel thePanel = this.alignPanel; @@ -3593,9 +3597,6 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, frame.addKeyListener(getKeyListeners()[0]); } - alignPanel.setOverviewPanel(overview); - alignPanel.setOverviewTitle(this); - return overview; } @@ -4818,7 +4819,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, * Object[] { String,SequenceI} */ ArrayList filesmatched = new ArrayList<>(); - ArrayList filesnotmatched = new ArrayList<>(); + ArrayList filesnotmatched = new ArrayList<>(); for (int i = 0; i < files.size(); i++) { // BH 2018 @@ -4864,9 +4865,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } mtch = idm.findAllIdMatches(pdbfn); } + FileFormatI type = null; if (mtch != null) { - FileFormatI type; try { type = new IdentifyFile().identify(file, protocol); @@ -4882,7 +4883,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } // File wasn't named like one of the sequences or wasn't a PDB // file. - filesnotmatched.add(file); + filesnotmatched.add(new Object[] { file, protocol, type }); } } int assocfiles = 0; @@ -4936,7 +4937,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, */ for (Object[] o : filesmatched) { - filesnotmatched.add(o[0]); + filesnotmatched.add(new Object[] { o[0], o[1] }); } } } @@ -4958,9 +4959,10 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, { return; } - for (Object fn : filesnotmatched) + for (Object[] fn : filesnotmatched) { - loadJalviewDataFile(fn, null, null, null); + loadJalviewDataFile(fn[0], (DataSourceType) fn[1], + (FileFormatI) fn[2], null); } } @@ -5056,7 +5058,19 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, { format = new IdentifyFile().identify(file, sourceType); } - if (FileFormat.ScoreMatrix == format) + if (FileFormat.FeatureSettings == format) + { + if (featureSettings != null) + { + featureSettings.load(file, sourceType); + } + else + { + FeatureSettings.loadFeatureSettingsFile(getFeatureRenderer(), + fileObject, sourceType); + } + } + else if (FileFormat.ScoreMatrix == format) { ScoreMatrixFile sm = new ScoreMatrixFile( new FileParse(file, sourceType)); @@ -5624,9 +5638,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, @Override protected void justifyLeftMenuItem_actionPerformed(ActionEvent e) { - AlignmentI al = viewport.getAlignment(); - al.justify(false); - viewport.firePropertyChange("alignment", null, al); + avc.justify_Region(true); } /** @@ -5635,9 +5647,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, @Override protected void justifyRightMenuItem_actionPerformed(ActionEvent e) { - AlignmentI al = viewport.getAlignment(); - al.justify(true); - viewport.firePropertyChange("alignment", null, al); + avc.justify_Region(false); } @Override @@ -5842,6 +5852,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } } alignPanel.validateAnnotationDimensions(true); + // TODO this triggers relayout of annotation panel - otherwise annotation + // label height is different to panel height + alignPanel.fontChanged(); alignPanel.alignmentChanged(); }