Example usage for javax.swing JEditorPane getTransferHandler

List of usage examples for javax.swing JEditorPane getTransferHandler

Introduction

In this page you can find the example usage for javax.swing JEditorPane getTransferHandler.

Prototype

public TransferHandler getTransferHandler() 

Source Link

Document

Gets the transferHandler property.

Usage

From source file:org.apache.tika.gui.TikaGUI.java

private void addWelcomeCard(JPanel panel, String name) {
    try {//from   ww  w . j ava2  s.  c  om
        JEditorPane editor = new JEditorPane(TikaGUI.class.getResource("welcome.html"));
        editor.setContentType("text/html");
        editor.setEditable(false);
        editor.setBackground(Color.WHITE);
        editor.setTransferHandler(new ParsingTransferHandler(editor.getTransferHandler(), this));
        panel.add(new JScrollPane(editor), name);
    } catch (IOException e) {
        e.printStackTrace();
    }
}

From source file:org.apache.tika.gui.TikaGUI.java

private JEditorPane addCard(JPanel panel, String type, String name) {
    JEditorPane editor = new JTextPane();
    editor.setBackground(Color.WHITE);
    editor.setContentType(type);/*  w  w  w  .  ja va2 s  .com*/
    editor.setTransferHandler(new ParsingTransferHandler(editor.getTransferHandler(), this));
    panel.add(new JScrollPane(editor), name);
    return editor;
}