Package org.apache.poi.hssf.usermodel

Examples of org.apache.poi.hssf.usermodel.HSSFFont


    }

    protected HSSFCellStyle createHeaderStyle(HSSFSheet sheet) {
        HSSFCellStyle style = wb.createCellStyle();
        style.setBorderBottom(HSSFCellStyle.BORDER_THIN);
        HSSFFont font = wb.createFont();
        font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
        style.setFont(font);
        return style;
    }
View Full Code Here


  }

        HSSFCell c = getCell(row,column);
        if (c != null) {
          HSSFCellStyle s = c.getCellStyle();
          HSSFFont f = wb.getFontAt(s.getFontIndex());
          boolean isbold = f.getBoldweight() > HSSFFont.BOLDWEIGHT_NORMAL;
          boolean isitalics = f.getItalic();
//          System.out.println("bold="+isbold);
//          System.out.println("italics="+isitalics);
          int fontstyle = 0;

          if (isbold) fontstyle = Font.BOLD;
          if (isitalics) fontstyle = fontstyle | Font.ITALIC;

          int fontheight = f.getFontHeightInPoints();
          if (fontheight == 9) fontheight = 10; //fix for stupid ol Windows

//          System.out.println("fontsizeinpnts="+f.getFontHeightInPoints());

          Font font = new Font(f.getFontName(),fontstyle,fontheight);
          setFont(font);
         

          HSSFColor clr = null;
          if (s.getFillPattern() == HSSFCellStyle.SOLID_FOREGROUND) {
            clr = (HSSFColor)colors.get(new Integer(s.getFillForegroundColor()));
          }
          if (clr == null) clr = new HSSFColor.WHITE();

          short[] rgb = clr.getTriplet();
          Color awtcolor = new Color(rgb[0],rgb[1],rgb[2]);

          setBackground(awtcolor);

          clr = (HSSFColor)colors.get(new Integer(f.getColor()));
          if (clr == null) clr = new HSSFColor.BLACK();
          rgb = clr.getTriplet();
          awtcolor = new Color(rgb[0],rgb[1],rgb[2]);
          setForeground(awtcolor);
View Full Code Here

      gesamtkosten += jahrList.get(i).getJahrGesamtkosten();
    }
   
    myRow = mySheet.createRow(mySheet.getLastRowNum()+1);
   
    HSSFFont myFont = myWorkBook.createFont();
    myFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
   
    HSSFCellStyle gesSumEuroCellStyle = myWorkBook.createCellStyle();
    gesSumEuroCellStyle.setDataFormat(myWorkBook.createDataFormat().getFormat("#,##0.00 �"));
    gesSumEuroCellStyle.setBorderBottom(HSSFCellStyle.BORDER_DOUBLE);
    gesSumEuroCellStyle.setBorderLeft(HSSFCellStyle.BORDER_THIN);
View Full Code Here

    myCell.setCellStyle(myCellStyle);
   
   
    myRow = mySheet.createRow(mySheet.getLastRowNum()+1);
   
    HSSFFont myFont = myWorkBook.createFont();
    myFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
   
    HSSFCellStyle gesSumEuroCellStyle = myWorkBook.createCellStyle();
    gesSumEuroCellStyle.setDataFormat(myWorkBook.createDataFormat().getFormat("#,##0.00 �"));
    gesSumEuroCellStyle.setBorderBottom(HSSFCellStyle.BORDER_DOUBLE);
    gesSumEuroCellStyle.setBorderLeft(HSSFCellStyle.BORDER_THIN);
View Full Code Here

      gesamtkosten += jahrList.get(i).getJahrGesamtkosten();
    }
   
    myRow = mySheet.createRow(mySheet.getLastRowNum()+1);
   
    HSSFFont myFont = myWorkBook.createFont();
    myFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
   
    HSSFCellStyle gesSumEuroCellStyle = myWorkBook.createCellStyle();
    gesSumEuroCellStyle.setDataFormat(myWorkBook.createDataFormat().getFormat("#,##0.00 �"));
    gesSumEuroCellStyle.setBorderBottom(HSSFCellStyle.BORDER_DOUBLE);
    gesSumEuroCellStyle.setBorderLeft(HSSFCellStyle.BORDER_THIN);
View Full Code Here

    myCell.setCellStyle(myCellStyle);
   
   
    myRow = mySheet.createRow(mySheet.getLastRowNum()+1);
   
    HSSFFont myFont = myWorkBook.createFont();
    myFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
   
    HSSFCellStyle gesSumEuroCellStyle = myWorkBook.createCellStyle();
    gesSumEuroCellStyle.setDataFormat(myWorkBook.createDataFormat().getFormat("#,##0.00 �"));
    gesSumEuroCellStyle.setBorderBottom(HSSFCellStyle.BORDER_DOUBLE);
    gesSumEuroCellStyle.setBorderLeft(HSSFCellStyle.BORDER_THIN);
View Full Code Here

      gesamtkosten += monatList.get(i).getMonatGesamtkosten();
    }
   
    myRow = mySheet.createRow(mySheet.getLastRowNum()+1);
   
    HSSFFont myFont = myWorkBook.createFont();
    myFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
   
    HSSFCellStyle gesSumEuroCellStyle = myWorkBook.createCellStyle();
    gesSumEuroCellStyle.setDataFormat(myWorkBook.createDataFormat().getFormat("#,##0.00 �"));
    gesSumEuroCellStyle.setBorderBottom(HSSFCellStyle.BORDER_DOUBLE);
    gesSumEuroCellStyle.setBorderLeft(HSSFCellStyle.BORDER_THIN);
View Full Code Here

    myCellStyle.setBorderTop(HSSFCellStyle.BORDER_MEDIUM);
    myCell.setCellStyle(myCellStyle);
   
    myRow = mySheet.createRow(mySheet.getLastRowNum()+1);
   
    HSSFFont myFont = myWorkBook.createFont();
    myFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
   
    HSSFCellStyle gesSumEuroCellStyle = myWorkBook.createCellStyle();
    gesSumEuroCellStyle.setDataFormat(myWorkBook.createDataFormat().getFormat("#,##0.00 �"));
    gesSumEuroCellStyle.setBorderBottom(HSSFCellStyle.BORDER_DOUBLE);
    gesSumEuroCellStyle.setBorderLeft(HSSFCellStyle.BORDER_THIN);
View Full Code Here

      gesamtkosten += jahrList.get(i).getJahrGesamtkosten();
    }
   
    myRow = mySheet.createRow(mySheet.getLastRowNum()+1);
   
    HSSFFont myFont = myWorkBook.createFont();
    myFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
   
    HSSFCellStyle gesSumEuroCellStyle = myWorkBook.createCellStyle();
    gesSumEuroCellStyle.setDataFormat(myWorkBook.createDataFormat().getFormat("#,##0.00 �"));
    gesSumEuroCellStyle.setBorderBottom(HSSFCellStyle.BORDER_DOUBLE);
    gesSumEuroCellStyle.setBorderLeft(HSSFCellStyle.BORDER_THIN);
View Full Code Here

    myCell.setCellStyle(myCellStyle);
   
   
    myRow = mySheet.createRow(mySheet.getLastRowNum()+1);
   
    HSSFFont myFont = myWorkBook.createFont();
    myFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
   
    HSSFCellStyle gesSumEuroCellStyle = myWorkBook.createCellStyle();
    gesSumEuroCellStyle.setDataFormat(myWorkBook.createDataFormat().getFormat("#,##0.00 �"));
    gesSumEuroCellStyle.setBorderBottom(HSSFCellStyle.BORDER_DOUBLE);
    gesSumEuroCellStyle.setBorderLeft(HSSFCellStyle.BORDER_THIN);
View Full Code Here

TOP

Related Classes of org.apache.poi.hssf.usermodel.HSSFFont

Copyright © 2018 www.massapicom. 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.