/*
* PasteAction.java
*
* This file is part of SQL Workbench/J, http://www.sql-workbench.net
*
* Copyright 2002-2008, Thomas Kellerer
* No part of this code maybe reused without the permission of the author
*
* To contact the author please send an email to: support@sql-workbench.net
*
*/
package workbench.gui.actions;
import java.awt.event.ActionEvent;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import javax.swing.KeyStroke;
import workbench.interfaces.ClipboardSupport;
import workbench.resource.ResourceMgr;
/**
* Action to paste the contents of the clipboard into the entry field
* @author support@sql-workbench.net
*/
public class PasteAction extends WbAction
{
private ClipboardSupport client;
public PasteAction(ClipboardSupport aClient)
{
super();
this.client = aClient;
this.setMenuTextByKey("MnuTxtPaste");
this.setIcon(ResourceMgr.getImage("Paste"));
this.setMenuItemName(ResourceMgr.MNU_TXT_EDIT);
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_MASK));
}
public void executeAction(ActionEvent e)
{
this.client.paste();
}
}
|