Java Code Examples for javax.swing.text.JTextComponent#setTransferHandler()

The following examples show how to use javax.swing.text.JTextComponent#setTransferHandler() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ClipboardHandler.java    From netbeans with Apache License 2.0 4 votes vote down vote up
public static void install(JTextComponent c) {
    c.setTransferHandler(new ImportingTransferHandler(c.getTransferHandler()));
}
 
Example 2
Source File: RectangularSelectionTransferHandler.java    From netbeans with Apache License 2.0 4 votes vote down vote up
public static void install(JTextComponent c) {
    TransferHandler origHandler = c.getTransferHandler();
    if (!(origHandler instanceof RectangularSelectionTransferHandler)) {
        c.setTransferHandler(new RectangularSelectionTransferHandler(c.getTransferHandler()));
    }
}
 
Example 3
Source File: RectangularSelectionTransferHandler.java    From netbeans with Apache License 2.0 4 votes vote down vote up
public static void uninstall(JTextComponent c) {
    TransferHandler origHandler = c.getTransferHandler();
    if (origHandler instanceof RectangularSelectionTransferHandler) {
        c.setTransferHandler(((RectangularSelectionTransferHandler)origHandler).getDelegate());
    }
}
 
Example 4
Source File: EditorCaretTransferHandler.java    From netbeans with Apache License 2.0 4 votes vote down vote up
public static void install(JTextComponent c) {
    TransferHandler origHandler = c.getTransferHandler();
    if (!(origHandler instanceof EditorCaretTransferHandler)) {
        c.setTransferHandler(new EditorCaretTransferHandler(c.getTransferHandler()));
    }
}
 
Example 5
Source File: EditorCaretTransferHandler.java    From netbeans with Apache License 2.0 4 votes vote down vote up
public static void uninstall(JTextComponent c) {
    TransferHandler origHandler = c.getTransferHandler();
    if (origHandler instanceof EditorCaretTransferHandler) {
        c.setTransferHandler(((EditorCaretTransferHandler)origHandler).getDelegate());
    }
}
 
Example 6
Source File: HtmlTransferHandler.java    From netbeans with Apache License 2.0 4 votes vote down vote up
public static void install(JTextComponent c) {
    TransferHandler origHandler = c.getTransferHandler();
    if (!(origHandler instanceof HtmlTransferHandler)) {
        c.setTransferHandler(new HtmlTransferHandler(c.getTransferHandler()));
    }
}