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.
46 lines
1.2 KiB
46 lines
1.2 KiB
/* |
|
* Copyright(c) 2001-2010, FineReport Inc, All Rights Reserved. |
|
*/ |
|
package com.fr.plugin.designer; |
|
|
|
import com.fr.base.BaseUtils; |
|
import com.fr.design.actions.TemplateComponentAction; |
|
import com.fr.design.designer.TargetComponent; |
|
import com.fr.general.Inter; |
|
|
|
import javax.swing.KeyStroke; |
|
import java.awt.event.ActionEvent; |
|
import java.awt.event.KeyEvent; |
|
|
|
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER; |
|
|
|
/** |
|
* Cut. |
|
*/ |
|
public class MyCopyAction extends TemplateComponentAction { |
|
/** |
|
* Constructor |
|
*/ |
|
public MyCopyAction(TargetComponent t) { |
|
super(t); |
|
|
|
this.setName(Inter.getLocText("新增插件菜单测试")); |
|
this.setMnemonic('T'); |
|
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/cut.png")); |
|
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, DEFAULT_MODIFIER)); |
|
} |
|
|
|
@Override |
|
public boolean executeActionReturnUndoRecordNeeded() { |
|
TargetComponent editPane = getEditingComponent(); |
|
if (editPane == null) { |
|
return false; |
|
} |
|
return editPane.cut(); |
|
} |
|
|
|
@Override |
|
public void actionPerformed(ActionEvent evt) { |
|
System.out.println(111111); |
|
} |
|
} |