Package org.xhtmlrenderer.swing

Examples of org.xhtmlrenderer.swing.SelectionHighlighter


        } catch (Exception e) {
            throw new RuntimeException(e);
        }

        // install a selection highlighter no the panel
        final SelectionHighlighter caret = new SelectionHighlighter();
        caret.install(xhtmlPanel);
        caret.selectAll();

        FSScrollPane fs = new FSScrollPane(xhtmlPanel);

        mainPanel.add(fs,BorderLayout.CENTER);

        //
        // actions
        //
        JPanel actionPanel = new JPanel(new FlowLayout());
        mainPanel.add(actionPanel, BorderLayout.SOUTH);

        // Select all text
        Action selectAll = new AbstractAction("Select All") {
            public void actionPerformed(ActionEvent event) {
                caret.selectAll();
            }
        };
        actionPanel.add(new JButton(selectAll));

View Full Code Here

TOP

Related Classes of org.xhtmlrenderer.swing.SelectionHighlighter

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.