/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
* Copyright (C) 2014 The Jalview Authors
*
* This file is part of Jalview.
*
* Jalview is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
*
* Jalview is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
* The Jalview Authors are detailed in the 'AUTHORS' file.
*/
package jalview.gui;
-import java.util.*;
-
-import java.awt.*;
-import java.awt.event.*;
-
-import javax.swing.*;
-
-import jalview.bin.*;
-import jalview.io.*;
-import jalview.jbgui.*;
-import jalview.schemes.*;
+import jalview.bin.Cache;
+import jalview.io.JalviewFileChooser;
+import jalview.io.JalviewFileView;
+import jalview.jbgui.GPreferences;
+import jalview.jbgui.GSequenceLink;
+import jalview.schemes.ColourSchemeProperty;
+import jalview.util.MessageManager;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.event.ActionEvent;
+import java.awt.event.MouseEvent;
+import java.util.Collection;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+import javax.swing.JColorChooser;
+import javax.swing.JFileChooser;
+import javax.swing.JInternalFrame;
+import javax.swing.JOptionPane;
/**
* DOCUMENT ME!
.indexOf("SRS|http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-newId+(([uniprot-all:$SEQUENCE_ID$]))+-view+SwissEntry");
if (srsPos > -1)
{
- sequenceURLLinks.setElementAt(
- "EMBL-EBI Search|http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$",
- srsPos);
+ sequenceURLLinks
+ .setElementAt(
+ "EMBL-EBI Search|http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$",
+ srsPos);
}
}
*/
groupURLLinks = new Vector();
- // groupURLLinks.addElement("UNIPROT|EnVision2|http://www.ebi.ac.uk/enfin-srv/envision2/pages/linkin.jsf?tool=Jalview&workflow=Default&datasetName=JalviewIDs$DATASETID$&input=$SEQUENCEIDS$&inputType=0|,");
- // groupURLLinks.addElement("Seqs|EnVision2|http://www.ebi.ac.uk/enfin-srv/envision2/pages/linkin.jsf?tool=Jalview&workflow=Default&datasetName=JalviewSeqs$DATASETID$&input=$SEQUENCES=/([A-Za-z]+)+/=$&inputType=1|,");
-
}
Vector nameLinks, urlLinks;
DasSourceBrowser dasSource;
- private WsPreferences wsPrefs;
+ private final WsPreferences wsPrefs;
/**
* Creates a new Preferences object.
height = 460;
}
- Desktop.addInternalFrame(frame, "Preferences", width, height);
+ Desktop.addInternalFrame(frame,
+ MessageManager.getString("label.preferences"), width, height);
frame.setMinimumSize(new Dimension(width, height));
seqLimit.setSelected(Cache.getDefault("SHOW_JVSUFFIX", true));
* @param e
* DOCUMENT ME!
*/
+ @Override
public void ok_actionPerformed(ActionEvent e)
{
Boolean.toString(clustaljv.isSelected()));
Cache.applicationProperties.setProperty("FASTA_JVSUFFIX",
Boolean.toString(fastajv.isSelected()));
+ Cache.applicationProperties.setProperty("MEGA_JVSUFFIX",
+ Boolean.toString(megajv.isSelected()));
Cache.applicationProperties.setProperty("MSF_JVSUFFIX",
Boolean.toString(msfjv.isSelected()));
Cache.applicationProperties.setProperty("PFAM_JVSUFFIX",
/**
* DOCUMENT ME!
*/
+ @Override
public void startupFileTextfield_mouseClicked()
{
JalviewFileChooser chooser = new JalviewFileChooser(
jalview.bin.Cache.getProperty("LAST_DIRECTORY"),
new String[]
- { "fa, fasta, fastq", "aln", "pfam", "msf", "pir", "blc", "jar" },
+ { "fa, fasta, fastq", "aln", "pfam", "meg", "msf", "pir",
+ "blc", "jar" },
new String[]
- { "Fasta", "Clustal", "PFAM", "MSF", "PIR", "BLC", "Jalview" },
+ { "Fasta", "Clustal", "PFAM", "MEGA", "MSF", "PIR", "BLC",
+ "Jalview" },
jalview.bin.Cache.getProperty("DEFAULT_FILE_FORMAT"));
chooser.setFileView(new JalviewFileView());
chooser.setDialogTitle("Select startup file");
* @param e
* DOCUMENT ME!
*/
+ @Override
public void cancel_actionPerformed(ActionEvent e)
{
try
* @param e
* DOCUMENT ME!
*/
+ @Override
public void annotations_actionPerformed(ActionEvent e)
{
conservation.setEnabled(annotations.isSelected());
&& (identity.isSelected() || showGroupConsensus.isSelected()));
}
+ @Override
public void newLink_actionPerformed(ActionEvent e)
{
while (!valid)
{
if (JOptionPane.showInternalConfirmDialog(Desktop.desktop, link,
- "New sequence URL link", JOptionPane.OK_CANCEL_OPTION, -1,
- null) == JOptionPane.OK_OPTION)
+ MessageManager.getString("label.new_sequence_url_link"),
+ JOptionPane.OK_CANCEL_OPTION, -1, null) == JOptionPane.OK_OPTION)
{
if (link.checkValid())
{
}
}
+ @Override
public void editLink_actionPerformed(ActionEvent e)
{
GSequenceLink link = new GSequenceLink();
if (index == -1)
{
JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "No link selected!", "No link selected",
+ MessageManager.getString("label.no_link_selected"),
+ MessageManager.getString("label.no_link_selected"),
JOptionPane.WARNING_MESSAGE);
return;
}
{
if (JOptionPane.showInternalConfirmDialog(Desktop.desktop, link,
- "New sequence URL link", JOptionPane.OK_CANCEL_OPTION, -1,
- null) == JOptionPane.OK_OPTION)
+ MessageManager.getString("label.new_sequence_url_link"),
+ JOptionPane.OK_CANCEL_OPTION, -1, null) == JOptionPane.OK_OPTION)
{
if (link.checkValid())
{
}
}
+ @Override
public void deleteLink_actionPerformed(ActionEvent e)
{
int index = linkNameList.getSelectedIndex();
if (index == -1)
{
JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "No link selected!", "No link selected",
+ MessageManager.getString("label.no_link_selected"),
+ MessageManager.getString("label.no_link_selected"),
JOptionPane.WARNING_MESSAGE);
return;
}
linkURLList.setListData(urlLinks);
}
+ @Override
public void defaultBrowser_mouseClicked(MouseEvent e)
{
JFileChooser chooser = new JFileChooser(".");
* jalview.jbgui.GPreferences#showunconserved_actionPerformed(java.awt.event
* .ActionEvent)
*/
+ @Override
protected void showunconserved_actionPerformed(ActionEvent e)
{
// TODO Auto-generated method stub
return groupURLLinks;
}
+ @Override
public void minColour_actionPerformed()
{
Color col = JColorChooser.showDialog(this,
minColour.repaint();
}
+ @Override
public void maxColour_actionPerformed()
{
Color col = JColorChooser.showDialog(this,