Examples of JDialogClipboard


Examples of freegressi.main.JDialogClipboard

    @Override
    public void actionPerformed(ActionEvent e) {
      Tableur sheet = SpreadSheets.getInstance().getActiveSheet();
      if (sheet == null)
        throw new NullPointerException("Pas de tableur");
      JDialogClipboard jdc = new JDialogClipboard(null, JDialogClipboard.JDialogClipboardType.TOCLIPBOARD, sheet.toCSV());
      jdc.setVisible(true);
      if (jdc.isOk()) {
        String text = jdc.getText();
        StringSelection stringSelection = new StringSelection(text);
        Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
        clipboard.setContents(stringSelection, null);
      }
      jdc.dispose();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.