本文整理汇总了Java中javax.swing.TransferHandler.getPasteAction方法的典型用法代码示例。如果您正苦于以下问题:Java TransferHandler.getPasteAction方法的具体用法?Java TransferHandler.getPasteAction怎么用?Java TransferHandler.getPasteAction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.TransferHandler
的用法示例。
在下文中一共展示了TransferHandler.getPasteAction方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: inMiddleOfSettingUpTheManager
import javax.swing.TransferHandler; //导入方法依赖的package包/类
protected void inMiddleOfSettingUpTheManager() {
assertNotNull("There is a manager already", System.getSecurityManager());
// do some strange tricks to initialize the system
field = new javax.swing.JTextField ();
TransferHandler.getCopyAction();
TransferHandler.getCutAction();
TransferHandler.getPasteAction();
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:NbClipboardIsUsedByAlreadyInitializedComponentsTest.java
示例2: initTransferHandler
import javax.swing.TransferHandler; //导入方法依赖的package包/类
private void initTransferHandler() {
setTransferHandler(controller.createFileTransferHandler());
filesTable.setTransferHandler(getTransferHandler());
final Action pasteAction = TransferHandler.getPasteAction();
getInputMap().put(KeyStroke.getKeyStroke("ctrl V"), pasteAction.getValue(Action.NAME));
getActionMap().put(pasteAction.getValue(Action.NAME), pasteAction);
}
示例3: getPasteAction
import javax.swing.TransferHandler; //导入方法依赖的package包/类
/**
* Lazily creates and returns the action to paste graph elements into the
* editor.
*/
private Action getPasteAction() {
if (this.pasteAction == null) {
Action action = TransferHandler.getPasteAction();
this.pasteAction =
new TransferAction(action, Options.PASTE_KEY, Options.PASTE_ACTION_NAME);
this.pasteAction.putValue(Action.SMALL_ICON, Icons.PASTE_ICON);
this.pasteAction.setEnabled(true);
}
return this.pasteAction;
}