X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FTreeCanvas.java;h=180467a1ab4f0d1178ec62bb3d758ddee9c9823a;hb=49a555c3890bc93583a5e0d8f0f237db21f5e3d3;hp=f1bdd31616c5015abc3b1c4e442b25ebad8f7141;hpb=3f9e523aac2d14e9ce68e186365008bf6a62fcce;p=jalview.git diff --git a/src/jalview/gui/TreeCanvas.java b/src/jalview/gui/TreeCanvas.java index f1bdd31..180467a 100755 --- a/src/jalview/gui/TreeCanvas.java +++ b/src/jalview/gui/TreeCanvas.java @@ -77,9 +77,9 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, TreePanel tp; - AlignViewport av; + private AlignViewport av; - AlignmentPanel ap; + private AlignmentPanel ap; Font font; @@ -97,7 +97,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, int offy; - float threshold; + private float threshold; String longestName; @@ -127,7 +127,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, { this.tp = tp; this.av = ap.av; - this.ap = ap; + this.setAssociatedPanel(ap); font = av.getFont(); scrollPane = scroller; addMouseListener(this); @@ -836,7 +836,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, if (col != null) { setColor(highlightNode, col); - PaintRefresher.Refresh(tp, ap.av.getSequenceSetId()); + PaintRefresher.Refresh(tp, getAssociatedPanel().av.getSequenceSetId()); repaint(); } } @@ -917,7 +917,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, if (ob instanceof SequenceI) { treeSelectionChanged((Sequence) ob); - PaintRefresher.Refresh(tp, ap.av.getSequenceSetId()); + PaintRefresher.Refresh(tp, getAssociatedPanel().av.getSequenceSetId()); repaint(); av.sendSelection(); return; @@ -949,6 +949,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, .deleteAllGroups(); aps[a].av.getCodingComplement().clearSequenceColours(); } + aps[a].av.setUpdateStructures(true); } colourGroups(groups); @@ -962,7 +963,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, } } - PaintRefresher.Refresh(tp, ap.av.getSequenceSetId()); + PaintRefresher.Refresh(tp, getAssociatedPanel().av.getSequenceSetId()); repaint(); } @@ -1006,8 +1007,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, // Propagate group colours in each view if (viewport.getGlobalColourScheme() != null) { - cs = viewport.getGlobalColourScheme().getInstance(viewport, sg, - null); + cs = viewport.getGlobalColourScheme().getInstance(viewport, sg); sg.setColourScheme(cs); sg.getGroupColourScheme().setThreshold( viewport.getResidueShading().getThreshold(), @@ -1089,7 +1089,47 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, } else { - return new AlignmentPanel[] { ap }; + return new AlignmentPanel[] { getAssociatedPanel() }; } } + + public AlignmentPanel getAssociatedPanel() + { + return ap; + } + + public void setAssociatedPanel(AlignmentPanel ap) + { + this.ap = ap; + } + + public AlignViewport getViewport() + { + return av; + } + + public void setViewport(AlignViewport av) + { + this.av = av; + } + + public float getThreshold() + { + return threshold; + } + + public void setThreshold(float threshold) + { + this.threshold = threshold; + } + + public boolean isApplyToAllViews() + { + return this.applyToAllViews; + } + + public void setApplyToAllViews(boolean applyToAllViews) + { + this.applyToAllViews = applyToAllViews; + } }