X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAppJmol.java;h=4379c20b628261f29e16650553225d59c55f5ea5;hb=25aaaa87042b3f507ad4348120df7dd073182759;hp=55288d0b4c166cd7243609ea771c5c2f49643432;hpb=c4ec878c9cb59fc40a88ed8ecdf5fda46f3de111;p=jalview.git diff --git a/src/jalview/gui/AppJmol.java b/src/jalview/gui/AppJmol.java index 55288d0..4379c20 100644 --- a/src/jalview/gui/AppJmol.java +++ b/src/jalview/gui/AppJmol.java @@ -1,5 +1,5 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1) * Copyright (C) 2014 The Jalview Authors * * This file is part of Jalview. @@ -147,9 +147,7 @@ public class AppJmol extends StructureViewerBase PDBEntry[] pdbentrys = new PDBEntry[files.length]; for (int i = 0; i < pdbentrys.length; i++) { - PDBEntry pdbentry = new PDBEntry(); - pdbentry.setFile(files[i]); - pdbentry.setId(ids[i]); + PDBEntry pdbentry = new PDBEntry(files[i], ids[i]); pdbentrys[i] = pdbentry; } // / TODO: check if protocol is needed to be set, and if chains are @@ -169,7 +167,7 @@ public class AppJmol extends StructureViewerBase seqColour.setSelected(false); viewerColour.setSelected(true); } - if (usetoColour) + else if (usetoColour) { useAlignmentPanelForColourbyseq(ap); jmb.setColourBySequence(true); @@ -427,118 +425,6 @@ public class AppJmol extends StructureViewerBase openNewJmol(ap, pe, seqs); } - public AlignmentPanel[] getAllAlignmentPanels() - { - AlignmentPanel[] t; - AlignmentPanel[] list = new AlignmentPanel[0]; - for (String setid : _aps) - { - AlignmentPanel[] panels = PaintRefresher.getAssociatedPanels(setid); - if (panels != null) - { - t = new AlignmentPanel[list.length + panels.length]; - System.arraycopy(list, 0, t, 0, list.length); - System.arraycopy(panels, 0, t, list.length, panels.length); - list = t; - } - } - - return list; - } - - /** - * set the primary alignmentPanel reference and add another alignPanel to the - * list of ones to use for colouring and aligning - * - * @param nap - */ - public void addAlignmentPanel(AlignmentPanel nap) - { - if (getAlignmentPanel() == null) - { - setAlignmentPanel(nap); - } - if (!_aps.contains(nap.av.getSequenceSetId())) - { - _aps.add(nap.av.getSequenceSetId()); - } - } - - /** - * remove any references held to the given alignment panel - * - * @param nap - */ - public void removeAlignmentPanel(AlignmentPanel nap) - { - try - { - _alignwith.remove(nap); - _colourwith.remove(nap); - if (getAlignmentPanel() == nap) - { - setAlignmentPanel(null); - for (AlignmentPanel aps : getAllAlignmentPanels()) - { - if (aps != nap) - { - setAlignmentPanel(aps); - break; - } - } - } - } catch (Exception ex) - { - } - if (getAlignmentPanel() != null) - { - buildActionMenu(); - } - } - - public void useAlignmentPanelForSuperposition(AlignmentPanel nap) - { - addAlignmentPanel(nap); - if (!_alignwith.contains(nap)) - { - _alignwith.add(nap); - } - } - - public void excludeAlignmentPanelForSuperposition(AlignmentPanel nap) - { - if (_alignwith.contains(nap)) - { - _alignwith.remove(nap); - } - } - - public void useAlignmentPanelForColourbyseq(AlignmentPanel nap, - boolean enableColourBySeq) - { - useAlignmentPanelForColourbyseq(nap); - getBinding().setColourBySequence(enableColourBySeq); - seqColour.setSelected(enableColourBySeq); - viewerColour.setSelected(!enableColourBySeq); - } - - public void useAlignmentPanelForColourbyseq(AlignmentPanel nap) - { - addAlignmentPanel(nap); - if (!_colourwith.contains(nap)) - { - _colourwith.add(nap); - } - } - - public void excludeAlignmentPanelForColourbyseq(AlignmentPanel nap) - { - if (_colourwith.contains(nap)) - { - _colourwith.remove(nap); - } - } - /** * pdb retrieval thread. */ @@ -1052,7 +938,7 @@ public class AppJmol extends StructureViewerBase // Set the colour using the current view for the associated alignframe for (AlignmentPanel ap : _colourwith) { - jmb.colourBySequence(ap.av.showSequenceFeatures, ap); + jmb.colourBySequence(ap.av.isShowSequenceFeatures(), ap); } } }