You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.1 KiB
41 lines
1.1 KiB
/* |
|
* Copyright(c) 2001-2010, FineReport Inc, All Rights Reserved. |
|
*/ |
|
package com.fr.design.actions.edit; |
|
|
|
import java.awt.event.KeyEvent; |
|
|
|
import javax.swing.KeyStroke; |
|
|
|
import com.fr.base.BaseUtils; |
|
import com.fr.design.actions.TemplateComponentAction; |
|
import com.fr.design.designer.TargetComponent; |
|
import com.fr.general.Inter; |
|
|
|
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER; |
|
|
|
/** |
|
* Paste. |
|
*/ |
|
public class PasteAction extends TemplateComponentAction { |
|
/** |
|
* Constructor |
|
*/ |
|
public PasteAction(TargetComponent t) { |
|
super(t); |
|
|
|
this.setName(Inter.getLocText("M_Edit-Paste")); |
|
this.setMnemonic('P'); |
|
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/paste.png")); |
|
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, DEFAULT_MODIFIER)); |
|
} |
|
|
|
@Override |
|
public boolean executeActionReturnUndoRecordNeeded() { |
|
TargetComponent tc = getEditingComponent(); |
|
if (tc == null) { |
|
return false; |
|
} |
|
return tc.paste(); |
|
} |
|
} |