content: package com.alibaba.excel.write.style;
  
  import com.alibaba.excel.constant.OrderConstant;
  import com.alibaba.excel.write.metadata.style.WriteCellStyle;
  import com.alibaba.excel.write.metadata.style.WriteFont;
  
  import org.apache.poi.ss.usermodel.BorderStyle;
  import org.apache.poi.ss.usermodel.FillPatternType;
  import org.apache.poi.ss.usermodel.HorizontalAlignment;
  import org.apache.poi.ss.usermodel.IndexedColors;
  import org.apache.poi.ss.usermodel.VerticalAlignment;
  
  /**
   * The default styles
   *
   * @author Jiaju Zhuang
   */
  public class DefaultStyle extends HorizontalCellStyleStrategy {
  
      @Override
      public int order() {
          return OrderConstant.DEFAULT_DEFINE_STYLE;
      }
  
      public DefaultStyle() {
          super();
          WriteCellStyle headWriteCellStyle = new WriteCellStyle();
          headWriteCellStyle.setWrapped(true);
          headWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
          headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);
          headWriteCellStyle.setLocked(true);
          headWriteCellStyle.setFillPatternType(FillPatternType.SOLID_FOREGROUND);
          headWriteCellStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
          headWriteCellStyle.setBorderTop(BorderStyle.THIN);
          headWriteCellStyle.setBorderBottom(BorderStyle.THIN);
          headWriteCellStyle.setBorderLeft(BorderStyle.THIN);
          headWriteCellStyle.setBorderRight(BorderStyle.THIN);
          WriteFont headWriteFont = new WriteFont();
          headWriteFont.setFontName("宋体");
          headWriteFont.setFontHeightInPoints((short)14);
          headWriteFont.setBold(true);
          headWriteCellStyle.setWriteFont(headWriteFont);
  
          setHeadWriteCellStyle(headWriteCellStyle);
      }
  }
  