类javax.swing.text.html.ParagraphView源码实例Demo

下面列出了怎么用javax.swing.text.html.ParagraphView的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: SmartIM4IntelliJ   文件: WrapHTMLFactory.java
@Override public View create(Element elem) {
    View v = super.create(elem);
    if (v instanceof LabelView) {
        // the javax.swing.text.html.BRView (representing <br> tag) is a
        // LabelView but must not be handled
        // by a WrapLabelView. As BRView is private, check the html tag from
        // elem attribute
        Object o = elem.getAttributes().getAttribute(StyleConstants.NameAttribute);
        if ((o instanceof HTML.Tag) && o == HTML.Tag.BR) {
            return new BRView(elem);
        }
    }
    if (v instanceof InlineView) {
        return new WrapInlineView(elem);
    } else if (v instanceof ParagraphView) {
        return new WrapParagraphView(elem);
    }
    return v;
}
 
源代码2 项目: SmartIM   文件: WrapHTMLFactory.java
@Override
public View create(Element elem) {
    View v = super.create(elem);
    if (v instanceof LabelView) {
        // the javax.swing.text.html.BRView (representing <br> tag) is a
        // LabelView but must not be handled
        // by a WrapLabelView. As BRView is private, check the html tag from
        // elem attribute
        Object o = elem.getAttributes().getAttribute(StyleConstants.NameAttribute);
        if ((o instanceof HTML.Tag) && o == HTML.Tag.BR) {
            return new BRView(elem);
        }
    }
    if (v instanceof InlineView) {
        return new WrapInlineView(elem);
    } else if (v instanceof ParagraphView) {
        return new WrapParagraphView(elem);
    }
    return v;
}
 
源代码3 项目: jitsi   文件: SIPCommHTMLEditorKit.java
@Override
public View create(Element elem)
{
    View view = super.create(elem);

    viewCreated(this, view);

    if (view instanceof ParagraphView)
    {
        return new ParagraphViewX(elem);
    }
    else if (view instanceof ComponentView)
    {
        return new MyComponentView(elem);
    }

    return view;
}
 
 类所在包
 同包方法