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


Java Area類代碼示例

本文整理匯總了Java中org.jxls.area.Area的典型用法代碼示例。如果您正苦於以下問題:Java Area類的具體用法?Java Area怎麽用?Java Area使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: processTemplate

import org.jxls.area.Area; //導入依賴的package包/類
private void processTemplate(final Transformer transformer, final Context context) throws IOException, InvalidFormatException
{
	
	//
	// Find Areas which we will need to process
    final AreaBuilder areaBuilder = new XlsCommentAreaBuilder();
       areaBuilder.setTransformer(transformer);
       final List<Area> xlsAreaList = areaBuilder.build();

       //
       // Process those areas
       for (final Area xlsArea : xlsAreaList)
       {
       	// Process area
           xlsArea.applyAt(new CellRef(xlsArea.getStartCellRef().getCellName()), context);

           // Process formulas
           xlsArea.setFormulaProcessor(new FastFormulaProcessor());
           xlsArea.processFormulas();
       }

       //
       // Write the result
       transformer.write();
}
 
開發者ID:metasfresh,項目名稱:metasfresh,代碼行數:26,代碼來源:JXlsExporter.java

示例2: addArea

import org.jxls.area.Area; //導入依賴的package包/類
@Override
public Command addArea(final Area area)
{
	super.addArea(area);

	if (_area == null)
	{
		_area = area;
	}
	else
	{
		throw new IllegalArgumentException("Adding more than one area is not allowed");
	}

	return this;
}
 
開發者ID:metasfresh,項目名稱:metasfresh,代碼行數:17,代碼來源:HideColumnIfCommand.java

示例3: applyAt

import org.jxls.area.Area; //導入依賴的package包/類
@Override
public Size applyAt(final CellRef cellRef, final Context context)
{
	//
	// Process area
	final Area area = getArea();
	final Size size = area.applyAt(cellRef, context);

	//
	// If given condition is evaluated as true, hide given columns
	if (isConditionTrue(context))
	{
		logger.debug("Hiding column of {} because condition '{}' was evaluated as true", cellRef, condition);
		hideColumn(cellRef);
	}
	else
	{
		logger.debug("Skip hiding column of {} because condition '{}' was evaluated as false", cellRef, condition);
	}

	//
	return size;
}
 
開發者ID:metasfresh,項目名稱:metasfresh,代碼行數:24,代碼來源:HideColumnIfCommand.java

示例4: processTemplateWithSheets

import org.jxls.area.Area; //導入依賴的package包/類
public static void processTemplateWithSheets(InputStream templateStream, OutputStream targetStream,
        org.jxls.common.Context jxlsContext) throws IOException {
    Transformer transformer = TransformerFactory.createTransformer(templateStream, targetStream);
    List<Area> xlsAreas = new XlsCommentAreaBuilder(transformer).build();
    for (Area xlsArea : xlsAreas) {
        xlsArea.applyAt(new CellRef(xlsArea.getStartCellRef().getCellName()), jxlsContext);
        xlsArea.setFormulaProcessor(new StandardFormulaProcessor());
        xlsArea.processFormulas();
    }
    transformer.deleteSheet(xlsAreas.get(0).getStartCellRef().getSheetName());
    transformer.write();
}
 
開發者ID:bamartinezd,項目名稱:traccar-service,代碼行數:13,代碼來源:ReportUtils.java

示例5: applyAt

import org.jxls.area.Area; //導入依賴的package包/類
@Override
@SuppressWarnings("unchecked")
public Size applyAt(CellRef cellRef, Context context) {
  // collect sub command areas
  List<Area> childAreas = this.getAreaList().stream()
    .flatMap(area1 -> area1.getCommandDataList().stream())
    .flatMap(commandData -> commandData.getCommand().getAreaList().stream())
    .collect(Collectors.toList());
  List<AreaRef> childAreaRefs = childAreas.stream()
    .map(Area::getAreaRef).collect(Collectors.toList());

  // register AreaListener for parent command area
  Area parentArea = this.getAreaList().get(0);
  MergeCellListener listener = new MergeCellListener(getTransformer(), parentArea.getAreaRef(), childAreaRefs,
    ((Collection) context.getVar(this.getItems())).size()); // 總數據量
  logger.info("register listener {} to {} from {}", listener, parentArea.getAreaRef(), cellRef);
  parentArea.addAreaListener(listener);

  // register AreaListener for all sub command area
  childAreas.forEach(area -> {
    logger.info("register listener {} to {} by parent", listener, area.getAreaRef());
    area.addAreaListener(listener);
  });

  // standard dealing
  return super.applyAt(cellRef, context);
}
 
開發者ID:simter,項目名稱:simter-jxls-ext,代碼行數:28,代碼來源:EachMergeCommand.java

示例6: EachMergeCommand

import org.jxls.area.Area; //導入依賴的package包/類
public EachMergeCommand(String items, Area area) {
  super(items, area);
}
 
開發者ID:simter,項目名稱:simter-jxls-ext,代碼行數:4,代碼來源:EachMergeCommand.java

示例7: getArea

import org.jxls.area.Area; //導入依賴的package包/類
private Area getArea()
{
	Check.assumeNotNull(_area, "area not null");
	return _area;
}
 
開發者ID:metasfresh,項目名稱:metasfresh,代碼行數:6,代碼來源:HideColumnIfCommand.java


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