JAL-1355
[jalview.git] / src / jalview / gui / UserDefinedColours.java
index 053d38d..a16fdc7 100755 (executable)
@@ -1,23 +1,26 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
  * Jalview is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License 
- * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
  *  
  * Jalview is distributed in the hope that it will be useful, but 
  * WITHOUT ANY WARRANTY; without even the implied warranty 
  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
  * PURPOSE.  See the GNU General Public License for more details.
  * 
- * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
  */
 package jalview.gui;
 
+import jalview.api.structures.JalviewStructureDisplayI;
 import jalview.datamodel.SequenceGroup;
 import jalview.io.JalviewFileChooser;
 import jalview.jbgui.GUserDefinedColours;
@@ -65,7 +68,7 @@ public class UserDefinedColours extends GUserDefinedColours implements
 
   JInternalFrame frame;
 
-  AppJmol jmol;
+  JalviewStructureDisplayI jmol;
 
   Vector upperCaseButtons;
 
@@ -119,7 +122,7 @@ public class UserDefinedColours extends GUserDefinedColours implements
     showFrame();
   }
 
-  public UserDefinedColours(AppJmol jmol, ColourSchemeI oldcs)
+  public UserDefinedColours(JalviewStructureDisplayI jmol, ColourSchemeI oldcs)
   {
     super();
     this.jmol = jmol;
@@ -144,7 +147,9 @@ public class UserDefinedColours extends GUserDefinedColours implements
     colorChooser.getSelectionModel().addChangeListener(this);
     frame = new JInternalFrame();
     frame.setContentPane(this);
-    Desktop.addInternalFrame(frame, "User Defined Colours", 720, 370, true);
+    Desktop.addInternalFrame(frame,
+            MessageManager.getString("label.user_defined_colours"), 720,
+            370, true);
 
     if (seqGroup != null)
     {
@@ -504,8 +509,9 @@ public class UserDefinedColours extends GUserDefinedColours implements
             { "jc" }, new String[]
             { "Jalview User Colours" }, "Jalview User Colours");
     chooser.setFileView(new jalview.io.JalviewFileView());
-    chooser.setDialogTitle("Load colour scheme");
-    chooser.setToolTipText("Load");
+    chooser.setDialogTitle(MessageManager
+            .getString("label.load_colour_scheme"));
+    chooser.setToolTipText(MessageManager.getString("action.load"));
 
     int value = chooser.showOpenDialog(this);
 
@@ -711,19 +717,22 @@ public class UserDefinedColours extends GUserDefinedColours implements
   {
     if (schemeName.getText().trim().length() < 1)
     {
-      JOptionPane.showInternalMessageDialog(Desktop.desktop,
-              MessageManager.getString("label.user_colour_scheme_must_have_name"),
-              MessageManager.getString("label.no_name_colour_scheme"), JOptionPane.WARNING_MESSAGE);
+      JOptionPane.showInternalMessageDialog(Desktop.desktop, MessageManager
+              .getString("label.user_colour_scheme_must_have_name"),
+              MessageManager.getString("label.no_name_colour_scheme"),
+              JOptionPane.WARNING_MESSAGE);
       return;
     }
 
     if (userColourSchemes != null
             && userColourSchemes.containsKey(schemeName.getText()))
     {
-      int reply = JOptionPane.showInternalConfirmDialog(
-              Desktop.desktop,
-              MessageManager.formatMessage("label.colour_scheme_exists_overwrite", new String[]{schemeName.getText(),schemeName.getText()}),
-              MessageManager.getString("label.duplicate_scheme_name"), JOptionPane.YES_NO_OPTION);
+      int reply = JOptionPane.showInternalConfirmDialog(Desktop.desktop,
+              MessageManager.formatMessage(
+                      "label.colour_scheme_exists_overwrite", new String[]
+                      { schemeName.getText(), schemeName.getText() }),
+              MessageManager.getString("label.duplicate_scheme_name"),
+              JOptionPane.YES_NO_OPTION);
       if (reply != JOptionPane.YES_OPTION)
       {
         return;
@@ -737,8 +746,8 @@ public class UserDefinedColours extends GUserDefinedColours implements
             { "Jalview User Colours" }, "Jalview User Colours");
 
     chooser.setFileView(new jalview.io.JalviewFileView());
-    chooser.setDialogTitle("Save colour scheme");
-    chooser.setToolTipText("Save");
+    chooser.setDialogTitle(MessageManager.getString("label.save_colour_scheme"));
+    chooser.setToolTipText(MessageManager.getString("action.save"));
 
     int value = chooser.showSaveDialog(this);