本文整理了Java中javax.swing.JFrame.setTransferHandler()
方法的一些代码示例,展示了JFrame.setTransferHandler()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JFrame.setTransferHandler()
方法的具体详情如下:
包路径:javax.swing.JFrame
类名称:JFrame
方法名:setTransferHandler
暂无
代码示例来源:origin: MarginallyClever/Makelangelo-software
public void createAndShowGUI() {
// Create and set up the window.
mainFrame = new JFrame(Translator.get("TitlePrefix"));
mainFrame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
mainFrame.addWindowListener(this);
mainFrame.setJMenuBar(createMenuBar());
mainFrame.setContentPane(createContentPane());
adjustWindowSize();
mainFrame.setVisible(true);
drawPanel.zoomToFitPaper();
// add the drag & drop support
mainFrame.setTransferHandler(myTransferHandler);
// start animation system
animator = new FPSAnimator(30);
animator.add(drawPanel);
animator.start();
}
代码示例来源:origin: org.gephi/desktop-branding
public static void register() {
JFrame frame = (JFrame) WindowManager.getDefault().getMainWindow();
frame.setTransferHandler(new TransferHandler() {
代码示例来源:origin: Audiveris/audiveris
@Override
protected void startup ()
{
logger.debug("MainGui. 2/startup");
logger.info("{} version {}", WellKnowns.TOOL_NAME, WellKnowns.TOOL_REF);
logger.info("\n{}", LogUtil.allInitialMessages());
if (!OcrUtil.getOcr().isAvailable()) {
logger.warn("{} Check log file for more details.", OCR.NO_OCR);
}
// Make the OmrGui instance available for the other classes
OMR.gui = this;
frame = getMainFrame();
stubsController = StubsController.getInstance();
stubsController.subscribe(this);
defineMenus();
defineLayout();
// Allow dropping of files
frame.setTransferHandler(new FileDropHandler());
// Handle ghost drop from shape palette
frame.setGlassPane(glassPane);
// Use the defined application name
appName = getContext().getResourceMap().getString("Application.name");
// Here we go...
show(frame);
}
内容来源于网络,如有侵权,请联系作者删除!