Java 类com.google.gwt.dom.client.ParagraphElement 实例源码

项目:wt-pdf-viewer    文件:WTPdfViewerWidget.java   
private ParagraphElement addDocumentPropertiesRow(Document document, DivElement dialog, String label) {
    DivElement row = createChildDiv(document, dialog, "row");

    SpanElement span = createChildSpan(document, row, "");
    span.setInnerText(label);

    ParagraphElement result = createChildP(document, row);
    result.setInnerText("-");
    return result;
}
项目:Wiab.pro    文件:Blip.java   
/**
 * Converts the given {@code HTML} into robot compatible plaintext.
 *
 * @param html the {@code HTML} to convert.
 * @return a plain text version of the given {@code HTML}.
 */
private static String convertToPlainText(String html) {
  StringBuffer result = new StringBuffer();
  Matcher matcher = MARKUP_PATTERN.matcher(html);
  while (matcher.find()) {
    String replacement = "";
    String tag = matcher.group().substring(1, matcher.group().length() - 1).split(" ")[0];
    if (ParagraphElement.TAG.equalsIgnoreCase(tag) || BRElement.TAG.equalsIgnoreCase(tag)) {
      replacement = "\n";
    }
    matcher.appendReplacement(result, replacement);
  }
  matcher.appendTail(result);
  return result.toString();
}
项目:Wiab.pro    文件:Markup.java   
/**
 * Converts the given {@code HTML} into robot compatible plain text.
 *
 * @param html the text to convert.
 * @return a plain text version of the given html text.
 */
private static String convertToPlainText(String html) {
  StringBuffer result = new StringBuffer();
  Matcher matcher = MARKUP_PATTERN.matcher(html);
  while (matcher.find()) {
    String replacement = "";
    String tag = matcher.group().substring(1, matcher.group().length() - 1).split(" ")[0];
    if (ParagraphElement.TAG.equalsIgnoreCase(tag) || BRElement.TAG.equalsIgnoreCase(tag)) {
      replacement = "\n";
    }
    matcher.appendReplacement(result, replacement);
  }
  matcher.appendTail(result);
  return result.toString();
}
项目:errai-polymer    文件:PaperDialog.java   
public PaperDialog(Element element, String styleName) {
    super(element);
    if (styleName != null && !styleName.equalsIgnoreCase(STYLE)) {
        styleName = STYLE + " " + styleName;
    }
    setStyleName(styleName);
    paragraphs = new ArrayList<ParagraphElement>();
}
项目:errai-polymer    文件:PaperDialog.java   
public void addParagraphContent(String... content){
    for(String txt : content){
        ParagraphElement p = Document.get().createPElement();
        p.setInnerHTML(txt);
        paragraphs.add(p);
    }

    if(!paragraphs.isEmpty()){
        buildContent();
    }
}
项目:errai-polymer    文件:PaperDialog.java   
public void addParagraphContent(ParagraphElement... content){
    for(ParagraphElement p : content){
        paragraphs.add(p);
    }

    if(!paragraphs.isEmpty()){
        buildContent();
    }
}
项目:wt-pdf-viewer    文件:WTPdfViewerWidget.java   
private ParagraphElement createP(Document document) {
    ParagraphElement result = document.createPElement();
    return result;
}
项目:wt-pdf-viewer    文件:WTPdfViewerWidget.java   
private ParagraphElement createChildP(Document document, Element parent) {
    ParagraphElement result = createP(document);
    parent.appendChild(result);

    return result;
}
项目:gwt-promptly    文件:PromptlyPanel.java   
/**
* 
* @param styledBlock A non null styled paragraph instance
* @param withFormatting If false, then styles will be ignored.
*/
 public final void append(StyledBlock styledBlock, boolean withFormatting) {
    FlowPanel outerWidget = new FlowPanel(ParagraphElement.TAG /* <p> tag */ );
    styledBlock.toGwtWidget(this, outerWidget, withFormatting, null /* outer style override */);
    appendAndScrollOrFocusAsAppropriate(outerWidget);
 }
项目:errai-polymer    文件:PaperDialog.java   
private void buildContent(){
    for(ParagraphElement p : paragraphs){
        getPaperElement().appendChild(p);
    }
}
项目:putnami-web-toolkit    文件:Help.java   
public Help() {
    super(ParagraphElement.TAG);
    StyleUtils.addStyle(this, Help.STYLE_HELP);
}
项目:gwtbootstrap3    文件:Paragraph.java   
public Paragraph(final String html) {
    super(ParagraphElement.TAG, html);
    setHTML(html);
}