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

The following examples show how to use javax.swing.text.JTextComponent#getTransferHandler() . 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: 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 2
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 3
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 4
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 5
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()));
    }
}