Example usage for org.apache.poi.xwpf.usermodel XWPFRun setBold

List of usage examples for org.apache.poi.xwpf.usermodel XWPFRun setBold

Introduction

In this page you can find the example usage for org.apache.poi.xwpf.usermodel XWPFRun setBold.

Prototype

@Override
public void setBold(boolean value) 

Source Link

Document

Whether the bold property shall be applied to all non-complex script characters in the contents of this run when displayed in a document.

Usage

From source file:Utils.FileHandler.java

private void boldText(XWPFParagraph paragraph, String text) {
    XWPFRun r = paragraph.createRun();
    r.setText(text);
    r.setBold(true);
}

From source file:Utils.FileHandler.java

private void boldText(XWPFParagraph paragraph, String text, boolean underline) {
    XWPFRun r = paragraph.createRun();
    r.setText(text);/*from   w  w w .  j  ava2 s . co m*/
    r.setBold(true);

    if (underline) {
        r.setUnderline(UnderlinePatterns.SINGLE);
    }
}