private HSSFFontFormatting getFontFormatting(boolean create) { FontFormatting fontFormatting = cfRuleRecord.getFontFormatting(); if (fontFormatting == null) { if (!create) return null; fontFormatting = new FontFormatting(); cfRuleRecord.setFontFormatting(fontFormatting); } return new HSSFFontFormatting(cfRuleRecord, workbook); }
/** * set font style options to default values (non-italic, non-bold) */ public void resetFontStyle() { setFontStyle(false,false); }
/** * set the type of underlining type for the font * * @param underlineType super or subscript option * * @see #U_NONE * @see #U_SINGLE * @see #U_DOUBLE * @see #U_SINGLE_ACCOUNTING * @see #U_DOUBLE_ACCOUNTING */ public void setUnderlineType(short underlineType) { switch(underlineType) { case HSSFFontFormatting.U_SINGLE: case HSSFFontFormatting.U_DOUBLE: case HSSFFontFormatting.U_SINGLE_ACCOUNTING: case HSSFFontFormatting.U_DOUBLE_ACCOUNTING: fontFormatting.setUnderlineType(underlineType); setUnderlineTypeModified(true); break; case HSSFFontFormatting.U_NONE: fontFormatting.setUnderlineType(underlineType); setUnderlineTypeModified(false); break; default: } }
public HSSFColor getFontColor() { return workbook.getCustomPalette().getColor( getFontColorIndex() ); }
public HSSFColor getFontColor() { return workbook.getCustomPalette().getColor( getFontColorIndex() ); }
private HSSFFontFormatting getFontFormatting(boolean create) { FontFormatting fontFormatting = cfRuleRecord.getFontFormatting(); if ( fontFormatting != null) { cfRuleRecord.setFontFormatting(fontFormatting); return new HSSFFontFormatting(cfRuleRecord); } else if( create ) { fontFormatting = new FontFormatting(); cfRuleRecord.setFontFormatting(fontFormatting); return new HSSFFontFormatting(cfRuleRecord); } else { return null; } }
/** * set font style options to default values (non-italic, non-bold) */ public void resetFontStyle() { setFontStyle(false,false); }
/** * set the type of underlining type for the font * * @param underlineType super or subscript option * * @see #U_NONE * @see #U_SINGLE * @see #U_DOUBLE * @see #U_SINGLE_ACCOUNTING * @see #U_DOUBLE_ACCOUNTING */ public void setUnderlineType(short underlineType) { switch(underlineType) { case HSSFFontFormatting.U_SINGLE: case HSSFFontFormatting.U_DOUBLE: case HSSFFontFormatting.U_SINGLE_ACCOUNTING: case HSSFFontFormatting.U_DOUBLE_ACCOUNTING: fontFormatting.setUnderlineType(underlineType); setUnderlineTypeModified(true); break; case HSSFFontFormatting.U_NONE: fontFormatting.setUnderlineType(underlineType); setUnderlineTypeModified(false); break; default: } }
private HSSFFontFormatting getFontFormatting(boolean create) { FontFormatting fontFormatting = cfRuleRecord.getFontFormatting(); if ( fontFormatting != null) { cfRuleRecord.setFontFormatting(fontFormatting); return new HSSFFontFormatting(cfRuleRecord); } else if( create ) { fontFormatting = new FontFormatting(); cfRuleRecord.setFontFormatting(fontFormatting); return new HSSFFontFormatting(cfRuleRecord); } else { return null; } }
/** * set font style options to default values (non-italic, non-bold) */ public void resetFontStyle() { setFontStyle(false,false); }
/** * set the type of underlining type for the font * * @param underlineType super or subscript option * * @see #U_NONE * @see #U_SINGLE * @see #U_DOUBLE * @see #U_SINGLE_ACCOUNTING * @see #U_DOUBLE_ACCOUNTING */ public void setUnderlineType(short underlineType) { switch(underlineType) { case HSSFFontFormatting.U_SINGLE: case HSSFFontFormatting.U_DOUBLE: case HSSFFontFormatting.U_SINGLE_ACCOUNTING: case HSSFFontFormatting.U_DOUBLE_ACCOUNTING: fontFormatting.setUnderlineType(underlineType); setUnderlineTypeModified(true); break; case HSSFFontFormatting.U_NONE: fontFormatting.setUnderlineType(underlineType); setUnderlineTypeModified(false); break; default: } }
private HSSFFontFormatting getFontFormatting(boolean create) { FontFormatting fontFormatting = cfRuleRecord.getFontFormatting(); if (fontFormatting == null) { if (!create) return null; fontFormatting = new FontFormatting(); cfRuleRecord.setFontFormatting(fontFormatting); } return new HSSFFontFormatting(cfRuleRecord, workbook); }
/** * set font style options to default values (non-italic, non-bold) */ public void resetFontStyle() { setFontStyle(false,false); }
/** * set the type of underlining type for the font * * @param underlineType super or subscript option * * @see #U_NONE * @see #U_SINGLE * @see #U_DOUBLE * @see #U_SINGLE_ACCOUNTING * @see #U_DOUBLE_ACCOUNTING */ public void setUnderlineType(short underlineType) { switch(underlineType) { case HSSFFontFormatting.U_SINGLE: case HSSFFontFormatting.U_DOUBLE: case HSSFFontFormatting.U_SINGLE_ACCOUNTING: case HSSFFontFormatting.U_DOUBLE_ACCOUNTING: fontFormatting.setUnderlineType(underlineType); setUnderlineTypeModified(true); break; case HSSFFontFormatting.U_NONE: fontFormatting.setUnderlineType(underlineType); setUnderlineTypeModified(false); break; default: } }