From: gmungoc Date: Wed, 8 Feb 2017 14:43:36 +0000 (+0000) Subject: JAL-2401 fix for NPE on selectedButtons, tweak for button appearance X-Git-Tag: Release_2_10_3b1~356 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=599107bb6f835ae4dbc679cbff023800faba7992;p=jalview.git JAL-2401 fix for NPE on selectedButtons, tweak for button appearance --- diff --git a/src/jalview/gui/UserDefinedColours.java b/src/jalview/gui/UserDefinedColours.java index e1a43d9..10a9687 100755 --- a/src/jalview/gui/UserDefinedColours.java +++ b/src/jalview/gui/UserDefinedColours.java @@ -101,7 +101,7 @@ public class UserDefinedColours extends GUserDefinedColours implements */ public UserDefinedColours(AlignmentPanel ap, SequenceGroup sg) { - super(); + this(); lcaseColour.setEnabled(false); @@ -124,6 +124,7 @@ public class UserDefinedColours extends GUserDefinedColours implements { caseSensitive.setSelected(true); lcaseColour.setEnabled(true); + lcaseColour.setForeground(Color.GRAY); resetButtonPanel(true); } else @@ -142,7 +143,7 @@ public class UserDefinedColours extends GUserDefinedColours implements public UserDefinedColours(JalviewStructureDisplayI viewer, ColourSchemeI oldcs) { - super(); + this(); this.structureViewer = viewer; colorChooser.getSelectionModel().addChangeListener(this); @@ -161,6 +162,12 @@ public class UserDefinedColours extends GUserDefinedColours implements } + public UserDefinedColours() + { + super(); + selectedButtons = new ArrayList(); + } + void showFrame() { colorChooser.getSelectionModel().addChangeListener(this); @@ -629,6 +636,7 @@ public class UserDefinedColours extends GUserDefinedColours implements { caseSensitive.setSelected(true); lcaseColour.setEnabled(true); + lcaseColour.setForeground(Color.GRAY); resetButtonPanel(true); for (int i = 0; i < lowerCaseButtons.size(); i++) {