git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'Jalview-BH/JAL-3026-JAL-3063-JAXB' of https://source.jalview.org/git...
[jalview.git]
/
src
/
jalview
/
jbgui
/
GCutAndPasteTransfer.java
diff --git
a/src/jalview/jbgui/GCutAndPasteTransfer.java
b/src/jalview/jbgui/GCutAndPasteTransfer.java
index
101cb03
..
97ac840
100755
(executable)
--- a/
src/jalview/jbgui/GCutAndPasteTransfer.java
+++ b/
src/jalview/jbgui/GCutAndPasteTransfer.java
@@
-1,27
+1,43
@@
/*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ 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
*
* 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.
*
* 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.jbgui;
import jalview.gui.JvSwingUtils;
*/
package jalview.jbgui;
import jalview.gui.JvSwingUtils;
+import jalview.util.MessageManager;
+
+import java.awt.BorderLayout;
+import java.awt.Font;
+import java.awt.Toolkit;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseEvent;
-import java.awt.*;
-import java.awt.event.*;
-import javax.swing.*;
+import javax.swing.JButton;
+import javax.swing.JInternalFrame;
+import javax.swing.JMenu;
+import javax.swing.JMenuBar;
+import javax.swing.JMenuItem;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
/**
* DOCUMENT ME!
/**
* DOCUMENT ME!
@@
-84,17
+100,19
@@
public class GCutAndPasteTransfer extends JInternalFrame
{
scrollPane.setBorder(null);
ok.setFont(JvSwingUtils.getLabelFont());
{
scrollPane.setBorder(null);
ok.setFont(JvSwingUtils.getLabelFont());
- ok.setText("New Window");
+ ok.setText(MessageManager.getString("label.new_window"));
ok.addActionListener(new ActionListener()
{
ok.addActionListener(new ActionListener()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
ok_actionPerformed(e);
}
});
public void actionPerformed(ActionEvent e)
{
ok_actionPerformed(e);
}
});
- cancel.setText("Close");
+ cancel.setText(MessageManager.getString("action.close"));
cancel.addActionListener(new ActionListener()
{
cancel.addActionListener(new ActionListener()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
cancel_actionPerformed(e);
public void actionPerformed(ActionEvent e)
{
cancel_actionPerformed(e);
@@
-102,57
+120,68
@@
public class GCutAndPasteTransfer extends JInternalFrame
});
textarea.setBorder(null);
});
textarea.setBorder(null);
- selectAll.setText("Select All");
+ selectAll.setText(MessageManager.getString("action.select_all"));
selectAll.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
selectAll.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
- java.awt.event.KeyEvent.VK_A, Toolkit.getDefaultToolkit()
- .getMenuShortcutKeyMask(), false));
+ java.awt.event.KeyEvent.VK_A,
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
selectAll.addActionListener(new ActionListener()
{
selectAll.addActionListener(new ActionListener()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
selectAll_actionPerformed(e);
}
});
public void actionPerformed(ActionEvent e)
{
selectAll_actionPerformed(e);
}
});
- jMenu1.setText("File");
- save.setText("Save");
+ jMenu1.setText(MessageManager.getString("action.file"));
+ save.setText(MessageManager.getString("action.save"));
save.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
save.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
- java.awt.event.KeyEvent.VK_S, Toolkit.getDefaultToolkit()
- .getMenuShortcutKeyMask(), false));
+ java.awt.event.KeyEvent.VK_S,
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
save.addActionListener(new ActionListener()
{
save.addActionListener(new ActionListener()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
save_actionPerformed(e);
}
});
copyItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
public void actionPerformed(ActionEvent e)
{
save_actionPerformed(e);
}
});
copyItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
- java.awt.event.KeyEvent.VK_C, Toolkit.getDefaultToolkit()
- .getMenuShortcutKeyMask(), false));
+ java.awt.event.KeyEvent.VK_C,
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
pasteMenu.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
pasteMenu.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
- java.awt.event.KeyEvent.VK_V, Toolkit.getDefaultToolkit()
- .getMenuShortcutKeyMask(), false));
+ java.awt.event.KeyEvent.VK_V,
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
editMenubar.add(jMenu1);
editMenubar.add(editMenu);
textarea.setFont(new java.awt.Font("Monospaced", Font.PLAIN, 12));
textarea.addMouseListener(new java.awt.event.MouseAdapter()
{
editMenubar.add(jMenu1);
editMenubar.add(editMenu);
textarea.setFont(new java.awt.Font("Monospaced", Font.PLAIN, 12));
textarea.addMouseListener(new java.awt.event.MouseAdapter()
{
+ @Override
public void mousePressed(MouseEvent e)
{
public void mousePressed(MouseEvent e)
{
- textarea_mousePressed(e);
+ textarea_mousePressed(e); // on Mac
+ }
+
+ @Override
+ public void mouseReleased(MouseEvent e)
+ {
+ textarea_mousePressed(e); // on Windows
}
});
}
});
- editMenu.setText("Edit");
- pasteMenu.setText("Paste");
+ editMenu.setText(MessageManager.getString("action.edit"));
+ pasteMenu.setText(MessageManager.getString("action.paste"));
pasteMenu.addActionListener(new ActionListener()
{
pasteMenu.addActionListener(new ActionListener()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
pasteMenu_actionPerformed(e);
}
});
public void actionPerformed(ActionEvent e)
{
pasteMenu_actionPerformed(e);
}
});
- copyItem.setText("Copy");
+ copyItem.setText(MessageManager.getString("action.copy"));
copyItem.addActionListener(new ActionListener()
{
copyItem.addActionListener(new ActionListener()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
copyItem_actionPerformed(e);
public void actionPerformed(ActionEvent e)
{
copyItem_actionPerformed(e);