Examples of createFont()


Examples of org.apache.poi.ss.usermodel.Workbook.createFont()

          int startingFonts = initialFonts[i];
         
          assertEquals(startingFonts, wb.getNumberOfFonts());
         
          // Get a font, and slightly change it
          Font a = wb.createFont();
          assertEquals(startingFonts+1, wb.getNumberOfFonts());
          a.setFontHeightInPoints((short)23);
          assertEquals(startingFonts+1, wb.getNumberOfFonts());
         
          // Get two more, unchanged
View Full Code Here

Examples of org.apache.poi.ss.usermodel.Workbook.createFont()

          assertEquals(startingFonts+1, wb.getNumberOfFonts());
          a.setFontHeightInPoints((short)23);
          assertEquals(startingFonts+1, wb.getNumberOfFonts());
         
          // Get two more, unchanged
          /*Font b =*/ wb.createFont();
          assertEquals(startingFonts+2, wb.getNumberOfFonts());
          /*Font c =*/ wb.createFont();
          assertEquals(startingFonts+3, wb.getNumberOfFonts());
       }
    }
View Full Code Here

Examples of org.apache.poi.ss.usermodel.Workbook.createFont()

          assertEquals(startingFonts+1, wb.getNumberOfFonts());
         
          // Get two more, unchanged
          /*Font b =*/ wb.createFont();
          assertEquals(startingFonts+2, wb.getNumberOfFonts());
          /*Font c =*/ wb.createFont();
          assertEquals(startingFonts+3, wb.getNumberOfFonts());
       }
    }
   
    /**
 
View Full Code Here

Examples of org.apache.poi.ss.usermodel.Workbook.createFont()

        CellStyle cs = wb.createCellStyle();
        CellStyle cs2 = wb.createCellStyle();
        CellStyle cs3 = wb.createCellStyle();
        DataFormat df = wb.createDataFormat();
        // create 2 fonts objects
        Font f = wb.createFont();
        Font f2 = wb.createFont();

        //set font 1 to 12 point type
        f.setFontHeightInPoints((short) 12);
        //make it blue
View Full Code Here

Examples of org.apache.poi.ss.usermodel.Workbook.createFont()

        CellStyle cs2 = wb.createCellStyle();
        CellStyle cs3 = wb.createCellStyle();
        DataFormat df = wb.createDataFormat();
        // create 2 fonts objects
        Font f = wb.createFont();
        Font f2 = wb.createFont();

        //set font 1 to 12 point type
        f.setFontHeightInPoints((short) 12);
        //make it blue
        f.setColor((short) 0xc);
View Full Code Here

Examples of org.apache.poi.xssf.usermodel.XSSFWorkbook.createFont()

        //plain string value
        row.createCell(2).setCellValue("This is a string cell");

        //rich text string
        RichTextString str = creationHelper.createRichTextString("Apache");
        Font font = wb.createFont();
        font.setItalic(true);
        font.setUnderline(Font.U_SINGLE);
        str.applyFont(font);
        row.createCell(3).setCellValue(str);
View Full Code Here

Examples of org.apache.poi.xssf.usermodel.XSSFWorkbook.createFont()

public class WorkingWithFonts {
    public static void main(String[] args) throws Exception {
        Workbook wb = new XSSFWorkbook()//or new HSSFWorkbook();
        Sheet sheet = wb.createSheet("Fonts");

        Font font0 = wb.createFont();
        font0.setColor(IndexedColors.BROWN.getIndex());
        CellStyle style0 = wb.createCellStyle();
        style0.setFont(font0);

        Font font1 = wb.createFont();
View Full Code Here

Examples of org.apache.poi.xssf.usermodel.XSSFWorkbook.createFont()

        Font font0 = wb.createFont();
        font0.setColor(IndexedColors.BROWN.getIndex());
        CellStyle style0 = wb.createCellStyle();
        style0.setFont(font0);

        Font font1 = wb.createFont();
        font1.setFontHeightInPoints((short)14);
        font1.setFontName("Courier New");
        font1.setColor(IndexedColors.RED.getIndex());
        CellStyle style1 = wb.createCellStyle();
        style1.setFont(font1);
View Full Code Here

Examples of org.apache.poi.xssf.usermodel.XSSFWorkbook.createFont()

        font1.setFontName("Courier New");
        font1.setColor(IndexedColors.RED.getIndex());
        CellStyle style1 = wb.createCellStyle();
        style1.setFont(font1);

        Font font2 = wb.createFont();
        font2.setFontHeightInPoints((short)16);
        font2.setFontName("Arial");
        font2.setColor(IndexedColors.GREEN.getIndex());
        CellStyle style2 = wb.createCellStyle();
        style2.setFont(font2);
View Full Code Here

Examples of org.eclipse.jface.resource.FontDescriptor.createFont()

    FontDescriptor bold = FontDescriptor.createFrom(font);
    bold = bold.setStyle(SWT.BOLD);
    FontDescriptor big = bold.setHeight(18);
    Font boldFont = bold.createFont(font.getDevice());

    name.setFont(big.createFont(font.getDevice()));
    id.setFont(boldFont);
    description.setFont(boldFont);
    quarter.setFont(boldFont);
    updatedBy.setFont(boldFont);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.