Methods Summary |
---|
public static final java.awt.Color | getAWTColor(int index, java.awt.Color deflt)This method retrieves the AWT Color representation from the colour hash table
HSSFColor clr = (HSSFColor) colors.get(new Integer(index));
if (clr == null) {
return deflt;
}
return getAWTColor(clr);
|
public static final java.awt.Color | getAWTColor(org.apache.poi.hssf.util.HSSFColor clr)Gets the aWTColor attribute of the SVTableUtils class
short[] rgb = clr.getTriplet();
return new Color(rgb[0], rgb[1], rgb[2]);
|
public static java.awt.Font | makeFont(org.apache.poi.hssf.usermodel.HSSFFont font)Creates a new font for a specific cell style
boolean isbold = font.getBoldweight() > HSSFFont.BOLDWEIGHT_NORMAL;
boolean isitalics = font.getItalic();
int fontstyle = Font.PLAIN;
if (isbold) {
fontstyle = Font.BOLD;
}
if (isitalics) {
fontstyle = fontstyle | Font.ITALIC;
}
int fontheight = font.getFontHeightInPoints();
if (fontheight == 9) {
//fix for stupid ol Windows
fontheight = 10;
}
return new Font(font.getFontName(), fontstyle, fontheight);
|