action.by_length = by Length\r
action.by_group = by Group\r
action.remove = Remove\r
-action.remove_redundancy = Remove Redundancy...\r
+action.remove_redundancy = Remove Redundancy\r
action.pairwise_alignment = Pairwise Alignments...\r
action.by_rna_helixes = by RNA Helices\r
action.user_defined = User Defined...\r
label.to_textbox = to Textbox\r
label.jalview = Jalview\r
label.csv_spreadsheet = CSV (Spreadsheet)\r
-label.status = [Status]\r
+label.status = Status\r
label.channels = Channels\r
label.channel_title_item_count = {0} ({1})\r
label.blog_item_published_on_date = {0} {1} \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.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.spaces_converted_to_backslashes = Spaces have been converted to _\r
label.no_spaces_allowed_sequence_name = No spaces allowed in Sequence Name\r
label.select_outline_colour = Select Outline Colour\r
-label.web_browser_not_found_unix = Unixers\: Couldn't find default web browser.\nAdd the full path to your browser in Preferences."\r
+label.web_browser_not_found_unix = Unixers: Couldn't find default web browser.\nAdd the full path to your browser in Preferences."\r
label.web_browser_not_found = Web browser not found\r
label.select_pdb_file_for = Select a PDB file for {0}\r
label.html = HTML\r
label.proxy_authorization_failed = Proxy Authorization Failed\r
label.internal_jalview_error = Internal Jalview Error\r
label.secondary_structure_prediction_service_couldnt_be_located = The Secondary Structure Prediction Service named {0} at {1} couldn't be located.\r
-label.service_called_is_not_msa_service = The Service called \n{0}\nis not a \nMultiple Sequence Alignment Service!\r
+label.service_called_is_not_msa_service = The Service called \n{0}\nis not a \nMultiple Sequence Alignment Service\!\r
label.msa_service_is_unknown = The Multiple Sequence Alignment Service named {0} is unknown\r
-label.service_called_is_not_seq_search_service = The Service called \n{0}\nis not a \nSequence Search Service!\r
+label.service_called_is_not_seq_search_service = The Service called \n{0}\nis not a \nSequence Search Service\!\r
label.seq_search_service_is_unknown = The Sequence Search Service named {0} is unknown\r
+label.feature_type = Feature Type\r
+label.display = Display\r
+label.service_url = Service URL\r
+label.copied_sequences = Copied sequences\r
+label.cut_sequences = Cut Sequences\r
+label.conservation_colour_increment = Conservation Colour Increment ({0})\r
+label.percentage_identity_thereshold = Percentage Identity Thereshold ({0})\r
+label.error_unsupported_owwner_user_colour_scheme = Unsupported owner for User Colour scheme dialog\r
+label.save_alignment_to_file = Save Alignment to file\r
+label.save_features_to_file = Save Features to File\r
+label.save_annotation_to_file = Save Annotation to File\r
+label.no_features_on_alignment = No features found on alignment\r
+label.save_pdb_file = Save PDB File\r
+label.save_text_to_file = Save Text to File\r
+label.save_state = Save State\r
+label.restore_state = Restore State\r
+label.saving_jalview_project = Saving jalview project {0}\r
+label.loading_jalview_project = Loading jalview project {0}\r
+label.save_vamsas_document_archive = Save Vamsas Document Archive\r
+label.saving_vamsas_doc = Saving VAMSAS Document to {0}\r
+label.load_feature_colours = Load Feature Colours\r
+label.save_feature_colours = Save Feature Colour Scheme\r
+label.dataset_for = {0} Dataset for {1}\r
+label.select_startup_file = Select startup file\r
+label.select_default_browser = Select default web browser\r
+label.save_tree_as_newick = Save tree as newick file\r
+label.create_eps_from_tree = Create EPS file from tree\r
+label.create_png_from_tree = Create PNG image from tree\r
+label.save_colour_scheme = Save colour scheme\r
+label.edit_params_for = Edit parameters for {0}\r
+label.choose_filename_for_param_file = Choose a filename for this parameter file\r
+label.save_as_html = Save as HTML\r
+label.recently_opened = Recently Opened\r
+label.blasting_for_unidentified_sequence_jobs_running = BLASTing for unidentified sequences - {0} jobs running.\r
+label.tree_from = Tree from {0}\r
+label.webservice_job_title = {0} using {1}\r
+label.select_visible_region_of = selected {0} region of {1}\r
+label.visible = Visible\r
+label.select_unselect_visible_regions_from = select and unselected {0} regions from {1}\r
+label.visible_region_of = visible region of\r
+label.webservice_job_title_on = {0} using {1} on {2}\r
+label.updating_vamsas_session = Updating vamsas session\r
+label.loading_file = Loading File: {0}\r
+label.edit_params = Edit {0}\r
+error.not_implemented = Not implemented\r
+error.no_such_method_as_clone1_for = No such method as clone1 for {0}\r
+error.null_from_clone1 = Null from clone1!\r
+error.implementation_error_sortbyfeature = Implementation Error - sortByFeature method must be one of FEATURE_SCORE, FEATURE_LABEL or FEATURE_DENSITY.\r
+error.not_yet_implemented = Not yet implemented\r
+error.unknown_type_dna_or_pep = Unknown Type {0} - dna or pep are the only allowed values.\r
+error.implementation_error_dont_know_thereshold_annotationcolourgradient = Implementation error: don't know about threshold setting for current AnnotationColourGradient.\r
+error.implementation_error_embeddedpopup_not_null = Implementation error - embeddedPopup must be non-null\r
+error.invalid_colour_for_mycheckbox = Invalid color for MyCheckBox\r
+error.implementation_error_unrecognised_render_object_for_features_type = Implementation Error: Unrecognised render object {0} for features of type {1}\r
+error.implementation_error_unsupported_feature_colour_object = Implementation error: Unsupported feature colour object.\r
+error.invalid_separator_parameter = Invalid separator parameter - must be non-zero length\r
+error.alignment_cigararray_not_implemented = Alignment(CigarArray) not yet implemented\r
+error.weak_sequencei_equivalence_not_yet_implemented = Weak sequenceI equivalence not yet implemented.\r
+error.implementation_error_can_only_make_alignmnet_from_cigararray = Implementation Error - can only make an alignment view from a CigarArray of sequences.\r
+error.empty_view_cannot_be_updated = empty view cannot be updated.\r
+error.mismatch_between_number_of_sequences_in_block = Mismatch between number of sequences in block {0} ({1}) and the original view ({2})\r
+error.padding_not_yet_implemented = Padding not yet implemented\r
+error.mismatch_between_visible_blocks_to_update_and_number_of_contigs_in_view = Mismatch between visible blocks to update and number of contigs in view (contigs=0,blocks={0})\r
+error.unknown_seq_cigar_operation = Unknown SeqCigar operation '{0}'\r
+error.implementation_bug_parse_cigar_string = Implementation bug in parseCigarString\r
+error.implementation_error_invalid_operation_string = Implementation error. Invalid operation string.\r
+error.invalid_range_string = Invalid range string (must be zero or positive number)\r
+error.implementation_error_delete_range_out_of_bounds = Implementation Error: deleteRange out of bounds: start must be non-negative and less than end.\r
+error.implementation_error = Implementation error\r
+error.implementation_error_unknown_operation = Implementation Error! Unknown operation '{0}'\r
+error.implementation_error_unexpected_null_from_get_sequence_and_deletions = Implementation Error - unexpected null from getSequenceAndDeletions\r
+error.implementation_error_set_seq_null = Implementation Error - _setSeq(null,...)\r
+error.implementation_error_s = Implementation Error: _s= {0}\r
+error.implementation_error_seqcigar_possible = SeqCigar: Possible implementation error: sequence is longer than dataset sequence\r
+error.implmentation_bug_seq_null = Implementation Bug. Null seq\r
+error.implementation_bug_cigar_operation_list_range_list = Implementation Bug. Cigar Operation list!= range list\r
+error.not_yet_implemented_cigar_object_from_cigar_string = NOT YET Implemented: Constructing a Cigar object from a cigar string and a gapped sequence.\r
+error.implementation_bug_cigar_operation = Implementation Bug. Cigar Operation '{0}' '{1}' not one of '{2}', '{3}', or '{4}'.\r
+error.implementation_error_for_new_cigar = Implementation error for new Cigar(SequenceI)\r
+error.implementation_error_cigar_seq_no_operations = Implementation error: {0}'th sequence Cigar has no operations.\r
+error.implementation_error_jmol_getting_data = Implementation error - Jmol seems to be still working on getting its data - report at http://issues.jalview.org/browse/JAL-1016\r
+error.implementation_error_no_pdbentry_from_index = Implementation error - no corresponding pdbentry (for index {0}) to add sequences mappings to\r
+error.jmol_version_not_compatible_with_jalview_version = Jmol version {0} is not compatible with this version of Jalview. Report this problem at issues.jalview.org\r
+error.not_implemented_remove = Remove: Not implemented\r
+error.not_implemented_clone = Clone: Not implemented\r
+error.implementation_error_chimera_getting_data = Implementation error - Chimera seems to be still working on getting its data - report at http://issues.jalview.org/browse/JAL-1016\r
+error.call_setprogressbar_before_registering_handler = call setProgressBar before registering the progress bar's handler.\r
+label.cancelled_params = Cancelled {0}\r
+error.implementation_error_cannot_show_view_alignment_frame = Implementation error: cannot show a view from another alignment in an AlignFrame.\r
+error.implementation_error_dont_know_about_thereshold_setting = Implementation error: don't know about threshold setting for current AnnotationColourGradient.\r
+error.eps_generation_not_implemented = EPS Generation not yet implemented\r
+error.png_generation_not_implemented = PNG Generation not yet implemented\r
+error.try_join_vamsas_session_another = Trying to join a vamsas session when another is already connected\r
+error.invalid_vamsas_session_id = Invalid vamsas session id\r
+error.implementation_error_cannot_create_groovyshell = Implementation Error. Cannot create groovyShell without Groovy on the classpath!\r
+label.groovy_support_failed = Jalview Groovy Support Failed\r
+label.couldnt_create_groovy_shell = Couldn't create the groovy Shell. Check the error log for the details of what went wrong.\r
+error.unsupported_version_calcIdparam = Unsupported Version for calcIdparam {0}\r
+error.implementation_error_cant_reorder_tree = Implementation Error: Can't reorder this tree. Not DefaultMutableTreeNode.\r
+error.invalid_value_for_option = Invalid value {0} for option {1}\r
+error.implementation_error_cannot_import_vamsas_doc = Implementation Error - cannot import existing vamsas document into an existing session, Yet!\r
+label.vamsas_doc_couldnt_be_opened_as_new_session = VAMSAS Document could not be opened as a new session - please choose another\r
+error.implementation_error_vamsas_operation_not_init = Impementation error! Vamsas Operations when client not initialised and connected\r
+error.jalview_no_connected_vamsas_session = Jalview not connected to Vamsas session\r
+error.implementation_error_cannot_recover_vamsas_object_mappings = IMPLEMENTATION ERROR: Cannot recover vamsas object mappings - no backup was made\r
+error.setstatus_called_non_existent_job_pane = setStatus called for non-existent job pane {0}\r
+error.implementation_error_cannot_find_marshaller_for_param_set =Implementation error: Can't find a marshaller for the parameter set\r
+error.implementation_error_old_jalview_object_not_bound =IMPLEMENTATION ERROR: old jalview object is not bound ! ({0})\r
+error.implementation_error_vamsas_doc_class_should_bind_to_type = Implementation Error: Vamsas Document Class {0} should bind to a {1} (found a {2})\r
+error.implementation_error_jalview_class_should_bind_to_type = Implementation Error: Jalview Class {0} should bind to a {1} (found a {2})\r
+error.invalid_vamsas_rangetype_cannot_resolve_lists = Invalid vamsas RangeType - cannot resolve both lists of Pos and Seg from choice!\r
+error.implementation_error_maplist_is_null = Implementation error. MapList is null for initMapType.\r
+error.implementation_error_cannot_have_null_alignment = Implementation error: Cannot have null alignment property key\r
+error.implementation_error_null_fileparse = Implementation error. Null FileParse in copy constructor\r
+error.implementation_error_cannot_map_alignment_sequences = IMPLEMENTATION ERROR: Cannot map an alignment of sequences from different datasets into a single alignment in the vamsas document.\r
+error.implementation_error_cannot_duplicate_colour_scheme = Serious implementation error: cannot duplicate colourscheme {0}\r
+error.implementation_error_structure_selection_manager_null = Implementation error. Structure selection manager's context is 'null'\r
+exception.ssm_context_is_null = SSM context is null\r
+error.idstring_seqstrings_only_one_per_sequence = idstrings and seqstrings contain one string each per sequence\r
+error.cannot_have_mixed_length_replacement_vectors = Cannot have mixed length replacement vectors. Replacement vector for {0} is {1} strings long, and have already seen a {2} length vector.\r
+error.cannot_have_zero_length_vector_replacement_strings = Cannot have zero length vector of replacement strings - either 1 value or n values.\r
+error.implementation_error_multiple_single_sequence_prediction_jobs_not_supported = Implementation Error! Multiple single sequence prediction jobs are not yet supported\r
+error.implementation_error_invalid_msa_index_for_job =Implementation Error! Invalid msaIndex for JPredJob on parent MSA input object!\r
+error.implementation_error_startjob_called = Implementation error - StartJob(JpredJob) called on {0}\r
+error.multiple_jnet_subjob_merge_not_implemented = Multiple JNet subjob merging not yet implemented\r
+label.job_never_ran = Job never ran - input returned to user.\r
+error.implementation_error_minlen_must_be_greater_zero = Implementation error: minlen must be zero or more\r
+error.implementation_error_msawbjob_called = Implementation error - StartJob(MsaWSJob) called on a WSJobInstance {0}\r
+error.implementation_error_cannot_attach_ws_menu_entry = IMPLEMENTATION ERROR: cannot attach WS Menu Entry without service handle reference!\r
+error.parameter_migration_not_implemented_yet = Parameter migration not implemented yet\r
+error.implementation_error_cannot_set_jaba_option = Implementation error: cannot set Jaba Option to a value outside its allowed value range!\r
+error.implementation_error_valuetype_doesnt_support_jabaws_type = IMPLEMENTATION ERROR: jalview.ws.params.ValueConstrainI.ValueType does not support the JABAWS type : {0}\r
+error.cannot_create_jabaws_param_set = Cannot create a JabaWSParamSet from non-JabaWS parameters\r
+error.cannot_set_arguments_to_jabaws_param_set = Cannot set arguments to a JabaWSParamSet that are not JabaWS arguments\r
+error.implementation_error_runner_config_not_available = Implementation Error: Runner Config not available for a JABAWS service of type {0} ({1})\r
+error.implementation_error_cannot_handle_jaba_param = Implementation Error: Cannot handle Jaba parameter object {0}\r
+error.implementation_error_attempt_to_delete_service_preset = Implementation error: Attempt to delete a service preset!\r
+error.implementation_error_cannot_locate_oldname_presetname = Implementation error: Can't locate either oldname ({0}) or presetName ({1}in the datastore!"\r
+error.implementation_error_jabaws_param_set_only_handled_by = Implementation error: JabaWsParamSets can only be handled by JabaParamStore\r
+error.cannot_set_source_file_for = Cannot set source file for {0}\r
+error.mismatch_service_instance_preset = Probable mismatch between service instance and preset!\r
+error.cannot_set_params_for_ws_preset = Cannot set Parameters for a Jaba Web service's preset\r
+error.implementation_error_can_only_instantiate_jaba_param_sets = Implementation error: Can only instantiate Jaba parameter sets\r
+error.no_aacon_service_found = No AACon service found\r
+error.implementation_error_couldnt_copy_value_constraint = Implementation error: could not copy ValueConstrain!\r
+error.couldnt_encode_as_utf8 = Couldn't encode '{0}' as UTF-8.\r
+error.tree_inputtype_not_yet_implemented = Tree InputType not yet implemented\r
+error.implementation_error_need_to_have_httpresponse = Implementation Error: need to have an HttpResponse to process\r
+error.dbrefsource_implementation_exception =DBRefSource Implementation Exception\r
+error.implementation_error_dbinstance_must_implement_interface = Implmentation Error - getDbInstances must be given a class that implements jalview.ws.seqfetcher.DbSourceProxy (was given{0})\r
+error.implementation_error_must_init_dbsources =Implementation error. Must initialise dbSources\r
+label.view_controller_toggled_marked = {0} {1} columns {2} containing features of type {3} across {4} sequence(s)\r
+label.toggled = Toggled\r
+label.marked = Marked\r
+label.not = not\r
+label.no_feature_of_type_found = No features of type {0} found.\r
+label.submission_params = Submission {0}\r
+label.empty_alignment_job = Empty Alignment Job\r
+label.add_new_sbrs_service = Add a new Simple Bioinformatics Rest Service\r
+label.edit_sbrs_entry = Edit Simple Bioinformatics Rest Service entry\r
+label.pca_recalculating = Recalculating PCA\r
+label.pca_calculating = Calculating PCA\r
+label.select_foreground_colour = Choose foreground colour\r
+label.select_colour_for_text = Select Colour for Text\r
+label.adjunst_foreground_text_colour_thereshold = Adjust Foreground Text Colour Threshold\r
+label.select_subtree_colour = Select Sub-Tree Colour\r
+label.create_new_sequence_features = Create New Sequence Feature(s)\r
+label.amend_delete_features = Amend/Delete Features for {0}\r
+exception.out_of_bounds_for_file = Out of bounds for file: i={0}, Final Buffer: i0={1} iend={2}\r
+exception.null_string_given_to_regex_search = Null String Given to Regex.search\r
+exception.null_string_like_given_to_regex_search = Null StringLike Given to Regex.search\r
+exception.null_string_given_to_regex_reverse_search = Null String Given to Regex.reverseSearch\r
+exception.null_string_like_given_to_regex_reverse_search = Null StringLike Given to Regex.reverseSearch\r
+exception.null_string_like_given_to_regex_search_from = Null String Given to Regex.searchFrom\r
+exception.null_string_like_given_to_regex_search_region = Null String Given to Regex.searchRegion\r
+exception.replace_null_regex_pointer = Replacer has null Regex pointer\r
+exception.bad_pattern_to_regex_perl_code = bad pattern to Regex.perlCode: {0}\r
+exception.no_stub_implementation_for_interface = There is no stub implementation for the interface: {0}\r
+exception.cannot_set_endpoint_address_unknown_port = Cannot set Endpoint Address for Unknown Port {0}\r
+exception.querying_matching_opening_parenthesis_for_non_closing_parenthesis = Querying matching opening parenthesis for non-closing parenthesis character {0}\r
+exception.mismatched_unseen_closing_char = Mismatched (unseen) closing character {0}\r
+exception.mismatched_closing_char = Mismatched closing character {0}\r
+exception.mismatched_opening_char = Mismatched opening character {0} at {1}\r
+exception.invalid_datasource_couldnt_obtain_reader = Invalid datasource. Could not obtain Reader\r
+exception.index_value_not_in_range = {0}: Index value '{1}' not in range [0..{2}]\r
+exception.unterminated_cigar_string = Unterminated cigar string\r
+exception.unexpected_operation_cigar_string_pos = Unexpected operation '{0}' in cigar string (position {1} in '{2}'\r
+exception.couldnt_parse_responde_from_annotated3d_server = Couldn't parse response from Annotate3d server\r
+exception.application_test_npe = Application test: throwing an NullPointerException It should arrive at the console\r
+exception.overwriting_vamsas_id_binding = Overwriting vamsas id binding\r
+exception.overwriting_jalview_id_binding = Overwriting jalview id binding\r
+error.implementation_error_unknown_file_format_string = Implementation error: Unknown file format string\r
+exception.failed_to_resolve_gzip_stream = Failed to resolve GZIP stream\r
+exception.problem_opening_file_also_tried = Problem opening {0} (also tried {1}) : {2}\r
+exception.problem_opening_file = Problem opening {0} : {1}\r
+exception.failed_to_read_data_from_source = Failed to read data from source: {0}\r
+exception.no_init_source_stream = Unitialised Source Stream\r
+exception.invalid_source_stream = Invalid Source Stream: {0}\r
+error.implementation_error_reset_called_for_invalid_source = Implementation Error: Reset called for invalid source.\r
+exception.number_of_residues_in_query_sequence_differ_from_prediction = Number of residues in {0} supposed query sequence ('{1}'\n{2})\ndiffer from number of prediction sites in prediction ({3})\r
+label.mapped = mapped\r
+exception.jpredconcide_entry_has_unexpected_number_of_columns = JPredConcise: Entry ({0}) has an unexpected number of columns\r
+exception.couldnt_parse_concise_annotation_for_prediction = Couldn't parse concise annotation for prediction profile.\n{0}\r
+exception.newfile = NewickFile\: {0}\n\r
+label.no_tree_read_in = No Tree read in\r
+exception.rnaml_couldnt_access_datasource = Couldn't access datasource ({0})\r
+exception.ranml_couldnt_process_data = Couldn't process data as RNAML file ({0})\r
+exception.ranml_invalid_file = Invalid RNAML file ({0})\r
+exception.ranml_problem_parsing_data = Problem parsing data as RNAML ({0})\r
+exception.pfam_no_sequences_found = No sequences found (PFAM input)\r
+exception.stockholm_invalid_format = This file is not in valid STOCKHOLM format: First line does not contain '# STOCKHOLM'\r
+exception.couldnt_parse_sequence_line = Could not parse sequence line: {0}\r
+exception.error_parsing_line = Error parsing {0}\r
+exception.unknown_annotation_detected = Unknown annotation detected: {0} {1}\r
+exception.couldnt_store_sequence_mappings = Couldn't store sequence mappings for {0}\r
+exception.matrix_too_many_iteration = Too many iterations in {0} (max is {1})\r
+exception.browser_not_found = Exception in finding browser: {0}\r
+exception.browser_unable_to_locate = Unable to locate browser: {0}\r
+exception.invocation_target_exception_creating_aedesc = InvocationTargetException while creating AEDesc: {0}\r
+exception.illegal_access_building_apple_evt= IllegalAccessException while building AppleEvent: {0}\r
+exception.instantiation_creating_aedesc = InstantiationException while creating AEDesc: {0}\r
+exception.unable_to_launch_url = Unable to launch URL: {0}\r
+exception.unable_to_create_internet_config = Unable to create an Internet Config instance: {0}\r
+exception.invocation_target_calling_url = InvocationTargetException while calling openURL: {0}\r
+exception.illegal_access_calling_url = IllegalAccessException while calling openURL: {0}\r
+exception.interrupted_launching_browser = InterruptedException while launching browser: {0}\r
+exception.das_source_doesnt_support_sequence_command = Source {0} does not support the sequence command.\r
+exception.invalid_das_source = Invalid das source: {0}\r
+exception.ebiembl_retrieval_failed_on = EBI EMBL XML retrieval failed on {0}:{1}\r
+label.no_embl_record_found = # No EMBL record retrieved for {0}:{1}\r
+label.embl_successfully_parsed = # Successfully parsed the {0} queries into an Alignment\r
+exception.no_pdb_records_for_chain = No PDB Records for {0} chain {1}\r
+exception.unexpected_handling_rnaml_translation_for_pdb = Unexpected exception when handling RNAML translation of PDB data\r
+exception.couldnt_recover_sequence_properties_for_alignment = Couldn't recover sequence properties for alignment\r
+exception.unknown_format_for_file = Unknown format {0} for file \: \n{1}\r
+label.remove_gaps = Remove Gaps\r
+exception.couldnt_recover_sequence_props_for_jnet_query = Couldn't recover sequence properties for JNet Query sequence!\r
+exception.server_timeout_try_later = Server timed out - try again later\n\r
+exception.web_service_returned_null_try_later= Server at {0} returned null object, it probably cannot be contacted. Try again later.\r
+exception.cannot_contact_service_endpoint_at = Cannot contact service endpoint at {0}\r
+error.implementation_error_cannot_find_service_url_in_given_set = Implementation error: Cannot find service url in the given url set!\r
+error.implementation_error_cannot_find_service_url_in_given_set_param_store = Implementation error: Cannot find service url in the given url set for this service parameter store ({0}}\r
+exception.jobsubmission_invalid_params_set = Invalid parameter set. Check Jalview implementation\r
+exception.notvaliddata_group_contains_less_than_min_seqs = Group contains less than {0} sequences.\r
+exception.outofmemory_loading_pdb_file = Out of memory loading PDB File\r
+exception.eps_coudnt_write_output_file = Could not write to the output file: {0}\r
+exception.eps_method_not_supported = Method not currently supported by EpsGraphics2D version {0}\r
+exception.eps_unable_to_get_inverse_matrix = Unable to get inverse of matrix: {0}\r
+warn.job_cannot_be_cancelled_close_window = This job cannot be cancelled.\nJust close the window.\r
+warn.service_not_supported = Service not supported!\r
+warn.input_is_too_big = Input is too big!\r
+warn.invalid_job_param_set = Invalid job parameter set!\r
+info.job_couldnt_be_run_server_doesnt_support_program = Job could not be run because the server doesn't support this program.\n{0}\r
+info.job_couldnt_be_run_exceeded_hard_limit = Job could not be run because it exceeded a hard limit on the server.\n{0}\r
+info.job_couldnt_be_run_incorrect_param_setting = Job could not be run because some of the parameter settings are not supported by the server.\n{0}\nPlease check to make sure you have used the correct parameter set for this service!\n\r
+info.no_jobs_ran = No jobs ran\r
+info.failed_to_submit_prediction = Failed to submit the prediction:\n{0} {1}\r
+info.invalid_jnet_job_result_data ={0}\n{1}\nInvalid JNet job result data!\n{2}\r
+info.failed_to_submit_sequences_for_alignment = Failed to submit sequences for alignment.\nIt is most likely that there is a problem with the server.\nJust close the window\n\r
+info.alignment_object_method_notes = \nAlignment Object Method Notes\n\r
+info.server_exception = \n{0} Server exception!\n{1}\r
+status.processing_commandline_args = Processing commandline arguments...\r
+status.das_features_being_retrived = DAS features being retrieved...\r
+status.searching_for_sequences_from = Searching for sequences from {0}\r
+status.finished_searching_for_sequences_from = Finished searching for sequences from {0}\r
+label.eps_file = EPS file\r
+label.png_image = PNG image\r
+status.saving_file = Saving {0}\r
+status.export_complete = Export complete.\r
+status.fetching_pdb = Fetching PDB {0}\r
+status.refreshing_news = Refreshing news\r
+status.importing_vamsas_session_from = Importing VAMSAS session from {0}\r
+status.opening_params = Opening {0}\r
+status.waiting_sequence_database_fetchers_init = Waiting for Sequence Database Fetchers to initialise\r
+status.init_sequence_database_fetchers = Initialising Sequence Database Fetchers\r
+status.fetching_sequence_queries_from = Fetching {0} sequence queries from {1}\r
+status.finshed_querying = Finished querying\r
+status.parsing_results = Parsing results.\r
+status.processing = Processing...\r
+status.refreshing_web_service_menus = Refreshing Web Service Menus\r
+status.collecting_job_results = Collecting job results.\r
+status.fetching_das_sequence_features = Fetching DAS Sequence Features\r
+status.no_das_sources_active = No DAS Sources Active\r
+status.das_feature_fetching_cancelled = DAS Feature Fetching Cancelled\r
+status.das_feature_fetching_complete = DAS Feature Fetching Complete\r
+status.fetching_db_refs = Fetching db refs\r
+label.font_doesnt_have_letters_defined = Font doesn't have letters defined\nso cannot be used\nwith alignment data\r
+label.error_loading_file_params = Error loading file {0}\r
+label.error_loading_jalview_file = Error loading Jalview file\r
+warn.out_of_memory_when_action = Out of memory when {0}!!\nSee help files for increasing Java Virtual Machine memory.\r
+warn.out_of_memory_loading_file = Out of memory loading file {0}!!\nSee help files for increasing Java Virtual Machine memory.\r
+label.out_of_memory = Out of memory\r
+label.invalid_id_column_width = Invalid ID Column width\r
+warn.user_defined_width_requirements = The user defined width for the\nannotation and sequence ID columns\nin exported figures must be\nat least 12 pixels wide.\r
+label.couldnt_create_sequence_fetcher = Couldn't create SequenceFetcher\r
+warn.couldnt_create_sequence_fetcher_client = Could not create the sequence fetcher client. Check error logs for details.\r
+warn.server_didnt_pass_validation = Service did not pass validation.\nCheck the Jalview Console for more details.\r
+warn.url_must_contain = Sequence URL must contain $SEQUENCE_ID$ or a regex $SEQUENCE_ID=/<regex>/=$\r
+info.validate_jabaws_server = Validate JabaWS Server ?\n(Look in console output for results)\r
+label.test_server = Test Server?\r
+info.you_want_jalview_to_find_uniprot_accessions = Do you want Jalview to find\nUniprot Accession ids for given sequence names?\r
+label.find_uniprot_accession_ids = Find Uniprot Accession Ids
\ No newline at end of file
jalview.bin.Cache.getProperty("LAST_DIRECTORY"));
chooser.setFileView(new JalviewFileView());
- chooser.setDialogTitle("Save PDB File");
+ chooser.setDialogTitle(MessageManager.getString("label.save_pdb_file"));
chooser.setToolTipText(MessageManager.getString("action.save"));
int value = chooser.showSaveDialog(this);
} catch (OutOfMemoryError er)
{
System.out.println("OUT OF MEMORY LOADING PDB FILE");
- throw new IOException("Out of memory loading PDB File");
+ throw new IOException(MessageManager.getString("exception.outofmemory_loading_pdb_file"));
} catch (NumberFormatException ex)
{
if (line != null)
//
package com.stevesoft.pat;
+import jalview.util.MessageManager;
+
import java.util.*;
/**
*/
Pattern clone1(Hashtable h)
{
- throw new Error("No such method as clone1 for " + getClass().getName());
+ throw new Error(MessageManager.formatMessage("error.no_such_method_as_clone1_for", new String[]{getClass().getName()}));
}
Pattern clone(Hashtable h)
p = clone1(h);
if (p == null)
{
- throw new Error("Null from clone1!");
+ throw new Error(MessageManager.getString("error.null_from_clone1"));
}
h.put(this, p);
h.put(p, p);
//
package com.stevesoft.pat;
+import jalview.util.MessageManager;
+
import java.io.*;
import java.util.*;
{
if (s == null)
{
- throw new NullPointerException("Null String Given to Regex.search");
+ throw new NullPointerException(MessageManager.getString("exception.null_string_given_to_regex_search"));
}
return _search(s, 0, s.length());
}
{
if (sl == null)
{
- throw new NullPointerException(
- "Null StringLike Given to Regex.search");
+ throw new NullPointerException(MessageManager.getString("exception.null_string_like_given_to_regex_search"));
}
return _search(sl, 0, sl.length());
}
{
if (s == null)
{
- throw new NullPointerException(
- "Null String Given to Regex.reverseSearch");
+ throw new NullPointerException(MessageManager.getString("exception.null_string_given_to_regex_reverse_search"));
}
return _reverseSearch(s, 0, s.length());
}
{
if (sl == null)
{
- throw new NullPointerException(
- "Null StringLike Given to Regex.reverseSearch");
+ throw new NullPointerException(MessageManager.getString("exception.null_string_like_given_to_regex_reverse_search"));
}
return _reverseSearch(sl, 0, sl.length());
}
{
if (s == null)
{
- throw new NullPointerException(
- "Null String Given to Regex.searchFrom");
+ throw new NullPointerException(MessageManager.getString("exception.null_string_like_given_to_regex_search_from"));
}
return _search(s, start, s.length());
}
{
if (s == null)
{
- throw new NullPointerException(
- "Null String Given to Regex.searchFrom");
+ throw new NullPointerException(MessageManager.getString("exception.null_string_like_given_to_regex_search_from"));
}
return _search(s, start, s.length());
}
{
if (s == null)
{
- throw new NullPointerException(
- "Null String Given to Regex.searchRegion");
+ throw new NullPointerException(MessageManager.getString("exception.null_string_like_given_to_regex_search_region"));
}
return _search(s, start, end);
}
//
package com.stevesoft.pat;
+import jalview.util.MessageManager;
+
import com.stevesoft.pat.wrap.*;
/** Internally used class. */
lastMatchedTo = 0;
if (rh.me == null)
{
- throw new NullPointerException("Replacer has null Regex pointer");
+ throw new NullPointerException(MessageManager.getString("exception.replace_null_regex_pointer"));
}
if (rh.me._search(s, start, end))
{
//
package com.stevesoft.pat;
+import jalview.util.MessageManager;
+
import com.stevesoft.pat.wrap.*;
/**
Regex r = Regex.perlCode(rs);
if (r == null)
{
- throw new NullPointerException("bad pattern to Regex.perlCode: " + rs);
+ throw new NullPointerException(MessageManager.formatMessage("exception.bad_pattern_to_regex_perl_code", new String[]{rs}));
}
add(r);
}
//
package com.stevesoft.pat.wrap;
+import jalview.util.MessageManager;
+
import java.io.*;
import com.stevesoft.pat.*;
{
}
- throw new ArrayIndexOutOfBoundsException("Out of bounds for file:"
- + " i=" + i + ", Final Buffer: i0=" + i0 + " iend=" + iend);
+ throw new ArrayIndexOutOfBoundsException(MessageManager.formatMessage("exception.out_of_bounds_for_file", new String[]{
+ Integer.valueOf(i).toString(),
+ Integer.valueOf(i0).toString(),
+ Integer.valueOf(iend).toString()
+ }));
}
public String toString()
{
- throw new Error("Not implemented");
+ throw new Error(MessageManager.getString("error.not_implemented"));
}
public int length()
*/
package ext.vamsas;
+import jalview.util.MessageManager;
+
public class IRegistryServiceLocator extends org.apache.axis.client.Service
implements ext.vamsas.IRegistryService
{
{
throw new javax.xml.rpc.ServiceException(t);
}
- throw new javax.xml.rpc.ServiceException(
- "There is no stub implementation for the interface: "
- + (serviceEndpointInterface == null ? "null"
- : serviceEndpointInterface.getName()));
+ throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage("exception.no_stub_implementation_for_interface", new String[]{(serviceEndpointInterface == null ? "null": serviceEndpointInterface.getName())}));
}
/**
}
else
{ // Unknown Port Name
- throw new javax.xml.rpc.ServiceException(
- " Cannot set Endpoint Address for Unknown Port" + portName);
+ throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage("exception.cannot_set_endpoint_address_unknown_port", new String[]{portName}));
}
}
*/
package ext.vamsas;
+import jalview.util.MessageManager;
+
public class JpredServiceLocator extends org.apache.axis.client.Service
implements ext.vamsas.JpredService
{
{
throw new javax.xml.rpc.ServiceException(t);
}
- throw new javax.xml.rpc.ServiceException(
- "There is no stub implementation for the interface: "
- + (serviceEndpointInterface == null ? "null"
- : serviceEndpointInterface.getName()));
+ throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage("exception.no_stub_implementation_for_interface", new String[]{(serviceEndpointInterface == null ? "null": serviceEndpointInterface.getName())}));
}
/**
}
else
{ // Unknown Port Name
- throw new javax.xml.rpc.ServiceException(
- " Cannot set Endpoint Address for Unknown Port" + portName);
+ throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage("exception.cannot_set_endpoint_address_unknown_port", new String[]{portName}));
}
}
*/
package ext.vamsas;
+import jalview.util.MessageManager;
+
public class MuscleWSServiceLocator extends org.apache.axis.client.Service
implements ext.vamsas.MuscleWSService
{
throw new javax.xml.rpc.ServiceException(t);
}
- throw new javax.xml.rpc.ServiceException(
- "There is no stub implementation for the interface: "
- + ((serviceEndpointInterface == null) ? "null"
- : serviceEndpointInterface.getName()));
+ throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage("exception.no_stub_implementation_for_interface", new String[]{(serviceEndpointInterface == null ? "null": serviceEndpointInterface.getName())}));
}
/**
}
else
{ // Unknown Port Name
- throw new javax.xml.rpc.ServiceException(
- " Cannot set Endpoint Address for Unknown Port" + portName);
+ throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage("exception.cannot_set_endpoint_address_unknown_port", new String[]{portName}));
}
}
*/
package ext.vamsas;
+import jalview.util.MessageManager;
+
public class SeqSearchServiceLocator extends org.apache.axis.client.Service
implements ext.vamsas.SeqSearchServiceService
{
{
throw new javax.xml.rpc.ServiceException(t);
}
- throw new javax.xml.rpc.ServiceException(
- "There is no stub implementation for the interface: "
- + (serviceEndpointInterface == null ? "null"
- : serviceEndpointInterface.getName()));
+ throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage("exception.no_stub_implementation_for_interface", new String[]{(serviceEndpointInterface == null ? "null": serviceEndpointInterface.getName())}));
}
/**
}
else
{ // Unknown Port Name
- throw new javax.xml.rpc.ServiceException(
- " Cannot set Endpoint Address for Unknown Port" + portName);
+ throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage("exception.cannot_set_endpoint_address_unknown_port", new String[]{portName}));
}
}
else
{
output.append("Wrong type = dna or pep only");
- throw new Error("Unknown Type " + type2
- + " - dna or pep are the only allowed values.");
+ throw new Error(MessageManager.formatMessage("error.unknown_type_dna_or_pep", new String[]{type2}));
}
}
if (method != FEATURE_SCORE && method != FEATURE_LABEL
&& method != FEATURE_DENSITY)
{
- throw new Error(
- "Implementation Error - sortByFeature method must be one of FEATURE_SCORE, FEATURE_LABEL or FEATURE_DENSITY.");
+ throw new Error(MessageManager.getString("error.implementation_error_sortbyfeature"));
}
boolean ignoreScore = method != FEATURE_SCORE;
StringBuffer scoreLabel = new StringBuffer();
{
if (method == FEATURE_LABEL)
{
- throw new Error("Not yet implemented.");
+ throw new Error(MessageManager.getString("error.not_yet_implemented"));
}
}
if (lastSortByFeatureScore == null
import jalview.analysis.SecStrConsensus.SimpleBP;
import jalview.datamodel.SequenceFeature;
+import jalview.util.MessageManager;
public class Rna
{
{
if (!isClosingParenthesis(closingParenthesis))
{
- throw new WUSSParseException(
- "Querying matching opening parenthesis for non-closing parenthesis character "
- + closingParenthesis, -1);
+ throw new WUSSParseException(MessageManager.formatMessage("exception.querying_matching_opening_parenthesis_for_non_closing_parenthesis", new String[]{new StringBuffer(closingParenthesis).toString()}), -1);
}
return closingToOpening.get(closingParenthesis);
if (!stacks.containsKey(opening))
{
- throw new WUSSParseException(
- "Mismatched (unseen) closing character " + base, i);
+ throw new WUSSParseException(MessageManager.formatMessage("exception.mismatched_unseen_closing_char", new String[]{new StringBuffer(base).toString()}), i);
}
Stack<Integer> stack = stacks.get(opening);
if (stack.isEmpty())
{
// error whilst parsing i'th position. pass back
- throw new WUSSParseException("Mismatched closing character "
- + base, i);
+ throw new WUSSParseException(MessageManager.formatMessage("exception.mismatched_closing_char", new String[]{new StringBuffer(base).toString()}), i);
}
int temp = stack.pop();
Stack<Integer> stack = stacks.get(opening);
if (!stack.empty())
{
- throw new WUSSParseException("Mismatched opening character "
- + opening + " at " + stack.pop(), i);
+ throw new WUSSParseException(MessageManager.formatMessage("exception.mismatched_opening_char", new String[]{new StringBuffer(opening).toString(),Integer.valueOf(stack.pop()).toString()}), i);
}
}
return pairs;
if (dialog.accept)
{
- EditCommand editCommand = new EditCommand("Edit Sequences",
+ EditCommand editCommand = new EditCommand(MessageManager.getString("label.edit_sequences"),
EditCommand.REPLACE, dialog.getName().replace(' ',
ap.av.getGapCharacter()),
sg.getSequencesAsArray(ap.av.getHiddenRepSequences()),
if (newAlignment)
{
- String newtitle = new String("Copied sequences");
- if (getTitle().startsWith("Copied sequences"))
+ String newtitle = MessageManager.getString("label.copied_sequences");
+ if (getTitle().startsWith(MessageManager.getString("label.copied_sequences")))
{
newtitle = getTitle();
}
else
{
- newtitle = newtitle.concat("- from " + getTitle());
+ newtitle = newtitle.concat(MessageManager.formatMessage("label.from_msname", new String[]{getTitle()}));
}
AlignFrame af = new AlignFrame(new Alignment(newSeqs),
viewport.applet, newtitle, false);
}
// !newAlignment
- addHistoryItem(new EditCommand("Add sequences", EditCommand.PASTE,
+ addHistoryItem(new EditCommand(MessageManager.getString("label.add_sequences"), EditCommand.PASTE,
seqs, 0, viewport.getAlignment().getWidth(),
viewport.getAlignment()));
/*
* //ADD HISTORY ITEM
*/
- addHistoryItem(new EditCommand("Cut Sequences", EditCommand.CUT, cut,
+ addHistoryItem(new EditCommand(MessageManager.getString("label.cut_sequences"), EditCommand.CUT, cut,
sg.getStartRes(), sg.getEndRes() - sg.getStartRes() + 1,
viewport.getAlignment()));
MessageManager.getString("label.load_features_annotations"));
MenuItem outputFeatures = new MenuItem(
- MessageManager.getString("label.export_features"));
+ MessageManager.getString("label.export_features").concat("..."));
MenuItem outputAnnotations = new MenuItem(
- MessageManager.getString("label.export_annotations"));
+ MessageManager.getString("label.export_annotations").concat("..."));
MenuItem closeMenuItem = new MenuItem(
MessageManager.getString("action.close"));
sortGroupMenuItem.setLabel(MessageManager.getString("action.by_group"));
sortGroupMenuItem.addActionListener(this);
removeRedundancyMenuItem.setLabel(MessageManager
- .getString("action.remove_redundancy"));
+ .getString("action.remove_redundancy").concat("..."));
removeRedundancyMenuItem.addActionListener(this);
pairwiseAlignmentMenuItem.setLabel(MessageManager
.getString("action.pairwise_alignment"));
threshold.select(1);
break;
default:
- throw new Error(
- "Implementation error: don't know about threshold setting for current AnnotationColourGradient.");
+ throw new Error(MessageManager.getString("error.implementation_error_dont_know_thereshold_annotationcolourgradient"));
}
thresholdIsMin.setState(acg.thresholdIsMinMax);
thresholdValue.setText("" + acg.getAnnotationThreshold());
String[][] boundchains, boolean align, AlignmentPanel ap,
String protocol)
{
- throw new Error("Not yet implemented.");
+ throw new Error(MessageManager.getString("error.not_yet_implemented"));
}
public AppletJmol(PDBEntry pdbentry, SequenceI[] seq, String[] chains,
}
if (freader == null)
{
- throw new Exception(
- "Invalid datasource. Could not obtain Reader.");
+ throw new Exception(MessageManager.getString("exception.invalid_datasource_couldnt_obtain_reader"));
}
jmb.viewer.openReader(pdbentry.getFile(), pdbentry.getId(),
freader);
{
if (embeddedPopup == null)
{
- throw new Error(
- "Implementation error - embeddedPopup must be non-null");
+ throw new Error(MessageManager.getString("error.implementation_error_embeddedpopup_not_null"));
}
if (overrideFonts)
{
}
else
{
- throw new Error("Invalid color for MyCheckBox");
+ throw new Error(MessageManager.getString("error.invalid_colour_for_mycheckbox"));
}
if (col != null)
{
return ((GraduatedColor) fc).getMaxColor();
}
}
- throw new Error("Implementation Error: Unrecognised render object "
- + fc.getClass() + " for features of type " + featureType);
+ throw new Error(MessageManager.formatMessage("error.implementation_error_unrecognised_render_object_for_features_type", new String[]{fc.getClass(),featureType}));
}
/**
}
else
{
- throw new Error(
- "Implementation error: Unsupported feature colour object.");
+ throw new Error(MessageManager.getString("error.implementation_error_unsupported_feature_colour_object"));
}
refreshTable();
}
}
else
{
- throw new Error("Invalid color for MyCheckBox");
+ throw new Error(MessageManager.getString("error.invalid_colour_for_mycheckbox"));
}
if (col != null)
{
}
}
- EditCommand cut = new EditCommand("Remove Redundancy",
+ EditCommand cut = new EditCommand(MessageManager.getString("action.remove_redundancy"),
EditCommand.CUT, deleted, 0, width, ap.av.getAlignment());
AlignmentI alignment = ap.av.getAlignment();
for (int i = 0; i < del.size(); i++)
import jalview.structure.SelectionSource;
import jalview.structure.SequenceListener;
import jalview.structure.StructureSelectionManager;
+import jalview.util.MessageManager;
public class SeqPanel extends Panel implements MouseMotionListener,
MouseListener, SequenceListener
StringBuffer message = new StringBuffer();
if (groupEditing)
{
- message.append("Edit group:");
+ message.append(MessageManager.getString("action.edit_group")).append(":");
if (editCommand == null)
{
- editCommand = new EditCommand("Edit Group");
+ editCommand = new EditCommand(MessageManager.getString("action.edit_group"));
}
}
else
{
- message.append("Edit sequence: " + seq.getName());
+ message.append(MessageManager.getString("label.edit_sequence")).append(" " + seq.getName());
String label = seq.getName();
if (label.length() > 10)
{
}
if (editCommand == null)
{
- editCommand = new EditCommand("Edit " + label);
+ editCommand = new EditCommand(MessageManager.formatMessage("label.edit_params", new String[]{label}));
}
}
sp.cs = cs;
}
- conservationSlider.setTitle("Conservation Colour Increment (" + source
- + ")");
+ conservationSlider.setTitle(MessageManager.formatMessage("label.conservation_colour_increment", new String[]{source}));
if (ap.av.getAlignment().getGroups() != null)
{
sp.setAllGroupsCheckEnabled(true);
pid = (SliderPanel) PIDSlider.getComponent(0);
pid.cs = cs;
}
- PIDSlider.setTitle("Percentage Identity Threshold (" + source + ")");
+ PIDSlider.setTitle(MessageManager.formatMessage("label.percentage_identity_thereshold", new String[]{source}));
if (ap.av.getAlignment().getGroups() != null)
{
setTargetColour(colour);
okcancelPanel.setBounds(new Rectangle(0, 113, 400, 35));
- frame.setTitle("User Defined Colours - " + label);
+ frame.setTitle(MessageManager.getString("label.user_defined_colours") + " - " + label);
frame.setSize(420, 200);
}
// // not 1.1 compatible!
// dialog = new Dialog(((JVDialog)alignframe), title, true);
// } else {
- throw new Error("Unsupported owner for User Colour scheme dialog.");
+ throw new Error(MessageManager.getString("label.error_unsupported_owwner_user_colour_scheme"));
}
dialog.add(this);
import javax.swing.*;
import jalview.gui.*;
+import jalview.util.MessageManager;
import jalview.util.Platform;
/**
{
if (!headless)
{
- desktop.setProgressBar("Processing commandline arguments...",
+ desktop.setProgressBar(MessageManager.getString("status.processing_commandline_args"),
progress = System.currentTimeMillis());
}
System.out.println("Opening file: " + file);
running++;
}
- af.setProgressBar("DAS features being retrieved...", id);
+ af.setProgressBar(MessageManager.getString("status.das_features_being_retrived"), id);
af.featureSettings_actionPerformed(null);
af.featureSettings.fetchDasFeatures(dasSources, true);
af.setProgressBar(null, id);
}
else
{
- throw new Error(
- "Invalid separator parameter - must be non-zero length");
+ throw new Error(MessageManager.getString("error.invalid_separator_parameter"));
}
}
int r = 255;
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._annotationElementList.size())
{
- throw new IndexOutOfBoundsException(
- "getAnnotationElement: Index value '" + index
- + "' not in range [0.."
- + (this._annotationElementList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getAnnotationElement",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._annotationElementList.size() - 1)).toString()
+ }));
}
return (jalview.binding.AnnotationElement) _annotationElementList
// check bounds for index
if (index < 0 || index >= this._annotationElementList.size())
{
- throw new IndexOutOfBoundsException(
- "setAnnotationElement: Index value '" + index
- + "' not in range [0.."
- + (this._annotationElementList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setAnnotationElement",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._annotationElementList.size() - 1)).toString()
+ }));
}
this._annotationElementList.set(index, vAnnotationElement);
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._settingList.size())
{
- throw new IndexOutOfBoundsException("getSetting: Index value '"
- + index + "' not in range [0.."
- + (this._settingList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getSetting",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._settingList.size() - 1)).toString()
+ }));
}
return (jalview.binding.Setting) _settingList.get(index);
// check bounds for index
if (index < 0 || index >= this._settingList.size())
{
- throw new IndexOutOfBoundsException("setSetting: Index value '"
- + index + "' not in range [0.."
- + (this._settingList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setSetting",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._settingList.size() - 1)).toString()
+ }));
}
this._settingList.set(index, vSetting);
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._seqList.size())
{
- throw new IndexOutOfBoundsException("getSeq: Index value '" + index
- + "' not in range [0.." + (this._seqList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getSeq",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._seqList.size() - 1)).toString()
+ }));
}
return ((java.lang.Integer) _seqList.get(index)).intValue();
// check bounds for index
if (index < 0 || index >= this._seqList.size())
{
- throw new IndexOutOfBoundsException("setSeq: Index value '" + index
- + "' not in range [0.." + (this._seqList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setSeq",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._seqList.size() - 1)).toString()
+ }));
}
this._seqList.set(index, new java.lang.Integer(vSeq));
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._featuresList.size())
{
- throw new IndexOutOfBoundsException("getFeatures: Index value '"
- + index + "' not in range [0.."
- + (this._featuresList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getFeatures",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._featuresList.size() - 1)).toString()
+ }));
}
return (jalview.binding.Features) _featuresList.get(index);
// check bounds for index
if (index < 0 || index >= this._pdbidsList.size())
{
- throw new IndexOutOfBoundsException("getPdbids: Index value '"
- + index + "' not in range [0.."
- + (this._pdbidsList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getPdbids",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._pdbidsList.size() - 1)).toString()
+ }));
}
return (jalview.binding.Pdbids) _pdbidsList.get(index);
// check bounds for index
if (index < 0 || index >= this._featuresList.size())
{
- throw new IndexOutOfBoundsException("setFeatures: Index value '"
- + index + "' not in range [0.."
- + (this._featuresList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setFeatures",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._featuresList.size() - 1)).toString()
+ }));
}
this._featuresList.set(index, vFeatures);
// check bounds for index
if (index < 0 || index >= this._pdbidsList.size())
{
- throw new IndexOutOfBoundsException("setPdbids: Index value '"
- + index + "' not in range [0.."
- + (this._pdbidsList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setPdbids",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._pdbidsList.size() - 1)).toString()
+ }));
}
this._pdbidsList.set(index, vPdbids);
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._JGroupList.size())
{
- throw new IndexOutOfBoundsException("getJGroup: Index value '"
- + index + "' not in range [0.."
- + (this._JGroupList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getJGroup",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._JGroupList.size() - 1)).toString()
+ }));
}
return (jalview.binding.JGroup) _JGroupList.get(index);
// check bounds for index
if (index < 0 || index >= this._JSeqList.size())
{
- throw new IndexOutOfBoundsException("getJSeq: Index value '" + index
- + "' not in range [0.." + (this._JSeqList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getJSeq",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._JSeqList.size() - 1)).toString()
+ }));
}
return (jalview.binding.JSeq) _JSeqList.get(index);
// check bounds for index
if (index < 0 || index >= this._treeList.size())
{
- throw new IndexOutOfBoundsException("getTree: Index value '" + index
- + "' not in range [0.." + (this._treeList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getJgetTreeSeq",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._treeList.size() - 1)).toString()
+ }));
}
return (jalview.binding.Tree) _treeList.get(index);
// check bounds for index
if (index < 0 || index >= this._userColoursList.size())
{
- throw new IndexOutOfBoundsException("getUserColours: Index value '"
- + index + "' not in range [0.."
- + (this._userColoursList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getUserColours",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._userColoursList.size() - 1)).toString()
+ }));
}
return (jalview.binding.UserColours) _userColoursList.get(index);
// check bounds for index
if (index < 0 || index >= this._viewportList.size())
{
- throw new IndexOutOfBoundsException("getViewport: Index value '"
- + index + "' not in range [0.."
- + (this._viewportList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getViewport",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._viewportList.size() - 1)).toString()
+ }));
}
return (jalview.binding.Viewport) _viewportList.get(index);
// check bounds for index
if (index < 0 || index >= this._JGroupList.size())
{
- throw new IndexOutOfBoundsException("setJGroup: Index value '"
- + index + "' not in range [0.."
- + (this._JGroupList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setJGroup",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._JGroupList.size() - 1)).toString()
+ }));
}
this._JGroupList.set(index, vJGroup);
// check bounds for index
if (index < 0 || index >= this._JSeqList.size())
{
- throw new IndexOutOfBoundsException("setJSeq: Index value '" + index
- + "' not in range [0.." + (this._JSeqList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setJSeq",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._JSeqList.size() - 1)).toString()
+ }));
}
this._JSeqList.set(index, vJSeq);
// check bounds for index
if (index < 0 || index >= this._treeList.size())
{
- throw new IndexOutOfBoundsException("setTree: Index value '" + index
- + "' not in range [0.." + (this._treeList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setTree",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._treeList.size() - 1)).toString()
+ }));
}
this._treeList.set(index, vTree);
// check bounds for index
if (index < 0 || index >= this._userColoursList.size())
{
- throw new IndexOutOfBoundsException("setUserColours: Index value '"
- + index + "' not in range [0.."
- + (this._userColoursList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setUserColours",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._userColoursList.size() - 1)).toString()
+ }));
}
this._userColoursList.set(index, vUserColours);
// check bounds for index
if (index < 0 || index >= this._viewportList.size())
{
- throw new IndexOutOfBoundsException("setViewport: Index value '"
- + index + "' not in range [0.."
- + (this._viewportList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setViewport",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._viewportList.size() - 1)).toString()
+ }));
}
this._viewportList.set(index, vViewport);
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._colourList.size())
{
- throw new IndexOutOfBoundsException("getColour: Index value '"
- + index + "' not in range [0.."
- + (this._colourList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getColour",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._colourList.size() - 1)).toString()
+ }));
}
return (Colour) _colourList.get(index);
// check bounds for index
if (index < 0 || index >= this._colourList.size())
{
- throw new IndexOutOfBoundsException("setColour: Index value '"
- + index + "' not in range [0.."
- + (this._colourList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setColour",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._colourList.size() - 1)).toString()
+ }));
}
this._colourList.set(index, vColour);
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._items.size())
{
- throw new IndexOutOfBoundsException("getPdbentryItem: Index value '"
- + index + "' not in range [0.." + (this._items.size() - 1)
- + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getPdbentryItem",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._items.size() - 1)).toString()
+ }));
}
return (jalview.binding.PdbentryItem) _items.get(index);
// check bounds for index
if (index < 0 || index >= this._items.size())
{
- throw new IndexOutOfBoundsException("setPdbentryItem: Index value '"
- + index + "' not in range [0.." + (this._items.size() - 1)
- + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setPdbentryItem",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._items.size() - 1)).toString()
+ }));
}
this._items.set(index, vPdbentryItem);
*/
package jalview.binding;
+import jalview.util.MessageManager;
+
/**
* Class PdbentryItem.
*
// check bounds for index
if (index < 0 || index >= this._propertyList.size())
{
- throw new IndexOutOfBoundsException("getProperty: Index value '"
- + index + "' not in range [0.."
- + (this._propertyList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getProperty",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._propertyList.size() - 1)).toString()
+ }));
}
return (jalview.binding.Property) _propertyList.get(index);
// check bounds for index
if (index < 0 || index >= this._propertyList.size())
{
- throw new IndexOutOfBoundsException("setProperty: Index value '"
- + index + "' not in range [0.."
- + (this._propertyList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setProperty",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._propertyList.size() - 1)).toString()
+ }));
}
this._propertyList.set(index, vProperty);
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._annotationList.size())
{
- throw new IndexOutOfBoundsException("getAnnotation: Index value '"
- + index + "' not in range [0.."
- + (this._annotationList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getAnnotation",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._annotationList.size() - 1)).toString()
+ }));
}
return (jalview.binding.Annotation) _annotationList.get(index);
// check bounds for index
if (index < 0 || index >= this._sequenceList.size())
{
- throw new IndexOutOfBoundsException("getSequence: Index value '"
- + index + "' not in range [0.."
- + (this._sequenceList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getSequence",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._sequenceList.size() - 1)).toString()
+ }));
}
return (jalview.binding.Sequence) _sequenceList.get(index);
// check bounds for index
if (index < 0 || index >= this._annotationList.size())
{
- throw new IndexOutOfBoundsException("setAnnotation: Index value '"
- + index + "' not in range [0.."
- + (this._annotationList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setAnnotation",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._annotationList.size() - 1)).toString()
+ }));
}
this._annotationList.set(index, vAnnotation);
// check bounds for index
if (index < 0 || index >= this._sequenceList.size())
{
- throw new IndexOutOfBoundsException("setSequence: Index value '"
- + index + "' not in range [0.."
- + (this._sequenceList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setSequence",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._sequenceList.size() - 1)).toString()
+ }));
}
this._sequenceList.set(index, vSequence);
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._alignmentList.size())
{
- throw new IndexOutOfBoundsException("getAlignment: Index value '"
- + index + "' not in range [0.."
- + (this._alignmentList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getAlignment",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._alignmentList.size() - 1)).toString()
+ }));
}
return (Alignment) _alignmentList.get(index);
// check bounds for index
if (index < 0 || index >= this._sequenceSetList.size())
{
- throw new IndexOutOfBoundsException("getSequenceSet: Index value '"
- + index + "' not in range [0.."
- + (this._sequenceSetList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getSequenceSet",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._sequenceSetList.size() - 1)).toString()
+ }));
}
return (SequenceSet) _sequenceSetList.get(index);
// check bounds for index
if (index < 0 || index >= this._treeList.size())
{
- throw new IndexOutOfBoundsException("getTree: Index value '" + index
- + "' not in range [0.." + (this._treeList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getTree",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._treeList.size() - 1)).toString()
+ }));
}
return (java.lang.String) _treeList.get(index);
// check bounds for index
if (index < 0 || index >= this._alignmentList.size())
{
- throw new IndexOutOfBoundsException("setAlignment: Index value '"
- + index + "' not in range [0.."
- + (this._alignmentList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setAlignment",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._alignmentList.size() - 1)).toString()
+ }));
}
this._alignmentList.set(index, vAlignment);
// check bounds for index
if (index < 0 || index >= this._sequenceSetList.size())
{
- throw new IndexOutOfBoundsException("setSequenceSet: Index value '"
- + index + "' not in range [0.."
- + (this._sequenceSetList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setSequenceSet",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._sequenceSetList.size() - 1)).toString()
+ }));
}
this._sequenceSetList.set(index, vSequenceSet);
// check bounds for index
if (index < 0 || index >= this._treeList.size())
{
- throw new IndexOutOfBoundsException("setTree: Index value '" + index
- + "' not in range [0.." + (this._treeList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setTree",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._treeList.size() - 1)).toString()
+ }));
}
this._treeList.set(index, vTree);
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
+import jalview.util.MessageManager;
public class AlignViewController implements AlignViewControllerI
{
}
viewport.setColumnSelection(cs);
alignPanel.paintAlignment(true);
- avcg.setStatus((toggle ? "Toggled " : "Marked ")
- + (invert ? (alw - alStart) - bs.cardinality() : bs
- .cardinality()) + " columns "
- + (invert ? "not " : "") + "containing features of type "
- + featureType + " across " + nseq + " sequence(s)");
+ avcg.setStatus(MessageManager.formatMessage("label.view_controller_toggled_marked",
+ new String[]{
+ (toggle ? MessageManager.getString("label.toggled") : MessageManager.getString("label.marked")),
+ (invert ? (Integer.valueOf((alw - alStart) - bs.cardinality()).toString()):(Integer.valueOf(bs.cardinality()).toString())),
+ featureType, Integer.valueOf(nseq).toString()
+ }));
return true;
}
else
{
- avcg.setStatus("No features of type " + featureType + " found.");
+ avcg.setStatus(MessageManager.formatMessage("label.no_feature_of_type_found", new String[]{featureType}));
if (!extendCurrent && cs != null)
{
cs.clear();
*/
public static AlignmentI createAlignment(CigarArray compactAlignment)
{
- throw new Error("Alignment(CigarArray) not yet implemented");
+ throw new Error(MessageManager.getString("error.alignment_cigararray_not_implemented"));
// this(compactAlignment.refCigars);
}
*/
package jalview.datamodel;
+import jalview.util.MessageManager;
+
import java.util.*;
public class AlignmentOrder
{
if (!identity)
{
- throw new Error("Weak sequenceI equivalence not yet implemented.");
+ throw new Error(MessageManager.getString("error.weak_sequencei_equivalence_not_yet_implemented"));
}
else
{
}
if (!identity)
{
- throw new Error("Weak sequenceI equivalence not yet implemented.");
+ throw new Error(MessageManager.getString("error.weak_sequencei_equivalence_not_yet_implemented"));
}
else
{
*/
package jalview.datamodel;
+import jalview.util.MessageManager;
import jalview.util.ShiftList;
import java.io.PrintStream;
{
if (!seqcigararray.isSeqCigarArray())
{
- throw new Error(
- "Implementation Error - can only make an alignment view from a CigarArray of sequences.");
+ throw new Error(MessageManager.getString("error.implementation_error_can_only_make_alignmnet_from_cigararray"));
}
// contigs = seqcigararray.applyDeletions();
contigs = seqcigararray.getDeletedRegions();
{
if (sequences == null || width <= 0)
{
- throw new Error("empty view cannot be updated.");
+ throw new Error(MessageManager.getString("error.empty_view_cannot_be_updated"));
}
if (nvismsa == null)
{
j++;
if (mseq.length != sequences.length)
{
- throw new Error(
- "Mismatch between number of sequences in block "
- + j + " (" + mseq.length
- + ") and the original view ("
- + sequences.length + ")");
+ throw new Error(MessageManager.formatMessage("error.mismatch_between_number_of_sequences_in_block", new String[]{Integer.valueOf(j).toString(),Integer.valueOf(mseq.length).toString(),Integer.valueOf(sequences.length).toString() }));
}
swidth = mseq[0].getLength(); // JBPNote: could ensure padded
// here.
else
{
// place gaps.
- throw new Error("Padding not yet implemented.");
+ throw new Error(MessageManager.getString("error.padding_not_yet_implemented"));
}
}
}
{
if (nvismsa.length != 1)
{
- throw new Error(
- "Mismatch between visible blocks to update and number of contigs in view (contigs=0,blocks="
- + nvismsa.length);
+ throw new Error(MessageManager.formatMessage("error.mismatch_between_visible_blocks_to_update_and_number_of_contigs_in_view", new String[]{Integer.valueOf(nvismsa.length).toString()}));
}
if (nvismsa[0] != null)
{
*/
package jalview.datamodel;
+import jalview.util.MessageManager;
+
import java.util.*;
public abstract class CigarBase
endpos = alcursor;
break;
default:
- throw new Error("Unknown SeqCigar operation '" + operation[i] + "'");
+ throw new Error(MessageManager.formatMessage("error.unknown_seq_cigar_operation", new String[]{new StringBuffer(operation[i]).toString()}));
}
}
if (++delcount > 0)
} while (c >= '0' && c <= '9' && j < l);
if (j >= l && c >= '0' && c <= '9')
{
- throw new Exception("Unterminated cigar string.");
+ throw new Exception(MessageManager.getString("exception.unterminated_cigar_string"));
}
try
{
i = j;
} catch (Exception e)
{
- throw new Error("Implementation bug in parseCigarString");
+ throw new Error(MessageManager.getString("error.implementation_bug_parse_cigar_string"));
}
if (c >= 'a' && c <= 'z')
{
}
else
{
- throw new Exception("Unexpected operation '" + c
- + "' in cigar string (position " + i + " in '"
- + cigarString + "'");
+ throw new Exception(MessageManager.formatMessage("exception.unexpected_operation_cigar_string_pos", new String[]{
+ new StringBuffer(c).toString(),
+ Integer.valueOf(i).toString(),
+ cigarString
+ }));
}
}
return new Object[]
}
if (op != M && op != D && op != I)
{
- throw new Error("Implementation error. Invalid operation string.");
+ throw new Error(MessageManager.getString("error.implementation_error_invalid_operation_string"));
}
if (range == 0)
{
}
if (range < 0)
{
- throw new Error(
- "Invalid range string (must be zero or positive number)");
+ throw new Error(MessageManager.getString("error.invalid_range_string"));
}
int lngth = 0;
if (operation == null)
}
if (start < 0 || start > end)
{
- throw new Error(
- "Implementation Error: deleteRange out of bounds: start must be non-negative and less than end.");
+ throw new Error(MessageManager.getString("error.implementation_error_delete_range_out_of_bounds"));
}
// find beginning
int cursor = 0; // mark the position for the current operation being edited.
}
break;
case D:
- throw new Error("Implementation error."); // do nothing;
+ throw new Error(MessageManager.getString("error.implementation_error")); // do nothing;
default:
- throw new Error("Implementation Error! Unknown operation '"
- + oldops[o] + "'");
+ throw new Error(MessageManager.formatMessage("error.implementation_error_unknown_operation", new String[]{new StringBuffer(oldops[o]).toString()}));
}
rlength -= remain;
remain = oldrange[++o]; // number of op characters left to edit
refseq.getSequenceAsString(start, end), GapChar);
if (edit_result == null)
{
- throw new Error(
- "Implementation Error - unexpected null from getSequenceAndDeletions");
+ throw new Error(MessageManager.getString("error.implementation_error_unexpected_null_from_get_sequence_and_deletions"));
}
int bounds[] = (int[]) edit_result[1];
seq = new Sequence(refseq.getName(), (String) edit_result[0],
boolean hasgaps = false;
if (seq == null)
{
- throw new Error("Implementation Error - _setSeq(null,...)");
+ throw new Error(MessageManager.getString("error.implementation_error_set_seq_null"));
}
if (_s < 0)
{
- throw new Error("Implementation Error: _s=" + _s);
+ throw new Error(MessageManager.formatMessage("error.implementation_error_s", new String[]{Integer.valueOf(_s).toString()}));
}
String seq_string = seq.getSequenceAsString();
if (_e == 0 || _e < _s || _e > seq_string.length())
// Check offsets
if (end > ds.getLength())
{
- throw new Error(
- "SeqCigar: Possible implementation error: sequence is longer than dataset sequence");
+ throw new Error(MessageManager.getString("error.implementation_error_seqcigar_possible"));
// end = ds.getLength();
}
super();
if (seq == null)
{
- throw new Error("Implementation Bug. Null seq !");
+ throw new Error(MessageManager.getString("error.implmentation_bug_seq_null"));
}
if (operation.length != range.length)
{
- throw new Error(
- "Implementation Bug. Cigar Operation list!= range list");
+ throw new Error(MessageManager.getString("error.implementation_bug_cigar_operation_list_range_list"));
}
if (operation != null)
if (_setSeq(seq, false, 0, 0))
{
- throw new Error(
- "NOT YET Implemented: Constructing a Cigar object from a cigar string and a gapped sequence.");
+ throw new Error(MessageManager.getString("error.not_yet_implemented_cigar_object_from_cigar_string"));
}
for (int i = this.length, j = 0; j < operation.length; i++, j++)
{
char op = operation[j];
if (op != M && op != I && op != D)
{
- throw new Error("Implementation Bug. Cigar Operation '" + j
- + "' '" + op + "' not one of '" + M + "', '" + I
- + "', or '" + D + "'.");
+ throw new Error(MessageManager.formatMessage("error.implementation_bug_cigar_operation", new String[]{Integer.valueOf(j).toString(),Integer.valueOf(op).toString(),Integer.valueOf(M).toString(),Integer.valueOf(I).toString(),Integer.valueOf(D).toString()}));
}
this.operation[i] = op;
this.range[i] = range[j];
this.length = 0;
if (_setSeq(seq, false, 0, 0))
{
- throw new Error(
- "NOT YET Implemented: Constructing a Cigar object from a cigar string and a gapped sequence.");
+ throw new Error(MessageManager.getString("error.not_yet_implemented_cigar_object_from_cigar_string"));
}
}
}
super();
if (seq == null)
{
- throw new Error("Implementation error for new Cigar(SequenceI)");
+ throw new Error(MessageManager.getString("error.implementation_error_for_new_cigar"));
}
_setSeq(seq, false, 0, 0);
// there is still work to do
super();
if (seq == null)
{
- throw new Error("Implementation error for new Cigar(SequenceI)");
+ throw new Error(MessageManager.getString("error.implementation_error_for_new_cigar"));
}
_setSeq(seq, false, start, end + 1);
// there is still work to do
// endcol}, hidden regions {{start, end, col}})
if (gs_regions[i] == null)
{
- throw new Error("Implementation error: " + i
- + "'th sequence Cigar has no operations.");
+ throw new Error(MessageManager.formatMessage("error.implementation_error_cigar_seq_no_operations", new String[]{Integer.valueOf(i).toString()}));
}
g_seqs[i] = new StringBuffer((String) ((Object[]) gs_regions[i])[0]); // the
// visible
import jalview.structure.StructureMapping;
import jalview.structure.StructureSelectionManager;
import jalview.structures.models.SequenceStructureBindingModel;
+import jalview.util.MessageManager;
import java.awt.Color;
import java.awt.Container;
// Jmol callback has completed.
if (mapping == null || mapping.length < 1)
{
- throw new Error(
- "Implementation error - Jmol seems to be still working on getting its data - report at http://issues.jalview.org/browse/JAL-1016");
+ throw new Error(MessageManager.getString("error.implementation_error_jmol_getting_data"));
}
int lastPos = -1;
for (int s = 0; s < sequence[pdbfnum].length; s++)
{
if (pe < 0 || pe >= pdbentry.length)
{
- throw new Error(
- "Implementation error - no corresponding pdbentry (for index "
- + pe + ") to add sequences mappings to");
+ throw new Error(MessageManager.formatMessage("error.implementation_error_no_pdbentry_from_index", new String[]{Integer.valueOf(pe).toString()}));
}
final String nullChain = "TheNullChain";
Vector s = new Vector();
import jalview.datamodel.SequenceI;
import jalview.io.AlignFile;
import jalview.io.FileParse;
+import jalview.util.MessageManager;
/**
* Import and process PDB files with Jmol
jmolApp.startViewer(viewer, null);
} catch (ClassCastException x)
{
- throw new Error(
- "Jmol version "
- + JmolViewer.getJmolVersion()
- + " is not compatible with this version of Jalview. Report this problem at issues.jalview.org",
+ throw new Error(MessageManager.formatMessage("error.jmol_version_not_compatible_with_jalview_version", new String[]{JmolViewer.getJmolVersion()}),
x);
}
}
*/
package jalview.ext.paradise;
+import jalview.util.MessageManager;
import jalview.ws.HttpClientUtils;
import java.io.IOException;
@Override
public void remove()
{
- throw new Error("Remove: Not implemented");
+ throw new Error(MessageManager.getString("error.not_implemented_remove"));
}
@Override
protected Object clone() throws CloneNotSupportedException
{
- throw new CloneNotSupportedException("Clone: Not implemented");
+ throw new CloneNotSupportedException(MessageManager.getString("error.not_implemented_clone"));
}
@Override
};
} catch (Exception foo)
{
- throw new Exception(
- "Couldn't parse response from Annotate3d server.", foo);
+ throw new Exception(MessageManager.getString("exception.couldnt_parse_responde_from_annotated3d_server"), foo);
}
}
import jalview.structure.StructureMapping;
import jalview.structure.StructureSelectionManager;
import jalview.structures.models.SequenceStructureBindingModel;
+import jalview.util.MessageManager;
import java.awt.Color;
import java.awt.event.ComponentEvent;
// Jmol callback has completed.
if (mapping == null || mapping.length < 1)
{
- throw new Error(
- "Implementation error - Chimera seems to be still working on getting its data - report at http://issues.jalview.org/browse/JAL-1016");
+ throw new Error(MessageManager.getString("error.implementation_error_chimera_getting_data"));
}
int lastPos = -1;
for (int s = 0; s < sequence[pdbfnum].length; s++)
{
if (pe < 0 || pe >= pdbentry.length)
{
- throw new Error(
- "Implementation error - no corresponding pdbentry (for index "
- + pe + ") to add sequences mappings to");
+ throw new Error(MessageManager.formatMessage("error.implementation_error_no_pdbentry_from_index", new String[]{Integer.valueOf(pe).toString()}));
}
final String nullChain = "TheNullChain";
Vector s = new Vector();
{
if (progressBarHandlers == null || !progressBars.contains(new Long(id)))
{
- throw new Error(
- "call setProgressBar before registering the progress bar's handler.");
+ throw new Error(MessageManager.getString("error.call_setprogressbar_before_registering_handler"));
}
progressBarHandlers.put(new Long(id), handler);
final JPanel progressPanel = (JPanel) progressBars.get(new Long(id));
public void actionPerformed(ActionEvent e)
{
handler.cancelActivity(id);
- us.setProgressBar(
- "Cancelled "
- + ((JLabel) progressPanel.getComponent(0))
- .getText(), id);
+ us.setProgressBar(MessageManager.formatMessage("label.cancelled_params", new String[]{((JLabel) progressPanel.getComponent(0)).getText()}), id);
}
});
progressPanel.add(cancel, BorderLayout.EAST);
currentFileFormat, false);
chooser.setFileView(new JalviewFileView());
- chooser.setDialogTitle("Save Alignment to file");
+ chooser.setDialogTitle(MessageManager.getString("label.save_alignment_to_file"));
chooser.setToolTipText(MessageManager.getString("action.save"));
int value = chooser.showSaveDialog(this);
// /////
// ADD HISTORY ITEM
//
- addHistoryItem(new EditCommand("Add sequences", EditCommand.PASTE,
+ addHistoryItem(new EditCommand(MessageManager.getString("label.add_sequences"), EditCommand.PASTE,
sequences, 0, alignment.getWidth(), alignment));
}
// Add any annotations attached to sequences
/*
* //ADD HISTORY ITEM
*/
- addHistoryItem(new EditCommand("Cut Sequences", EditCommand.CUT, cut,
+ addHistoryItem(new EditCommand(MessageManager.getString("label.cut_sequences"), EditCommand.CUT, cut,
sg.getStartRes(), sg.getEndRes() - sg.getStartRes() + 1,
viewport.getAlignment()));
boolean addFirstIndex = false;
if (viewTitle == null || viewTitle.trim().length() == 0)
{
- viewTitle = "View";
+ viewTitle = MessageManager.getString("action.view");
addFirstIndex = true;
}
else
public void run()
{
final long sttime = System.currentTimeMillis();
- ths.setProgressBar("Searching for sequences from " + fsrc, sttime);
+ ths.setProgressBar(MessageManager.formatMessage("status.searching_for_sequences_from", new String[]{fsrc}), sttime);
try
{
Alignment ds = ths.getViewport().getAlignment().getDataset(); // update
jalview.bin.Cache.log.error("Error when finding crossreferences",
e);
}
- ths.setProgressBar("Finished searching for sequences from " + fsrc,
+ ths.setProgressBar(MessageManager.formatMessage("status.finished_searching_for_sequences_from", new String[]{fsrc}),
sttime);
}
if (!viewport.getSequenceSetId().equals(
alignmentPanel.av.getSequenceSetId()))
{
- throw new Error(
- "Implementation error: cannot show a view from another alignment in an AlignFrame.");
+ throw new Error(MessageManager.getString("error.implementation_error_cannot_show_view_alignment_frame"));
}
if (tabbedPane != null
& alignPanels.indexOf(alignmentPanel) != tabbedPane
import jalview.jbgui.*;
import jalview.schemes.*;
import jalview.structure.StructureSelectionManager;
+import jalview.util.MessageManager;
/**
* DOCUMENT ME!
.getProperty("java.awt.headless").equals("true"));
if (alignFrame != null && !headless)
{
- alignFrame.setProgressBar("Saving "
- + (type == jalview.util.ImageMaker.PNG ? "PNG image"
- : "EPS file"), progress);
+ alignFrame.setProgressBar(MessageManager.formatMessage("status.saving_file", new String[]{(type == jalview.util.ImageMaker.PNG ? MessageManager.getString("label.png_image") : MessageManager.getString("label.eps_file"))}), progress);
}
try
{
{
if (alignFrame != null && !headless)
{
- alignFrame.setProgressBar("Export complete.", progress);
+ alignFrame.setProgressBar(MessageManager.getString("status.export_complete"), progress);
}
}
}
threshold.setSelectedIndex(2);
break;
default:
- throw new Error(
- "Implementation error: don't know about threshold setting for current AnnotationColourGradient.");
+ throw new Error(MessageManager.getString("error.implementation_error_dont_know_about_thereshold_setting"));
}
thresholdIsMin.setSelected(acg.thresholdIsMinMax);
thresholdValue.setText("" + acg.getAnnotationThreshold());
public void minColour_actionPerformed()
{
Color col = JColorChooser.showDialog(this,
- "Select Colour for Minimum Value", minColour.getBackground());
+ MessageManager.getString("label.select_colour_minimum_value"), minColour.getBackground());
if (col != null)
{
minColour.setBackground(col);
public void maxColour_actionPerformed()
{
Color col = JColorChooser.showDialog(this,
- "Select Colour for Maximum Value", maxColour.getBackground());
+ MessageManager.getString("label.select_colour_maximum_value"), maxColour.getBackground());
if (col != null)
{
maxColour.setBackground(col);
this.ap = ap;
features = true;
CSVFormat.setVisible(false);
- frame.setTitle("Export Features");
+ frame.setTitle(MessageManager.getString("label.export_features"));
}
public void exportAnnotations(AlignmentPanel ap,
this.annotations = annotations;
this.sequenceGroups = list;
this.alignmentProperties = alProperties;
- frame.setTitle("Export Annotations");
+ frame.setTitle(MessageManager.getString("label.export_annotations"));
}
public void toFile_actionPerformed(ActionEvent e)
jalview.bin.Cache.getProperty("LAST_DIRECTORY"));
chooser.setFileView(new JalviewFileView());
- chooser.setDialogTitle(features ? "Save Features to File"
- : "Save Annotation to File");
+ chooser.setDialogTitle(features ? MessageManager.getString("label.save_features_to_file")
+ : MessageManager.getString("label.save_annotation_to_file"));
chooser.setToolTipText(MessageManager.getString("action.save"));
int value = chooser.showSaveDialog(this);
if (value == JalviewFileChooser.APPROVE_OPTION)
{
- String text = "No features found on alignment";
+ String text = MessageManager.getString("label.no_features_on_alignment");
if (features)
{
if (GFFFormat.isSelected())
public void toTextbox_actionPerformed(ActionEvent e)
{
- String text = "No features found on alignment";
+ String text = MessageManager.getString("label.no_features_on_alignment");
if (features)
{
if (GFFFormat.isSelected())
else if (evt.getActionCommand().equals(COLOUR))
{
Color col = JColorChooser.showDialog(this,
- "Choose foreground colour", Color.black);
+ MessageManager.getString("label.select_foreground_colour"), Color.black);
for (int i = 0; i < av.getColumnSelection().size(); i++)
{
long hdl = pdbid.hashCode() - System.currentTimeMillis();
if (progressBar != null)
{
- progressBar.setProgressBar("Fetching PDB " + pdbid, hdl);
+ progressBar.setProgressBar(MessageManager.formatMessage("status.fetching_pdb", new String[]{pdbid}), hdl);
}
try
{
}
if (progressBar != null)
{
- progressBar.setProgressBar("Finished.", hdl);
+ progressBar.setProgressBar(MessageManager.getString("label.state_completed"), hdl);
}
if (pdbseq != null)
{
jalview.bin.Cache.getProperty("LAST_DIRECTORY"));
chooser.setFileView(new JalviewFileView());
- chooser.setDialogTitle("Save PDB File");
+ chooser.setDialogTitle(MessageManager.getString("label.save_pdb_file"));
chooser.setToolTipText(MessageManager.getString("action.save"));
int value = chooser.showSaveDialog(this);
public void backGround_actionPerformed(ActionEvent actionEvent)
{
java.awt.Color col = JColorChooser.showDialog(this,
- "Select Background Colour", null);
+ MessageManager.getString("label.select_backgroud_colour"), null);
if (col != null)
{
jmb.setBackgroundColour(col);
topBottomSplitPane.setBottomComponent(bottomPanel);
JScrollPane spTextDescription = new JScrollPane(textDescription);
textDescription.setText("");
- statusBar.setText(MessageManager.getString("label.status"));
+ statusBar.setText(new StringBuffer("[").append(MessageManager.getString("label.status")).append("]").toString());
buttonRefresh.addActionListener(new ActionListener()
{
long hdl = pdbid.hashCode() - System.currentTimeMillis();
if (progressBar != null)
{
- progressBar.setProgressBar("Fetching PDB " + pdbid, hdl);
+ progressBar.setProgressBar(MessageManager.formatMessage("status.fetching_pdb", new String[]{pdbid}), hdl);
}
try
{
}
if (progressBar != null)
{
- progressBar.setProgressBar("Finished.", hdl);
+ progressBar.setProgressBar(MessageManager.getString("label.state_completed"), hdl);
}
if (pdbseq != null)
{
jalview.bin.Cache.getProperty("LAST_DIRECTORY"));
chooser.setFileView(new JalviewFileView());
- chooser.setDialogTitle("Save PDB File");
+ chooser.setDialogTitle(MessageManager.getString("label.save_pdb_file"));
chooser.setToolTipText(MessageManager.getString("action.save"));
int value = chooser.showSaveDialog(this);
*/
public void eps_actionPerformed(ActionEvent e)
{
- throw new Error("EPS Generation not yet implemented.");
+ throw new Error(MessageManager.getString("error.eps_generation_not_implemented"));
}
/**
*/
public void png_actionPerformed(ActionEvent e)
{
- throw new Error("PNG Generation not yet implemented.");
+ throw new Error(MessageManager.getString("error.png_generation_not_implemented"));
}
public void jmolColour_actionPerformed(ActionEvent actionEvent)
public void backGround_actionPerformed(ActionEvent actionEvent)
{
java.awt.Color col = JColorChooser.showDialog(this,
- "Select Background Colour", null);
+ MessageManager.getString("label.select_backgroud_colour"), null);
if (col != null)
{
jmb.setBackgroundColour(col);
} catch (InterruptedException ie)
{
}
- throw new NullPointerException(
- "Application test: throwing an NullPointerException It should arrive at the console");
+ throw new NullPointerException(MessageManager.getString("exception.application_test_npe"));
}
}
chooser.setAcceptAllFileFilterUsed(false);
chooser.setFileView(new JalviewFileView());
- chooser.setDialogTitle("Save Text to File");
+ chooser.setDialogTitle(MessageManager.getString("label.save_text_to_file"));
chooser.setToolTipText(MessageManager.getString("action.save"));
int value = chooser.showSaveDialog(this);
chooser.setAcceptAllFileFilterUsed(false);
chooser.setFileView(new JalviewFileView());
- chooser.setDialogTitle("Save Text to File");
+ chooser.setDialogTitle(MessageManager.getString("label.save_text_to_file"));
chooser.setToolTipText(MessageManager.getString("action.save"));
int value = chooser.showSaveDialog(this);
public void run()
{
long instance = System.currentTimeMillis();
- Desktop.instance.setProgressBar("Refreshing news", instance);
+ Desktop.instance.setProgressBar(MessageManager.getString("status.refreshing_news"), instance);
jvnews.refreshNews();
Desktop.instance.setProgressBar(null, instance);
jvnews.showNews();
if (format.equals("URL NOT FOUND"))
{
JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "Couldn't locate " + url, "URL not found",
+ MessageManager.formatMessage("label.couldnt_locate", new String[]{url}), MessageManager.getString("label.url_not_found"),
JOptionPane.WARNING_MESSAGE);
return;
{ "Jalview Project" }, "Jalview Project");
chooser.setFileView(new JalviewFileView());
- chooser.setDialogTitle("Save State");
+ chooser.setDialogTitle(MessageManager.getString("label.save_state"));
int value = chooser.showSaveDialog(this);
public void run()
{
- setProgressBar("Saving jalview project " + choice.getName(),
+ setProgressBar(MessageManager.formatMessage("label.saving_jalview_project", new String[]{choice.getName()}),
choice.hashCode());
jalview.bin.Cache.setProperty("LAST_DIRECTORY",
choice.getParent());
{ "Jalview Project", "Jalview Project (old)" },
"Jalview Project");
chooser.setFileView(new JalviewFileView());
- chooser.setDialogTitle("Restore state");
+ chooser.setDialogTitle(MessageManager.getString("label.restore_state"));
int value = chooser.showOpenDialog(this);
{
public void run()
{
- setProgressBar("loading jalview project " + choice,
+ setProgressBar(MessageManager.formatMessage("label.loading_jalview_project", new String[]{choice}),
choice.hashCode());
try
{
{
if (fileLoadingCount == 0)
{
- fileLoadingPanels.add(addProgressPanel("Loading File: " + fileName
- + " "));
+ fileLoadingPanels.add(addProgressPanel(MessageManager.formatMessage("label.loading_file", new String[]{fileName})));
}
fileLoadingCount++;
}
jalview.bin.Cache.getProperty("LAST_DIRECTORY"));
chooser.setFileView(new JalviewFileView());
- chooser.setDialogTitle("Open a saved VAMSAS session");
+ chooser.setDialogTitle(MessageManager.getString("label.open_saved_vamsas_session"));
chooser.setToolTipText(MessageManager
.getString("label.select_vamsas_session_opened_as_new_vamsas_session"));
return false;
}
- setProgressBar("Importing VAMSAS session from " + file.getName(),
+ setProgressBar(MessageManager.formatMessage("status.importing_vamsas_session_from", new String[]{file.getName()}),
file.hashCode());
try
{
v_client = new jalview.gui.VamsasApplication(this, file, null);
} catch (Exception ex)
{
- setProgressBar("Importing VAMSAS session from " + file.getName(),
- file.hashCode());
+ setProgressBar(MessageManager.formatMessage("status.importing_vamsas_session_from", new String[]{file.getName()}),
+ file.hashCode());
jalview.bin.Cache.log.error(
"New vamsas session from existing session file failed:", ex);
return false;
}
setupVamsasConnectedGui();
v_client.initial_update(); // TODO: thread ?
- setProgressBar("Importing VAMSAS session from " + file.getName(),
+ setProgressBar(MessageManager.formatMessage("status.importing_vamsas_session_from", new String[]{file.getName()}),
file.hashCode());
return v_client.inSession();
}
{
if (v_client != null)
{
- throw new Error(
- "Trying to join a vamsas session when another is already connected.");
+ throw new Error(MessageManager.getString("error.try_join_vamsas_session_another"));
}
if (mysesid == null)
{
- throw new Error("Invalid vamsas session id.");
+ throw new Error(MessageManager.getString("error.invalid_vamsas_session_id"));
}
v_client = new VamsasApplication(this, mysesid);
setupVamsasConnectedGui();
{ "Vamsas Document" }, "Vamsas Document");
chooser.setFileView(new JalviewFileView());
- chooser.setDialogTitle("Save Vamsas Document Archive");
+ chooser.setDialogTitle(MessageManager.getString("label.save_vamsas_document_archive"));
int value = chooser.showSaveDialog(this);
if (value == JalviewFileChooser.APPROVE_OPTION)
{
java.io.File choice = chooser.getSelectedFile();
- JPanel progpanel = addProgressPanel("Saving VAMSAS Document to "
- + choice.getName());
+ JPanel progpanel = addProgressPanel(MessageManager.formatMessage("label.saving_vamsas_doc", new String[]{choice.getName()}));
jalview.bin.Cache.setProperty("LAST_DIRECTORY", choice.getParent());
String warnmsg = null;
String warnttl = null;
}
if (b)
{
- vamUpdate = this.addProgressPanel("Updating vamsas session");
+ vamUpdate = this.addProgressPanel(MessageManager.getString("label.updating_vamsas_session"));
}
vamsasStart.setVisible(!b);
vamsasStop.setVisible(!b);
// use reflection to avoid creating compilation dependency.
if (!jalview.bin.Cache.groovyJarsPresent())
{
- throw new Error(
- "Implementation Error. Cannot create groovyShell without Groovy on the classpath!");
+ throw new Error(MessageManager.getString("error.implementation_error_cannot_create_groovyshell"));
}
try
{
.showInternalMessageDialog(
Desktop.desktop,
- "Couldn't create the groovy Shell. Check the error log for the details of what went wrong.",
- "Jalview Groovy Support Failed",
+ MessageManager.getString("label.couldnt_create_groovy_shell"),
+ MessageManager.getString("label.groovy_support_failed"),
JOptionPane.ERROR_MESSAGE);
}
}
{
if (progressBarHandlers == null || !progressBars.contains(new Long(id)))
{
- throw new Error(
- "call setProgressBar before registering the progress bar's handler.");
+ throw new Error(MessageManager.getString("error.call_setprogressbar_before_registering_handler"));
}
progressBarHandlers.put(new Long(id), handler);
final JPanel progressPanel = (JPanel) progressBars.get(new Long(id));
public void actionPerformed(ActionEvent e)
{
handler.cancelActivity(id);
- us.setProgressBar(
- "Cancelled "
- + ((JLabel) progressPanel.getComponent(0))
- .getText(), id);
+ us.setProgressBar(MessageManager.formatMessage("label.cancelled_params", new String[]{((JLabel) progressPanel.getComponent(0)).getText()}), id);
}
});
progressPanel.add(cancel, BorderLayout.EAST);
{
if (progress != null)
{
- progress.setProgressBar("Opening " + url, this.hashCode());
+ progress.setProgressBar(MessageManager.formatMessage("status.opening_params", new String[]{url}), this.hashCode());
}
jalview.util.BrowserLauncher.openURL(url);
} catch (Exception ex)
JOptionPane
.showInternalMessageDialog(
Desktop.desktop,
- "Unixers: Couldn't find default web browser."
- + "\nAdd the full path to your browser in Preferences.",
- "Web browser not found",
+ MessageManager.getString("label.web_browser_not_found_unix"),
+ MessageManager.getString("label.web_browser_not_found"),
JOptionPane.WARNING_MESSAGE);
ex.printStackTrace();
return ((GraduatedColor) fc).getMaxColor();
}
}
- throw new Error("Implementation Error: Unrecognised render object "
- + fc.getClass() + " for features of type " + featureType);
+ throw new Error(MessageManager.formatMessage("error.implementation_error_unrecognised_render_object_for_features_type", new String[]{fc.getClass().toString(),featureType}));
}
/**
return ((GraduatedColor) fc).findColor(feature);
}
}
- throw new Error("Implementation Error: Unrecognised render object "
- + fc.getClass() + " for features of type " + feature.getType());
+ throw new Error(MessageManager.formatMessage("error.implementation_error_unrecognised_render_object_for_features_type", new String[]{fc.getClass().toString(),feature.getType()}));
}
private boolean showFeature(SequenceFeature sequenceFeature)
{ "OK", "Cancel" };
}
- String title = newFeatures ? "Create New Sequence Feature(s)"
- : "Amend/Delete Features for " + sequences[0].getName();
+ String title = newFeatures ? MessageManager.getString("label.create_new_sequence_features")
+ : MessageManager.formatMessage("label.amend_delete_features", new String[]{sequences[0].getName()});
int reply = JOptionPane.showInternalOptionDialog(Desktop.desktop,
bigPanel, title, JOptionPane.YES_NO_CANCEL_OPTION,
- JOptionPane.QUESTION_MESSAGE, null, options, "OK");
+ JOptionPane.QUESTION_MESSAGE, null, options, MessageManager.getString("action.ok"));
jalview.io.FeaturesFile ffile = new jalview.io.FeaturesFile();
{ "fc" }, new String[]
{ "Sequence Feature Colours" }, "Sequence Feature Colours");
chooser.setFileView(new jalview.io.JalviewFileView());
- chooser.setDialogTitle("Load Feature Colours");
+ chooser.setDialogTitle(MessageManager.getString("label.load_feature_colours"));
chooser.setToolTipText(MessageManager.getString("action.load"));
int value = chooser.showOpenDialog(this);
{ "fc" }, new String[]
{ "Sequence Feature Colours" }, "Sequence Feature Colours");
chooser.setFileView(new jalview.io.JalviewFileView());
- chooser.setDialogTitle("Save Feature Colour Scheme");
+ chooser.setDialogTitle(MessageManager.getString("label.save_feature_colours"));
chooser.setToolTipText(MessageManager.getString("action.save"));
int value = chooser.showSaveDialog(this);
}
private String[] columnNames =
- { "Feature Type", "Colour", "Display" };
+ { MessageManager.getString("label.feature_type"), MessageManager.getString("action.colour"), MessageManager.getString("label.display") };
private Object[][] data;
JOptionPane
.showInternalMessageDialog(
this,
- "Font doesn't have letters defined\nso cannot be used\nwith alignment data.",
- "Invalid Font", JOptionPane.WARNING_MESSAGE);
+ MessageManager.getString("label.font_doesnt_have_letters_defined"),
+ MessageManager.getString("label.invalid_font"), JOptionPane.WARNING_MESSAGE);
return;
}
if (tp != null)
JOptionPane
.showInternalMessageDialog(
Desktop.desktop,
- "Unixers: Couldn't find default web browser."
- + "\nAdd the full path to your browser in Preferences.",
- "Web browser not found", JOptionPane.WARNING_MESSAGE);
+ MessageManager.getString("label.web_browser_not_found_unix"),
+ MessageManager.getString("label.web_browser_not_found"), JOptionPane.WARNING_MESSAGE);
ex.printStackTrace();
}
}
else
{
- throw new Error(
- "Implementation Error: Can't reorder this tree. Not DefaultMutableTreeNode.");
+ throw new Error(MessageManager.getString("error.implementation_error_cant_reorder_tree"));
}
}
jalview.util.QuickSort.sort(names, nodes);
import jalview.datamodel.SequenceI;
import jalview.schemabinding.version2.*;
import jalview.schemes.*;
+import jalview.util.MessageManager;
import jalview.util.Platform;
import jalview.util.jarInputStreamProvider;
import jalview.viewmodel.AlignmentViewport;
for (String dssids : dsses.keySet())
{
AlignFrame _af = dsses.get(dssids);
- String jfileName = fileName + " Dataset for " + _af.getTitle();
+ String jfileName = MessageManager.formatMessage("label.dataset_for", new String[]{fileName,_af.getTitle()});
if (!jfileName.endsWith(".xml"))
{
jfileName = jfileName + ".xml";
return false;
}
}
- throw new Error("Unsupported Version for calcIdparam "
- + calcIdParam.toString());
+ throw new Error(MessageManager.formatMessage("error.unsupported_version_calcIdparam", new String[]{calcIdParam.toString()}));
}
/**
{
JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "Error loading " + file, "Error loading Jalview file",
+ MessageManager.formatMessage("label.error_loading_file_params", new String[]{file}), MessageManager.getString("label.error_loading_jalview_file"),
JOptionPane.WARNING_MESSAGE);
}
});
*/
package jalview.gui;
+import jalview.util.MessageManager;
+
import java.awt.Component;
public class OOMWarning implements Runnable
javax.swing.JOptionPane
.showInternalMessageDialog(
desktop,
- "Out of memory when "
- + action
- + "!!"
- + "\nSee help files for increasing Java Virtual Machine memory.",
- "Out of memory",
+ MessageManager.formatMessage("warn.out_of_memory_when_action", new String[]{action}),
+ MessageManager.getString("label.out_of_memory"),
javax.swing.JOptionPane.WARNING_MESSAGE);
// hope that there's enough memory left that no more appear.
oomInprogress = false;
}
else
{
- throw new Error("Invalid value " + string + " for option " + option);
+ throw new Error(MessageManager.formatMessage("error.invalid_value_for_option", new String[]{string,option}));
}
}
public void bgcolour_actionPerformed(ActionEvent e)
{
- Color col = JColorChooser.showDialog(this, "Select Background Colour",
+ Color col = JColorChooser.showDialog(this, MessageManager.getString("label.select_backgroud_colour"),
rc.bgColour);
if (col != null)
{
long progId = System.currentTimeMillis();
IProgressIndicator progress = this;
- String message = "Recalculating PCA";
+ String message = MessageManager.getString("label.pca_recalculating");
if (getParent() == null)
{
progress = ap.alignFrame;
- message = "Calculating PCA";
+ message = MessageManager.getString("label.pca_calculating");
}
progress.setProgressBar(message, progId);
try
{
if (progressBarHandlers == null || !progressBars.contains(new Long(id)))
{
- throw new Error(
- "call setProgressBar before registering the progress bar's handler.");
+ throw new Error(MessageManager.getString("error.call_setprogressbar_before_registering_handler"));
}
progressBarHandlers.put(new Long(id), handler);
final JPanel progressPanel = (JPanel) progressBars.get(new Long(id));
public void actionPerformed(ActionEvent e)
{
handler.cancelActivity(id);
- us.setProgressBar(
- "Cancelled "
- + ((JLabel) progressPanel.getComponent(0))
- .getText(), id);
+ us.setProgressBar(MessageManager.formatMessage("label.cancelled_params", new String[]{((JLabel) progressPanel.getComponent(0)).getText()}), id);
}
});
progressPanel.add(cancel, BorderLayout.EAST);
{ "Fasta", "Clustal", "PFAM", "MSF", "PIR", "BLC", "Jalview" },
jalview.bin.Cache.getProperty("DEFAULT_FILE_FORMAT"));
chooser.setFileView(new JalviewFileView());
- chooser.setDialogTitle("Select startup file");
+ chooser.setDialogTitle(MessageManager.getString("label.select_startup_file"));
int value = chooser.showOpenDialog(this);
public void defaultBrowser_mouseClicked(MouseEvent e)
{
JFileChooser chooser = new JFileChooser(".");
- chooser.setDialogTitle("Select default web browser");
+ chooser.setDialogTitle(MessageManager.getString("label.select_default_browser"));
int value = chooser.showOpenDialog(this);
public void minColour_actionPerformed()
{
Color col = JColorChooser.showDialog(this,
- "Select Colour for Minimum Value", minColour.getBackground());
+ MessageManager.getString("label.select_colour_minimum_value"), minColour.getBackground());
if (col != null)
{
minColour.setBackground(col);
public void maxColour_actionPerformed()
{
Color col = JColorChooser.showDialog(this,
- "Select Colour for Maximum Value", maxColour.getBackground());
+ MessageManager.getString("label.select_colour_maximum_value"), maxColour.getBackground());
if (col != null)
{
maxColour.setBackground(col);
JOptionPane
.showInternalMessageDialog(
Desktop.desktop,
- "The user defined width for the\nannotation and sequence ID columns\nin exported figures must be\nat least 12 pixels wide.",
- "Invalid ID Column width",
+ MessageManager.getString("warn.user_defined_width_requirements"),
+ MessageManager.getString("label.invalid_id_column_width"),
JOptionPane.WARNING_MESSAGE);
userIdWidth.setText("");
}
}
}
- EditCommand cut = new EditCommand("Remove Redundancy",
+ EditCommand cut = new EditCommand(MessageManager.getString("action.remove_redundancy"),
EditCommand.CUT, deleted, 0, width, ap.av.getAlignment());
for (int i = 0; i < del.size(); i++)
message.append("Edit group:");
if (editCommand == null)
{
- editCommand = new EditCommand("Edit Group");
+ editCommand = new EditCommand(MessageManager.getString("action.edit_group"));
}
}
else
}
if (editCommand == null)
{
- editCommand = new EditCommand("Edit " + label);
+ editCommand = new EditCommand(MessageManager.formatMessage("label.edit_params", new String[]{label}));
}
}
if (guiWindow != null)
{
guiWindow.setProgressBar(
- "Waiting for Sequence Database Fetchers to initialise",
+ MessageManager.getString("status.waiting_sequence_database_fetchers_init"),
Thread.currentThread().hashCode());
}
// initting happening on another thread - so wait around to see if it
if (guiWindow != null)
{
guiWindow.setProgressBar(
- "Waiting for Sequence Database Fetchers to initialise",
+ MessageManager.getString("status.waiting_sequence_database_fetchers_init"),
Thread.currentThread().hashCode());
}
}
*/
if (guiWindow != null)
{
- guiWindow.setProgressBar("Initialising Sequence Database Fetchers",
+ guiWindow.setProgressBar(MessageManager.getString("status.init_sequence_database_fetchers"),
Thread.currentThread().hashCode());
}
dasRegistry = jalview.bin.Cache.getDasSourceRegistry();
jalview.ws.SequenceFetcher sf = new jalview.ws.SequenceFetcher();
if (guiWindow != null)
{
- guiWindow.setProgressBar("Initialising Sequence Database Fetchers",
+ guiWindow.setProgressBar(MessageManager.getString("status.init_sequence_database_fetchers"),
Thread.currentThread().hashCode());
}
lastDasSourceRegistry = (dasRegistry.getDasRegistryURL() + dasRegistry
JOptionPane
.showInternalMessageDialog(
Desktop.desktop,
- "Could not create the sequence fetcher client. Check error logs for details.",
- "Couldn't create SequenceFetcher",
+ MessageManager.getString("warn.couldnt_create_sequence_fetcher_client"),
+ MessageManager.getString("label.couldnt_create_sequence_fetcher"),
JOptionPane.ERROR_MESSAGE);
}
});
try
{
// update status
- guiWindow.setProgressBar("Fetching " + nqueries
- + " sequence queries from " + proxy.getDbName(), Thread
+ guiWindow.setProgressBar(MessageManager.formatMessage("status.fetching_sequence_queries_from", new String[]{Integer.valueOf(nqueries).toString(),proxy.getDbName()}), Thread
.currentThread().hashCode());
isAliSource = proxy.isA(DBRefSource.ALIGNMENTDB);
if (proxy.getAccessionSeparator() == null)
presultTitle.add(titl);
}
}
- guiWindow.setProgressBar("Finished querying", Thread.currentThread()
+ guiWindow.setProgressBar(MessageManager.getString("status.finshed_querying"), Thread.currentThread()
.hashCode());
}
- guiWindow.setProgressBar((presult.size() > 0) ? "Parsing results."
- : "Processing ..", Thread.currentThread().hashCode());
+ guiWindow.setProgressBar((presult.size() > 0) ? MessageManager.getString("status.parsing_results")
+ : MessageManager.getString("status.processing"), Thread.currentThread().hashCode());
// process results
while (presult.size() > 0)
{
sp.cs = cs;
}
- conservationSlider.setTitle("Conservation Colour Increment (" + source
- + ")");
+ conservationSlider.setTitle(MessageManager.formatMessage("label.conservation_colour_increment", new String[]{source}));
if (ap.av.getAlignment().getGroups() != null)
{
pid.cs = cs;
}
- PIDSlider.setTitle("Percentage Identity Threshold (" + source + ")");
+ PIDSlider.setTitle(MessageManager.formatMessage("label.percentage_identity_thereshold", new String[]{source}));
if (ap.av.getAlignment().getGroups() != null)
{
public void mousePressed(MouseEvent e)
{
Color col = JColorChooser.showDialog(bigpanel,
- "Select Colour for Text", col1.getBackground());
+ MessageManager.getString("label.select_colour_for_text"), col1.getBackground());
if (col != null)
{
colour1Changed(col);
public void mousePressed(MouseEvent e)
{
Color col = JColorChooser.showDialog(bigpanel,
- "Select Colour for Text", col2.getBackground());
+ MessageManager.getString("label.select_colour_for_text"), col2.getBackground());
if (col != null)
{
colour2Changed(col);
});
int reply = JOptionPane.showInternalOptionDialog(ap, bigpanel,
- "Adjust Foreground Text Colour Threshold",
+ MessageManager.getString("label.adjunst_foreground_text_colour_thereshold"),
JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE,
null, null, null);
if (SwingUtilities.isRightMouseButton(evt))
{
Color col = JColorChooser.showDialog(this,
- "Select Sub-Tree Colour", highlightNode.color);
+ MessageManager.getString("label.select_subtree_colour"), highlightNode.color);
if (col != null)
{
setColor(highlightNode, col);
JalviewFileChooser chooser = new JalviewFileChooser(
jalview.bin.Cache.getProperty("LAST_DIRECTORY"));
chooser.setFileView(new JalviewFileView());
- chooser.setDialogTitle("Save tree as newick file");
+ chooser.setDialogTitle(MessageManager.getString("label.save_tree_as_newick"));
chooser.setToolTipText(MessageManager.getString("action.save"));
int value = chooser.showSaveDialog(null);
{ "eps" }, new String[]
{ "Encapsulated Postscript" }, "Encapsulated Postscript");
chooser.setFileView(new jalview.io.JalviewFileView());
- chooser.setDialogTitle("Create EPS file from tree");
+ chooser.setDialogTitle(MessageManager.getString("label.create_eps_from_tree"));
chooser.setToolTipText(MessageManager.getString("action.save"));
int value = chooser.showSaveDialog(this);
{ "Portable network graphics" }, "Portable network graphics");
chooser.setFileView(new jalview.io.JalviewFileView());
- chooser.setDialogTitle("Create PNG image from tree");
+ chooser.setDialogTitle(MessageManager.getString("label.create_png_from_tree"));
chooser.setToolTipText(MessageManager.getString("action.save"));
int value = chooser.showSaveDialog(this);
{ "Jalview User Colours" }, "Jalview User Colours");
chooser.setFileView(new jalview.io.JalviewFileView());
- chooser.setDialogTitle("Save colour scheme");
+ chooser.setDialogTitle(MessageManager.getString("label.save_colour_scheme"));
chooser.setToolTipText(MessageManager.getString("action.save"));
int value = chooser.showSaveDialog(this);
import jalview.structure.StructureSelectionManager;
import jalview.structure.VamsasListener;
import jalview.structure.VamsasSource;
+import jalview.util.MessageManager;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
{
if (sess != null)
{
- throw new Error(
- "Implementation Error - cannot import existing vamsas document into an existing session, Yet!");
+ throw new Error(MessageManager.getString("error.implementation_error_cannot_import_vamsas_doc"));
}
try
{
.showInternalMessageDialog(
Desktop.desktop,
- "VAMSAS Document could not be opened as a new session - please choose another",
- "VAMSAS Document Import Failed",
+ MessageManager.getString("label.vamsas_doc_couldnt_be_opened_as_new_session"),
+ MessageManager.getString("label.vamsas_document_import_failed"),
JOptionPane.ERROR_MESSAGE);
}
{
if (!inSession())
{
- throw new Error(
- "Impementation error! Vamsas Operations when client not initialised and connected.");
+ throw new Error(MessageManager.getString("error.implementation_error_vamsas_operation_not_init"));
}
addDocumentUpdateHandler();
addStoreDocumentHandler();
public void end_session(boolean promptUser)
{
if (!inSession())
- throw new Error("Jalview not connected to Vamsas session.");
+ throw new Error(MessageManager.getString("error.jalview_no_connected_vamsas_session"));
Cache.log.info("Jalview disconnecting from the Vamsas Session.");
try
{
return;
}
- throw new Error(
- "IMPLEMENTATION ERROR: Cannot recover vamsas object mappings - no backup was made.");
+ throw new Error(MessageManager.getString("error.implementation_error_cannot_recover_vamsas_object_mappings"));
}
jv2vobj.clear();
Iterator el = _backup_jv2vobj.entrySet().iterator();
{
if (jobpane < 0 || jobpane >= jobPanes.size())
{
- throw new Error("setStatus called for non-existent job pane."
- + jobpane);
+ throw new Error(MessageManager.formatMessage("error.setstatus_called_non_existent_job_pane", new String[]{Integer.valueOf(jobpane).toString()}));
}
switch (status)
{
// anyhow - it has to stop threads and clean up
// JBPNote : TODO: Instead of a warning, we should have an optional 'Are
// you sure?' prompt
- warnUser("This job cannot be cancelled.\nJust close the window.",
- "Cancel job");
+ warnUser(MessageManager.getString("warn.job_cannot_be_cancelled_close_window"),
+ MessageManager.getString("action.cancel_job"));
}
else
{
{
if (progressBarHandlers == null || !progressBars.contains(new Long(id)))
{
- throw new Error(
- "call setProgressBar before registering the progress bar's handler.");
+ throw new Error(MessageManager.getString("error.call_setprogressbar_before_registering_handler"));
}
progressBarHandlers.put(new Long(id), handler);
final JPanel progressPanel = (JPanel) progressBars.get(new Long(id));
public void actionPerformed(ActionEvent e)
{
handler.cancelActivity(id);
- us.setProgressBar(
- "Cancelled "
- + ((JLabel) progressPanel.getComponent(0))
- .getText(), id);
+ us.setProgressBar(MessageManager.formatMessage("label.cancelled_params", new String[]{((JLabel) progressPanel.getComponent(0)).getText()}), id);
}
});
progressPanel.add(cancel, BorderLayout.EAST);
frame = new JDialog(Desktop.instance, true);
- frame.setTitle("Edit parameters for " + service.getActionText());
+ frame.setTitle(MessageManager.formatMessage("label.edit_params_for", new String[]{service.getActionText()}));
Rectangle deskr = Desktop.instance.getBounds();
Dimension pref = this.getPreferredSize();
frame.setBounds(new Rectangle(
}
if (parser == null)
{
- throw new Error(
- "Implementation error: Can't find a marshaller for the parameter set");
+ throw new Error(MessageManager.getString("error.implementation_error_cannot_find_marshaller_for_param_set"));
}
if (filename == null)
{
{ "Web Service Parameter File" },
"Web Service Parameter File");
chooser.setFileView(new jalview.io.JalviewFileView());
- chooser.setDialogTitle("Choose a filename for this parameter file");
+ chooser.setDialogTitle(MessageManager.getString("label.choose_filename_for_param_file"));
chooser.setToolTipText(MessageManager.getString("action.save"));
int value = chooser.showSaveDialog(Desktop.instance);
if (value == JalviewFileChooser.APPROVE_OPTION)
}
wsList.setModel(new WsUrlTableModel(tdat));
- wsList.getColumn("Status").setMinWidth(10);
+ wsList.getColumn(MessageManager.getString("label.status")).setMinWidth(10);
}
private class JabaWSStatusRenderer extends JPanel implements
{
private Object[][] data;
+ private String[] columnNames = new String[]
+ { MessageManager.getString("label.service_url"), MessageManager.getString("label.status") };
public WsUrlTableModel(Object[][] tdat)
{
@Override
public String getColumnName(int column)
{
- if (column == 1)
- {
- return "Status";
- }
- return "Service URL";
+ return columnNames[column];
}
@Override
protected void newSbrsUrl_actionPerformed(ActionEvent e)
{
RestServiceEditorPane rse = new RestServiceEditorPane();
- rse.showDialog("Add a new Simple Bioinformatics Rest Service");
+ rse.showDialog(MessageManager.getString("label.add_new_sbrs_service"));
String rservice = rse.getEditedRestService();
if (rservice != null && !rsbsUrls.contains(rservice))
{
{
RestServiceEditorPane rse = new RestServiceEditorPane(
new RestServiceDescription(rsbsUrls.elementAt(sel)));
- rse.showDialog("Edit Simple Bioinformatics Rest Service entry");
+ rse.showDialog(MessageManager.getString("label.edit_sbrs_entry"));
String rservice = rse.getEditedRestService();
if (rservice != null)
{
int validate = JOptionPane
.showInternalConfirmDialog(
Desktop.desktop,
- "Validate JabaWS Server ?\n(Look in console output for results)",
- "Test Server?", JOptionPane.YES_NO_OPTION);
+ MessageManager.getString("info.validate_jabaws_server"),
+ MessageManager.getString("label.test_server"), JOptionPane.YES_NO_OPTION);
if (validate == JOptionPane.OK_OPTION)
{
if (jalview.ws.jws2.Jws2Discoverer.testServiceUrl(foo))
JOptionPane
.showInternalMessageDialog(
Desktop.desktop,
- "Service did not pass validation.\nCheck the Jalview Console for more details.");
+ MessageManager.getString("warn.server_didnt_pass_validation"));
}
}
else
public void run()
{
long ct = System.currentTimeMillis();
- Desktop.instance.setProgressBar("Refreshing Web Service Menus",
+ Desktop.instance.setProgressBar(MessageManager.getString("status.refreshing_web_service_menus"),
ct);
if (lastrefresh != update)
{
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.Sequence;
import jalview.datamodel.SequenceI;
+import jalview.util.MessageManager;
import java.io.IOException;
import java.util.Enumeration;
{
if (key == null)
{
- throw new Error(
- "Implementation error: Cannot have null alignment property key.");
+ throw new Error(MessageManager.getString("error.implementation_error_cannot_have_null_alignment"));
}
if (value == null)
{
else
{
- throw new Exception(
- "Implementation error: Unknown file format string");
+ throw new Exception(MessageManager.getString("error.implementation_error_unknown_file_format_string"));
}
afile.setNewlineString(newline);
afile.addJVSuffix(jvsuffix);
javax.swing.JOptionPane
.showInternalMessageDialog(
Desktop.desktop,
- "Out of memory loading file "
- + file
- + "!!"
- + "\nSee help files for increasing Java Virtual Machine memory.",
- "Out of memory",
+ MessageManager.formatMessage("warn.out_of_memory_loading_file", new String[]{file}),
+ MessageManager.getString("label.out_of_memory"),
javax.swing.JOptionPane.WARNING_MESSAGE);
}
});
*/
package jalview.io;
+import jalview.util.MessageManager;
+
import java.io.*;
import java.net.*;
import java.util.zip.GZIPInputStream;
{
if (from == null)
{
- throw new Error(
- "Implementation error. Null FileParse in copy constructor");
+ throw new Error(MessageManager.getString("error.implementation_error_null_fileparse"));
}
if (from == this)
return;
{
if (e != null)
{
- throw new IOException("Failed to resolve GZIP stream", e);
+ throw new IOException(MessageManager.getString("exception.failed_to_resolve_gzip_stream"), e);
}
throw q;
}
{
if (checkFileSource(suffixLess))
{
- throw new IOException("Problem opening " + inFile
- + " (also tried " + suffixLess + ") : " + errormessage);
+ throw new IOException(MessageManager.formatMessage("exception.problem_opening_file_also_tried", new String[]{inFile.getName(),suffixLess,errormessage}));
}
}
else
{
- throw new IOException("Problem opening " + inFile + " : "
- + errormessage);
+ throw new IOException(MessageManager.formatMessage("exception.problem_opening_file", new String[]{inFile.getName(),errormessage}));
}
}
}
if (dataIn == null || error)
{
// pass up the reason why we have no source to read from
- throw new IOException("Failed to read data from source:\n"
- + errormessage);
+ throw new IOException(MessageManager.formatMessage("exception.failed_to_read_data_from_source", new String[]{errormessage}));
}
error = false;
dataIn.mark(READAHEAD_LIMIT);
}
else
{
- throw new IOException("Unitialised Source Stream");
+ throw new IOException(MessageManager.getString("exception.no_init_source_stream"));
}
}
{
if (!error)
return dataIn.readLine();
- throw new IOException("Invalid Source Stream:" + errormessage);
+ throw new IOException(MessageManager.formatMessage("exception.invalid_source_stream", new String[]{errormessage}));
}
public boolean isValid()
}
else
{
- throw new IOException(
- "Implementation Error: Reset called for invalid source.");
+ throw new IOException(MessageManager.getString("error.implementation_error_reset_called_for_invalid_source"));
}
}
{ "HTML files" }, "HTML files");
chooser.setFileView(new JalviewFileView());
- chooser.setDialogTitle("Save as HTML");
+ chooser.setDialogTitle(MessageManager.getString("label.save_as_html"));
chooser.setToolTipText(MessageManager.getString("action.save"));
int value = chooser.showSaveDialog(null);
import java.util.*;
import jalview.datamodel.*;
+import jalview.util.MessageManager;
/**
* Parser for the JPred/JNet concise format. This is a series of CSV lines, each
if (maxLength != seq_entries.elementAt(i).toString().length())
{
- throw new IOException("JPredConcise: Entry ("
- + ids.elementAt(i).toString()
- + ") has an unexpected number of columns");
+ throw new IOException(MessageManager.formatMessage("exception.jpredconcide_entry_has_unexpected_number_of_columns", new String[]{ids.elementAt(i).toString()}));
}
if ((newSeq.getName().startsWith("QUERY") || newSeq.getName()
} catch (Exception e)
{
tal = null;
- IOException ex = new IOException(
- "Couldn't parse concise annotation for prediction profile.\n"
- + e);
+ IOException ex = new IOException(MessageManager.formatMessage("exception.couldnt_parse_concise_annotation_for_prediction", new String[]{e.getMessage()}));
e.printStackTrace(); // java 1.1 does not have :
// ex.setStackTrace(e.getStackTrace());
throw ex;
}
});
- this.setBorder(new javax.swing.border.TitledBorder("Recently Opened"));
+ this.setBorder(new javax.swing.border.TitledBorder(MessageManager.getString("label.recently_opened")));
final JScrollPane scroller = new JScrollPane(list);
scroller.setPreferredSize(new Dimension(130, 200));
package jalview.io;
import jalview.datamodel.*;
+import jalview.util.MessageManager;
public class JnetAnnotationMaker
{
if ((delMap != null && delMap.length > width)
|| (delMap == null && gapmap.length != width))
{
- throw (new Exception("Number of residues in "
- + (delMap == null ? "" : " mapped ")
- + "supposed query sequence ('"
- + al.getSequenceAt(firstSeq).getName() + "'\n"
- + al.getSequenceAt(firstSeq).getSequenceAsString()
- + ")\ndiffer from number of prediction sites in prediction ("
- + width + ")"));
+ throw (new Exception(MessageManager.formatMessage("exception.number_of_residues_in_query_sequence_differ_from_prediction", new String[]{
+ (delMap == null ? "" : MessageManager.getString("label.mapped")),
+ al.getSequenceAt(firstSeq).getName(),
+ al.getSequenceAt(firstSeq).getSequenceAsString(),
+ Integer.valueOf(width).toString()
+ })));
}
AlignmentAnnotation annot;
import java.util.StringTokenizer;
import jalview.datamodel.*;
+import jalview.util.MessageManager;
/**
* Parse a new hanpshire style tree Caveats: NHX files are NOT supported and the
if (Error != null)
{
- throw (new IOException("NewickFile: " + Error + "\n"));
+ throw (new IOException(MessageManager.formatMessage("exception.newfile", new String[]{Error.toString()})));
}
if (root == null)
{
- throw (new IOException("NewickFile: No Tree read in\n"));
+ throw (new IOException(MessageManager.formatMessage("exception.newfile", new String[]{MessageManager.getString("label.no_tree_read_in")})));
}
// THe next line is failing for topali trees - not sure why yet. if
// (root.right()!=null && root.isDummy())
if (noSeqs < 1)
{
- throw new IOException("No sequences found (PFAM input)");
+ throw new IOException(MessageManager.getString("exception.pfam_no_sequences_found"));
}
for (i = 0; i < headers.size(); i++)
import jalview.datamodel.Annotation;
import jalview.datamodel.Sequence;
import jalview.datamodel.SequenceI;
+import jalview.util.MessageManager;
import fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax;
import fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed;
_parse();
} catch (ExceptionPermissionDenied pdx)
{
- errormessage = "Couldn't access datasource (" + pdx.getMessage()
- + ")";
+ errormessage = MessageManager.formatMessage("exception.rnaml_couldnt_access_datasource", new String[]{pdx.getMessage()});
throw new IOException(pdx);
} catch (ExceptionLoadingFailed lf)
{
- errormessage = "Couldn't process data as RNAML file ("
- + lf.getMessage() + ")";
+ errormessage = MessageManager.formatMessage("exception.ranml_couldnt_process_data", new String[]{lf.getMessage()});
throw new IOException(lf);
} catch (ExceptionFileFormatOrSyntax iff)
{
- errormessage = "Invalid RNAML file (" + iff.getMessage() + ")";
+ errormessage = MessageManager.formatMessage("exception.ranml_invalid_file", new String[]{iff.getMessage()});
throw new IOException(iff);
} catch (Exception x)
{
error = true;
- errormessage = "Problem parsing data as RNAML (" + x.getMessage()
- + ")";
- throw new IOException("Couldn't parse the datasource as RNAML", x);
+ errormessage = MessageManager.formatMessage("exception.ranml_problem_parsing_data", new String[]{x.getMessage()});
+ throw new IOException(errormessage , x);
}
}
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
import jalview.util.Format;
+import jalview.util.MessageManager;
import java.io.BufferedReader;
import java.io.FileReader;
r = new Regex("# STOCKHOLM ([\\d\\.]+)");
if (!r.search(nextLine()))
{
- throw new IOException(
- "This file is not in valid STOCKHOLM format: First line does not contain '# STOCKHOLM'");
+ throw new IOException(MessageManager.getString("exception.stockholm_invalid_format"));
}
else
{
if (!x.search(line))
{
// logger.error("Could not parse sequence line: " + line);
- throw new IOException("Could not parse sequence line: " + line);
+ throw new IOException(MessageManager.formatMessage("exception.couldnt_parse_sequence_line", new String[]{line}));
}
String ns = (String) seqs.get(x.stringMatched(1));
if (ns == null)
}
else
{
- throw new IOException("Error parsing " + line);
+ throw new IOException(MessageManager.formatMessage("exception.error_parsing_line", new String[]{line}));
}
}
else if (annType.equals("GC"))
}
else
{
- throw new IOException("Unknown annotation detected: " + annType
- + " " + annContent);
+ throw new IOException(MessageManager.formatMessage("exception.unknown_annotation_detected", new String[]{annType,annContent}));
}
}
}
import jalview.io.vamsas.DatastoreItem;
import jalview.io.vamsas.DatastoreRegistry;
import jalview.io.vamsas.Rangetype;
+import jalview.util.MessageManager;
+
import java.io.IOException;
import java.util.Enumeration;
import java.util.HashMap;
{
Cache.log.debug(
"Warning? Overwriting existing vamsas id binding for "
- + vobj.getVorbaId(), new Exception(
- "Overwriting vamsas id binding."));
+ + vobj.getVorbaId(), new Exception(MessageManager.getString("exception.overwriting_vamsas_id_binding")));
}
else if (jv2vobj.containsKey(jvobj)
&& !((VorbaId) jv2vobj.get(jvobj)).equals(vobj.getVorbaId()))
if (vbound.getV_parent() != null
&& dataset != vbound.getV_parent())
{
- throw new Error(
- "IMPLEMENTATION ERROR: Cannot map an alignment of sequences from different datasets into a single alignment in the vamsas document.");
+ throw new Error(MessageManager.getString("error.implementation_error_cannot_map_alignment_sequences"));
// This occurs because the dataset for the alignment we are
// trying to
}
{
// NOTE: this happens if user deletes object in one session then updates
// from another client
- throw new Error(
- "IMPLEMENTATION ERROR: old jalview object is not bound ! ("
- + oldjvobject + ")");
+ throw new Error(MessageManager.formatMessage("error.implementation_error_old_jalview_object_not_bound", new String[]{oldjvobject.toString()}));
}
if (newjvobject != null)
{
int[] se = null;
if (dseta.getSegCount() > 0 && dseta.getPosCount() > 0)
{
- throw new Error(
- "Invalid vamsas RangeType - cannot resolve both lists of Pos and Seg from choice!");
+ throw new Error(MessageManager.getString("error.invalid_vamsas_rangetype_cannot_resolve_lists"));
}
if (dseta.getSegCount() > 0)
{
int[] se = null;
if (dseta.getSegCount() > 0 && dseta.getPosCount() > 0)
{
- throw new Error(
- "Invalid vamsas RangeType - cannot resolve both lists of Pos and Seg from choice!");
+ throw new Error(MessageManager.getString("error.invalid_vamsas_rangetype_cannot_resolve_lists"));
}
if (dseta.getSegCount() > 0)
{
}
} catch (Exception e)
{
- throw new Exception("Couldn't store sequence mappings for " + title,
- e);
+ throw new Exception(MessageManager.formatMessage("exception.couldnt_store_sequence_mappings", new String[]{title}),e);
}
}
imageIndex++;
imageIndex %= 9;
output.setFrameIcon(imageIcon[imageIndex]);
- output.setTitle("BLASTing for unidentified sequences - "
- + jobsRunning + " jobs running.");
+ output.setTitle(MessageManager.formatMessage("label.blasting_for_unidentified_sequence_jobs_running", new String[]{jobsRunning}));
} catch (Exception ex)
{
}
import jalview.bin.Cache;
import jalview.io.VamsasAppDatastore;
+import jalview.util.MessageManager;
import java.util.Enumeration;
import java.util.Hashtable;
{
Cache.log.debug(
"Warning? Overwriting existing vamsas id binding for "
- + vobj.getVorbaId(), new Exception(
- "Overwriting vamsas id binding."));
+ + vobj.getVorbaId(), new Exception(MessageManager.getString("exception.overwriting_vamsas_id_binding")));
}
else if (jv2vobj.containsKey(jvobj)
&& !((VorbaId) jv2vobj.get(jvobj)).equals(vobj.getVorbaId()))
{
Cache.log.debug(
"Warning? Overwriting existing jalview object binding for "
- + jvobj, new Exception(
- "Overwriting jalview object binding."));
+ + jvobj, new Exception(MessageManager.getString("exception.overwriting_jalview_id_binding")));
}
/*
* Cache.log.error("Attempt to make conflicting object binding! "+vobj+" id "
Object vobject = jv2vobj.remove(oldjvobject);
if (vobject == null)
{
- throw new Error(
- "IMPLEMENTATION ERROR: old jalview object is not bound ! ("
- + oldjvobject + ")");
+ throw new Error(MessageManager.formatMessage("error.implementation_error_old_jalview_object_not_bound", new String[]{oldjvobject.toString()}));
}
if (newjvobject != null)
{
tojalview = true;
if (jvobj != null && !(boundType.isAssignableFrom(jvobj.getClass())))
{
- throw new Error("Implementation Error: Vamsas Document Class "
- + vobj.getClass() + " should bind to a " + boundType
- + " (found a " + jvobj.getClass() + ")");
+ throw new Error(MessageManager.formatMessage("error.implementation_error_vamsas_doc_class_should_bind_to_type"
+ , new String[]{vobj.getClass().toString(),boundType.toString(),jvobj.getClass().toString()}));
}
dsReg.registerDsObj(this);
}
vobj = getjv2vObj(jvobj);
if (vobj != null && !(boundToType.isAssignableFrom(vobj.getClass())))
{
- throw new Error("Implementation Error: Jalview Class "
- + jvobj2.getClass() + " should bind to a " + boundToType
- + " (found a " + vobj.getClass() + ")");
+ throw new Error(MessageManager.formatMessage("error.implementation_error_vamsas_doc_class_should_bind_to_type"
+ , new String[]{jvobj2.getClass().toString(),boundToType.toString(),vobj.getClass().toString()}));
}
dsReg.registerDsObj(this);
}
import uk.ac.vamsas.objects.core.RangeType;
import uk.ac.vamsas.objects.core.Seg;
import jalview.io.VamsasAppDatastore;
+import jalview.util.MessageManager;
/**
* Enhances DatastoreItem objects with additional functions to do with RangeType
int[] se = null;
if (dseta.getSegCount() > 0 && dseta.getPosCount() > 0)
{
- throw new Error(
- "Invalid vamsas RangeType - cannot resolve both lists of Pos and Seg from choice!");
+ throw new Error(MessageManager.getString("error.invalid_vamsas_rangetype_cannot_resolve_lists"));
}
if (dseta.getSegCount() > 0)
{
int[] se = null;
if (dseta.getSegCount() > 0 && dseta.getPosCount() > 0)
{
- throw new Error(
- "Invalid vamsas RangeType - cannot resolve both lists of Pos and Seg from choice!");
+ throw new Error(MessageManager.getString("error.invalid_vamsas_rangetype_cannot_resolve_lists"));
}
if (dseta.getSegCount() > 0)
{
int[] se = null;
if (range.getSegCount() > 0 && range.getPosCount() > 0)
{
- throw new Error(
- "Invalid vamsas RangeType - cannot resolve both lists of Pos and Seg from choice!");
+ throw new Error(MessageManager.getString("error.invalid_vamsas_rangetype_cannot_resolve_lists"));
}
if (range.getSegCount() > 0)
{
{
if (ml == null)
{
- throw new Error(
- "Implementation error. MapList is null for initMapType.");
+ throw new Error(MessageManager.getString("error.implementation_error_maplist_is_null"));
}
maprange.setLocal(new Local());
maprange.setMapped(new Mapped());
}
});
removeRedundancyMenuItem.setText(MessageManager
- .getString("action.remove_redundancy"));
+ .getString("action.remove_redundancy").concat("..."));
removeRedundancyMenuItem.setAccelerator(javax.swing.KeyStroke
.getKeyStroke(java.awt.event.KeyEvent.VK_D, Toolkit
.getDefaultToolkit().getMenuShortcutKeyMask(), false));
JOptionPane
.showInternalMessageDialog(
jalview.gui.Desktop.desktop,
- "Sequence URL must contain $SEQUENCE_ID$ or a regex $SEQUENCE_ID=/<regex>/=$",
- "URL not valid", JOptionPane.WARNING_MESSAGE);
+ MessageManager.getString("warn.url_must_contain"),
+ MessageManager.getString("label.invalid_url"), JOptionPane.WARNING_MESSAGE);
return false;
}
if (iter == maxIter)
{
- throw new Exception("Too many iterations in tqli (" + maxIter
- + ")");
+ throw new Exception(MessageManager.formatMessage("exception.matrix_too_many_iteration", new String[]{"tqli", Integer.valueOf(maxIter).toString()}));
}
else
{
if (iter == maxIter)
{
- throw new Exception("Too many iterations in tqli2 (max is "
- + maxIter + ")");
+ throw new Exception(MessageManager.formatMessage("exception.matrix_too_many_iteration", new String[]{"tqli2", Integer.valueOf(maxIter).toString()}));
}
else
{
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._alcodMapList.size())
{
- throw new IndexOutOfBoundsException("getAlcodMap: Index value '"
- + index + "' not in range [0.."
- + (this._alcodMapList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getAlcodMap",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._alcodMapList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.AlcodMap) _alcodMapList
// check bounds for index
if (index < 0 || index >= this._alcodonList.size())
{
- throw new IndexOutOfBoundsException("getAlcodon: Index value '"
- + index + "' not in range [0.."
- + (this._alcodonList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getAlcodon",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._alcodonList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.Alcodon) _alcodonList.get(index);
// check bounds for index
if (index < 0 || index >= this._alcodMapList.size())
{
- throw new IndexOutOfBoundsException("setAlcodMap: Index value '"
- + index + "' not in range [0.."
- + (this._alcodMapList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setAlcodMap",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._alcodonList.size() - 1)).toString()
+ }));
}
this._alcodMapList.set(index, vAlcodMap);
// check bounds for index
if (index < 0 || index >= this._alcodonList.size())
{
- throw new IndexOutOfBoundsException("setAlcodon: Index value '"
- + index + "' not in range [0.."
- + (this._alcodonList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setAlcodon",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._alcodonList.size() - 1)).toString()
+ }));
}
this._alcodonList.set(index, vAlcodon);
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._annotationElementList.size())
{
- throw new IndexOutOfBoundsException(
- "getAnnotationElement: Index value '" + index
- + "' not in range [0.."
- + (this._annotationElementList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getAnnotationElement",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._annotationElementList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.AnnotationElement) _annotationElementList
// check bounds for index
if (index < 0 || index >= this._annotationElementList.size())
{
- throw new IndexOutOfBoundsException(
- "setAnnotationElement: Index value '" + index
- + "' not in range [0.."
- + (this._annotationElementList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setAnnotationElement",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._annotationElementList.size() - 1)).toString()
+ }));
}
this._annotationElementList.set(index, vAnnotationElement);
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._otherDataList.size())
{
- throw new IndexOutOfBoundsException("getOtherData: Index value '"
- + index + "' not in range [0.."
- + (this._otherDataList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getOtherData",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._otherDataList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.OtherData) _otherDataList
// check bounds for index
if (index < 0 || index >= this._otherDataList.size())
{
- throw new IndexOutOfBoundsException("setOtherData: Index value '"
- + index + "' not in range [0.."
- + (this._otherDataList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setOtherData",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._otherDataList.size() - 1)).toString()
+ }));
}
this._otherDataList.set(index, vOtherData);
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._groupList.size())
{
- throw new IndexOutOfBoundsException("getGroup: Index value '" + index
- + "' not in range [0.." + (this._groupList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getGroup",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._groupList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.Group) _groupList.get(index);
// check bounds for index
if (index < 0 || index >= this._settingList.size())
{
- throw new IndexOutOfBoundsException("getSetting: Index value '"
- + index + "' not in range [0.."
- + (this._settingList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getSetting",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._settingList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.Setting) _settingList.get(index);
// check bounds for index
if (index < 0 || index >= this._groupList.size())
{
- throw new IndexOutOfBoundsException("setGroup: Index value '" + index
- + "' not in range [0.." + (this._groupList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setGroup",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._groupList.size() - 1)).toString()
+ }));
}
this._groupList.set(index, vGroup);
// check bounds for index
if (index < 0 || index >= this._settingList.size())
{
- throw new IndexOutOfBoundsException("setSetting: Index value '"
- + index + "' not in range [0.."
- + (this._settingList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setSetting",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._settingList.size() - 1)).toString()
+ }));
}
this._settingList.set(index, vSetting);
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._seqList.size())
{
- throw new IndexOutOfBoundsException("getSeq: Index value '" + index
- + "' not in range [0.." + (this._seqList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getSeq",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._seqList.size() - 1)).toString()
+ }));
}
return (java.lang.String) _seqList.get(index);
// check bounds for index
if (index < 0 || index >= this._seqList.size())
{
- throw new IndexOutOfBoundsException("setSeq: Index value '" + index
- + "' not in range [0.." + (this._seqList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setSeq",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._seqList.size() - 1)).toString()
+ }));
}
this._seqList.set(index, vSeq);
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._featuresList.size())
{
- throw new IndexOutOfBoundsException("getFeatures: Index value '"
- + index + "' not in range [0.."
- + (this._featuresList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getFeatures",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._featuresList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.Features) _featuresList
// check bounds for index
if (index < 0 || index >= this._hiddenSequencesList.size())
{
- throw new IndexOutOfBoundsException(
- "getHiddenSequences: Index value '" + index
- + "' not in range [0.."
- + (this._hiddenSequencesList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getHiddenSequences",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._hiddenSequencesList.size() - 1)).toString()
+ }));
}
return ((java.lang.Integer) _hiddenSequencesList.get(index)).intValue();
// check bounds for index
if (index < 0 || index >= this._pdbidsList.size())
{
- throw new IndexOutOfBoundsException("getPdbids: Index value '"
- + index + "' not in range [0.."
- + (this._pdbidsList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getPdbids",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._pdbidsList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.Pdbids) _pdbidsList.get(index);
// check bounds for index
if (index < 0 || index >= this._featuresList.size())
{
- throw new IndexOutOfBoundsException("setFeatures: Index value '"
- + index + "' not in range [0.."
- + (this._featuresList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setFeatures",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._featuresList.size() - 1)).toString()
+ }));
}
this._featuresList.set(index, vFeatures);
// check bounds for index
if (index < 0 || index >= this._hiddenSequencesList.size())
{
- throw new IndexOutOfBoundsException(
- "setHiddenSequences: Index value '" + index
- + "' not in range [0.."
- + (this._hiddenSequencesList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setHiddenSequences",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._hiddenSequencesList.size() - 1)).toString()
+ }));
}
this._hiddenSequencesList.set(index, new java.lang.Integer(
// check bounds for index
if (index < 0 || index >= this._pdbidsList.size())
{
- throw new IndexOutOfBoundsException("setPdbids: Index value '"
- + index + "' not in range [0.."
- + (this._pdbidsList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setPdbids",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._pdbidsList.size() - 1)).toString()
+ }));
}
this._pdbidsList.set(index, vPdbids);
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._JGroupList.size())
{
- throw new IndexOutOfBoundsException("getJGroup: Index value '"
- + index + "' not in range [0.."
- + (this._JGroupList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getJGroup",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._JGroupList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.JGroup) _JGroupList.get(index);
// check bounds for index
if (index < 0 || index >= this._JSeqList.size())
{
- throw new IndexOutOfBoundsException("getJSeq: Index value '" + index
- + "' not in range [0.." + (this._JSeqList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getJSeq",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._JSeqList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.JSeq) _JSeqList.get(index);
// check bounds for index
if (index < 0 || index >= this._treeList.size())
{
- throw new IndexOutOfBoundsException("getTree: Index value '" + index
- + "' not in range [0.." + (this._treeList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getJgetTreeSeq",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._treeList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.Tree) _treeList.get(index);
// check bounds for index
if (index < 0 || index >= this._userColoursList.size())
{
- throw new IndexOutOfBoundsException("getUserColours: Index value '"
- + index + "' not in range [0.."
- + (this._userColoursList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getUserColours",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._userColoursList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.UserColours) _userColoursList
// check bounds for index
if (index < 0 || index >= this._viewportList.size())
{
- throw new IndexOutOfBoundsException("getViewport: Index value '"
- + index + "' not in range [0.."
- + (this._viewportList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getViewport",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._viewportList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.Viewport) _viewportList
// check bounds for index
if (index < 0 || index >= this._JGroupList.size())
{
- throw new IndexOutOfBoundsException("setJGroup: Index value '"
- + index + "' not in range [0.."
- + (this._JGroupList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setJGroup",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._JGroupList.size() - 1)).toString()
+ }));
}
this._JGroupList.set(index, vJGroup);
// check bounds for index
if (index < 0 || index >= this._JSeqList.size())
{
- throw new IndexOutOfBoundsException("setJSeq: Index value '" + index
- + "' not in range [0.." + (this._JSeqList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setJSeq",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._JSeqList.size() - 1)).toString()
+ }));
}
this._JSeqList.set(index, vJSeq);
// check bounds for index
if (index < 0 || index >= this._treeList.size())
{
- throw new IndexOutOfBoundsException("setTree: Index value '" + index
- + "' not in range [0.." + (this._treeList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setTree",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._treeList.size() - 1)).toString()
+ }));
}
this._treeList.set(index, vTree);
// check bounds for index
if (index < 0 || index >= this._userColoursList.size())
{
- throw new IndexOutOfBoundsException("setUserColours: Index value '"
- + index + "' not in range [0.."
- + (this._userColoursList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setUserColours",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._userColoursList.size() - 1)).toString()
+ }));
}
this._userColoursList.set(index, vUserColours);
// check bounds for index
if (index < 0 || index >= this._viewportList.size())
{
- throw new IndexOutOfBoundsException("setViewport: Index value '"
- + index + "' not in range [0.."
- + (this._viewportList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setViewport",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._viewportList.size() - 1)).toString()
+ }));
}
this._viewportList.set(index, vViewport);
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._colourList.size())
{
- throw new IndexOutOfBoundsException("getColour: Index value '"
- + index + "' not in range [0.."
- + (this._colourList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getColour",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._colourList.size() - 1)).toString()
+ }));
}
return (Colour) _colourList.get(index);
// check bounds for index
if (index < 0 || index >= this._colourList.size())
{
- throw new IndexOutOfBoundsException("setColour: Index value '"
- + index + "' not in range [0.."
- + (this._colourList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setColour",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._colourList.size() - 1)).toString()
+ }));
}
this._colourList.set(index, vColour);
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._mapListFromList.size())
{
- throw new IndexOutOfBoundsException("getMapListFrom: Index value '"
- + index + "' not in range [0.."
- + (this._mapListFromList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getMapListFrom",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._mapListFromList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.MapListFrom) _mapListFromList
// check bounds for index
if (index < 0 || index >= this._mapListToList.size())
{
- throw new IndexOutOfBoundsException("getMapListTo: Index value '"
- + index + "' not in range [0.."
- + (this._mapListToList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getMapListTo",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._mapListToList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.MapListTo) _mapListToList
// check bounds for index
if (index < 0 || index >= this._mapListFromList.size())
{
- throw new IndexOutOfBoundsException("setMapListFrom: Index value '"
- + index + "' not in range [0.."
- + (this._mapListFromList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setMapListFrom",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._mapListFromList.size() - 1)).toString()
+ }));
}
this._mapListFromList.set(index, vMapListFrom);
// check bounds for index
if (index < 0 || index >= this._mapListToList.size())
{
- throw new IndexOutOfBoundsException("setMapListTo: Index value '"
- + index + "' not in range [0.."
- + (this._mapListToList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setMapListTo",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._mapListToList.size() - 1)).toString()
+ }));
}
this._mapListToList.set(index, vMapListTo);
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._items.size())
{
- throw new IndexOutOfBoundsException("getPdbentryItem: Index value '"
- + index + "' not in range [0.." + (this._items.size() - 1)
- + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getPdbentryItem",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._items.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.PdbentryItem) _items.get(index);
// check bounds for index
if (index < 0 || index >= this._items.size())
{
- throw new IndexOutOfBoundsException("setPdbentryItem: Index value '"
- + index + "' not in range [0.." + (this._items.size() - 1)
- + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setPdbentryItem",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._items.size() - 1)).toString()
+ }));
}
this._items.set(index, vPdbentryItem);
*/
package jalview.schemabinding.version2;
+import jalview.util.MessageManager;
+
/**
* Class PdbentryItem.
*
// check bounds for index
if (index < 0 || index >= this._propertyList.size())
{
- throw new IndexOutOfBoundsException("getProperty: Index value '"
- + index + "' not in range [0.."
- + (this._propertyList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getProperty",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._propertyList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.Property) _propertyList
// check bounds for index
if (index < 0 || index >= this._propertyList.size())
{
- throw new IndexOutOfBoundsException("setProperty: Index value '"
- + index + "' not in range [0.."
- + (this._propertyList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setProperty",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._propertyList.size() - 1)).toString()
+ }));
}
this._propertyList.set(index, vProperty);
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._structureStateList.size())
{
- throw new IndexOutOfBoundsException(
- "getStructureState: Index value '" + index
- + "' not in range [0.."
- + (this._structureStateList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getStructureState",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._structureStateList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.StructureState) _structureStateList
// check bounds for index
if (index < 0 || index >= this._structureStateList.size())
{
- throw new IndexOutOfBoundsException(
- "setStructureState: Index value '" + index
- + "' not in range [0.."
- + (this._structureStateList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setStructureState",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._structureStateList.size() - 1)).toString()
+ }));
}
this._structureStateList.set(index, vStructureState);
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._DBRefList.size())
{
- throw new IndexOutOfBoundsException("getDBRef: Index value '" + index
- + "' not in range [0.." + (this._DBRefList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getDBRef",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._DBRefList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.DBRef) _DBRefList.get(index);
// check bounds for index
if (index < 0 || index >= this._DBRefList.size())
{
- throw new IndexOutOfBoundsException("setDBRef: Index value '" + index
- + "' not in range [0.." + (this._DBRefList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setDBRef",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._DBRefList.size() - 1)).toString()
+ }));
}
this._DBRefList.set(index, vDBRef);
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._alcodonFrameList.size())
{
- throw new IndexOutOfBoundsException("getAlcodonFrame: Index value '"
- + index + "' not in range [0.."
- + (this._alcodonFrameList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getAlcodonFrame",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._alcodonFrameList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.AlcodonFrame) _alcodonFrameList
// check bounds for index
if (index < 0 || index >= this._annotationList.size())
{
- throw new IndexOutOfBoundsException("getAnnotation: Index value '"
- + index + "' not in range [0.."
- + (this._annotationList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getAnnotation",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._alcodonFrameList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.Annotation) _annotationList
// check bounds for index
if (index < 0 || index >= this._sequenceList.size())
{
- throw new IndexOutOfBoundsException("getSequence: Index value '"
- + index + "' not in range [0.."
- + (this._sequenceList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getSequence",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._sequenceList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.Sequence) _sequenceList
// check bounds for index
if (index < 0 || index >= this._sequenceSetPropertiesList.size())
{
- throw new IndexOutOfBoundsException(
- "getSequenceSetProperties: Index value '" + index
- + "' not in range [0.."
- + (this._sequenceSetPropertiesList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getSequenceSetProperties",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._sequenceSetPropertiesList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.SequenceSetProperties) _sequenceSetPropertiesList
// check bounds for index
if (index < 0 || index >= this._alcodonFrameList.size())
{
- throw new IndexOutOfBoundsException("setAlcodonFrame: Index value '"
- + index + "' not in range [0.."
- + (this._alcodonFrameList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setAlcodonFrame",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._alcodonFrameList.size() - 1)).toString()
+ }));
}
this._alcodonFrameList.set(index, vAlcodonFrame);
// check bounds for index
if (index < 0 || index >= this._annotationList.size())
{
- throw new IndexOutOfBoundsException("setAnnotation: Index value '"
- + index + "' not in range [0.."
- + (this._annotationList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setAnnotation",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._annotationList.size() - 1)).toString()
+ }));
}
this._annotationList.set(index, vAnnotation);
// check bounds for index
if (index < 0 || index >= this._sequenceList.size())
{
- throw new IndexOutOfBoundsException("setSequence: Index value '"
- + index + "' not in range [0.."
- + (this._sequenceList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setSequence",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._sequenceList.size() - 1)).toString()
+ }));
}
this._sequenceList.set(index, vSequence);
// check bounds for index
if (index < 0 || index >= this._sequenceSetPropertiesList.size())
{
- throw new IndexOutOfBoundsException(
- "setSequenceSetProperties: Index value '" + index
- + "' not in range [0.."
- + (this._sequenceSetPropertiesList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setSequenceSetProperties",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._sequenceSetPropertiesList.size() - 1)).toString()
+ }));
}
this._sequenceSetPropertiesList.set(index, vSequenceSetProperties);
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._sequenceSetList.size())
{
- throw new IndexOutOfBoundsException("getSequenceSet: Index value '"
- + index + "' not in range [0.."
- + (this._sequenceSetList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getSequenceSet",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._sequenceSetList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.SequenceSet) _sequenceSetList
// check bounds for index
if (index < 0 || index >= this._treeList.size())
{
- throw new IndexOutOfBoundsException("getTree: Index value '" + index
- + "' not in range [0.." + (this._treeList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getTree",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._treeList.size() - 1)).toString()
+ }));
}
return (java.lang.String) _treeList.get(index);
// check bounds for index
if (index < 0 || index >= this._sequenceSetList.size())
{
- throw new IndexOutOfBoundsException("setSequenceSet: Index value '"
- + index + "' not in range [0.."
- + (this._sequenceSetList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setSequenceSet",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._sequenceSetList.size() - 1)).toString()
+ }));
}
this._sequenceSetList.set(index, vSequenceSet);
// check bounds for index
if (index < 0 || index >= this._treeList.size())
{
- throw new IndexOutOfBoundsException("setTree: Index value '" + index
- + "' not in range [0.." + (this._treeList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setTree",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._treeList.size() - 1)).toString()
+ }));
}
this._treeList.set(index, vTree);
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._calcIdParamList.size())
{
- throw new IndexOutOfBoundsException("getCalcIdParam: Index value '"
- + index + "' not in range [0.."
- + (this._calcIdParamList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getCalcIdParam",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._calcIdParamList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.CalcIdParam) _calcIdParamList
// check bounds for index
if (index < 0 || index >= this._hiddenColumnsList.size())
{
- throw new IndexOutOfBoundsException("getHiddenColumns: Index value '"
- + index + "' not in range [0.."
- + (this._hiddenColumnsList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getHiddenColumns",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._hiddenColumnsList.size() - 1)).toString()
+ }));
}
return (jalview.schemabinding.version2.HiddenColumns) _hiddenColumnsList
// check bounds for index
if (index < 0 || index >= this._calcIdParamList.size())
{
- throw new IndexOutOfBoundsException("setCalcIdParam: Index value '"
- + index + "' not in range [0.."
- + (this._calcIdParamList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setCalcIdParam",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._calcIdParamList.size() - 1)).toString()
+ }));
}
this._calcIdParamList.set(index, vCalcIdParam);
// check bounds for index
if (index < 0 || index >= this._hiddenColumnsList.size())
{
- throw new IndexOutOfBoundsException("setHiddenColumns: Index value '"
- + index + "' not in range [0.."
- + (this._hiddenColumnsList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setHiddenColumns",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._hiddenColumnsList.size() - 1)).toString()
+ }));
}
this._hiddenColumnsList.set(index, vHiddenColumns);
//- Imported classes and packages -/
//---------------------------------/
+import jalview.util.MessageManager;
+
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
// check bounds for index
if (index < 0 || index >= this._serviceURLList.size())
{
- throw new IndexOutOfBoundsException("getServiceURL: Index value '"
- + index + "' not in range [0.."
- + (this._serviceURLList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "getServiceURL",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._serviceURLList.size() - 1)).toString()
+ }));
}
return (java.lang.String) _serviceURLList.get(index);
// check bounds for index
if (index < 0 || index >= this._serviceURLList.size())
{
- throw new IndexOutOfBoundsException("setServiceURL: Index value '"
- + index + "' not in range [0.."
- + (this._serviceURLList.size() - 1) + "]");
+ throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+ "setServiceURL",
+ Integer.valueOf(index).toString(),
+ Integer.valueOf((this._serviceURLList.size() - 1)).toString()
+ }));
}
this._serviceURLList.set(index, vServiceURL);
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.SequenceI;
+import jalview.util.MessageManager;
import java.awt.Color;
import java.util.Hashtable;
return getClass().newInstance();
} catch (Exception q)
{
- throw new Error(
- "Serious implementation error: cannot duplicate colourscheme "
- + getClass().getName(), q);
+ throw new Error(MessageManager.formatMessage("error.implementation_error_cannot_duplicate_colour_scheme", new String[]{getClass().getName()}), q);
}
}
}
import jalview.api.AlignmentViewPanel;
import jalview.api.StructureSelectionManagerProvider;
import jalview.datamodel.*;
+import jalview.util.MessageManager;
public class StructureSelectionManager
{
{
if (instances != null)
{
- throw new Error(
- "Implementation error. Structure selection manager's context is 'null'",
- new NullPointerException("SSM context is null"));
+ throw new Error(MessageManager.getString("error.implementation_error_structure_selection_manager_null"),
+ new NullPointerException(MessageManager.getString("exception.ssm_context_is_null")));
}
else
{
} catch (InterruptedException ie)
{
}
- throw new NullPointerException(
- "Application test: throwing an NullPointerException It should arrive at the console");
+ throw new NullPointerException(MessageManager.getString("exception.application_test_npe"));
}
}
{
if (!loadedWithoutErrors)
{
- throw new IOException("Exception in finding browser: " + errorMessage);
+ throw new IOException(MessageManager.formatMessage("exception.browser_not_found", new String[]{errorMessage}));
}
Object browser = locateBrowser();
if (browser == null)
{
- throw new IOException("Unable to locate browser: " + errorMessage);
+ throw new IOException(MessageManager.formatMessage("exception.browser_unable_to_locate", new String[]{errorMessage}));
}
switch (jvm)
{});
} catch (InvocationTargetException ite)
{
- throw new IOException(
- "InvocationTargetException while creating AEDesc: "
- + ite.getMessage());
+ throw new IOException(MessageManager.formatMessage("exception.invocation_target_exception_creating_aedesc", new String[]{ite.getMessage()}));
} catch (IllegalAccessException iae)
{
- throw new IOException(
- "IllegalAccessException while building AppleEvent: "
- + iae.getMessage());
+ throw new IOException(MessageManager.formatMessage("exception.illegal_access_building_apple_evt", new String[]{iae.getMessage()}));
} catch (InstantiationException ie)
{
- throw new IOException(
- "InstantiationException while creating AEDesc: "
- + ie.getMessage());
+ throw new IOException(MessageManager.formatMessage("exception.illegal_access_building_apple_evt", new String[]{ie.getMessage()}));
} finally
{
aeDesc = null; // Encourage it to get disposed if it was created
}
else
{
- throw new IOException("Unable to launch URL: " + result);
+ throw new IOException(MessageManager.formatMessage("exception.unable_to_launch_url", new String[]{Integer.valueOf(result).toString()}));
}
}
else
{
- throw new IOException(
- "Unable to create an Internet Config instance: " + result);
+ throw new IOException(MessageManager.formatMessage("exception.unable_to_create_internet_config", new String[]{Integer.valueOf(result).toString()}));
}
break;
{ url });
} catch (InvocationTargetException ite)
{
- throw new IOException(
- "InvocationTargetException while calling openURL: "
- + ite.getMessage());
+ throw new IOException(MessageManager.formatMessage("exception.invocation_target_calling_url", new String[]{ite.getMessage()}));
} catch (IllegalAccessException iae)
{
- throw new IOException(
- "IllegalAccessException while calling openURL: "
- + iae.getMessage());
+ throw new IOException(MessageManager.formatMessage("exception.illegal_access_calling_url", new String[]{iae.getMessage()}));
}
break;
process.exitValue();
} catch (InterruptedException ie)
{
- throw new IOException(
- "InterruptedException while launching browser: "
- + ie.getMessage());
+ throw new IOException(MessageManager.formatMessage("exception.interrupted_launching_browser", new String[]{ie.getMessage()}));
}
break;
}
} catch (InterruptedException ie)
{
- throw new IOException(
- "InterruptedException while launching browser: "
- + ie.getMessage());
+ throw new IOException(MessageManager.formatMessage("exception.interrupted_launching_browser", new String[]{ie.getMessage()}));
}
break;
{ dsstring });
if (idstrings.length != seqstrings.length)
{
- throw new Error(
- "idstrings and seqstrings contain one string each per sequence.");
+ throw new Error(MessageManager.getString("error.idstring_seqstrings_only_one_per_sequence"));
}
return rstrings;
}
{
if (maxs != idseq[i].length)
{
- throw new Error(
- "Cannot have mixed length replacement vectors. Replacement vector for "
- + (mtch[i]) + " is " + idseq[i].length
- + " strings long, and have already seen a "
- + maxs + " length vector.");
+ throw new Error(MessageManager.formatMessage("error.cannot_have_mixed_length_replacement_vectors",
+ new String[]{(mtch[i]), Integer.valueOf(idseq[i].length).toString(),Integer.valueOf(maxs).toString()}));
}
}
}
else
{
- throw new Error(
- "Cannot have zero length vector of replacement strings - either 1 value or n values.");
+ throw new Error(MessageManager.getString("error.cannot_have_zero_length_vector_replacement_strings"));
}
}
// iterate through input, collating segments to be inserted into url
import jalview.gui.AlignFrame;
import jalview.gui.WebserviceInfo;
import jalview.gui.FeatureRenderer.FeatureRendererSettings;
+import jalview.util.MessageManager;
public abstract class AWSThread extends Thread
{
} catch (Exception ex)
{
// Deal with Transaction exceptions
- wsInfo.appendProgressText(jobs[j].jobnum, "\n" + WebServiceName
- + " Server exception!\n" + ex.getMessage());
+ wsInfo.appendProgressText(jobs[j].jobnum,
+ MessageManager.formatMessage("info.server_exception", new String[]{WebServiceName,ex.getMessage()}));
// always output the exception's stack trace to the log
Cache.log.warn(WebServiceName + " job(" + jobs[j].jobnum
+ ") Server exception.");
Cache.log
.debug("WebServiceJob poll loop finished with no jobs created.");
wsInfo.setStatus(wsInfo.STATE_STOPPED_ERROR);
- wsInfo.appendProgressText("No jobs ran.");
+ wsInfo.appendProgressText(MessageManager.getString("info.no_jobs_ran"));
wsInfo.setFinishedNoResults();
}
}
{
if (dbSources == null)
{
- throw new Error("Implementation error. Must initialise dbSources");
+ throw new Error(MessageManager.getString("error.implementation_error_must_init_dbsources"));
}
running = true;
long startTime = System.currentTimeMillis();
- af.setProgressBar("Fetching db refs", startTime);
+ af.setProgressBar(MessageManager.getString("status.fetching_db_refs"), startTime);
try
{
if (Cache.getDefault("DBREFFETCH_USEPICR", false))
import jalview.gui.AlignFrame;
import jalview.gui.Desktop;
import jalview.gui.FeatureSettings;
+import jalview.util.MessageManager;
import jalview.util.UrlLink;
import jalview.ws.dbsources.das.api.DasSourceRegistryI;
import jalview.ws.dbsources.das.api.jalviewSourceI;
reply = JOptionPane
.showInternalConfirmDialog(
Desktop.desktop,
- "Do you want Jalview to find\n"
- + "Uniprot Accession ids for given sequence names?",
- "Find Uniprot Accession Ids",
+ MessageManager.getString("info.you_want_jalview_to_find_uniprot_accessions"),
+ MessageManager.getString("label.find_uniprot_accession_ids"),
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
}
startTime = System.currentTimeMillis();
if (af != null)
{
- af.setProgressBar("Fetching DAS Sequence Features", startTime);
+ af.setProgressBar(MessageManager.getString("status.fetching_das_sequence_features"), startTime);
}
if (sourceRegistry == null)
{
if (af != null)
{
- af.setProgressBar("No DAS Sources Active", startTime);
+ af.setProgressBar(MessageManager.getString("status.no_das_sources_active"), startTime);
}
if (getFeatSettings() != null)
{
{
if (af != null)
{
- af.setProgressBar("DAS Feature Fetching Cancelled", startTime);
+ af.setProgressBar(MessageManager.getString("status.das_feature_fetching_cancelled"), startTime);
}
cancelled = true;
}
if (!cancelled && af != null)
{
// only update the progress bar if we've completed the fetch normally
- af.setProgressBar("DAS Feature Fetching Complete", startTime);
+ af.setProgressBar(MessageManager.getString("status.das_feature_fetching_complete"), startTime);
}
if (af != null && af.featureSettings != null)
JOptionPane
.showInternalMessageDialog(
Desktop.desktop,
- "Unixers: Couldn't find default web browser."
- + "\nAdd the full path to your browser in Preferences.",
- "Web browser not found", JOptionPane.WARNING_MESSAGE);
+ MessageManager.getString("label.web_browser_not_found_unix"),
+ MessageManager.getString("label.web_browser_not_found"), JOptionPane.WARNING_MESSAGE);
ex.printStackTrace();
}
import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceI;
import jalview.datamodel.xdb.embl.EmblEntry;
+import jalview.util.MessageManager;
import jalview.ws.ebi.EBIFetchClient;
import java.io.File;
} catch (Exception e)
{
stopQuery();
- throw new Exception("EBI EMBL XML retrieval failed on "
- + emprefx.toLowerCase() + ":" + query.trim(), e);
+ throw new Exception(MessageManager.formatMessage("exception.ebiembl_retrieval_failed_on", new String[]{emprefx.toLowerCase(),query.trim()}), e);
}
return getEmblSequenceRecords(emprefx, query, reply);
}
}
else
{
- result.append("# No EMBL record retrieved for "
- + emprefx.toLowerCase() + ":" + query.trim());
+ result.append(MessageManager.formatMessage("label.no_embl_record_found", new String[]{emprefx.toLowerCase(),query.trim()}));
}
}
if (efile != null)
if (seqs != null && seqs.length > 0)
{
al = new Alignment(seqs);
- result.append("# Successfully parsed the " + emprefx
- + " queries into an Alignment");
+ result.append(MessageManager.formatMessage("label.embl_successfully_parsed", new String[]{emprefx}));
results = result;
}
stopQuery();
import jalview.datamodel.AlignmentI;
import jalview.io.FormatAdapter;
+import jalview.util.MessageManager;
import jalview.ws.ebi.EBIFetchClient;
import jalview.ws.seqfetcher.DbSourceProxy;
if (pdbfile == null || pdbfile.getHeight() < 1)
{
- throw new Exception("No PDB Records for " + id + " chain "
- + ((chain == null) ? "' '" : chain));
+ throw new Exception(MessageManager.formatMessage("exception.no_pdb_records_for_chain", new String[]{id, ((chain == null) ? "' '" : chain)}));
}
} catch (Exception ex) // Problem parsing PDB file
import com.stevesoft.pat.Regex;
+import jalview.util.MessageManager;
import jalview.ws.dbsources.das.api.jalviewSourceI;
import jalview.ws.seqfetcher.*;
import jalview.bin.Cache;
if (!(jsrc = new JalviewSource(source, connprops, false))
.isSequenceSource())
{
- throw new Exception("Source " + source.getTitle()
- + " does not support the sequence command.");
+ throw new Exception(MessageManager.formatMessage("exception.das_source_doesnt_support_sequence_command", new String[]{source.getTitle()}));
}
this.tier = 1 + ((jsrc.isLocal() || jsrc.isReferenceSource()) ? 0 : 1);
this.source = source;
import org.biodas.jdas.schema.sources.SOURCE;
import org.biodas.jdas.schema.sources.VERSION;
+import jalview.util.MessageManager;
import jalview.ws.dbsources.das.api.jalviewSourceI;
import jalview.ws.seqfetcher.DbSourceProxy;
int p = cap.getQueryUri().lastIndexOf(capname);
if (p < -1)
{
- throw new Exception("Invalid das source: " + source.getUri());
+ throw new Exception(MessageManager.formatMessage("exception.invalid_das_source", new String[]{source.getUri()}));
}
if (cap.getQueryUri().charAt(p) == '/')
{
*/
package jalview.ws.ebi;
+import jalview.util.MessageManager;
+
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.File;
public String[] getSupportedDBs()
{
// TODO - implement rest call for dbfetch getSupportedDBs
- throw new Error("Not yet implemented");
+ throw new Error(MessageManager.getString("error.not_yet_implemented"));
}
/**
public String[] getSupportedFormats()
{
// TODO - implement rest call for dbfetch getSupportedFormats
- throw new Error("Not yet implemented");
+ throw new Error(MessageManager.getString("error.not_yet_implemented"));
}
/**
public String[] getSupportedStyles()
{
// TODO - implement rest call for dbfetch getSupportedStyles
- throw new Error("Not yet implemented");
+ throw new Error(MessageManager.getString("error.not_yet_implemented"));
}
public File fetchDataAsFile(String ids, String f, String s)
import jalview.io.FileParse;
import jalview.io.FormatAdapter;
import jalview.io.InputStreamParser;
+import jalview.util.MessageManager;
import java.io.BufferedReader;
import java.io.FileReader;
}
else
{
- throw new IOException(
- "Unexpected exception when handling RNAML translation of PDB data",
+ throw new IOException(MessageManager.getString("exception.unexpected_handling_rnaml_translation_for_pdb"),
x);
}
}
{
if (!msa && msf.length > 1)
{
- throw new Error(
- "Implementation Error! Multiple single sequence prediction jobs are not yet supported.");
+ throw new Error(MessageManager.getString("error.implementation_error_multiple_single_sequence_prediction_jobs_not_supported"));
}
String altitle = getPredictionName(WebServiceName) + " for "
private WebserviceInfo setWebService()
{
WebServiceName = "JNetWS";
- WebServiceJobTitle = "JNet secondary structure prediction";
+ WebServiceJobTitle = MessageManager.getString("label.jnet_secondary_structure_prediction");
WebServiceReference = "\"Cuff J. A and Barton G.J (2000) Application of "
+ "multiple sequence alignment profiles to improve protein secondary structure prediction, "
+ "Proteins 40:502-511\".";
if (!jalview.analysis.SeqsetUtils.deuniquify(
(Hashtable) SequenceInfo, sqs))
{
- throw (new Exception(
- "Couldn't recover sequence properties for alignment."));
+ throw (new Exception(MessageManager.getString("exception.couldnt_recover_sequence_properties_for_alignment")));
}
}
FirstSeq = 0;
}
else
{
- throw (new Exception("Unknown format " + format
- + " for file : \n" + result.getAligfile()));
+ throw (new Exception(MessageManager.formatMessage("exception.unknown_format_for_file", new String[]{format,result.getAligfile()})));
}
}
else
.getAlignmentAndColumnSelection(gc))[0];
if (this.msaIndex >= sqs.length)
{
- throw new Error(
- "Implementation Error! Invalid msaIndex for JPredJob on parent MSA input object!");
+ throw new Error(MessageManager.getString("error.implementation_error_invalid_msa_index_for_job"));
}
// ///
// Uses RemoveGapsCommand
// ///
- new jalview.commands.RemoveGapsCommand("Remove Gaps",
+ new jalview.commands.RemoveGapsCommand(MessageManager.getString("label.remove_gaps"),
new SequenceI[]
{ sqs[msaIndex] }, currentView);
if (!jalview.analysis.SeqsetUtils.SeqCharacterUnhash(
al.getSequenceAt(FirstSeq), SequenceInfo))
{
- throw (new Exception(
- "Couldn't recover sequence properties for JNet Query sequence!"));
+ throw (new Exception(MessageManager.getString("exception.couldnt_recover_sequence_props_for_jnet_query")));
}
else
{
{
if (!(j instanceof JPredJob))
{
- throw new Error(
- "Implementation error - StartJob(JpredJob) called on "
- + j.getClass());
+ throw new Error(MessageManager.formatMessage("error.implementation_error_startjob_called", new String[]{j.getClass().toString()}));
}
try
{
{
job.result = (vamsas.objects.simple.Result) new JpredResult();
job.result.setInvalid(true);
- job.result.setStatus("Submission " + job.getJobId());
+ job.result.setStatus(MessageManager.formatMessage("label.submission_params", new String[]{job.getJobId().toString()}));
throw new Exception(job.getJobId());
}
else
}
else
{
- throw new Exception("Server timed out - try again later\n");
+ throw new Exception(MessageManager.getString("exception.server_timeout_try_later"));
}
} catch (Exception e)
{
{
wsInfo.setStatus(j.getJobnum(), WebserviceInfo.STATE_STOPPED_ERROR);
// JBPNote - this could be a popup informing the user of the problem.
- wsInfo.appendProgressText(j.getJobnum(),
- "Failed to submit the prediction:\n" + e.getMessage()
- + wsInfo.getProgressText());
+ wsInfo.appendProgressText(j.getJobnum(), MessageManager.formatMessage("info.failed_to_submit_prediction", new String[]{e.getMessage(),wsInfo.getProgressText()}));
jalview.bin.Cache.log.debug(
"Failed Submission of job " + j.getJobnum(), e);
else
{
// do merge with other job results
- throw new Error(
- "Multiple JNet subjob merging not yet implemented.");
+ throw new Error(MessageManager.getString("error.multiple_jnet_subjob_merge_not_implemented"));
}
} catch (Exception e)
{
"JNet Client: JPred Annotation Parse Error", e);
wsInfo.setStatus(j.getJobnum(),
WebserviceInfo.STATE_STOPPED_ERROR);
- wsInfo.appendProgressText(j.getJobnum(), OutputHeader + "\n"
- + j.result.getStatus()
- + "\nInvalid JNet job result data!\n" + e.getMessage());
+ wsInfo.appendProgressText(j.getJobnum(), MessageManager.formatMessage("info.invalid_jnet_job_result_data", new String[]{OutputHeader.toString(),j.result.getStatus(), e.getMessage() }));
j.result.setBroken(true);
}
}
public void cancelJob()
{
- throw new Error("Implementation error!");
+ throw new Error(MessageManager.getString("error.implementation_error"));
}
public boolean canMergeResults()
import jalview.bin.*;
import jalview.datamodel.*;
import jalview.gui.*;
+import jalview.util.MessageManager;
import jalview.ws.AWsJob;
import jalview.ws.JobStateSummary;
import jalview.ws.WSClientI;
subjobComplete = true;
result = new MsaResult();
result.setFinished(true);
- result.setStatus("Job never ran - input returned to user.");
+ result.setStatus(MessageManager.getString("label.job_never_ran"));
}
}
int nseqs = 0;
if (minlen < 0)
{
- throw new Error(
- "Implementation error: minlen must be zero or more.");
+ throw new Error(MessageManager.getString("error.implementation_error_minlen_must_be_greater_zero"));
}
for (int i = 0; i < seqs.length; i++)
{
{
if (!(job instanceof MsaWSJob))
{
- throw new Error("StartJob(MsaWSJob) called on a WSJobInstance "
- + job.getClass());
+ throw new Error(MessageManager.formatMessage("error.implementation_error_msawbjob_called", new String[]{job.getClass().toString()}));
}
MsaWSJob j = (MsaWSJob) job;
if (j.isSubmitted())
j.setSubmitted(true);
j.result = new MsaResult();
j.result.setFinished(true);
- j.result.setStatus("Empty Alignment Job");
+ j.result.setStatus(MessageManager.getString("label.empty_alignment_job"));
((MsaResult) j.result).setMsa(null);
}
try
{
if (jobsubmit == null)
{
- throw new Exception(
- "Server at "
- + WsUrl
- + " returned null object, it probably cannot be contacted. Try again later ?");
+ throw new Exception(MessageManager.formatMessage("exception.web_service_returned_null_try_later", new String[]{WsUrl}));
}
throw new Exception(jobsubmit.getJobId());
WebserviceInfo.STATE_STOPPED_SERVERERROR);
wsInfo.appendProgressText(
j.getJobnum(),
- "Failed to submit sequences for alignment.\n"
- + "It is most likely that there is a problem with the server.\n"
- + "Just close the window\n");
+ MessageManager.getString("info.failed_to_submit_sequences_for_alignment"));
// e.printStackTrace(); // TODO: JBPNote DEBUG
}
if (valign != null)
{
wsInfo.appendProgressText(jobs[j].getJobnum(),
- "\nAlignment Object Method Notes\n");
+ MessageManager.getString("info.alignment_object_method_notes"));
String[] lines = valign.getMethod();
for (int line = 0; line < lines.length; line++)
{
}
if (!locateWebService())
{
- throw new Exception("Cannot contact service endpoint at " + WsURL);
+ throw new Exception(MessageManager.formatMessage("exception.cannot_contact_service_endpoint_at", new String[]{WsURL}));
}
String database = server.getDatabase();
if (database == null)
import jalview.datamodel.*;
import jalview.gui.*;
import jalview.io.NewickFile;
+import jalview.util.MessageManager;
import jalview.ws.AWsJob;
import jalview.ws.JobStateSummary;
import jalview.ws.WSClientI;
subjobComplete = true;
result = new MsaResult();
result.setFinished(true);
- result.setStatus("Job never ran - input returned to user.");
+ result.setStatus(MessageManager.getString("label.job_never_ran"));
}
}
int nseqs = 0;
if (minlen < 0)
{
- throw new Error(
- "Implementation error: minlen must be zero or more.");
+ throw new Error(MessageManager.getString("error.implementation_error_minlen_must_be_greater_zero"));
}
for (int i = 0; i < seqs.length; i++)
{
{
if (!(job instanceof SeqSearchWSJob))
{
- throw new Error("StartJob(MsaWSJob) called on a WSJobInstance "
- + job.getClass());
+ throw new Error(MessageManager.formatMessage("error.implementation_error_msawbjob_called", new String[]{job.getClass().toString()}));
}
SeqSearchWSJob j = (SeqSearchWSJob) job;
if (j.isSubmitted())
j.setSubmitted(true);
j.result = new MsaResult();
j.result.setFinished(true);
- j.result.setStatus("Empty Alignment Job");
+ j.result.setStatus(MessageManager.getString("label.empty_alignment_job"));
((MsaResult) j.result).setMsa(null);
}
try
{
if (jobsubmit == null)
{
- throw new Exception(
- "Server at "
- + WsUrl
- + " returned null object, it probably cannot be contacted. Try again later ?");
+ throw new Exception(MessageManager.formatMessage("exception.web_service_returned_null_try_later", new String[]{WsUrl}));
}
throw new Exception(jobsubmit.getJobId());
WebserviceInfo.STATE_STOPPED_SERVERERROR);
wsInfo.appendProgressText(
j.getJobnum(),
- "Failed to submit sequences for alignment.\n"
- + "It is most likely that there is a problem with the server.\n"
- + "Just close the window\n");
+ MessageManager.getString("info.failed_to_submit_sequences_for_alignment"));
// e.printStackTrace(); // TODO: JBPNote DEBUG
}
if (valign != null)
{
wsInfo.appendProgressText(jobs[j].getJobnum(),
- "\nAlignment Object Method Notes\n");
+ MessageManager.getString("info.alignment_object_method_notes"));
String[] lines = valign.getMethod();
for (int line = 0; line < lines.length; line++)
{
AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT);
if (nf != null)
{
- af.ShowNewickTree(nf, "Tree from " + this.alTitle);
+ af.ShowNewickTree(nf, MessageManager.formatMessage("label.tree_from", new String[]{this.alTitle}));
}
// initialise with same renderer settings as in parent alignframe.
af.getFeatureRenderer().transferSettings(this.featureSettings);
import jalview.gui.AlignFrame;
import jalview.gui.WebserviceInfo;
+import jalview.util.MessageManager;
import jalview.ws.WSClient;
import jalview.ws.WSMenuEntryProviderI;
{
if (serviceHandle == null)
{
- throw new Error(
- "IMPLEMENTATION ERROR: cannot attach WS Menu Entry without service handle reference!");
+ throw new Error(MessageManager.getString("error.implementation_error_cannot_attach_ws_menu_entry"));
}
attachWSMenuEntry(wsmenu, serviceHandle, alignFrame);
}
import compbio.metadata.PresetManager;
import compbio.metadata.RunnerConfig;
+import jalview.util.MessageManager;
import jalview.ws.jws2.dm.JabaOption;
import jalview.ws.jws2.dm.JabaParameter;
import jalview.ws.jws2.dm.JabaWsParamSet;
}
if (narg == null)
{
- throw new Error(
- "Implementation Error: Cannot handle Jaba parameter object "
- + rg.getClass());
+ throw new Error(MessageManager.formatMessage("error.implementation_error_cannot_handle_jaba_param", new String[]{rg.getClass().toString()}));
}
else
{
.getOption() : null;
if (narg == null)
{
- throw new Error(
- "Implementation Error: Cannot handle Jaba parameter object "
- + rg.getClass());
+ throw new Error(MessageManager.formatMessage("error.implementation_error_cannot_handle_jaba_param", new String[]{rg.getClass().toString()}));
}
else
{
}
if (servicePresets.containsKey(name))
{
- throw new Error(
- "Implementation error: Attempt to delete a service preset!");
+ throw new Error(MessageManager.getString("error.implementation_error_attempt_to_delete_service_preset"));
}
}
: getPreset(presetName));
if (jps == null)
{
- throw new Error("Implementation error: Can't locate either oldname ("
- + oldName + ") or presetName (" + presetName
- + "in the datastore!");
+ throw new Error(MessageManager.formatMessage("error.implementation_error_cannot_locate_oldname_presetname", new String[]{oldName,presetName}));
}
jps.setName(presetName);
jps.setDescription(text);
{
if (!involves(urls))
{
- throw new IOException(
- "Implementation error: Cannot find service url in the given url set!");
+ throw new IOException(MessageManager.getString("error.implementation_error_cannot_find_service_url_in_given_set"));
}
JabaWsParamSet wsp = new JabaWsParamSet();
{
if (!involves(pset.getApplicableUrls()))
{
- throw new IOException(
- "Implementation error: Cannot find service url in the given url set for this service parameter store ("
- + service.getUri() + ") !");
-
+ throw new IOException(MessageManager.formatMessage("error.implementation_error_cannot_find_service_url_in_given_set_param_store", new String[]{service.getUri()}));
}
if (!(pset instanceof JabaWsParamSet))
{
- throw new Error(
- "Implementation error: JabaWsParamSets can only be handled by JabaParamStore");
+ throw new Error(MessageManager.getString("error.implementation_error_jabaws_param_set_only_handled_by"));
}
StringBuffer rslt = new StringBuffer();
*/
package jalview.ws.jws2;
+import jalview.util.MessageManager;
import jalview.ws.jws2.jabaws2.Jws2Instance;
import jalview.ws.params.ArgumentI;
import jalview.ws.params.WsParamSetI;
@Override
public void setSourceFile(String newfile)
{
- throw new Error("Cannot set source file for " + getClass());
+ throw new Error(MessageManager.formatMessage("error.cannot_set_source_file_for", new String[]{getClass().toString()}));
}
@Override
} catch (Exception e)
{
e.printStackTrace();
- throw new Error(
- "Probable mismatch between service instance and preset!");
+ throw new Error(MessageManager.getString("error.mismatch_service_instance_preset"));
}
}
@Override
public void setArguments(List<ArgumentI> args)
{
- throw new Error("Cannot set Parameters for a Jaba Web service's preset");
+ throw new Error(MessageManager.getString("error.cannot_set_params_for_ws_preset"));
}
}
import jalview.datamodel.Annotation;
import jalview.datamodel.SequenceI;
import jalview.gui.AlignFrame;
+import jalview.util.MessageManager;
import jalview.ws.jws2.jabaws2.Jws2Instance;
import jalview.ws.params.WsParamSetI;
rslt = aaservice.customAnalize(seqs, getJabaArguments());
} catch (WrongParameterException x)
{
- throw new JobSubmissionException(
- "Invalid parameter set. Check Jalview implementation.", x);
+ throw new JobSubmissionException(MessageManager.getString("exception.jobsubmission_invalid_params_set"), x);
}
}
import jalview.datamodel.Annotation;
import jalview.datamodel.SequenceI;
import jalview.gui.AlignFrame;
+import jalview.util.MessageManager;
import jalview.workers.AlignCalcWorker;
import jalview.ws.jws2.jabaws2.Jws2Instance;
import jalview.ws.params.WsParamSetI;
rslt = msaservice.customAlign(seqs, getJabaArguments());
} catch (WrongParameterException x)
{
- throw new JobSubmissionException(
- "Invalid parameter set. Check Jalview implementation.", x);
-
+ throw new JobSubmissionException(MessageManager.getString("exception.jobsubmission_invalid_params_set"), x);
}
}
return rslt;
* arguments. for (Argument opt : arguments) { newargs.add(opt); } }
* paramset = newargs; } else {
*/
- throw new Error(
- "Implementation error: Can only instantiate Jaba parameter sets.");
+ throw new Error(MessageManager.getString("error.implementation_error_can_only_instantiate_jaba_param_sets"));
}
}
else
{
// TODO raise dialog box explaining error, and/or open the JABA
// preferences menu.
- throw new Error("No AACon service found.");
+ throw new Error(MessageManager.getString("error.no_aacon_service_found"));
}
return new AAConSettings(true, service, null, null);
}
import jalview.bin.*;
import jalview.datamodel.*;
import jalview.gui.*;
+import jalview.util.MessageManager;
import jalview.ws.AWsJob;
import jalview.ws.WSClientI;
import jalview.ws.JobStateSummary;
int nseqs = 0;
if (minlen < 0)
{
- throw new Error(
- "Implementation error: minlen must be zero or more.");
+ throw new Error(MessageManager.getString("error.implementation_error_minlen_must_be_greater_zero"));
}
for (int i = 0; i < seqs.length; i++)
{
// boiler plate template
if (!(job instanceof MsaWSJob))
{
- throw new Error("StartJob(MsaWSJob) called on a WSJobInstance "
- + job.getClass());
+ throw new Error(MessageManager.formatMessage("error.implementation_error_msawbjob_called", new String[]{job.getClass().toString()}));
}
MsaWSJob j = (MsaWSJob) job;
if (j.isSubmitted())
{
// special case - selection consisted entirely of empty sequences...
j.setjobStatus(JobStatus.FINISHED);
- j.setStatus("Empty Alignment Job");
+ j.setStatus(MessageManager.getString("label.empty_alignment_job"));
}
try
{
}
else
{
- throw new Exception(
- "Server at "
- + WsUrl
- + " returned null string for job id, it probably cannot be contacted. Try again later ?");
+ throw new Exception(MessageManager.formatMessage("exception.web_service_returned_null_try_later", new String[]{WsUrl}));
}
} catch (compbio.metadata.UnsupportedRuntimeException _lex)
{
lex = _lex;
- wsInfo.appendProgressText("Job could not be run because the server doesn't support this program.\n"
- + _lex.getMessage());
- wsInfo.warnUser(_lex.getMessage(), "Service not supported!");
+ wsInfo.appendProgressText(MessageManager.formatMessage("info.job_couldnt_be_run_server_doesnt_support_program", new String[]{_lex.getMessage()}));
+ wsInfo.warnUser(_lex.getMessage(), MessageManager.getString("warn.service_not_supported"));
wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_SERVERERROR);
wsInfo.setStatus(j.getJobnum(),
WebserviceInfo.STATE_STOPPED_SERVERERROR);
} catch (compbio.metadata.LimitExceededException _lex)
{
lex = _lex;
- wsInfo.appendProgressText("Job could not be run because it exceeded a hard limit on the server.\n"
- + _lex.getMessage());
- wsInfo.warnUser(_lex.getMessage(), "Input is too big!");
+ wsInfo.appendProgressText(MessageManager.formatMessage("info.job_couldnt_be_run_exceeded_hard_limit", new String[]{_lex.getMessage()}));
+ wsInfo.warnUser(_lex.getMessage(), MessageManager.getString("warn.input_is_too_big"));
wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_ERROR);
wsInfo.setStatus(j.getJobnum(), WebserviceInfo.STATE_STOPPED_ERROR);
} catch (compbio.metadata.WrongParameterException _lex)
{
lex = _lex;
- wsInfo.warnUser(_lex.getMessage(), "Invalid job parameter set!");
- wsInfo.appendProgressText("Job could not be run because some of the parameter settings are not supported by the server.\n"
- + _lex.getMessage()
- + "\nPlease check to make sure you have used the correct parameter set for this service!\n");
+ wsInfo.warnUser(_lex.getMessage(), MessageManager.getString("warn.invalid_job_param_set"));
+ wsInfo.appendProgressText(MessageManager.formatMessage("info.job_couldnt_be_run_incorrect_param_setting", new String[]{_lex.getMessage()}));
wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_ERROR);
wsInfo.setStatus(j.getJobnum(), WebserviceInfo.STATE_STOPPED_ERROR);
} catch (Error e)
j.setAllowedServerExceptions(0);
wsInfo.appendProgressText(j.getJobnum(),
- "Failed to submit sequences for alignment.\n"
- + "Just close the window\n");
+ MessageMAnager.getString("info.failed_to_submit_sequences_for_alignment"));
}
}
}
public void parseResult()
{
long progbar = System.currentTimeMillis();
- wsInfo.setProgressBar("Collecting job results.", progbar);
+ wsInfo.setProgressBar(MessageManager.getString("status.collecting_job_results"), progbar);
int results = 0; // number of result sets received
JobStateSummary finalState = new JobStateSummary();
try
} catch (Exception e)
{
e.printStackTrace();
- throw new Error(
- "Implementation error: could not copy ValueConstrain!");
+ throw new Error(MessageManager.getString("error.implementation_error_couldnt_copy_value_constraint"));
}
}
} catch (Exception x)
{
x.printStackTrace();
- throw new Error("Implementation error", x);
+ throw new Error(MessageManager.getString("error.implementation_error"), x);
}
alignFrame.getViewport().getCalcManager().registerWorker(worker);
alignFrame.getViewport().getCalcManager().startWorker(worker);
return;
}
// Try even harder to migrate arguments.
- throw new Error("Parameter migration not implemented yet");
+ throw new Error(MessageManager.getString("error.parameter_migration_not_implemented_yet"));
}
}
*/
package jalview.ws.jws2.dm;
+import jalview.util.MessageManager;
import jalview.ws.jws2.ParameterUtils;
import jalview.ws.params.OptionI;
} catch (Exception e)
{
e.printStackTrace();
- throw new Error(
- "Implementation error: cannot set Jaba Option to a value outside its allowed value range!");
+ throw new Error(MessageManager.getString("error.implementation_error_cannot_set_jaba_option"));
}
}
import compbio.metadata.ValueConstrain;
+import jalview.util.MessageManager;
import jalview.ws.params.ValueConstrainI;
public class JabaValueConstrain implements ValueConstrainI
{
return ValueType.Integer;
}
- throw new Error(
- "IMPLEMENTATION ERROR: jalview.ws.params.ValueConstrainI.ValueType does not support the JABAWS type :"
- + vc.toString());
+ throw new Error(MessageManager.formatMessage("error.implementation_error_valuetype_doesnt_support_jabaws_type", new String[]{vc.toString()}));
}
@Override
import compbio.metadata.Option;
+import jalview.util.MessageManager;
import jalview.ws.jws2.JabaParamStore;
import jalview.ws.params.ArgumentI;
import jalview.ws.params.WsParamSetI;
{
if (!allJaba(jobParams))
{
- throw new Error(
- "Cannot create a JabaWSParamSet from non-JabaWS parameters");
+ throw new Error(MessageManager.getString("error.cannot_create_jabaws_param_set"));
}
else
{
{
if (!allJaba(args))
{
- throw new Error(
- "Cannot set arguments to a JabaWSParamSet that are not JabaWS arguments");
+ throw new Error(MessageManager.getString("error.cannot_set_arguments_to_jabaws_param_set"));
}
jabaArguments = new ArrayList<Option>();
for (ArgumentI rg : args)
import jalview.gui.AlignFrame;
import jalview.gui.Desktop;
+import jalview.util.MessageManager;
import jalview.ws.jws2.JabaParamStore;
import jalview.ws.jws2.MsaWSClient;
import jalview.ws.jws2.SequenceAnnotationWSClient;
{
return ((SequenceAnnotation) service).getRunnerOptions();
}
- throw new Error(
- "Implementation Error: Runner Config not available for a JABAWS service of type "
- + serviceType + " (" + service.getClass() + ")");
+ throw new Error(MessageManager.formatMessage("error.implementation_error_runner_config_not_available", new String[]{serviceType,service.getClass().toString()}));
}
@Override
if (en == null)
{
- throw new Error(
- "Implementation Error: need to have an HttpResponse to process.");
+ throw new Error(MessageManager.getString("error.implementation_error_need_to_have_httpresponse"));
}
jalview.io.packed.JalviewDataset ds = restJob.newJalviewDataset();
// Decide how we deal with content.
public void setWebserviceInfo(boolean headless)
{
- WebServiceJobTitle = service.details.Action + " using "
- + service.details.Name;
+ WebServiceJobTitle = MessageManager.formatMessage("label.webservice_job_title", new String[]{service.details.Action,service.details.Name});
WebServiceName = service.details.Name;
WebServiceReference = "No reference - go to url for more info";
if (service.details.description != null)
_input = new AlignmentView(av.getAlignment(),
av.getColumnSelection(), av.getSelectionGroup(),
av.hasHiddenColumns(), true, true);
- viewTitle = "selected "
- + (av.hasHiddenColumns() ? "visible" : "")
- + " region of " + af.getTitle();
+ viewTitle = MessageManager.formatMessage("label.select_visible_region_of", new String[]{(av.hasHiddenColumns() ? MessageManager.getString("label.visible") : ""),af.getTitle()});
}
else
{
av.getColumnSelection(), av.getSelectionGroup(),
av.hasHiddenColumns(), false, true);
}
- viewTitle = "select and unselected "
- + (av.hasHiddenColumns() ? "visible" : "")
- + " regions from " + af.getTitle();
+ viewTitle = MessageManager.formatMessage("label.select_unselect_visible_regions_from", new String[]{(av.hasHiddenColumns() ? MessageManager.getString("label.visible") : ""),af.getTitle()});
}
else
{
_input = new AlignmentView(av.getAlignment(),
av.getColumnSelection(), av.getSelectionGroup(),
av.hasHiddenColumns(), true, true);
- viewTitle = "selected " + (av.hasHiddenColumns() ? "visible" : "")
- + " region of " + af.getTitle();
+ viewTitle = MessageManager.formatMessage("label.select_visible_region_of", new String[]{(av.hasHiddenColumns() ? MessageManager.getString("label.visible") : ""),af.getTitle()});
}
}
else
_input = new AlignmentView(av.getAlignment(),
av.getColumnSelection(), null, av.hasHiddenColumns(), false,
true);
- viewTitle = "" + (av.hasHiddenColumns() ? "visible region of " : "")
+ viewTitle = "" + (av.hasHiddenColumns() ? (new StringBuffer(" ").append(MessageManager.getString("label.visible_region_of")).toString()) : "")
+ af.getTitle();
}
import jalview.io.NewickFile;
import jalview.io.packed.JalviewDataset;
import jalview.io.packed.JalviewDataset.AlignmentSet;
+import jalview.util.MessageManager;
import jalview.ws.AWSThread;
import jalview.ws.AWsJob;
destAls.add(destAl);
destColsel.add(destCs);
resultDest.add(AddDataTo.newAlignment);
- throw new Error("Impl. Error! TODO: ");
+ throw new Error(MessageManager.getString("error.implementation_error")+"TODO: ");
}
}
/**
{
AlignmentI destal;
ColumnSelection destcs;
- String alTitle = restClient.service.details.Action + " using "
- + restClient.service.details.Name + " on "
- + restClient.viewTitle;
+ String alTitle = MessageManager.formatMessage("label.webservice_job_title_on", new String[]{restClient.service.details.Action,restClient.service.details.Name,restClient.viewTitle});
switch (action)
{
case newAlignment:
*/
package jalview.ws.rest.params;
+import jalview.util.MessageManager;
import jalview.ws.params.OptionI;
import jalview.ws.rest.InputType;
import jalview.ws.rest.NoValidInputDataException;
prm.add(URLEncoder.encode(value, "UTF-8"));
} catch (UnsupportedEncodingException ex)
{
- throw new Error("Couldn't encode '" + value + "' as UTF-8.", ex);
+ throw new Error(MessageManager.formatMessage("error.couldnt_encode_as_utf8", new String[]{value}), ex);
}
}
import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
+import jalview.util.MessageManager;
import jalview.ws.params.OptionI;
import jalview.ws.params.simple.IntegerParameter;
import jalview.ws.params.simple.Option;
{
if (sg.getSize() < minsize)
{
- throw new NoValidInputDataException("Group contains less than "
- + minsize + " sequences.");
+ throw new NoValidInputDataException(MessageManager.formatMessage("exception.notvaliddata_group_contains_less_than_min_seqs", new String[]{Integer.valueOf(minsize).toString()}));
}
// TODO: refactor to sequenceGroup for efficiency -
// getAlignmentRowInterval(AlignmentI al)
/*
* rj.getTreeForInput(token); return new StringBody(new )
*/
- throw new Error("Tree InputType not yet implemented");
+ throw new Error(MessageManager.getString("error.tree_inputtype_not_yet_implemented"));
// return null;
}
import jalview.datamodel.DBRefEntry;
import jalview.datamodel.SequenceI;
import jalview.util.DBRefUtils;
+import jalview.util.MessageManager;
import java.util.ArrayList;
import java.util.Enumeration;
} catch (Exception e)
{
// Serious problems if this happens.
- throw new Error("DBRefSource Implementation Exception", e);
+ throw new Error(MessageManager.getString("error.dbrefsource_implementation_exception"), e);
}
addDbRefSourceImpl(proxy);
}
{
if (!jalview.ws.seqfetcher.DbSourceProxy.class.isAssignableFrom(class1))
{
- throw new Error(
- "Implmentation Error - getDbInstances must be given a class that implements jalview.ws.seqfetcher.DbSourceProxy (was given '"
- + class1 + "')");
+ throw new Error(MessageManager.formatMessage("error.implementation_error_dbinstance_must_implement_interface", new String[]{class1.toString()}));
}
if (FETCHABLEDBS == null)
{
*/
package org.jibble.epsgraphics;
+import jalview.util.MessageManager;
+
import java.io.*;
import java.util.*;
_bufferedWriter.write(line + "\n");
} catch (IOException e)
{
- throw new EpsException("Could not write to the output file: " + e);
+ throw new EpsException(MessageManager.formatMessage("exception.eps_coudnt_write_output_file", new String[]{e.getMessage()}));
}
}
*/
package org.jibble.epsgraphics;
+import jalview.util.MessageManager;
+
import java.io.*;
import java.text.*;
import java.util.*;
*/
private void methodNotSupported()
{
- EpsException e = new EpsException(
- "Method not currently supported by EpsGraphics2D version "
- + VERSION);
+ EpsException e = new EpsException(MessageManager.formatMessage("exception.eps_method_not_supported", new String[]{VERSION}));
e.printStackTrace(System.err);
}
return t.createTransformedShape(_clip);
} catch (Exception e)
{
- throw new EpsException("Unable to get inverse of matrix: "
- + _transform);
+ throw new EpsException(MessageManager.formatMessage("exception.eps_unable_to_get_inverse_matrix", new String[]{_transform.toString()}));
}
}
}
matrix = matrix.createInverse();
} catch (Exception e)
{
- throw new EpsException("Unable to get inverse of matrix: " + matrix);
+ throw new EpsException(MessageManager.formatMessage("exception.eps_unable_to_get_inverse_matrix", new String[]{matrix.toString()}));
}
matrix.scale(1, -1);
matrix.getMatrix(m);
*/
package uk.ac.ebi.www;
+import jalview.util.MessageManager;
+
public class WSWUBlastServiceLocator extends org.apache.axis.client.Service
implements uk.ac.ebi.www.WSWUBlastService
{
{
throw new javax.xml.rpc.ServiceException(t);
}
- throw new javax.xml.rpc.ServiceException(
- "There is no stub implementation for the interface: "
- + (serviceEndpointInterface == null ? "null"
- : serviceEndpointInterface.getName()));
+ throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage("exception.no_stub_implementation_for_interface", new String[]{(serviceEndpointInterface == null ? "null": serviceEndpointInterface.getName())}));
}
/**
*/
package uk.ac.ebi.www.picr.AccessionMappingService;
+import jalview.util.MessageManager;
+
public class AccessionMapperServiceLocator extends
org.apache.axis.client.Service implements
uk.ac.ebi.www.picr.AccessionMappingService.AccessionMapperService
{
throw new javax.xml.rpc.ServiceException(t);
}
- throw new javax.xml.rpc.ServiceException(
- "There is no stub implementation for the interface: "
- + (serviceEndpointInterface == null ? "null"
- : serviceEndpointInterface.getName()));
+ throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage("exception.no_stub_implementation_for_interface", new String[]{(serviceEndpointInterface == null ? "null": serviceEndpointInterface.getName())}));
}
/**
}
else
{ // Unknown Port Name
- throw new javax.xml.rpc.ServiceException(
- " Cannot set Endpoint Address for Unknown Port" + portName);
+ throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage("exception.cannot_set_endpoint_address_unknown_port", new String[]{portName}));
}
}