forked from fanruan/design
yaoh.wu
6 years ago
18 changed files with 118 additions and 237 deletions
@ -0,0 +1,7 @@
|
||||
package com.fr.design.designer; |
||||
|
||||
/** |
||||
* 暂时是空接口,标记一下模板设计时推出的代理其他 {@link TargetComponent} 的类 |
||||
*/ |
||||
public interface DesignerProxy { |
||||
} |
@ -1,36 +1,32 @@
|
||||
package com.fr.design.designer.beans.actions; |
||||
|
||||
import java.awt.event.KeyEvent; |
||||
|
||||
import javax.swing.KeyStroke; |
||||
|
||||
import com.fr.base.BaseUtils; |
||||
|
||||
import com.fr.design.base.mode.DesignModeContext; |
||||
import com.fr.design.mainframe.FormDesigner; |
||||
|
||||
import javax.swing.KeyStroke; |
||||
import java.awt.event.KeyEvent; |
||||
|
||||
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER; |
||||
|
||||
public class PasteAction extends FormWidgetEditAction { |
||||
|
||||
public PasteAction(FormDesigner t) { |
||||
super(t); |
||||
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_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() { |
||||
FormDesigner tc = getEditingComponent(); |
||||
if (tc == null) { |
||||
return false; |
||||
} |
||||
return tc.paste(); |
||||
} |
||||
@Override |
||||
public void update() { |
||||
this.setEnabled(true); |
||||
} |
||||
public PasteAction(FormDesigner t) { |
||||
super(t); |
||||
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_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() { |
||||
return DesignModeContext.doPaste(getEditingComponent()); |
||||
} |
||||
|
||||
@Override |
||||
public void update() { |
||||
this.setEnabled(true); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue