From: amwaterhouse Date: Fri, 10 Dec 2004 14:38:41 +0000 (+0000) Subject: Colours set globally in viewport X-Git-Tag: Release_2_0~846 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=25effdb93ea664f42294ebf56d3b640d2f58a5f4;p=jalview.git Colours set globally in viewport --- diff --git a/src/jalview/gui/UserDefinedColours.java b/src/jalview/gui/UserDefinedColours.java index c78c093..a12672e 100755 --- a/src/jalview/gui/UserDefinedColours.java +++ b/src/jalview/gui/UserDefinedColours.java @@ -13,20 +13,19 @@ import java.util.*; public class UserDefinedColours extends GUserDefinedColours implements ChangeListener { - SeqPanel seqPanel; + AlignViewport av; ColourSchemeI colourScheme; JButton selectedButton; Vector oldColours = new Vector(); JInternalFrame frame; - public UserDefinedColours(JInternalFrame f, SeqPanel sp) + public UserDefinedColours(JInternalFrame f, AlignViewport av) { super(); colorChooser.getSelectionModel().addChangeListener(this); - seqPanel = sp; + this.av = av; frame = f; - colourScheme = seqPanel.getColourScheme(); - // colourScheme. + colourScheme = av.getGlobalColourScheme(); for(int i=0; i<20; i++) makeButton(ResidueProperties.aa2Triplet.get( ResidueProperties.aa[i] )+"", ResidueProperties.aa[i]); @@ -89,7 +88,7 @@ public class UserDefinedColours extends GUserDefinedColours implements ChangeLis ucs.setThreshold(0); ucs.setColourScheme( newColours ); - seqPanel.setColourScheme( ucs, false ); + av.setGlobalColourScheme( ucs ); } protected void loadbutton_actionPerformed(ActionEvent e) @@ -157,7 +156,7 @@ public class UserDefinedColours extends GUserDefinedColours implements ChangeLis } ucs.setColourScheme( newColours ); - seqPanel.setColourScheme( ucs, false ); + av.setGlobalColourScheme( ucs ); }