List of usage examples for org.apache.poi.ss.usermodel Font U_DOUBLE_ACCOUNTING
byte U_DOUBLE_ACCOUNTING
To view the source code for org.apache.poi.ss.usermodel Font U_DOUBLE_ACCOUNTING.
Click Source Link
From source file:biz.webgate.dominoext.poi.component.kernel.WorkbookProcessor.java
License:Apache License
public synchronized void checkStyleConstantValues() { if (m_StyleConstantValues == null) { m_StyleConstantValues = new HashMap<String, Short>(); m_StyleConstantValues.put("ALIGN_CENTER", CellStyle.ALIGN_CENTER); m_StyleConstantValues.put("ALIGN_CENTER_SELECTION", CellStyle.ALIGN_CENTER_SELECTION); m_StyleConstantValues.put("ALIGN_FILL", CellStyle.ALIGN_FILL); m_StyleConstantValues.put("ALIGN_GENERAL", CellStyle.ALIGN_GENERAL); m_StyleConstantValues.put("ALIGN_JUSTIFY", CellStyle.ALIGN_JUSTIFY); m_StyleConstantValues.put("ALIGN_LEFT", CellStyle.ALIGN_LEFT); m_StyleConstantValues.put("ALIGN_RIGHT", CellStyle.ALIGN_RIGHT); m_StyleConstantValues.put("BORDER_DASH_DOT", CellStyle.BORDER_DASH_DOT); m_StyleConstantValues.put("BORDER_DASH_DOT_DOT", CellStyle.BORDER_DASH_DOT_DOT); m_StyleConstantValues.put("BORDER_DASHED", CellStyle.BORDER_DASHED); m_StyleConstantValues.put("BORDER_DOTTED", CellStyle.BORDER_DOTTED); m_StyleConstantValues.put("BORDER_DOUBLE", CellStyle.BORDER_DOUBLE); m_StyleConstantValues.put("BORDER_HAIR", CellStyle.BORDER_HAIR); m_StyleConstantValues.put("BORDER_MEDIUM", CellStyle.BORDER_MEDIUM); m_StyleConstantValues.put("BORDER_MEDIUM_DASH_DOT", CellStyle.BORDER_MEDIUM_DASH_DOT); m_StyleConstantValues.put("BORDER_MEDIUM_DASH_DOT_DOT", CellStyle.BORDER_MEDIUM_DASH_DOT_DOT); m_StyleConstantValues.put("BORDER_MEDIUM_DASHED", CellStyle.BORDER_MEDIUM_DASHED); m_StyleConstantValues.put("BORDER_NONE", CellStyle.BORDER_NONE); m_StyleConstantValues.put("BORDER_SLANTED_DASH_DOT", CellStyle.BORDER_SLANTED_DASH_DOT); m_StyleConstantValues.put("BORDER_THICK", CellStyle.BORDER_THICK); m_StyleConstantValues.put("BORDER_THIN", CellStyle.BORDER_THIN); m_StyleConstantValues.put("ALT_BARS", CellStyle.ALT_BARS); m_StyleConstantValues.put("BIG_SPOTS", CellStyle.BIG_SPOTS); m_StyleConstantValues.put("BRICKS", CellStyle.BRICKS); m_StyleConstantValues.put("DIAMONDS", CellStyle.DIAMONDS); m_StyleConstantValues.put("FINE_DOTS", CellStyle.FINE_DOTS); m_StyleConstantValues.put("LEAST_DOTS", CellStyle.LEAST_DOTS); m_StyleConstantValues.put("LESS_DOTS", CellStyle.LESS_DOTS); m_StyleConstantValues.put("NO_FILL", CellStyle.NO_FILL); m_StyleConstantValues.put("SOLID_FOREGROUND", CellStyle.SOLID_FOREGROUND); m_StyleConstantValues.put("SPARSE_DOTS", CellStyle.SPARSE_DOTS); m_StyleConstantValues.put("SQUARES", CellStyle.SQUARES); m_StyleConstantValues.put("THICK_BACKWARD_DIAG", CellStyle.THICK_BACKWARD_DIAG); m_StyleConstantValues.put("THICK_FORWARD_DIAG", CellStyle.THICK_FORWARD_DIAG); m_StyleConstantValues.put("THICK_HORZ_BANDS", CellStyle.THICK_HORZ_BANDS); m_StyleConstantValues.put("THICK_VERT_BANDS", CellStyle.THICK_VERT_BANDS); m_StyleConstantValues.put("THIN_BACKWARD_DIAG", CellStyle.THIN_BACKWARD_DIAG); m_StyleConstantValues.put("THIN_FORWARD_DIAG", CellStyle.THIN_FORWARD_DIAG); m_StyleConstantValues.put("THIN_HORZ_BANDS", CellStyle.THIN_HORZ_BANDS); m_StyleConstantValues.put("THIN_VERT_BANDS", CellStyle.THIN_VERT_BANDS); m_StyleConstantValues.put("VERTICAL_BOTTOM", CellStyle.VERTICAL_BOTTOM); m_StyleConstantValues.put("VERTICAL_CENTER", CellStyle.VERTICAL_CENTER); m_StyleConstantValues.put("VERTICAL_JUSTIFY", CellStyle.VERTICAL_JUSTIFY); m_StyleConstantValues.put("VERTICAL_TOP", CellStyle.VERTICAL_TOP); m_StyleConstantValues.put("SS_NONE", Font.SS_NONE); m_StyleConstantValues.put("SS_SUPER", Font.SS_SUPER); m_StyleConstantValues.put("SS_SUB", Font.SS_SUB); m_StyleConstantValues.put("BOLDWEIGHT_BOLD", Font.BOLDWEIGHT_BOLD); m_StyleConstantValues.put("BOLDWEIGHT_NORMAL", Font.BOLDWEIGHT_NORMAL); }/*from w ww. j av a2 s. co m*/ if (m_StyleByteConstantValues == null) { m_StyleByteConstantValues = new HashMap<String, Byte>(); m_StyleByteConstantValues.put("U_NONE", Font.U_NONE); m_StyleByteConstantValues.put("U_SINGLE", Font.U_SINGLE); m_StyleByteConstantValues.put("U_DOUBLE", Font.U_DOUBLE); m_StyleByteConstantValues.put("U_SINGLE_ACCOUNTING", Font.U_SINGLE_ACCOUNTING); m_StyleByteConstantValues.put("U_DOUBLE_ACCOUNTING", Font.U_DOUBLE_ACCOUNTING); } }
From source file:com.canoo.webtest.plugins.exceltest.ExcelVerifyCellStyle.java
License:Open Source License
private static String getFontStyle(final Font font) { final StringBuffer sb = new StringBuffer(); if (font.getBoldweight() == Font.BOLDWEIGHT_BOLD) { sb.append("bold "); }/*from w w w . jav a 2 s .c o m*/ if (font.getItalic()) { sb.append("italic "); } if (font.getStrikeout()) { sb.append("strikethrough "); } if (font.getTypeOffset() == Font.SS_SUB) { sb.append("subscript "); } else if (font.getTypeOffset() == Font.SS_SUPER) { sb.append("superscript "); } switch (font.getUnderline()) { case Font.U_NONE: break; case Font.U_SINGLE: sb.append("underline "); break; case Font.U_SINGLE_ACCOUNTING: sb.append("underline-accounting "); break; case Font.U_DOUBLE: sb.append("underline-double "); break; case Font.U_DOUBLE_ACCOUNTING: sb.append("underline-double-accounting "); break; default: sb.append("underline-unknown "); break; } if (sb.length() == 0) { return "normal"; } return sb.substring(0, sb.length() - 1); }
From source file:org.alanwilliamson.openbd.plugin.spreadsheet.SpreadSheetFormatOptions.java
License:Open Source License
public static void initialize() { lookup_colors = new HashMap<String, Short>(); lookup_alignment = new HashMap<String, Short>(); lookup_border = new HashMap<String, Short>(); lookup_fillpatten = new HashMap<String, Short>(); lookup_underline = new HashMap<String, Byte>(); lookup_color = new HashMap<String, Color>(); lookup_underline.put("double", Font.U_DOUBLE); lookup_underline.put("double_accounting", Font.U_DOUBLE_ACCOUNTING); lookup_underline.put("single", Font.U_SINGLE); lookup_underline.put("single_accounting", Font.U_SINGLE_ACCOUNTING); lookup_underline.put("none", Font.U_NONE); lookup_colors.put("black", IndexedColors.BLACK.getIndex()); lookup_colors.put("brown", IndexedColors.BROWN.getIndex()); lookup_colors.put("olive_green", IndexedColors.OLIVE_GREEN.getIndex()); lookup_colors.put("dark_green", IndexedColors.DARK_GREEN.getIndex()); lookup_colors.put("dark_teal", IndexedColors.DARK_TEAL.getIndex()); lookup_colors.put("dark_blue", IndexedColors.DARK_BLUE.getIndex()); lookup_colors.put("indigo", IndexedColors.INDIGO.getIndex()); lookup_colors.put("grey_80_percent", IndexedColors.GREY_80_PERCENT.getIndex()); lookup_colors.put("grey_50_percent", IndexedColors.GREY_50_PERCENT.getIndex()); lookup_colors.put("grey_40_percent", IndexedColors.GREY_40_PERCENT.getIndex()); lookup_colors.put("grey_25_percent", IndexedColors.GREY_25_PERCENT.getIndex()); lookup_colors.put("orange", IndexedColors.ORANGE.getIndex()); lookup_colors.put("dark_yellow", IndexedColors.DARK_YELLOW.getIndex()); lookup_colors.put("green", IndexedColors.GREEN.getIndex()); lookup_colors.put("teal", IndexedColors.TEAL.getIndex()); lookup_colors.put("blue", IndexedColors.BLUE.getIndex()); lookup_colors.put("blue_grey", IndexedColors.BLUE_GREY.getIndex()); lookup_colors.put("red", IndexedColors.RED.getIndex()); lookup_colors.put("light_orange", IndexedColors.LIGHT_ORANGE.getIndex()); lookup_colors.put("lime", IndexedColors.LIME.getIndex()); lookup_colors.put("sea_green", IndexedColors.SEA_GREEN.getIndex()); lookup_colors.put("aqua", IndexedColors.AQUA.getIndex()); lookup_colors.put("light_blue", IndexedColors.LIGHT_BLUE.getIndex()); lookup_colors.put("violet", IndexedColors.VIOLET.getIndex()); lookup_colors.put("pink", IndexedColors.PINK.getIndex()); lookup_colors.put("gold", IndexedColors.GOLD.getIndex()); lookup_colors.put("yellow", IndexedColors.YELLOW.getIndex()); lookup_colors.put("bright_green", IndexedColors.BRIGHT_GREEN.getIndex()); lookup_colors.put("turquoise", IndexedColors.TURQUOISE.getIndex()); lookup_colors.put("dark_red", IndexedColors.DARK_RED.getIndex()); lookup_colors.put("sky_blue", IndexedColors.SKY_BLUE.getIndex()); lookup_colors.put("plum", IndexedColors.PLUM.getIndex()); lookup_colors.put("rose", IndexedColors.ROSE.getIndex()); lookup_colors.put("light_yellow", IndexedColors.LIGHT_YELLOW.getIndex()); lookup_colors.put("light_green", IndexedColors.LIGHT_GREEN.getIndex()); lookup_colors.put("light_turquoise", IndexedColors.LIGHT_TURQUOISE.getIndex()); lookup_colors.put("pale_blue", IndexedColors.PALE_BLUE.getIndex()); lookup_colors.put("lavender", IndexedColors.LAVENDER.getIndex()); lookup_colors.put("white", IndexedColors.WHITE.getIndex()); lookup_colors.put("cornflower_blue", IndexedColors.CORNFLOWER_BLUE.getIndex()); lookup_colors.put("lemon_chiffon", IndexedColors.LEMON_CHIFFON.getIndex()); lookup_colors.put("maroon", IndexedColors.MAROON.getIndex()); lookup_colors.put("orchid", IndexedColors.ORCHID.getIndex()); lookup_colors.put("coral", IndexedColors.CORAL.getIndex()); lookup_colors.put("royal_blue", IndexedColors.ROYAL_BLUE.getIndex()); lookup_colors.put("light_cornflower_blue", IndexedColors.LIGHT_CORNFLOWER_BLUE.getIndex()); lookup_alignment.put("left", CellStyle.ALIGN_LEFT); lookup_alignment.put("right", CellStyle.ALIGN_RIGHT); lookup_alignment.put("center", CellStyle.ALIGN_CENTER); lookup_alignment.put("justify", CellStyle.ALIGN_JUSTIFY); lookup_alignment.put("general", CellStyle.ALIGN_GENERAL); lookup_alignment.put("fill", CellStyle.ALIGN_FILL); lookup_alignment.put("center_selection", CellStyle.ALIGN_CENTER_SELECTION); lookup_alignment.put("vertical_top", CellStyle.VERTICAL_TOP); lookup_alignment.put("vertical_bottom", CellStyle.VERTICAL_BOTTOM); lookup_alignment.put("vertical_center", CellStyle.VERTICAL_CENTER); lookup_alignment.put("vertical_justify", CellStyle.VERTICAL_JUSTIFY); lookup_border.put("none", CellStyle.BORDER_NONE); lookup_border.put("thin", CellStyle.BORDER_THIN); lookup_border.put("medium", CellStyle.BORDER_MEDIUM); lookup_border.put("dashed", CellStyle.BORDER_DASHED); lookup_border.put("hair", CellStyle.BORDER_HAIR); lookup_border.put("thick", CellStyle.BORDER_THICK); lookup_border.put("double", CellStyle.BORDER_DOUBLE); lookup_border.put("dotted", CellStyle.BORDER_DOTTED); lookup_border.put("medium_dashed", CellStyle.BORDER_MEDIUM_DASHED); lookup_border.put("dash_dot", CellStyle.BORDER_DASH_DOT); lookup_border.put("medium_dash_dot", CellStyle.BORDER_MEDIUM_DASH_DOT); lookup_border.put("dash_dot_dot", CellStyle.BORDER_DASH_DOT_DOT); lookup_border.put("medium_dash_dot_dot", CellStyle.BORDER_MEDIUM_DASH_DOT_DOT); lookup_border.put("slanted_dash_dot", CellStyle.BORDER_SLANTED_DASH_DOT); lookup_fillpatten.put("big_spots", CellStyle.BIG_SPOTS); lookup_fillpatten.put("squares", CellStyle.SQUARES); lookup_fillpatten.put("nofill", CellStyle.NO_FILL); lookup_fillpatten.put("solid_foreground", CellStyle.SOLID_FOREGROUND); lookup_fillpatten.put("fine_dots", CellStyle.FINE_DOTS); lookup_fillpatten.put("alt_bars", CellStyle.ALT_BARS); lookup_fillpatten.put("sparse_dots", CellStyle.SPARSE_DOTS); lookup_fillpatten.put("thick_horz_bands", CellStyle.THICK_HORZ_BANDS); lookup_fillpatten.put("thick_vert_bands", CellStyle.THICK_VERT_BANDS); lookup_fillpatten.put("thick_backward_diag", CellStyle.THICK_BACKWARD_DIAG); lookup_fillpatten.put("thick_forward_diag", CellStyle.THICK_FORWARD_DIAG); lookup_fillpatten.put("thin_horz_bands", CellStyle.THIN_HORZ_BANDS); lookup_fillpatten.put("thin_vert_bands", CellStyle.THIN_VERT_BANDS); lookup_fillpatten.put("thin_backward_diag", CellStyle.THIN_BACKWARD_DIAG); lookup_fillpatten.put("thin_forward_diag", CellStyle.THIN_FORWARD_DIAG); lookup_fillpatten.put("diamonds", CellStyle.DIAMONDS); lookup_fillpatten.put("less_dots", CellStyle.LESS_DOTS); lookup_fillpatten.put("least_dots", CellStyle.LEAST_DOTS); lookup_color.put("black", Color.BLACK); lookup_color.put("blue", Color.BLUE); lookup_color.put("cyan", Color.CYAN); lookup_color.put("dark_gray", Color.DARK_GRAY); lookup_color.put("darkGray", Color.DARK_GRAY); lookup_color.put("gray", Color.GRAY); lookup_color.put("green", Color.GREEN); lookup_color.put("light_gray", Color.LIGHT_GRAY); lookup_color.put("lightGray", Color.LIGHT_GRAY); lookup_color.put("magenta", Color.MAGENTA); lookup_color.put("orange", Color.ORANGE); lookup_color.put("pink", Color.PINK); lookup_color.put("red", Color.RED); lookup_color.put("white", Color.WHITE); lookup_color.put("yellow", Color.YELLOW); }
From source file:ru.icc.cells.ssdc.DataLoader.java
License:Apache License
private void fillFont(CFont font, Font excelFont) { font.setName(excelFont.getFontName()); // TODO CFont font //font.setColor( excelFont.getColor() ); font.setHeight(excelFont.getFontHeight()); font.setHeightInPoints(excelFont.getFontHeightInPoints()); // TODO ? ? Boldweight, ?? ? ? short boldWeight = excelFont.getBoldweight(); if (boldWeight >= 700) font.setBold(true);//ww w . ja va 2s . com font.setItalic(excelFont.getItalic()); font.setStrikeout(excelFont.getStrikeout()); byte underline = excelFont.getUnderline(); if (underline != Font.U_NONE) font.setUnderline(true); if (underline == Font.U_DOUBLE || underline == Font.U_DOUBLE_ACCOUNTING) font.setDoubleUnderline(true); }