Package javax.swing.text.html

Examples of javax.swing.text.html.HTMLEditorKit


     *
     * @return javax.swing.text.html.HTMLEditorKit
     */
    private HTMLEditorKit getHTMLEditorKit() {
        if (HTMLEditorKit == null) {
            HTMLEditorKit = new HTMLEditorKit();
        }
        return HTMLEditorKit;
    }
View Full Code Here


    private void initComponents() {
        waitingWorker = new WaitingWorker();

        htmlPanel = new JEditorPane();
        htmlPanel.setEditorKit(new HTMLEditorKit());
        htmlPanel.setEditable(false);
        // listen for the "page" property, useful for worker to know when load
        // is completed
        htmlPanel.addPropertyChangeListener("page", waitingWorker);
View Full Code Here

    private void initComponents() {
        waitingWorker = new WaitingWorker();

        htmlPanel = new JEditorPane();
        htmlPanel.setEditorKit(new HTMLEditorKit());
        htmlPanel.setEditable(false);
        // listen for the "page" property, useful for worker to know when load
        // is completed
        htmlPanel.addPropertyChangeListener("page", waitingWorker);
View Full Code Here

    }

    public HTMLViewWidget(boolean readOnly)
    {
        this.textPane = new JTextPane();
        this.textPane.setEditorKit(new HTMLEditorKit());
        this.textPane.setEditable(!readOnly);

        JScrollPane scrollPane = new JScrollPane(this.textPane);
        scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
        scrollPane.setPreferredSize(new Dimension(250, 155));
View Full Code Here

public final class HTMLSequenceFormatter {
  public static final int LINE_CHARS = 60;
  public static final int SEGMENT_CHARS = 10;
 
  public static Document format(Sequence sequence) throws IOException, BadLocationException {
    HTMLEditorKit editorKit = new HTMLEditorKit();
    HTMLDocument doc = (HTMLDocument)editorKit.createDefaultDocument();
    editorKit.read(new StringReader(HTMLUtils.renderSequence(sequence.getSequence(), true)), doc, 0);
    return doc;
  }
View Full Code Here

    editorKit.read(new StringReader(HTMLUtils.renderSequence(sequence.getSequence(), true)), doc, 0);
    return doc;
  }

  public static Document format(AlignmentStore alignmentStore) throws IOException, BadLocationException {
    HTMLEditorKit editorKit = new HTMLEditorKit();
    HTMLDocument doc = (HTMLDocument)editorKit.createDefaultDocument();
    editorKit.read(new StringReader(alignmentStore.getHTMLAlignment()), doc, 0);
    return doc;
  }
View Full Code Here

    JTextPane helpPane = new JTextPane();
    helpPane.setContentType("text/html");
    helpPane.setEditable(false);
    helpPane.setPreferredSize(Size.dialog_panel_help);
    try {
      HTMLEditorKit editorKit = new HTMLEditorKit();
      HTMLDocument doc = (HTMLDocument) editorKit.createDefaultDocument();
      editorKit.read(new StringReader(helpDoc), doc, 0);
      helpPane.setDocument(doc);
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      JOptionPane.showMessageDialog(null, new JScrollPane(helpPane, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED),
View Full Code Here

 
  private HTMLDocument doc;
 
  public HelpWindow() {
   
    editor.setEditorKit(new HTMLEditorKit());
    editor.setEditable(false);
   
    String str = Loader.getIndexText();
    editor.setText(str);
   
View Full Code Here

   
      final Stack<String> urlStack = new Stack<String>();
      final JEditorPane editorPane;

     
       editorPane = new JEditorPane(new HTMLEditorKit().getContentType(), " ");

        editorPane.setOpaque(false);
        editorPane.setBorder(null);
        editorPane.setEditable(false);
View Full Code Here

    /** Creates new form */

    JPanelSIP() {
        initComponents();
        jEditorPane1.setEditable(false);
        jEditorPane1.setEditorKit(new HTMLEditorKit());       
        java.net.URL helpURL = JPanelSIP.class.getResource("sip.html");
        try {
            jEditorPane1.setPage(helpURL);
        } catch (IOException e) {
            Logger.getLogger(JPanelSIP.class.getName()).log(Level.FINER,null,e);
View Full Code Here

TOP

Related Classes of javax.swing.text.html.HTMLEditorKit

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.