Package java.awt.datatransfer

Examples of java.awt.datatransfer.StringSelection


   * Put data into the system clipboard.
   * @param data the data
   */
  public void put(final String data) {
    java.awt.datatransfer.Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
    clipboard.setContents(new StringSelection(data), this);
  }
View Full Code Here


     */

    public void copyDN()
    {
        selectDN = new DN(getActiveDN());
        StringSelection ss = new StringSelection(selectDN.toString());
        Clipboard clip = Toolkit.getDefaultToolkit().getSystemClipboard();
        clip.setContents(ss,ss);
        tree.fireJXplorerEvent(new JXplorerEvent(this, JXplorerEvent.EventType.DNSELECTED, selectDN.toString()));

        if(!tree.getName().equalsIgnoreCase("Schema"))
View Full Code Here

                content.append(selectedValues[i]);
                if (i < selectedValues.length - 1) {
                    content.append(lineSeparator);
                }
            }
            return new StringSelection(content.toString());
        }
View Full Code Here

    /**
     * Handle packet with server clip-board.
     */
    private void serverCutText(DataInputStream is) throws IOException {
        ServerCutText clipboardContent = new ServerCutText(is);
        StringSelection contents = new StringSelection(clipboardContent.getContent());
        Toolkit.getDefaultToolkit().getSystemClipboard().setContents(contents, null);

        s_logger.info("Server clipboard buffer: " + clipboardContent.getContent());
    }
View Full Code Here

    // Reusable routines

    private void setClipboard(String clipboardData) {
        Toolkit.getDefaultToolkit().getSystemClipboard().setContents(
            new StringSelection(clipboardData), null);
    }
View Full Code Here

        Integer i = Integer.parseInt(id);
        String clip = CLIP_ITEMS.get(i);

        if (clip != null) {
            Toolkit.getDefaultToolkit().getSystemClipboard().setContents(
                new StringSelection(clip), null);
        } else {
            Toolkit.getDefaultToolkit().beep();
        }
       
        DashController.printNullDocument(out);
View Full Code Here

                if (isEditing())
                    removeEditor();
                setCutList(rows);

                return new StringSelection(data.toString());
            }
View Full Code Here

        }

    }//GEN-LAST:event_onResultTableClick

    private void onPopUpCopy(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_onPopUpCopy
        Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(resultModel.get(taResults.getSelectedRow()).getAbsoluteFilePath()), null);
    }//GEN-LAST:event_onPopUpCopy
View Full Code Here

        exportDone(textKit, transferable, realAction);
    }

    public static final Transferable createTransferable(final TextKit textKit) {
        String text = textKit.getSelectedText();
        return text != null ? new StringSelection(text) : null;
    }
View Full Code Here

                if (i < colMaxSelectionIndex) {
                    content.append(lineSeparator);
                }
            }

            return new StringSelection(content.toString());
        }
View Full Code Here

TOP

Related Classes of java.awt.datatransfer.StringSelection

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.