JAL-2773 add new flag to paintAlignment(updateOverview,updateStructures) and first...
[jalview.git] / src / jalview / appletgui / UserDefinedColours.java
index 845110e..6831a73 100644 (file)
@@ -54,8 +54,8 @@ import java.awt.event.FocusListener;
 import java.awt.event.MouseEvent;
 import java.util.Vector;
 
-public class UserDefinedColours extends Panel implements ActionListener,
-        AdjustmentListener, FocusListener
+public class UserDefinedColours extends Panel
+        implements ActionListener, AdjustmentListener, FocusListener
 {
 
   AlignmentPanel ap;
@@ -64,7 +64,7 @@ public class UserDefinedColours extends Panel implements ActionListener,
 
   Button selectedButton;
 
-  Vector<Color> oldColours = new Vector<Color>();
+  Vector<Color> oldColours = new Vector<>();
 
   ColourSchemeI oldColourScheme;
 
@@ -214,9 +214,8 @@ public class UserDefinedColours extends Panel implements ActionListener,
       // // not 1.1 compatible!
       // dialog = new Dialog(((JVDialog)alignframe), title, true);
       // } else {
-      throw new Error(
-              MessageManager
-                      .getString("label.error_unsupported_owwner_user_colour_scheme"));
+      throw new Error(MessageManager.getString(
+              "label.error_unsupported_owwner_user_colour_scheme"));
     }
 
     dialog.add(this);
@@ -225,11 +224,12 @@ public class UserDefinedColours extends Panel implements ActionListener,
     int height = 160 + alignframe.getInsets().top + getInsets().bottom;
     int width = 400;
 
-    dialog.setBounds(alignframe.getBounds().x
-            + (alignframe.getSize().width - width) / 2,
+    dialog.setBounds(
+            alignframe.getBounds().x
+                    + (alignframe.getSize().width - width) / 2,
             alignframe.getBounds().y
-                    + (alignframe.getSize().height - height) / 2, width,
-            height);
+                    + (alignframe.getSize().height - height) / 2,
+            width, height);
 
   }
 
@@ -520,7 +520,7 @@ public class UserDefinedColours extends Panel implements ActionListener,
                 ap.av.isIgnoreGapsConsensus());
       }
       ap.seqPanel.seqCanvas.img = null;
-      ap.paintAlignment(true);
+      ap.paintAlignment(true, true);
     }
     else if (jmol != null)
     {
@@ -599,7 +599,7 @@ public class UserDefinedColours extends Panel implements ActionListener,
       {
         ap.av.setGlobalColourScheme(oldColourScheme);
       }
-      ap.paintAlignment(true);
+      ap.paintAlignment(true, true);
     }
 
     frame.setVisible(false);