X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FUserDefinedColours.java;h=a16fdc700464f4f493cef43848ca7147d9b3e997;hb=aced09c4feeaf3406269442c14e54abeeb4cad81;hp=60c45c5ca50ae6a42c59ee6bdb0d7b38c13ee014;hpb=59d682209891099d46b960509907c79e3fb276fe;p=jalview.git diff --git a/src/jalview/gui/UserDefinedColours.java b/src/jalview/gui/UserDefinedColours.java index 60c45c5..a16fdc7 100755 --- a/src/jalview/gui/UserDefinedColours.java +++ b/src/jalview/gui/UserDefinedColours.java @@ -1,28 +1,33 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8) - * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle + * 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 . + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * 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; import jalview.schemes.ColourSchemeI; import jalview.schemes.ResidueProperties; import jalview.schemes.UserColourScheme; +import jalview.util.MessageManager; import java.awt.Color; import java.awt.Font; @@ -63,7 +68,7 @@ public class UserDefinedColours extends GUserDefinedColours implements JInternalFrame frame; - AppJmol jmol; + JalviewStructureDisplayI jmol; Vector upperCaseButtons; @@ -117,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; @@ -142,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) { @@ -502,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); @@ -709,21 +717,22 @@ public class UserDefinedColours extends GUserDefinedColours implements { if (schemeName.getText().trim().length() < 1) { - JOptionPane.showInternalMessageDialog(Desktop.desktop, - "User colour scheme must have a name!", - "No name for 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, - "Colour scheme " + schemeName.getText() + " exists." - + "\nContinue saving colour scheme as " - + schemeName.getText() + "?", - "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);