Package freegressi.main

Examples of freegressi.main.JDialogClipboard$MagicAction


    @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

Related Classes of freegressi.main.JDialogClipboard$MagicAction

Copyright © 2018 www.massapicom. 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.