当前位置: 首页>>代码示例>>Java>>正文


Java HTMLDocument.setAsynchronousLoadPriority方法代码示例

本文整理汇总了Java中javax.swing.text.html.HTMLDocument.setAsynchronousLoadPriority方法的典型用法代码示例。如果您正苦于以下问题:Java HTMLDocument.setAsynchronousLoadPriority方法的具体用法?Java HTMLDocument.setAsynchronousLoadPriority怎么用?Java HTMLDocument.setAsynchronousLoadPriority使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing.text.html.HTMLDocument的用法示例。


在下文中一共展示了HTMLDocument.setAsynchronousLoadPriority方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getContentPanel

import javax.swing.text.html.HTMLDocument; //导入方法依赖的package包/类
private JPanel getContentPanel() {
    content = new JPanel(new BorderLayout());
    JTextPane txt = new JTextPane();
    HTMLDocument doc = (HTMLDocument) txt.getEditorKitForContentType("text/html").createDefaultDocument();
    doc.setAsynchronousLoadPriority(-1);
    txt.setDocument(doc);
    URL url = I18.getResource("create_midi.html");
    try {
        txt.setPage(url);
    } catch (Exception ignored) {
    }
    txt.setEditable(false);
    content.add("North", new JScrollPane(txt));

    convert = new YassMIDIConverter();
    convert.setStandAlone(false);
    content.add("Center", gui = convert.getGUI());
    return content;
}
 
开发者ID:SarutaSan72,项目名称:Yass,代码行数:20,代码来源:MIDI.java

示例2: createDefaultDocument

import javax.swing.text.html.HTMLDocument; //导入方法依赖的package包/类
@Override
public Document createDefaultDocument() {
    StyleSheet styles = getStyleSheet();
    StyleSheet ss = new StyleSheet();

    ss.addStyleSheet(styles);

    HTMLDocument doc = new CustomHTMLDocument(ss);
    doc.setParser(getParser());
    doc.setAsynchronousLoadPriority(4);
    doc.setTokenThreshold(100);
    return doc;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:OverviewControllerUI.java

示例3: getContentPanel

import javax.swing.text.html.HTMLDocument; //导入方法依赖的package包/类
/**
 * Gets the contentPanel attribute of the Tap object
 *
 * @return The contentPanel value
 */
private JPanel getContentPanel() {
    JPanel content = new JPanel(new BorderLayout());
    JTextPane txt = new JTextPane();
    HTMLDocument doc = (HTMLDocument) txt.getEditorKitForContentType("text/html").createDefaultDocument();
    doc.setAsynchronousLoadPriority(-1);
    txt.setDocument(doc);
    URL url = I18.getResource("create_tap.html");
    try {
        txt.setPage(url);
    } catch (Exception ignored) {
    }
    txt.setEditable(false);
    content.add("North", new JScrollPane(txt));

    table = new YassTable();
    table.setEnabled(false);
    content.add("Center", scroll = new JScrollPane(table));
    content.add("South", check = new JCheckBox(I18.get("create_tap_edit")));
    check.setSelected(wizard.getValue("starteditor").equals("true"));
    check.addItemListener(
            new ItemListener() {
                public void itemStateChanged(ItemEvent e) {
                    if (check.isSelected()) {
                        wizard.setValue("starteditor", "true");
                    } else {
                        wizard.setValue("starteditor", "false");
                    }
                }
            });
    scroll.setPreferredSize(new Dimension(100, 100));
    scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    return content;
}
 
开发者ID:SarutaSan72,项目名称:Yass,代码行数:39,代码来源:Tap.java

示例4: getContentPanel

import javax.swing.text.html.HTMLDocument; //导入方法依赖的package包/类
/**
 * Gets the contentPanel attribute of the Header object
 *
 * @return The contentPanel value
 */
private JPanel getContentPanel() {
    JPanel content = new JPanel(new BorderLayout());
    JTextPane txt = new JTextPane();
    HTMLDocument doc = (HTMLDocument) txt.getEditorKitForContentType("text/html").createDefaultDocument();
    doc.setAsynchronousLoadPriority(-1);
    txt.setDocument(doc);
    txt.setEditable(false);
    URL url = I18.getResource("create_header.html");
    try {
        txt.setPage(url);
    } catch (Exception ignored) {
    }
    content.add("Center", new JScrollPane(txt));

    fileTable =
            new JTable(5, 2) {
                private static final long serialVersionUID = -6838778960413155202L;

                public TableCellEditor getCellEditor(int row, int column) {
                    if (row == 2 && column == 1 && genreEditor != null) {
                        return genreEditor;
                    } else if (row == 3 && column == 1 && langEditor != null) {
                        return langEditor;
                    } else if (column == 1) {
                        return super.getCellEditor(row, column);
                    } else {
                        return null;
                    }
                }
            };
    fileTable.setValueAt(I18.get("create_header_title"), 0, 0);
    fileTable.setValueAt(I18.get("create_header_artist"), 1, 0);
    fileTable.setValueAt(I18.get("create_header_genre"), 2, 0);
    fileTable.setValueAt(I18.get("create_header_language"), 3, 0);
    fileTable.setValueAt(I18.get("create_header_bpm"), 4, 0);
    content.add("South", fileTable);
    return content;
}
 
开发者ID:SarutaSan72,项目名称:Yass,代码行数:44,代码来源:Header.java

示例5: getContentPanel

import javax.swing.text.html.HTMLDocument; //导入方法依赖的package包/类
/**
 * Gets the contentPanel attribute of the Lyrics object
 *
 * @return The contentPanel value
 */
private JPanel getContentPanel() {
    JPanel content = new JPanel(new BorderLayout());
    JTextPane txt = new JTextPane();
    HTMLDocument doc = (HTMLDocument) txt.getEditorKitForContentType("text/html").createDefaultDocument();
    doc.setAsynchronousLoadPriority(-1);
    txt.setDocument(doc);
    URL url = I18.getResource("create_lyrics.html");
    try {
        txt.setPage(url);
    } catch (Exception ignored) {
    }
    txt.setEditable(false);
    content.add("Center", new JScrollPane(txt));

    JPanel buttons = new JPanel(new GridLayout(1, 3));
    utf8 = new JCheckBox("UTF-8");
    utf8.setSelected(wizard.getValue("encoding").equals("utf8"));
    utf8.addItemListener(
            new ItemListener() {
                public void itemStateChanged(ItemEvent e) {
                    if (utf8.isSelected()) {
                        wizard.setValue("encoding", "utf8");
                    } else {
                        wizard.setValue("encoding", "");
                    }
                }
            });
    buttons.add(utf8);
    buttons.add(new JLabel(""));
    buttons.add(new JLabel(""));

    lyricsArea = new JTextArea(10, 20);
    JPanel pan = new JPanel(new BorderLayout());
    pan.add("Center", new JScrollPane(lyricsArea));
    pan.add("South", buttons);
    content.add("South", pan);
    return content;
}
 
开发者ID:SarutaSan72,项目名称:Yass,代码行数:44,代码来源:Lyrics.java

示例6: getContentPanel

import javax.swing.text.html.HTMLDocument; //导入方法依赖的package包/类
/**
 * Gets the contentPanel attribute of the Edition object
 *
 * @return The contentPanel value
 */
private JPanel getContentPanel() {
    JPanel content = new JPanel(new BorderLayout());
    JTextPane txt = new JTextPane();
    HTMLDocument doc = (HTMLDocument) txt.getEditorKitForContentType("text/html").createDefaultDocument();
    doc.setAsynchronousLoadPriority(-1);
    txt.setDocument(doc);
    txt.setEditable(false);
    URL url = I18.getResource("create_edition.html");
    try {
        txt.setPage(url);
    } catch (Exception ignored) {
    }
    content.add("Center", new JScrollPane(txt));

    fc = new JComboBox<>();
    fc.setEditable(true);

    JPanel fPanel = new JPanel(new BorderLayout());
    fPanel.add("West", new JLabel(I18.get("create_edition_folder")));
    fPanel.add("Center", fc);
    JPanel ePanel = new JPanel(new BorderLayout());
    ePanel.add("West", new JLabel(I18.get("create_edition_edition")));
    ePanel.add("Center", eField = new JTextField());

    JPanel all = new JPanel(new GridLayout(2, 1));
    all.add(fPanel);
    all.add(ePanel);
    content.add("South", all);
    return content;
}
 
开发者ID:SarutaSan72,项目名称:Yass,代码行数:36,代码来源:Edition.java


注:本文中的javax.swing.text.html.HTMLDocument.setAsynchronousLoadPriority方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。