當前位置: 首頁>>代碼示例>>Java>>正文


Java WritableCellFormat.setOrientation方法代碼示例

本文整理匯總了Java中jxl.write.WritableCellFormat.setOrientation方法的典型用法代碼示例。如果您正苦於以下問題:Java WritableCellFormat.setOrientation方法的具體用法?Java WritableCellFormat.setOrientation怎麽用?Java WritableCellFormat.setOrientation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在jxl.write.WritableCellFormat的用法示例。


在下文中一共展示了WritableCellFormat.setOrientation方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getOrientation

import jxl.write.WritableCellFormat; //導入方法依賴的package包/類
public static WritableCellFormat getOrientation(int stepValue, WritableCellFormat cellFormat) throws WriteException
{
	if(stepValue!=ExcelOutputMeta.FONT_ORIENTATION_HORIZONTAL)
	{
		switch(stepValue)
        {
            case ExcelOutputMeta.FONT_ORIENTATION_MINUS_45:
            	cellFormat.setOrientation(jxl.format.Orientation.MINUS_45);
            break;
            case ExcelOutputMeta.FONT_ORIENTATION_MINUS_90:
            	cellFormat.setOrientation(jxl.format.Orientation.MINUS_90);
            break;
            case ExcelOutputMeta.FONT_ORIENTATION_PLUS_45:
            	cellFormat.setOrientation(jxl.format.Orientation.PLUS_45);
            break;
            case ExcelOutputMeta.FONT_ORIENTATION_PLUS_90:
            	cellFormat.setOrientation(jxl.format.Orientation.PLUS_90);
            break;
            case ExcelOutputMeta.FONT_ORIENTATION_STACKED:
            	cellFormat.setOrientation(jxl.format.Orientation.STACKED);
            break;
            case ExcelOutputMeta.FONT_ORIENTATION_VERTICAL:
            	cellFormat.setOrientation(jxl.format.Orientation.VERTICAL);
            break;
            default: break;
         }
	}
	return cellFormat;
}
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:30,代碼來源:ExcelFontMap.java

示例2: getOrientation

import jxl.write.WritableCellFormat; //導入方法依賴的package包/類
public static WritableCellFormat getOrientation( int stepValue, WritableCellFormat cellFormat ) throws WriteException {
  if ( stepValue != ExcelOutputMeta.FONT_ORIENTATION_HORIZONTAL ) {
    switch ( stepValue ) {
      case ExcelOutputMeta.FONT_ORIENTATION_MINUS_45:
        cellFormat.setOrientation( jxl.format.Orientation.MINUS_45 );
        break;
      case ExcelOutputMeta.FONT_ORIENTATION_MINUS_90:
        cellFormat.setOrientation( jxl.format.Orientation.MINUS_90 );
        break;
      case ExcelOutputMeta.FONT_ORIENTATION_PLUS_45:
        cellFormat.setOrientation( jxl.format.Orientation.PLUS_45 );
        break;
      case ExcelOutputMeta.FONT_ORIENTATION_PLUS_90:
        cellFormat.setOrientation( jxl.format.Orientation.PLUS_90 );
        break;
      case ExcelOutputMeta.FONT_ORIENTATION_STACKED:
        cellFormat.setOrientation( jxl.format.Orientation.STACKED );
        break;
      case ExcelOutputMeta.FONT_ORIENTATION_VERTICAL:
        cellFormat.setOrientation( jxl.format.Orientation.VERTICAL );
        break;
      default:
        break;
    }
  }
  return cellFormat;
}
 
開發者ID:pentaho,項目名稱:pentaho-kettle,代碼行數:28,代碼來源:ExcelFontMap.java

示例3: textVertical

import jxl.write.WritableCellFormat; //導入方法依賴的package包/類
private WritableCell textVertical(WritableCell cell) throws WriteException {
	WritableCellFormat format = new WritableCellFormat(cell.getCellFormat());
	format.setOrientation(Orientation.PLUS_90);
	cell.setCellFormat(format);
	return cell;
}
 
開發者ID:kefik,項目名稱:Pogamut3,代碼行數:7,代碼來源:ExcelReport.java

示例4: setParam

import jxl.write.WritableCellFormat; //導入方法依賴的package包/類
private WritableCellFormat setParam(WritableCellFormat wcf, int map) throws WriteException {
	if ( (map&CENTRE)!=0 ) 		wcf.setAlignment(Alignment.CENTRE);
	if ( (map&RIGHT)!=0 ) 		wcf.setAlignment(Alignment.RIGHT);
	if ( (map&LEFT)!=0 ) 		wcf.setAlignment(Alignment.LEFT);
	if ( (map&VCENTRE)!=0 ) 	wcf.setVerticalAlignment(VerticalAlignment.CENTRE);
	
	if ( (map&B_TOP_MED)!=0 ) 	wcf.setBorder(Border.TOP, BorderLineStyle.MEDIUM);
	if ( (map&B_BOTTOM_MED)!=0 ) wcf.setBorder(Border.BOTTOM, BorderLineStyle.MEDIUM);
	if ( (map&B_LEFT_MED)!=0 ) 	wcf.setBorder(Border.LEFT, BorderLineStyle.MEDIUM);
	if ( (map&B_RIGHT_MED)!=0 ) wcf.setBorder(Border.RIGHT, BorderLineStyle.MEDIUM);
	
	if ( (map&B_ALL_MED)!=0 ) {
		wcf.setBorder(Border.RIGHT, BorderLineStyle.MEDIUM);
		wcf.setBorder(Border.LEFT, BorderLineStyle.MEDIUM);
		wcf.setBorder(Border.TOP, BorderLineStyle.MEDIUM);
		wcf.setBorder(Border.BOTTOM, BorderLineStyle.MEDIUM);
	}
	
	if ( (map&B_TOP_LOW)!=0 ) 	wcf.setBorder(Border.TOP, BorderLineStyle.THIN);
	if ( (map&B_BOTTOM_LOW)!=0 ) wcf.setBorder(Border.BOTTOM, BorderLineStyle.THIN);
	if ( (map&B_LEFT_LOW)!=0 ) 	wcf.setBorder(Border.LEFT, BorderLineStyle.THIN);
	if ( (map&B_RIGHT_LOW)!=0 ) wcf.setBorder(Border.RIGHT, BorderLineStyle.THIN);
	
	if ( (map&B_ALL_LOW)!=0 ) {
		wcf.setBorder(Border.RIGHT, BorderLineStyle.THIN);
		wcf.setBorder(Border.LEFT, BorderLineStyle.THIN);
		wcf.setBorder(Border.TOP, BorderLineStyle.THIN);
		wcf.setBorder(Border.BOTTOM, BorderLineStyle.THIN);
	}
	
	if ( (map&GRAY_25)!=0 ) wcf.setBackground(Colour.GRAY_25);
	if ( (map&GREEN)!=0 ) wcf.setBackground(Colour.LIGHT_GREEN);
	if ( (map&BLACK)!=0 ) wcf.setBackground(Colour.BLACK);
	if ( (map&YELLOW)!=0 ) wcf.setBackground(Colour.YELLOW);
	if ( (map&RED)!=0 ) wcf.setBackground(Colour.RED);
	
	if ( (map&WRAP)!=0 ) wcf.setWrap(true);
	
	if ( (map&DIAG45)!=0 ) wcf.setOrientation(Orientation.PLUS_45);
	

	
	return wcf;
}
 
開發者ID:vagfed,項目名稱:hmcScanner,代碼行數:45,代碼來源:Loader.java


注:本文中的jxl.write.WritableCellFormat.setOrientation方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。