X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FFeatureColourChooser.java;h=d8db54657c628d40186a77e88b22efe7ca3df91c;hb=5eeb49c62b1004b1efe837a543c8ff84aa6d7faf;hp=396df04443a5427455083c47b532ad7913fb548e;hpb=3d0101179759ef157b088ea135423cd909512d9f;p=jalview.git diff --git a/src/jalview/gui/FeatureColourChooser.java b/src/jalview/gui/FeatureColourChooser.java index 396df04..d8db546 100644 --- a/src/jalview/gui/FeatureColourChooser.java +++ b/src/jalview/gui/FeatureColourChooser.java @@ -31,6 +31,8 @@ import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; @@ -145,7 +147,7 @@ public class FeatureColourChooser extends JalviewDialog */ if (ap != null) { - ap.paintAlignment(true); + ap.paintAlignment(true, true); } } }); @@ -288,6 +290,14 @@ public class FeatureColourChooser extends JalviewDialog thresholdValue_actionPerformed(); } }); + thresholdValue.addFocusListener(new FocusAdapter() + { + @Override + public void focusLost(FocusEvent e) + { + thresholdValue_actionPerformed(); + } + }); slider.setPaintLabels(false); slider.setPaintTicks(true); slider.setBackground(Color.white); @@ -386,9 +396,9 @@ public class FeatureColourChooser extends JalviewDialog * feature type, and repaints the alignment, and optionally the Overview * and/or structure viewer if open * - * @param updateOverview + * @param updateStructsAndOverview */ - void changeColour(boolean updateOverview) + void changeColour(boolean updateStructsAndOverview) { // Check if combobox is still adjusting if (adjusting) @@ -497,7 +507,7 @@ public class FeatureColourChooser extends JalviewDialog } fr.setColour(type, acg); cs = acg; - ap.paintAlignment(updateOverview); + ap.paintAlignment(updateStructsAndOverview, updateStructsAndOverview); } @Override @@ -529,7 +539,7 @@ public class FeatureColourChooser extends JalviewDialog void reset() { fr.setColour(type, oldcs); - ap.paintAlignment(true); + ap.paintAlignment(true, true); cs = null; } @@ -555,7 +565,7 @@ public class FeatureColourChooser extends JalviewDialog /* * force repaint of any Overview window or structure */ - ap.paintAlignment(true); + ap.paintAlignment(true, true); } catch (NumberFormatException ex) { }