Browse Source
* commit '1a98f452b61c8a6a2bec2d7374a338f380820374': f REPORT-11623 模板加密 设计器拷贝剪切控制research/10.0
yaoh.wu
6 years ago
18 changed files with 120 additions and 236 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; |
package com.fr.design.designer.beans.actions; |
||||||
|
|
||||||
import java.awt.event.KeyEvent; |
|
||||||
|
|
||||||
import javax.swing.KeyStroke; |
|
||||||
|
|
||||||
import com.fr.base.BaseUtils; |
import com.fr.base.BaseUtils; |
||||||
|
import com.fr.design.base.mode.DesignModeContext; |
||||||
import com.fr.design.mainframe.FormDesigner; |
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; |
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER; |
||||||
|
|
||||||
public class PasteAction extends FormWidgetEditAction { |
public class PasteAction extends FormWidgetEditAction { |
||||||
|
|
||||||
public PasteAction(FormDesigner t) { |
public PasteAction(FormDesigner t) { |
||||||
super(t); |
super(t); |
||||||
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_M_Edit_Paste")); |
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_M_Edit_Paste")); |
||||||
this.setMnemonic('P'); |
this.setMnemonic('P'); |
||||||
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/paste.png")); |
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/paste.png")); |
||||||
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, DEFAULT_MODIFIER)); |
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, DEFAULT_MODIFIER)); |
||||||
} |
} |
||||||
|
|
||||||
@Override |
@Override |
||||||
public boolean executeActionReturnUndoRecordNeeded() { |
public boolean executeActionReturnUndoRecordNeeded() { |
||||||
FormDesigner tc = getEditingComponent(); |
return DesignModeContext.doPaste(getEditingComponent()); |
||||||
if (tc == null) { |
} |
||||||
return false; |
|
||||||
} |
@Override |
||||||
return tc.paste(); |
public void update() { |
||||||
} |
this.setEnabled(true); |
||||||
@Override |
} |
||||||
public void update() { |
|
||||||
this.setEnabled(true); |
|
||||||
} |
|
||||||
|
|
||||||
} |
} |
Loading…
Reference in new issue