Package jxl.format

Examples of jxl.format.Font


        bw.write("    <name><![CDATA["+s.getName()+"]]></name>");
        bw.newLine();
     
        Cell[] row = null;
        CellFormat format = null;
        Font font = null;
     
        for (int i = 0 ; i < s.getRows() ; i++)
        {
          bw.write("    <row number=\"" + i + "\">");
          bw.newLine();
          row = s.getRow(i);

          for (int j = 0 ; j < row.length; j++)
          {
            // Remember that empty cells can contain format information
            if ((row[j].getType() != CellType.EMPTY) ||
                (row[j].getCellFormat() != null))
            {
              format = row[j].getCellFormat();
              bw.write("      <col number=\"" + j + "\">");
              bw.newLine();
              bw.write("        <data>");
              bw.write("<![CDATA["+row[j].getContents()+"]]>");
              bw.write("</data>");
              bw.newLine();    

              if (row[j].getCellFormat() != null)
              {
                bw.write("        <format wrap=\"" + format.getWrap() + "\"");
                bw.newLine();
                bw.write("                align=\"" +
                         format.getAlignment().getDescription() + "\"");
                bw.newLine();
                bw.write("                valign=\"" +
                         format.getVerticalAlignment().getDescription() + "\"");
                bw.newLine();
                bw.write("                orientation=\"" +
                         format.getOrientation().getDescription() + "\"");
                bw.write(">");
                bw.newLine();

                // The font information
                font = format.getFont();
                bw.write("          <font name=\"" + font.getName() + "\"");
                bw.newLine();
                bw.write("                point_size=\"" +
                         font.getPointSize() + "\"");
                bw.newLine();
                bw.write("                bold_weight=\"" +
                         font.getBoldWeight() + "\"");
                bw.newLine();
                bw.write("                italic=\"" + font.isItalic() + "\"");
                bw.newLine();
                bw.write("                underline=\"" +
                         font.getUnderlineStyle().getDescription() + "\"");
                bw.newLine();
                bw.write("                colour=\"" +
                         font.getColour().getDescription() + "\"");
                bw.newLine();
                bw.write("                script=\"" +
                         font.getScriptStyle().getDescription() + "\"");
                bw.write(" />");
                bw.newLine();


                // The cell background information
View Full Code Here

TOP

Related Classes of jxl.format.Font

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.