List of usage examples for javax.swing JEditorPane setTransferHandler
@BeanProperty(hidden = true, description = "Mechanism for transfer of data to and from the component") public void setTransferHandler(TransferHandler newHandler)
From source file:org.apache.tika.gui.TikaGUI.java
private void addWelcomeCard(JPanel panel, String name) { try {/* w w w .j a v a 2 s .c o m*/ 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 . j a v a2 s . c o m editor.setTransferHandler(new ParsingTransferHandler(editor.getTransferHandler(), this)); panel.add(new JScrollPane(editor), name); return editor; }