当前位置: 首页>>代码示例>>Java>>正文


Java Report.getLayout方法代码示例

本文整理汇总了Java中ro.nextreports.engine.Report.getLayout方法的典型用法代码示例。如果您正苦于以下问题:Java Report.getLayout方法的具体用法?Java Report.getLayout怎么用?Java Report.getLayout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ro.nextreports.engine.Report的用法示例。


在下文中一共展示了Report.getLayout方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: copyTemplate

import ro.nextreports.engine.Report; //导入方法依赖的package包/类
public static void copyTemplate(Report report, File directory) throws IOException {
      ReportLayout layout = LayoutHelper.getReportLayout();
      if (report != null) {
          // run report from tree (without open)
          layout = report.getLayout();
      }
      String templateName = layout.getTemplateName();
if ((templateName != null) && !"".equals(templateName.trim())) {
	String fromPath = Globals.getCurrentReportAbsolutePath();
	if (fromPath == null) {
		fromPath = Globals.getTreeReportAbsolutePath();
	}						
	FileUtil.copyToDir(new File(new File(fromPath).getParentFile().getAbsolutePath() + File.separator + templateName),
				directory, true);			
}       
  }
 
开发者ID:nextreports,项目名称:nextreports-designer,代码行数:17,代码来源:FileUtil.java

示例2: deleteImages

import ro.nextreports.engine.Report; //导入方法依赖的package包/类
public static void deleteImages(Report report) {
    ReportLayout layout = LayoutHelper.getReportLayout();
    if (report != null) {
        // run report from tree (without open)
        layout = report.getLayout();
    }
    List<Band> bands = layout.getBands();
    for (Band band : bands) {
        for (int i=0, rows = band.getRowCount(); i<rows; i++) {
            List<BandElement> list = band.getRow(i);
            for (BandElement be : list) {
                if (be instanceof ImageBandElement) {
                    String image = ((ImageBandElement)be).getImage();
                    deleteImage(image);
                }
            }
        }
    }
    if (layout.getBackgroundImage() != null) {
    	deleteImage(layout.getBackgroundImage());
    }
}
 
开发者ID:nextreports,项目名称:nextreports-designer,代码行数:23,代码来源:FileUtil.java

示例3: getStaticImages

import ro.nextreports.engine.Report; //导入方法依赖的package包/类
/**
 * Get static images used by report
 * 
 * @param report
 *            report
 * @return a list of static images used by report
 */
public static List<String> getStaticImages(Report report) {
	List<String> images = new ArrayList<String>();
	ReportLayout layout = report.getLayout();
	List<Band> bands = layout.getBands();
	for (Band band : bands) {
		for (int i = 0, rows = band.getRowCount(); i < rows; i++) {
			List<BandElement> list = band.getRow(i);
			for (BandElement be : list) {
				if ((be instanceof ImageBandElement) && !(be instanceof ChartBandElement)
						&& !(be instanceof BarcodeBandElement)) {
					images.add(((ImageBandElement) be).getImage());
				}
			}
		}
	}
	if (layout.getBackgroundImage() != null) {
		images.add(layout.getBackgroundImage());
	}
	return images;
}
 
开发者ID:nextreports,项目名称:nextreports-engine,代码行数:28,代码来源:ReportUtil.java

示例4: getUsedColumns

import ro.nextreports.engine.Report; //导入方法依赖的package包/类
public static Set<String> getUsedColumns(Report report) {
    Set<String> columns = new HashSet<String>();
    ReportLayout layout;
    if (report == null) {
        layout = LayoutHelper.getReportLayout();
    } else {
        layout = report.getLayout();
    }
    List<Band> bands = layout.getBands();
    for (Band band : bands) {
        int rows = band.getRowCount();
        int cols = band.getColumnCount();
        for (int i = 0; i < rows; i++) {
            for (int j = 0; j < cols; j++) {
                BandElement bandElement = band.getElementAt(i, j);
                if (bandElement instanceof ColumnBandElement) {
                    columns.add(((ColumnBandElement) bandElement).getColumn());
                } else if (bandElement instanceof FunctionBandElement) {
                    columns.add(((FunctionBandElement) bandElement).getColumn());
                } else if (bandElement instanceof ExpressionBandElement) {
                    columns.add(((ExpressionBandElement) bandElement).getExpressionName());
                }
            }
        }
    }
    return columns;
}
 
开发者ID:nextreports,项目名称:nextreports-designer,代码行数:28,代码来源:BandUtil.java

示例5: getNotFoundColumns

import ro.nextreports.engine.Report; //导入方法依赖的package包/类
public static Set<String> getNotFoundColumns(Report report, DataSource ds) throws Exception {
    List<String> columns = ReportLayoutUtil.getAllColumnNamesForReport(report, ds);
    Set<String> usedColumns = BandUtil.getUsedColumns(report);
    usedColumns.removeAll(columns);
    ReportLayout layout;
    if (report == null) {
        layout = LayoutHelper.getReportLayout();
    } else {
        layout = report.getLayout();
    }
    usedColumns.removeAll(ReportUtil.getExpressionsNames(layout));        
    return usedColumns;
}
 
开发者ID:nextreports,项目名称:nextreports-designer,代码行数:14,代码来源:BandUtil.java

示例6: getNotFoundColumnsUsedByGroups

import ro.nextreports.engine.Report; //导入方法依赖的package包/类
public static Set<String> getNotFoundColumnsUsedByGroups(Report report, DataSource ds) throws Exception {
    List<String> columns = ReportLayoutUtil.getAllColumnNamesForReport(report, ds);        
    ReportLayout layout;
    if (report == null) {
        layout = LayoutHelper.getReportLayout();
    } else {
        layout = report.getLayout();
    }
    Set<String> usedColumns = ReportLayoutUtil.getAllColumnNamesUsedByGroupes(layout);
    usedColumns.removeAll(columns);                
    return usedColumns;
}
 
开发者ID:nextreports,项目名称:nextreports-designer,代码行数:13,代码来源:BandUtil.java


注:本文中的ro.nextreports.engine.Report.getLayout方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。