action.add = Add\r
action.save_as_default = Save as default\r
action.cancel_fetch = Cancel Fetch\r
-\r
+action.save_omit_hidden_columns = Save / Omit Hidden Columns\r
+action.change_font = Change Font\r
+action.colour = Colour\r
+action.calculate = Calculate\r
+action.select_all = Select all\r
+action.deselect_all = Deselect all\r
+action.invert_selection = Invert selection\r
+action.using_jmol = Using Jmol\r
+action.link = Link\r
+action.show_chain = Show Chain\r
label.str = Str:\r
label.seq = Seq:\r
label.structures_manager = Structures Manager\r
label.successfully_pasted_alignment_file = Successfully pasted alignment file\r
label.paste_your_alignment_file = Paste your alignment file here\r
label.paste_your = Paste your\r
-label.finished_searching = Finished searching.\r
+label.finished_searching = Finished searching\r
label.search_results= Search results {0} : {1}\r
label.found_match_for = Found match for {0}\r
label.font = Font:\r
label.selected_database_to_fetch_from = Selected {0} database {1} to fetch from {2} \r
label.database_param = Database: {0}\r
label.example_param = Example: {0}\r
+label.select_file_format_before_saving = You must select a file format before saving!\r
+label.file_format_not_specified = File format not specified\r
+label.alignment_contains_hidden_columns = The Alignment contains hidden columns.\nDo you want to save only the visible alignment?\r
+label.couldnt_save_file = Couldn't save file: {0}\r
+label.error_saving_file = Error Saving File\r
+label.remove_from_default_list = Remove from default list?\r
+label.remove_user_defined_colour = Remove user defined colour\r
+label.you_must_select_least_two_sequences = You must select at least 2 sequences.\r
+label.invalid_selection = Invalid Selection\r
+label.principal_component_analysis_must_take_least_four_input_sequences = Principal component analysis must take\nat least 4 input sequences.\r
+label.sequence_selection_insufficient = Sequence selection insufficient\r
+label.you_need_more_two_sequences_selected_build_tree = You need to have more than two sequences selected to build a tree!\r
+label.not_enough_sequences = Not enough sequences\r
+label.selected_region_to_tree_may_only_contain_residues_or_gaps = The selected region to create a tree may\nonly contain residues or gaps.\nTry using the Pad function in the edit menu,\nor one of the multiple sequence alignment web services.\r
+label.sequences_selection_not_aligned = Sequences in selection are not aligned\r
+label.sequences_must_be_aligned_before_creating_tree = The sequences must be aligned before creating a tree.\nTry using the Pad function in the edit menu,\n or one of the multiple sequence alignment web services.\r
+label.sequences_not_aligned = Sequences not aligned\r
+label.problem_reading_tree_file = Problem reading tree file\r
+label.possible_problem_with_tree_file = Possible problem with tree file\r
+label.select_at_least_three_bases_in_at_least_one_sequence_to_cDNA_translation = Please select at least three bases in at least one sequence in order to perform a cDNA translation.\r
+label.translation_failed = Translation Failed\r
+label.error_when_translating_sequences_submit_bug_report = Unfortunately, something went wrong when translating your sequences.\nPlease take a look in the Jalview java console\nand submit a bug report including the stacktrace.\r
+label.implementation_error = Implementation error:\r
+label.automatically_associate_pdb_files_with_sequences_same_name = Do you want to automatically associate the {0} PDB files with sequences in the alignment that have the same name?\r
+label.automatically_associate_pdb_files_by_name = Automatically Associate PDB files by name\r
+label.ignore_unmatched_dropped_files_info = <html>Do you want to <em>ignore</em> the {0} files whose names did not match any sequence IDs ?</html>\r
+label.ignore_unmatched_dropped_files = Ignore unmatched dropped files?\r
+label.enter_view_name = Enter View Name\r
+label.enter_label = Enter label\r
+label.enter_label_for_the_structure = Enter a label for the structure?\r
+label.pdb_entry_is_already_displayed = {0} is already displayed.\nDo you want to re-use this viewer ?\r
+label.map_sequences_to_visible_window = Map Sequences to Visible Window: {0}\r
+label.add_pdbentry_to_view = Do you want to add {0} to the view called\n'{1}'\n\r
+label.align_to_existing_structure_view = Align to existing structure view\r
+label.pdb_entries_couldnt_be_retrieved = The following pdb entries could not be retrieved from the PDB\:\n{0}\nPlease try downloading them manually.\r
+label.couldnt_load_file = Couldn't load file\r
+label.couldnt_find_pdb_id_in_file = Couldn't find a PDB id in the file supplied. Please enter an Id to identify this structure.\r
+label.no_pdb_id_in_file = No PDB Id in File\r
+label.couldnt_read_pasted_text = Couldn't read the pasted text {0}\r
+label.error_parsing_text = Error parsing text\r
+label.enter_local_das_source = Enter Nickname & URL of Local DAS Source\r
+label.you_can_only_edit_or_remove_local_das_sources = You can only edit or remove local DAS Sources!\r
+label.public_das_source = Public DAS source - not editable\r
+label.input_alignment_from_url = Input Alignment From URL\r
+label.couldnt_import_as_vamsas_session = Couldn't import '{0}' as a new vamsas session.\r
+label.vamsas_document_import_failed = Vamsas Document Import Failed\r
+label.couldnt_locate = Couldn't locate {0}\r
+label.url_not_found = URL not found\r
+label.no_link_selected = No link selected\r
+label.new_sequence_url_link = New sequence URL link\r
+label.cannot_edit_annotations_in_wrapped_view = Cannot edit annotations in wrapped view\r
+label.wrapped_view_no_edit = Wrapped view - no edit\r
+label.error_retrieving_data = Error Retrieving Data\r
+label.user_colour_scheme_must_have_name = User colour scheme must have a name\r
+label.no_name_colour_scheme = No name for colour scheme\r
+label.invalid_url = Invalid URL !\r
+label.error_loading_file = Error loading file\r
+label.problems_opening_file = Encountered problems opening {0}!!\r
+label.file_open_error = File open error\r
+label.no_das_sources_selected_warn = No das sources were selected.\nPlease select some sources and\ntry again.\r
+label.no_das_sources_selected_title = No DAS Sources Selected\r
+label.colour_scheme_exists_overwrite = Colour scheme {0} exists.\nContinue saving colour scheme as {1}?"\r
+label.duplicate_scheme_name = Duplicate scheme name\r
+label.jalview_new_questionnaire = There is a new Questionnaire available. Would you like to complete it now ?\n\r
+label.jalview_user_survey = Jalview User Survey\r
+label.alignment_properties = Alignment Properties: {0}\r
+label.alignment_props = Alignment Properties\r
+label.input_cut_paste = Cut & Paste Input\r
+label.alignment_output_command = Alignment output - {0}\r
+label.annotations = Annotations\r
+label.features = Features\r
+label.overview_params = Overview {0}\r
+label.paste_newick_file = Paste Newick file\r
+label.load_tree_from_file = From File - \r
+label.colour_by_annotation = Colour by Annotation\r
+label.selection_output_command = Selection output - {0}\r
+label.annotation_for_displayid = <p><h2>Annotation for {0} </h2></p><p>\r
+label.pdb_sequence_mapping = PDB - Sequence Mapping\r
+label.pca_details = PCA details\r
+label.redundancy_threshold_selection = Redundancy threshold selection\r
+label.user_defined_colours = User defined colours\r
+label.jalviewLite_release = JalviewLite - Release {0}\r
+label.jaview_build_date = Build date: {0}\r
+label.jalview_authors_1 = Authors: Jim Procter, Andrew Waterhouse, Jan Engelhardt, Lauren Lui,\r
+label.jalview_authors_2 = Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton.\r
+label.jalview_dev_managers = Development managed by The Barton Group, University of Dundee, Scotland, UK.\r
+label.jalview_distribution_lists = For help, see the FAQ at www.jalview.org and/or join the jalview-discuss@jalview.org mailing list\r
+label.jalview_please_cite = If you use Jalview, please cite:\r
+label.jalview_cite_1_authors = Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009)\r
+label.jalview_cite_1_title = Jalview Version 2 - a multiple sequence alignment editor and analysis workbench\r
+label.jalview_cite_1_ref = Bioinformatics doi: 10.1093/bioinformatics/btp033\r
+label.right_click = Right click\r
+label.to_add_annotation = to add annotation\r
+label.alignment_has_no_annotations = Alignment has no annotations\r
+label.retrieving_pdb_data = Retrieving PDB data...\r
+label.label = Label\r
+label.no_features_added_to_this_alignment = No Features added to this alignment!!\r
+label.features_can_be_added_from_searches_1 = (Features can be added from searches or\r
+label.features_can_be_added_from_searches_2 = from Jalview / GFF features files)\r
+label.calculating_pca= Calculating PCA\r
+label.reveal_columns = Reveal Columns\r
+label.jalview_cannot_open_file = Jalview can't open file\r
+label.jalview_applet = Jalview applet\r
+label.loading_data = Loading data\r
+label.memory_stats = Total Free Memory: {0} MB; Max Memory: {1} MB; {2} %\r
+label.calculating_tree = Calculating tree\r
+label.state_queueing = queuing\r
+label.state_running = running\r
+label.state_complete = complete\r
+label.state_job_cancelled = job cancelled!!\r
+label.state_job_error = job error!\r
+label.server_error_try_later = Server Error! (try later)\r
+label.error_loading_pdb_data = Error loading PDB data!!\r
+label.fetching_pdb_data = Fetching PDB data...\r
+label.structure_type = Structure_type\r
+label.settings_for_type = Settings for {0}\r
+label.view_full_application = View in Full Application\r
+label.load_associated_tree = Load Associated Tree ...\r
+label.load_features_annotations = Load Features/Annotations ...\r
+label.export_features = Export Features ...\r
+label.export_annotations = Export Annotations ...\r
+label.jalview_copy = Copy (Jalview Only)\r
+label.jalview_cut = Cut (Jalview Only)\r
+label.to_upper_case = To Upper Case\r
+label.to_lower_case = To Lower Case\r
+label.toggle_case = Toggle Case\r
+label.edit_name_description = Edit Name/Description\r
+label.create_sequence_feature = Create Sequence Feature\r
+label.edit_sequence = Edit Sequence\r
+label.sequence_details = Sequence Details\r
+label.jmol_help = Jmol Help\r
+label.all = All\r
+label.sort_by_score = Sort by Score\r
+label.sort_by_density = Sort by Density\r
+label.reveal = Reveal\r
+label.hide_columns = Hide Columns\r
import jalview.appletgui.*;
import jalview.structure.*;
+import jalview.util.MessageManager;
public class AppletPDBCanvas extends Panel implements MouseListener,
MouseMotionListener, StructureListener
g.fillRect(0, 0, getSize().width, getSize().height);
g.setColor(Color.black);
g.setFont(new Font("Verdana", Font.BOLD, 14));
- g.drawString("Error loading PDB data!!", 50, getSize().height / 2);
+ g.drawString(MessageManager.getString("label.error_loading_pdb_data"), 50, getSize().height / 2);
return;
}
{
g.setColor(Color.black);
g.setFont(new Font("Verdana", Font.BOLD, 14));
- g.drawString("Fetching PDB data...", 50, getSize().height / 2);
+ g.drawString(MessageManager.getString("label.fetching_pdb_data"), 50, getSize().height / 2);
return;
}
false, null);
Frame frame = new Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame, "PDB - Sequence Mapping",
+ jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.pdb_sequence_mapping"),
500, 600);
cap.setText(pdbcanvas.mappingDetails.toString());
import jalview.gui.*;
import jalview.io.*;
import jalview.schemes.*;
+import jalview.util.MessageManager;
import jalview.ws.ebi.EBIFetchClient;
public class PDBViewer extends JInternalFrame implements Runnable
int option = JOptionPane.showInternalConfirmDialog(
jalview.gui.Desktop.desktop,
- "Remove from default list?",
- "Remove user defined colour",
+ MessageManager.getString("label.remove_from_default_list"),
+ MessageManager.getString("label.remove_user_defined_colour"),
JOptionPane.YES_NO_OPTION);
if (option == JOptionPane.YES_OPTION)
{
CheckboxMenuItem displayNonconserved = new CheckboxMenuItem();
- Menu editMenu = new Menu("Edit");
+ Menu editMenu = new Menu(MessageManager.getString("action.edit"));
- MenuItem copy = new MenuItem("Copy (Jalview Only)");
+ MenuItem copy = new MenuItem(MessageManager.getString("label.jalview_copy"));
- MenuItem cut = new MenuItem("Cut (Jalview Only)");
+ MenuItem cut = new MenuItem(MessageManager.getString("label.jalview_cut"));
- MenuItem toUpper = new MenuItem("To Upper Case");
+ MenuItem toUpper = new MenuItem(MessageManager.getString("label.to_upper_case"));
- MenuItem toLower = new MenuItem("To Lower Case");
+ MenuItem toLower = new MenuItem(MessageManager.getString("label.to_lower_case"));
- MenuItem toggleCase = new MenuItem("Toggle Case");
+ MenuItem toggleCase = new MenuItem(MessageManager.getString("label.toggle_case"));
Menu outputmenu = new Menu();
MenuItem repGroup = new MenuItem();
- MenuItem sequenceName = new MenuItem("Edit Name/Description");
+ MenuItem sequenceName = new MenuItem(MessageManager.getString("label.edit_name_description"));
- MenuItem sequenceFeature = new MenuItem("Create Sequence Feature");
+ MenuItem sequenceFeature = new MenuItem(MessageManager.getString("label.create_sequence_feature"));
- MenuItem editSequence = new MenuItem("Edit Sequence");
+ MenuItem editSequence = new MenuItem(MessageManager.getString("label.edit_sequence"));
- MenuItem sequenceDetails = new MenuItem("Sequence Details ...");
+ MenuItem sequenceDetails = new MenuItem(MessageManager.getString("label.sequence_details") + "...");
- MenuItem selSeqDetails = new MenuItem("Sequence Details ...");
+ MenuItem selSeqDetails = new MenuItem(MessageManager.getString("label.sequence_details") + "...");
Sequence seq;
if (links != null && links.size() > 0)
{
- Menu linkMenu = new Menu("Link");
+ Menu linkMenu = new Menu(MessageManager.getString("action.link"));
String link;
for (int i = 0; i < links.size(); i++)
{
Frame frame = new Frame();
frame.add(cap);
jalview.bin.JalviewLite.addFrame(frame,
- "Selection output - " + e.getActionCommand(), 600, 500);
+ MessageManager.formatMessage("label.selection_output_command", new String[]{e.getActionCommand()}),600, 500);
// JBPNote: getSelectionAsNewSequence behaviour has changed - this method
// now returns a full copy of sequence data
// TODO consider using getSequenceSelection instead here
StringBuffer contents = new StringBuffer();
for (SequenceI seq : sequences)
{
- contents.append("<p><h2>Annotation for " + seq.getDisplayId(true)
- + "</h2></p><p>");
+ contents.append(MessageManager.formatMessage("label.annotation_for_displayid",new String[]{seq.getDisplayId(true)}));
new SequenceAnnotationReport(null)
.createSequenceAnnotationReport(
contents,
cap.setText(contents.toString());
Frame frame = new Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame, "Alignment Properties: "
- + getTitle(), 400, 250);
+ jalview.bin.JalviewLite.addFrame(frame, MessageManager.formatMessage("label.alignment_properties", new String[]{getTitle()}),
+ 400, 250);
}
else if (source == overviewMenuItem)
{
CutAndPasteTransfer cap = new CutAndPasteTransfer(true, this);
Frame frame = new Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame, "Cut & Paste Input", 500, 500);
+ jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.input_cut_paste"), 500, 500);
}
protected void outputText_actionPerformed(ActionEvent e)
Frame frame = new Frame();
frame.add(cap);
jalview.bin.JalviewLite.addFrame(frame,
- "Alignment output - " + e.getActionCommand(), 600, 500);
+ MessageManager.formatMessage("label.alignment_output_command", new String[]{e.getActionCommand()}),600, 500);
cap.setText(new AppletFormatAdapter().formatSequences(
e.getActionCommand(), viewport.getAlignment(),
viewport.showJVSuffix));
CutAndPasteTransfer cap = new CutAndPasteTransfer(false, this);
Frame frame = new Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame, "Annotations", 600, 500);
+ jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.annotations"), 600, 500);
cap.setText(annotation);
}
}
Frame frame = new Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame, "Features", 600, 500);
+ jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.features"), 600, 500);
cap.setText(features);
}
else
OverviewPanel overview = new OverviewPanel(alignPanel);
frame.add(overview);
// +50 must allow for applet frame window
- jalview.bin.JalviewLite.addFrame(frame, "Overview " + this.getTitle(),
+ jalview.bin.JalviewLite.addFrame(frame, MessageManager.formatMessage("label.overview_params", new String[]{this.getTitle()}),
overview.getPreferredSize().width,
overview.getPreferredSize().height + 50);
{
Frame frame = new Frame();
frame.add(new PairwiseAlignPanel(alignPanel));
- jalview.bin.JalviewLite.addFrame(frame, "Pairwise Alignment", 600,
+ jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("action.pairwise_alignment"), 600,
500);
}
}
cap.setTreeImport();
Frame frame = new Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame, "Paste Newick file ", 400, 300);
+ jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.paste_newick_file"), 400, 300);
}
public void loadTree(jalview.io.NewickFile tree, String treeFile)
{
- TreePanel tp = new TreePanel(alignPanel, treeFile, "From File - ", tree);
+ TreePanel tp = new TreePanel(alignPanel, treeFile, MessageManager.getString("label.load_tree_from_file"), tree);
jalview.bin.JalviewLite.addFrame(tp, treeFile, 600, 500);
addTreeMenuItem(tp, treeFile);
}
// TODO: update this text for each release or centrally store it for
// lite and application
g.setFont(new Font("Helvetica", Font.BOLD, 14));
- g.drawString("JalviewLite - Release " + version, x, y += fh);
+ g.drawString(MessageManager.formatMessage("label.jalviewLite_release", new String[]{version}), x, y += fh);
g.setFont(new Font("Helvetica", Font.BOLD, 12));
- g.drawString("Build date: " + builddate, x, y += fh);
+ g.drawString(MessageManager.formatMessage("label.jaview_build_date", new String[]{builddate}), x, y += fh);
g.setFont(new Font("Helvetica", Font.PLAIN, 12));
g.drawString(
- "Authors: Jim Procter, Andrew Waterhouse, Jan Engelhardt, Lauren Lui,",
+ MessageManager.getString("label.jalview_authors_1"),
x, y += fh * 1.5);
- g.drawString("Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton.", x + 50, y += fh+8);
+ g.drawString(MessageManager.getString("label.jalview_authors_2"), x + 50, y += fh+8);
g.drawString(
- "Development managed by The Barton Group, University of Dundee, Scotland, UK.",
+ MessageManager.getString("label.jalview_dev_managers"),
x, y += fh);
g.drawString(
- "For help, see the FAQ at www.jalview.org and/or join the jalview-discuss@jalview.org mailing list",
+ MessageManager.getString("label.jalview_distribution_lists"),
x, y += fh);
- g.drawString("If you use Jalview, please cite:", x, y += fh + 8);
+ g.drawString(MessageManager.getString("label.jalview_please_cite"), x, y += fh + 8);
g.drawString(
- "Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009)",
+ MessageManager.getString("label.jalview_cite_1_authors"),
x, y += fh);
g.drawString(
- "Jalview Version 2 - a multiple sequence alignment editor and analysis workbench",
+ MessageManager.getString("label.jalview_cite_1_title"),
x, y += fh);
- g.drawString("Bioinformatics doi: 10.1093/bioinformatics/btp033",
+ g.drawString(MessageManager.getString("label.jalview_cite_1_ref"),
x, y += fh);
}
}
Frame frame = new Frame();
frame.add(new AboutPanel(JalviewLite.getVersion(), JalviewLite
.getBuildDate()));
- jalview.bin.JalviewLite.addFrame(frame, "Jalview", 580, 220);
+ jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.jalview"), 580, 220);
}
MenuBar alignFrameMenuBar = new MenuBar();
- Menu fileMenu = new Menu("File");
+ Menu fileMenu = new Menu(MessageManager.getString("action.file"));
- MenuItem loadApplication = new MenuItem("View in Full Application");
+ MenuItem loadApplication = new MenuItem(MessageManager.getString("label.view_full_application"));
- MenuItem loadTree = new MenuItem("Load Associated Tree ...");
+ MenuItem loadTree = new MenuItem(MessageManager.getString("label.load_associated_tree"));
- MenuItem loadAnnotations = new MenuItem("Load Features/Annotations ...");
+ MenuItem loadAnnotations = new MenuItem(MessageManager.getString("label.load_features_annotations"));
- MenuItem outputFeatures = new MenuItem("Export Features ...");
+ MenuItem outputFeatures = new MenuItem(MessageManager.getString("label.export_features"));
- MenuItem outputAnnotations = new MenuItem("Export Annotations ...");
+ MenuItem outputAnnotations = new MenuItem(MessageManager.getString("label.export_annotations"));
- MenuItem closeMenuItem = new MenuItem("Close");
+ MenuItem closeMenuItem = new MenuItem(MessageManager.getString("action.close"));
- Menu editMenu = new Menu("Edit");
+ Menu editMenu = new Menu(MessageManager.getString("action.edit"));
- Menu viewMenu = new Menu("View");
+ Menu viewMenu = new Menu(MessageManager.getString("action.view"));
- Menu colourMenu = new Menu("Colour");
+ Menu colourMenu = new Menu(MessageManager.getString("action.colour"));
- Menu calculateMenu = new Menu("Calculate");
+ Menu calculateMenu = new Menu(MessageManager.getString("action.calculate"));
- MenuItem selectAllSequenceMenuItem = new MenuItem("Select all");
+ MenuItem selectAllSequenceMenuItem = new MenuItem(MessageManager.getString("action.select_all"));
- MenuItem deselectAllSequenceMenuItem = new MenuItem("Deselect All");
+ MenuItem deselectAllSequenceMenuItem = new MenuItem(MessageManager.getString("action.deselect_all"));
- MenuItem invertSequenceMenuItem = new MenuItem("Invert Selection");
+ MenuItem invertSequenceMenuItem = new MenuItem(MessageManager.getString("action.invert_selection"));
MenuItem remove2LeftMenuItem = new MenuItem();
CheckboxMenuItem displayNonconservedMenuItem = new CheckboxMenuItem();
- MenuItem alProperties = new MenuItem("Alignment Properties...");
+ MenuItem alProperties = new MenuItem(MessageManager.getString("label.alignment_props"));
MenuItem overviewMenuItem = new MenuItem();
frame = new Frame();
frame.add(this);
- jalview.bin.JalviewLite.addFrame(frame, "Colour by Annotation", 560,
+ jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.colour_by_annotation"), 560,
175);
validate();
}
import java.awt.event.*;
import jalview.datamodel.*;
+import jalview.util.MessageManager;
import jalview.util.ParseHtmlBodyAndLinks;
public class AnnotationLabels extends Panel implements ActionListener,
if ((evt.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK)
{
- PopupMenu popup = new PopupMenu("Annotations");
+ PopupMenu popup = new PopupMenu(MessageManager.getString("label.annotations"));
MenuItem item = new MenuItem(ADDNEW);
item.addActionListener(this);
if (!av.wrapAlignment && ((aa == null) || (aa.length < 1)))
{
g.setColor(Color.black);
- g.drawString("Right click", 2, 8);
- g.drawString("to add annotation", 2, 18);
+ g.drawString(MessageManager.getString("label.right_click"), 2, 8);
+ g.drawString(MessageManager.getString("label.to_add_annotation"), 2, 18);
}
}
}
import jalview.datamodel.*;
import jalview.renderer.AnnotationRenderer;
import jalview.renderer.AwtRenderPanelI;
+import jalview.util.MessageManager;
public class AnnotationPanel extends Panel implements AwtRenderPanelI,
AdjustmentListener, ActionListener, MouseListener,
return;
}
- PopupMenu pop = new PopupMenu("Structure type");
+ PopupMenu pop = new PopupMenu(MessageManager.getString("label.structure_type"));
MenuItem item;
/*
* Just display the needed structure options
g.setColor(Color.black);
if (av.validCharWidth)
{
- g.drawString("Alignment has no annotations", 20, 15);
+ g.drawString(MessageManager.getString("label.alignment_has_no_annotations"), 20, 15);
}
return;
import jalview.io.*;
import jalview.schemes.*;
+import jalview.util.MessageManager;
public class AppletJmol extends EmbmenuFrame implements
// StructureListener,
KeyListener, ActionListener, ItemListener, SequenceStructureBinding
{
- Menu fileMenu = new Menu("File");
+ Menu fileMenu = new Menu(MessageManager.getString("action.file"));
- Menu viewMenu = new Menu("View");
+ Menu viewMenu = new Menu(MessageManager.getString("action.view"));
- Menu coloursMenu = new Menu("Colours");
+ Menu coloursMenu = new Menu(MessageManager.getString("action.colour"));
- Menu chainMenu = new Menu("Show Chain");
+ Menu chainMenu = new Menu(MessageManager.getString("action.show_chain"));
- Menu helpMenu = new Menu("Help");
+ Menu helpMenu = new Menu(MessageManager.getString("action.help"));
- MenuItem mappingMenuItem = new MenuItem("View Mapping");
+ MenuItem mappingMenuItem = new MenuItem(MessageManager.getString("label.view_mapping"));
- CheckboxMenuItem seqColour = new CheckboxMenuItem("By Sequence", true);
+ CheckboxMenuItem seqColour = new CheckboxMenuItem(MessageManager.getString("action.by_sequence"), true);
- CheckboxMenuItem jmolColour = new CheckboxMenuItem("Using Jmol", false);
+ CheckboxMenuItem jmolColour = new CheckboxMenuItem(MessageManager.getString("action.using_jmol"), false);
- MenuItem chain = new MenuItem("By Chain");
+ MenuItem chain = new MenuItem(MessageManager.getString("action.by_chain"));
- MenuItem charge = new MenuItem("Charge & Cysteine");
+ MenuItem charge = new MenuItem(MessageManager.getString("label.charge_cysteine"));
- MenuItem zappo = new MenuItem("Zappo");
+ MenuItem zappo = new MenuItem(MessageManager.getString("label.zappo"));
- MenuItem taylor = new MenuItem("Taylor");
+ MenuItem taylor = new MenuItem(MessageManager.getString("label.taylor"));
- MenuItem hydro = new MenuItem("Hydrophobicity");
+ MenuItem hydro = new MenuItem(MessageManager.getString("label.hydrophobicity"));
- MenuItem helix = new MenuItem("Helix Propensity");
+ MenuItem helix = new MenuItem(MessageManager.getString("label.helix_propensity"));
- MenuItem strand = new MenuItem("Strand Propensity");
+ MenuItem strand = new MenuItem(MessageManager.getString("label.strand_propensity"));
- MenuItem turn = new MenuItem("Turn Propensity");
+ MenuItem turn = new MenuItem(MessageManager.getString("label.turn_propensity"));
- MenuItem buried = new MenuItem("Buried Index");
+ MenuItem buried = new MenuItem(MessageManager.getString("label.buried_index"));
- MenuItem purinepyrimidine = new MenuItem("Purine/Pyrimidine");
+ MenuItem purinepyrimidine = new MenuItem(MessageManager.getString("label.purine_pyrimidine"));
- MenuItem user = new MenuItem("User Defined Colours");
+ MenuItem user = new MenuItem(MessageManager.getString("label.user_defined_colours"));
- MenuItem jmolHelp = new MenuItem("Jmol Help");
+ MenuItem jmolHelp = new MenuItem(MessageManager.getString("label.jmol_help"));
Panel scriptWindow;
{
chainMenu.removeAll();
- MenuItem menuItem = new MenuItem("All");
+ MenuItem menuItem = new MenuItem(MessageManager.getString("label.all"));
menuItem.addActionListener(this);
chainMenu.add(menuItem);
.println("Out of memory when trying to create dialog box with sequence-structure mapping.");
return;
}
- jalview.bin.JalviewLite.addFrame(frame, "PDB - Sequence Mapping",
+ jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.pdb_sequence_mapping"),
550, 600);
}
else if (evt.getSource() == charge)
g.fillRect(0, 0, currentSize.width, currentSize.height);
g.setColor(Color.white);
g.setFont(new Font("Verdana", Font.BOLD, 14));
- g.drawString("Retrieving PDB data....", 20, currentSize.height / 2);
+ g.drawString(MessageManager.getString("label.retrieving_pdb_data"), 20, currentSize.height / 2);
}
else
{
g.setColor(Color.black);
Font f = new Font("Verdana", Font.PLAIN, 10);
g.setFont(f);
- g.drawString("Label", 0, 0);
+ g.drawString(MessageManager.getString("label.label"), 0, 0);
}
else
{
import jalview.datamodel.*;
import jalview.schemes.AnnotationColourGradient;
import jalview.schemes.GraduatedColor;
+import jalview.util.MessageManager;
public class FeatureSettings extends Panel implements ItemListener,
MouseListener, MouseMotionListener, ActionListener,
height = Math.max(200, height);
height = Math.min(400, height);
int width = 300;
- jalview.bin.JalviewLite.addFrame(frame, "Feature Settings", width,
+ jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.feature_settings"), width,
height);
}
public void paint(Graphics g)
{
g.setColor(Color.black);
- g.drawString("No Features added to this alignment!!", 10, 20);
- g.drawString("(Features can be added from searches or", 10, 40);
- g.drawString("from Jalview / GFF features files)", 10, 60);
+ g.drawString(MessageManager.getString("label.no_features_added_to_this_alignment"), 10, 20);
+ g.drawString(MessageManager.getString("label.features_can_be_added_from_searches_1"), 10, 40);
+ g.drawString(MessageManager.getString("label.features_can_be_added_from_searches_2"), 10, 60);
}
protected void popupSort(final MyCheckbox check, final Hashtable minmax,
{
final String type = check.type;
final Object typeCol = fr.getFeatureStyle(type);
- java.awt.PopupMenu men = new PopupMenu("Settings for " + type);
- java.awt.MenuItem scr = new MenuItem("Sort by Score");
+ java.awt.PopupMenu men = new PopupMenu(MessageManager.formatMessage("label.settings_for_type", new String[]{type}));
+ java.awt.MenuItem scr = new MenuItem(MessageManager.getString("label.sort_by_score"));
men.add(scr);
final FeatureSettings me = this;
scr.addActionListener(new ActionListener()
}
});
- MenuItem dens = new MenuItem("Sort by Density");
+ MenuItem dens = new MenuItem(MessageManager.getString("label.sort_by_density"));
dens.addActionListener(new ActionListener()
{
this.ap = ap;
frame = new Frame();
frame.add(this);
- jalview.bin.JalviewLite.addFrame(frame, "Find", 340, 120);
+ jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("action.find"), 340, 120);
frame.repaint();
frame.addWindowListener(new WindowAdapter()
{
Frame frame = new Frame();
this.frame = frame;
frame.add(this);
- jalview.bin.JalviewLite.addFrame(frame, "Change Font", 440, 115);
+ jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("action.change_font"), 440, 115);
init = false;
}
embedMenuIfNeeded(rc);
add(rc, BorderLayout.CENTER);
- jalview.bin.JalviewLite.addFrame(this, "Principal component analysis",
+ jalview.bin.JalviewLite.addFrame(this, MessageManager.getString("label.principal_component_analysis"),
475, 400);
Thread worker = new Thread(this);
CutAndPasteTransfer cap = new CutAndPasteTransfer(false, null);
Frame frame = new Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame, "PCA details", 500, 500);
+ jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.pca_details"), 500, 500);
cap.setText(pcaModel.getDetails());
}
frame = new Frame();
frame.add(this);
jalview.bin.JalviewLite.addFrame(frame,
- "Redundancy threshold selection", 400, 100);
+ MessageManager.getString("label.redundancy_threshold_selection"), 400, 100);
frame.addWindowListener(this);
if (points == null)
{
g.setFont(new Font("Verdana", Font.PLAIN, 18));
- g.drawString("Calculating PCA....", 20, getSize().height / 2);
+ g.drawString(MessageManager.getString("label.calculating_pca") + "....", 20, getSize().height / 2);
}
else
{
import java.awt.event.*;
import jalview.datamodel.*;
+import jalview.util.MessageManager;
public class ScalePanel extends Panel implements MouseMotionListener,
MouseListener
PopupMenu pop = new PopupMenu();
if (reveal != null)
{
- MenuItem item = new MenuItem("Reveal");
+ MenuItem item = new MenuItem(MessageManager.getString("label.reveal"));
item.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
if (av.getColumnSelection().getHiddenColumns().size() > 1)
{
- item = new MenuItem("Reveal All");
+ item = new MenuItem(MessageManager.getString("action.reveal_all"));
item.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
}
else if (av.getColumnSelection().contains(res))
{
- MenuItem item = new MenuItem("Hide Columns");
+ MenuItem item = new MenuItem(MessageManager.getString("label.hide_columns"));
item.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
if (reveal != null && reveal[0] > startx && reveal[0] < endx)
{
- gg.drawString("Reveal Columns", reveal[0] * av.charWidth, 0);
+ gg.drawString(MessageManager.getString("label.reveal_columns"), reveal[0] * av.charWidth, 0);
}
}
}
frame = new Frame();
frame.add(this);
- jalview.bin.JalviewLite.addFrame(frame, "User defined colours", 420,
+ jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.user_defined_colours"), 420,
345);
if (seqGroup != null)
g.setColor(Color.cyan);
g.fillRect(0, 0, getSize().width, getSize().height);
g.setColor(Color.red);
- g.drawString("Jalview can't open file", 5, 15);
+ g.drawString(MessageManager.getString("label.jalview_cannot_open_file"), 5, 15);
g.drawString("\"" + file + "\"", 5, 30);
}
else if (embedded)
{
g.setColor(Color.black);
g.setFont(new Font("Arial", Font.BOLD, 24));
- g.drawString("Jalview Applet", 50, getSize().height / 2 - 30);
- g.drawString("Loading Data...", 50, getSize().height / 2);
+ g.drawString(MessageManager.getString("label.jalview_applet"), 50, getSize().height / 2 - 30);
+ g.drawString(MessageManager.getString("label.loading_data") + "...", 50, getSize().height / 2);
}
}
if (currentFileFormat == null)
{
JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "You must select a file format before saving!",
- "File format not specified", JOptionPane.WARNING_MESSAGE);
+ MessageManager.getString("label.select_file_format_before_saving"),
+ MessageManager.getString("label.file_format_not_specified"), JOptionPane.WARNING_MESSAGE);
value = chooser.showSaveDialog(this);
return;
}
int reply = JOptionPane
.showInternalConfirmDialog(
Desktop.desktop,
- "The Alignment contains hidden columns."
- + "\nDo you want to save only the visible alignment?",
- "Save / Omit Hidden Columns",
+ MessageManager.getString("label.alignment_contains_hidden_columns"),
+ MessageManager.getString("action.save_omit_hidden_columns"),
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (!success)
{
- JOptionPane.showInternalMessageDialog(this, "Couldn't save file: "
- + fileName, "Error Saving File", JOptionPane.WARNING_MESSAGE);
+ JOptionPane.showInternalMessageDialog(this, MessageManager.formatMessage("label.couldnt_save_file", new String[]{fileName}),
+ MessageManager.getString("label.error_saving_file"), JOptionPane.WARNING_MESSAGE);
}
return success;
int reply = JOptionPane
.showInternalConfirmDialog(
Desktop.desktop,
- "The Alignment contains hidden columns."
- + "\nDo you want to output only the visible alignment?",
- "Save / Omit Hidden Columns",
+ MessageManager.getString("label.alignment_contains_hidden_columns"),
+ MessageManager.getString("action.save_omit_hidden_columns"),
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
int option = JOptionPane.showInternalConfirmDialog(
jalview.gui.Desktop.desktop,
- "Remove from default list?",
- "Remove user defined colour",
+ MessageManager.getString("label.remove_from_default_list"),
+ MessageManager.getString("label.remove_user_defined_colour"),
JOptionPane.YES_NO_OPTION);
if (option == JOptionPane.YES_OPTION)
{
|| (viewport.getSelectionGroup().getSize() < 2))
{
JOptionPane.showInternalMessageDialog(this,
- "You must select at least 2 sequences.", "Invalid Selection",
+ MessageManager.getString("label.you_must_select_least_two_sequences"), MessageManager.getString("label.invalid_selection"),
JOptionPane.WARNING_MESSAGE);
}
else
|| (viewport.getAlignment().getHeight() < 4))
{
JOptionPane.showInternalMessageDialog(this,
- "Principal component analysis must take\n"
- + "at least 4 input sequences.",
- "Sequence selection insufficient",
+ MessageManager.getString("label.principal_component_analysis_must_take_least_four_input_sequences"),
+ MessageManager.getString("label.sequence_selection_insufficient"),
JOptionPane.WARNING_MESSAGE);
return;
JOptionPane
.showMessageDialog(
Desktop.desktop,
- "You need to have more than two sequences selected to build a tree!",
- "Not enough sequences", JOptionPane.WARNING_MESSAGE);
+ MessageManager.getString("label.you_need_more_two_sequences_selected_build_tree"),
+ MessageManager.getString("label.not_enough_sequences"), JOptionPane.WARNING_MESSAGE);
return;
}
JOptionPane
.showMessageDialog(
Desktop.desktop,
- "The selected region to create a tree may\nonly contain residues or gaps.\n"
- + "Try using the Pad function in the edit menu,\n"
- + "or one of the multiple sequence alignment web services.",
- "Sequences in selection are not aligned",
+ MessageManager.getString("label.selected_region_to_tree_may_only_contain_residues_or_gaps"),
+ MessageManager.getString("label.sequences_selection_not_aligned"),
JOptionPane.WARNING_MESSAGE);
return;
JOptionPane
.showMessageDialog(
Desktop.desktop,
- "The sequences must be aligned before creating a tree.\n"
- + "Try using the Pad function in the edit menu,\n"
- + "or one of the multiple sequence alignment web services.",
- "Sequences not aligned",
+ MessageManager.getString("label.sequences_must_be_aligned_before_creating_tree"),
+ MessageManager.getString("label.sequences_not_aligned"),
JOptionPane.WARNING_MESSAGE);
return;
} catch (Exception ex)
{
JOptionPane.showMessageDialog(Desktop.desktop, ex.getMessage(),
- "Problem reading tree file", JOptionPane.WARNING_MESSAGE);
+ MessageManager.getString("label.problem_reading_tree_file"), JOptionPane.WARNING_MESSAGE);
ex.printStackTrace();
}
if (fin != null && fin.hasWarningMessage())
{
JOptionPane.showMessageDialog(Desktop.desktop,
- fin.getWarningMessage(), "Possible problem with tree file",
+ fin.getWarningMessage(), MessageManager.getString("label.possible_problem_with_tree_file"),
JOptionPane.WARNING_MESSAGE);
}
}
JOptionPane
.showMessageDialog(
Desktop.desktop,
- "Please select at least three bases in at least one sequence in order to perform a cDNA translation.",
- "Translation Failed", JOptionPane.WARNING_MESSAGE);
+ MessageManager.getString("label.select_at_least_three_bases_in_at_least_one_sequence_to_cDNA_translation"),
+ MessageManager.getString("label.translation_failed"), JOptionPane.WARNING_MESSAGE);
}
else
{
JOptionPane
.showMessageDialog(
Desktop.desktop,
- "Unfortunately, something went wrong when translating your sequences.\nPlease take a look in the Jalview java console\nand submit a bug report including the stacktrace.",
- "Implementation error: Translation Failed", JOptionPane.ERROR_MESSAGE);
+ MessageManager.getString("label.error_when_translating_sequences_submit_bug_report"),
+ MessageManager.getString("label.implementation_error") + MessageManager.getString("translation_failed"), JOptionPane.ERROR_MESSAGE);
return;
}
if (al == null)
JOptionPane
.showMessageDialog(
Desktop.desktop,
- "Please select at least three bases in at least one sequence in order to perform a cDNA translation.",
- "Translation Failed", JOptionPane.WARNING_MESSAGE);
+ MessageManager.getString("label.select_at_least_three_bases_in_at_least_one_sequence_to_cDNA_translation"),
+ MessageManager.getString("label.translation_failed"), JOptionPane.WARNING_MESSAGE);
}
else
{
|| JOptionPane
.showConfirmDialog(
this,
- "Do you want to automatically associate the "
- + filesmatched.size()
- + " PDB files with sequences in the alignment that have the same name ?",
- "Automatically Associate PDB files by name",
+ MessageManager.formatMessage("label.automatically_associate_pdb_files_with_sequences_same_name",
+ new String[]{Integer.valueOf(filesmatched.size()).toString()}),
+ MessageManager.getString("label.automatically_associate_pdb_files_by_name"),
JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION)
{
"AUTOASSOCIATE_PDBANDSEQS_IGNOREOTHERS", false) || JOptionPane
.showConfirmDialog(
this,
- "<html>Do you want to <em>ignore</em> the "
- + filesnotmatched.size()
- + " files whose names did not match any sequence IDs ?</html>",
- "Ignore unmatched dropped files ?",
+ MessageManager.formatMessage("label.ignore_unmatched_dropped_files_info", new String[]{Integer.valueOf(filesnotmatched.size()).toString()}),
+ MessageManager.getString("label.ignore_unmatched_dropped_files"),
JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION))
{
return;
if (SwingUtilities.isRightMouseButton(e))
{
String reply = JOptionPane.showInternalInputDialog(this,
- "Enter View Name", "Edit View Name",
+ MessageManager.getString("label.enter_view_name"), MessageManager.getString("label.enter_view_name,
JOptionPane.QUESTION_MESSAGE);
if (reply != null)
import jalview.datamodel.*;
import jalview.io.*;
+import jalview.util.MessageManager;
/**
* DOCUMENT ME!
if (!av.wrapAlignment && ((aa == null) || (aa.length < 1)))
{
- g.drawString("Right click", 2, 8);
- g.drawString("to add annotation", 2, 18);
+ g.drawString(MessageManager.getString("label.right_click"), 2, 8);
+ g.drawString(MessageManager.getString("label.to_add_annotation"), 2, 18);
}
}
}
else if (evt.getActionCommand().equals(LABEL))
{
String exMesg = collectAnnotVals(anot, av.getColumnSelection(), LABEL);
- String label = JOptionPane.showInputDialog(this, "Enter label",
+ String label = JOptionPane.showInputDialog(this, MessageManager.getString("label.enter_label"),
exMesg);
if (label == null)
}
String label = JOptionPane.showInputDialog(
- "Enter a label for the structure?", symbol);
+ MessageManager.getString("label.enter_label_for_the_structure"), symbol);
if (label == null)
{
g.setColor(Color.black);
if (av.validCharWidth)
{
- g.drawString("Alignment has no annotations", 20, 15);
+ g.drawString(MessageManager.getString("label.alignment_has_no_annotations"), 20, 15);
}
return;
import jalview.datamodel.PDBEntry;
import jalview.io.*;
import jalview.schemes.*;
+import jalview.util.MessageManager;
import jalview.util.Platform;
public class AppJmol extends GStructureViewer implements Runnable,
if (alreadyMapped != null)
{
int option = JOptionPane.showInternalConfirmDialog(Desktop.desktop,
- pdbentry.getId() + " is already displayed."
- + "\nDo you want to re-use this viewer ?",
- "Map Sequences to Visible Window: " + pdbentry.getId(),
+ MessageManager.formatMessage("label.pdb_entry_is_already_displayed", new String[]{pdbentry.getId()}),
+ MessageManager.formatMessage("label.map_sequences_to_visible_window", new String[]{pdbentry.getId()}),
JOptionPane.YES_NO_OPTION);
if (option == JOptionPane.YES_OPTION)
AppJmol topJmol = (AppJmol) jm.nextElement();
// TODO: highlight topJmol in view somehow
int option = JOptionPane.showInternalConfirmDialog(Desktop.desktop,
- "Do you want to add " + pdbentry.getId()
- + " to the view called\n'" + topJmol.getTitle()
- + "'\n", "Align to existing structure view",
+ MessageManager.formatMessage("label.add_pdbentry_to_view", new String[]{pdbentry.getId(),topJmol.getTitle()}),
+ MessageManager.getString("label.align_to_existing_structure_view"),
JOptionPane.YES_NO_OPTION);
if (option == JOptionPane.YES_OPTION)
{
{
JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "The following pdb entries could not be retrieved from the PDB:\n"
- + errormsgs.toString()
- + "\nPlease try downloading them manually.",
- "Couldn't load file", JOptionPane.ERROR_MESSAGE);
+ MessageManager.formatMessage("label.pdb_entries_couldnt_be_retrieved", new String[]{errormsgs.toString()}),
+ MessageManager.getString("label.couldnt_load_file"), JOptionPane.ERROR_MESSAGE);
}
long lastnotify = jmb.getLoadNotifiesHandled();
g.fillRect(0, 0, currentSize.width, currentSize.height);
g.setColor(Color.white);
g.setFont(new Font("Verdana", Font.BOLD, 14));
- g.drawString("Error loading file...", 20, currentSize.height / 2);
+ g.drawString(MessageManager.getString("label.error_loading_file") + "...", 20, currentSize.height / 2);
StringBuffer sb = new StringBuffer();
int lines = 0;
for (int e = 0; e < jmb.pdbentry.length; e++)
g.fillRect(0, 0, currentSize.width, currentSize.height);
g.setColor(Color.white);
g.setFont(new Font("Verdana", Font.BOLD, 14));
- g.drawString("Retrieving PDB data....", 20, currentSize.height / 2);
+ g.drawString(MessageManager.getString("label.retrieving_pdb_data"), 20, currentSize.height / 2);
}
else
{
import jalview.datamodel.PDBEntry;
import jalview.datamodel.SequenceI;
+import jalview.util.MessageManager;
/**
* GUI related routines for associating PDB files with sequences
reply = JOptionPane
.showInternalInputDialog(
Desktop.desktop,
- "Couldn't find a PDB id in the file supplied."
- + "Please enter an Id to identify this structure.",
- "No PDB Id in File", JOptionPane.QUESTION_MESSAGE);
+ MessageManager.getString("label.couldnt_find_pdb_id_in_file"),
+ MessageManager.getString("label.no_pdb_id_in_file"), JOptionPane.QUESTION_MESSAGE);
}
if (reply == null)
{
} catch (java.io.IOException ex)
{
JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "Couldn't read the pasted text.\n" + ex.toString(),
- "Error parsing text", JOptionPane.WARNING_MESSAGE);
+ MessageManager.formatMessage("label.couldnt_read_pasted_text", new String[]{ex.toString()}),
+ MessageManager.getString("label.error_parsing_text"), JOptionPane.WARNING_MESSAGE);
}
}
panel.add(pane12, BorderLayout.SOUTH);
int reply = JOptionPane.showInternalConfirmDialog(Desktop.desktop,
- panel, "Enter Nickname & URL of Local DAS Source",
+ panel, MessageManager.getString("label.enter_local_das_source"),
JOptionPane.OK_CANCEL_OPTION);
if (reply != JOptionPane.OK_OPTION)
if (!sourceRegistry.getSource(nickname).isLocal())
{
JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "You can only edit or remove local DAS Sources!",
- "Public DAS source - not editable",
+ MessageManager.getString("label.you_can_only_edit_or_remove_local_das_sources"),
+ MessageManager.getString("label.public_das_source"),
JOptionPane.WARNING_MESSAGE);
return;
}
}
int reply = JOptionPane.showInternalConfirmDialog(desktop, panel,
- "Input Alignment From URL", JOptionPane.OK_CANCEL_OPTION);
+ MessageManager.getString("label.input_alignment_from_url"), JOptionPane.OK_CANCEL_OPTION);
if (reply != JOptionPane.OK_OPTION)
{
if (!vamsasImport(chooser.getSelectedFile()))
{
JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "Couldn't import '" + fle + "' as a new vamsas session.",
- "Vamsas Document Import Failed",
+ MessageManager.formatMessage("label.couldnt_import_as_vamsas_session", new String[]{fle}),
+ MessageManager.getString("label.vamsas_document_import_failed"),
JOptionPane.ERROR_MESSAGE);
}
}
if (fm != null)
{
g.drawString(
- "Total Free Memory: " + df.format(totalFreeMemory)
- + "MB; Max Memory: " + df.format(maxMemory)
- + "MB; " + df.format(percentUsage) + "%", 10,
+ MessageManager.formatMessage("label.memory_stats", new String[]{df.format(totalFreeMemory),df.format(maxMemory),df.format(percentUsage)}), 10,
getHeight() - fm.getHeight());
}
}
{
complete();
JOptionPane.showInternalConfirmDialog(Desktop.desktop,
- "No das sources were selected.\n"
- + "Please select some sources and\n" + " try again.",
- "No Sources Selected", JOptionPane.DEFAULT_OPTION,
+ MessageManager.getString("label.no_das_sources_selected_warn"),
+ MessageManager.getString("label.no_das_sources_selected_title"), JOptionPane.DEFAULT_OPTION,
JOptionPane.INFORMATION_MESSAGE);
}
// width/g.getFontMetrics().stringWidth("Label"),
// height/g.getFontMetrics().getHeight())));
- g.drawString("Label", 0, 0);
+ g.drawString(MessageManager.getString("label.label"), 0, 0);
}
else
// 'SelectRegion' selection
if (!haveResults)
{
- JOptionPane.showInternalMessageDialog(this, "Finished searching",
+ JOptionPane.showInternalMessageDialog(this, MessageManager.getString("label.finished_searching"),
null, JOptionPane.INFORMATION_MESSAGE);
resIndex = -1;
seqIndex = 0;
import org.exolab.castor.xml.*;
import jalview.binding.*;
import jalview.schemes.*;
+import jalview.util.MessageManager;
import jalview.util.jarInputStreamProvider;
/**
System.err.println("Couldn't locate Jalview XML file : " + ex
+ "\n");
JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "Couldn't locate " + file, "URL not found",
+ MessageManager.formatMessage("label.couldnt_locate", new String[]{file}),
+ MessageManager.getString("label.url_not_found"),
JOptionPane.WARNING_MESSAGE);
}
});
import jalview.io.*;
import jalview.jbgui.*;
import jalview.schemes.*;
+import jalview.util.MessageManager;
/**
* DOCUMENT ME!
while (!valid)
{
if (JOptionPane.showInternalConfirmDialog(Desktop.desktop, link,
- "New sequence URL link", JOptionPane.OK_CANCEL_OPTION, -1,
+ MessageManager.getString("label.new_sequence_url_link"), JOptionPane.OK_CANCEL_OPTION, -1,
null) == JOptionPane.OK_OPTION)
{
if (link.checkValid())
if (index == -1)
{
JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "No link selected!", "No link selected",
+ MessageManager.getString("label.no_link_selected"), MessageManager.getString("label.no_link_selected"),
JOptionPane.WARNING_MESSAGE);
return;
}
{
if (JOptionPane.showInternalConfirmDialog(Desktop.desktop, link,
- "New sequence URL link", JOptionPane.OK_CANCEL_OPTION, -1,
+ MessageManager.getString("label.new_sequence_url_link"), JOptionPane.OK_CANCEL_OPTION, -1,
null) == JOptionPane.OK_OPTION)
{
if (link.checkValid())
if (index == -1)
{
JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "No link selected!", "No link selected",
+ MessageManager.getString("label.no_link_selected"), MessageManager.getString("label.no_link_selected"),
JOptionPane.WARNING_MESSAGE);
return;
}
if (points == null)
{
g.setFont(new Font("Verdana", Font.PLAIN, 18));
- g.drawString("Calculating PCA....", 20, getHeight() / 2);
+ g.drawString(MessageManager.getString("label.calculating_pca")+ "....", 20, getHeight() / 2);
}
else
{
if (reveal != null && reveal[0] > startx && reveal[0] < endx)
{
- gg.drawString("Reveal Columns", reveal[0] * av.charWidth, 0);
+ gg.drawString(MessageManager.getString("label.reveal_columns"), reveal[0] * av.charWidth, 0);
}
}
import jalview.io.SequenceAnnotationReport;
import jalview.schemes.*;
import jalview.structure.*;
+import jalview.util.MessageManager;
/**
* DOCUMENT ME!
if (av.wrapAlignment && seq > av.getAlignment().getHeight())
{
JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "Cannot edit annotations in wrapped view.",
- "Wrapped view - no edit", JOptionPane.WARNING_MESSAGE);
+ MessageManager.getString("label.cannot_edit_annotations_in_wrapped_view"),
+ MessageManager.getString("label.wrapped_view_no_edit"), JOptionPane.WARNING_MESSAGE);
return;
}
import jalview.datamodel.*;
import jalview.io.*;
import jalview.util.DBRefUtils;
+import jalview.util.MessageManager;
import jalview.ws.dbsources.das.api.DasSourceRegistryI;
import jalview.ws.seqfetcher.DbSourceProxy;
import java.awt.BorderLayout;
public void run()
{
JOptionPane.showInternalMessageDialog(Desktop.desktop, error,
- "Error Retrieving Data", JOptionPane.WARNING_MESSAGE);
+ MessageManager.getString("label.error_retrieving_data"), JOptionPane.WARNING_MESSAGE);
}
});
}
if (tree == null)
{
- g.drawString("Calculating tree....", 20, getHeight() / 2);
+ g.drawString(MessageManager.getString("label.calculating_tree") + "....", 20, getHeight() / 2);
}
else
{
import jalview.schemes.ColourSchemeI;
import jalview.schemes.ResidueProperties;
import jalview.schemes.UserColourScheme;
+import jalview.util.MessageManager;
import java.awt.Color;
import java.awt.Font;
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);
+ MessageManager.getString("label.user_colour_scheme_must_have_name"),
+ MessageManager.getString("label.no_name_colour_scheme"), JOptionPane.WARNING_MESSAGE);
return;
}
{
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);
+ 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;
*/
package jalview.gui;
+import jalview.util.MessageManager;
+
import java.io.*;
import java.net.*;
jalview.bin.Cache.log.info("Prompting user for questionnaire at "
+ qurl);
int reply = JOptionPane.showInternalConfirmDialog(Desktop.desktop,
- "There is a new Questionnaire available."
- + "Would you like to complete it now ?\n",
- "Jalview User Survey", JOptionPane.YES_NO_OPTION,
+ MessageManager.getString("label.jalview_new_questionnaire"),
+ MessageManager.getString("label.jalview_user_survey"), JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (reply == JOptionPane.YES_OPTION)
switch (currentStatus)
{
case STATE_QUEUING:
- g.drawString(title.concat(" - queuing"), 60, 30);
+ g.drawString(title.concat(" - ").concat(MessageManager.getString("label.state_queueing")), 60, 30);
break;
case STATE_RUNNING:
- g.drawString(title.concat(" - running"), 60, 30);
+ g.drawString(title.concat(" - ").concat(MessageManager.getString("label.state_running")), 60, 30);
break;
case STATE_STOPPED_OK:
- g.drawString(title.concat(" - complete"), 60, 30);
+ g.drawString(title.concat(" - ").concat(MessageManager.getString("label.state_completed")), 60, 30);
break;
case STATE_CANCELLED_OK:
- g.drawString(title.concat(" - job cancelled!"), 60, 30);
+ g.drawString(title.concat(" - ").concat(MessageManager.getString("label.state_job_cancelled")), 60, 30);
break;
case STATE_STOPPED_ERROR:
- g.drawString(title.concat(" - job error!"), 60, 30);
+ g.drawString(title.concat(" - ").concat(MessageManager.getString("label.state_job_error")), 60, 30);
break;
case STATE_STOPPED_SERVERERROR:
- g.drawString(title.concat(" - Server Error! (try later)"), 60, 30);
+ g.drawString(title.concat(" - ").concat(MessageManager.getString("label.server_error_try_later")), 60, 30);
break;
}
{
valid = false;
JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "Invalid URL !");
+ MessageManager.getString("label.invalid_url"));
}
}
if (valid && resp == JOptionPane.OK_OPTION)
import jalview.datamodel.*;
import jalview.gui.*;
+import jalview.util.MessageManager;
public class FileLoader implements Runnable
{
public void run()
{
JOptionPane.showInternalMessageDialog(Desktop.desktop,
- errorMessage, "Error loading file",
+ errorMessage, MessageManager.getString("label.error_loading_file"),
JOptionPane.WARNING_MESSAGE);
}
});
public void run()
{
javax.swing.JOptionPane.showInternalMessageDialog(
- Desktop.desktop, "Encountered problems opening " + file
- + "!!", "File open error",
+ Desktop.desktop, MessageManager.formatMessage("label.problems_opening_file", new String[]{file}),
+ MessageManager.getString("label.file_open_error"),
javax.swing.JOptionPane.WARNING_MESSAGE);
}
});
package jalview.jbgui;
import jalview.schemes.ColourSchemeProperty;
+import jalview.util.MessageManager;
import java.awt.BorderLayout;
import java.awt.Color;
int option = JOptionPane.showInternalConfirmDialog(
jalview.gui.Desktop.desktop,
- "Remove from default list?",
- "Remove user defined colour",
+ MessageManager.getString("label.remove_from_default_list"),
+ MessageManager.getString("label.remove_user_defined_colour"),
JOptionPane.YES_NO_OPTION);
if (option == JOptionPane.YES_OPTION)
{