当前位置: 首页>>代码示例>>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;未经允许,请勿转载。