JAL-4061 JAL-4062 button in Find dialog to copy highlighted regions to clipboard
[jalview.git] / src / jalview / jbgui / GFinder.java
index aa79671..9ed2127 100755 (executable)
  */
 package jalview.jbgui;
 
-import jalview.datamodel.AlignmentI;
-import jalview.io.DataSourceType;
-import jalview.io.FileFormat;
-import jalview.io.FormatAdapter;
-import jalview.io.cache.JvCacheableInputBox;
-import jalview.util.MessageManager;
-
 import java.awt.BorderLayout;
 import java.awt.Font;
 import java.awt.GridLayout;
@@ -44,6 +37,13 @@ import javax.swing.SwingUtilities;
 import javax.swing.event.CaretEvent;
 import javax.swing.event.CaretListener;
 
+import jalview.datamodel.AlignmentI;
+import jalview.io.DataSourceType;
+import jalview.io.FileFormat;
+import jalview.io.FormatAdapter;
+import jalview.io.cache.JvCacheableInputBox;
+import jalview.util.MessageManager;
+
 public class GFinder extends JPanel
 {
   private static final java.awt.Font VERDANA_12 = new Font("Verdana",
@@ -59,6 +59,8 @@ public class GFinder extends JPanel
 
   protected JButton createFeatures;
 
+  protected JButton copyToClipboard;
+
   protected JvCacheableInputBox<String> searchBox;
 
   protected JCheckBox caseSensitive;
@@ -205,9 +207,26 @@ public class GFinder extends JPanel
         createFeatures_actionPerformed();
       }
     });
+    copyToClipboard = new JButton();
+    copyToClipboard.setEnabled(false);
+    copyToClipboard.setFont(VERDANA_12);
+    copyToClipboard.setText(MessageManager.getString("label.copy"));
+    copyToClipboard.addActionListener(new ActionListener()
+    {
+      @Override
+      public void actionPerformed(ActionEvent e)
+      {
+        copyToClipboard_actionPerformed();
+      }
+    });
     eastPanel.add(findNext);
     eastPanel.add(findAll);
     eastPanel.add(createFeatures);
+    eastPanel.add(copyToClipboard);
+  }
+
+  protected void copyToClipboard_actionPerformed()
+  {
   }
 
   protected void textfield_keyPressed(KeyEvent e)