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


Java POIUtils.findCell方法代码示例

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


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

示例1: setIndexMatrix

import org.insightech.er.util.POIUtils; //导入方法依赖的package包/类
private void setIndexMatrix(final HSSFWorkbook workbook, final HSSFSheet sheet, final ERTable table) {
    final CellLocation logicalIndexCellLocation = POIUtils.findCell(sheet, KEYWORD_LOGICAL_INDEX_MATRIX);

    if (logicalIndexCellLocation != null) {
        if (logicalIndexMatrixCellStyle == null) {
            logicalIndexMatrixCellStyle = this.createMatrixCellStyle(workbook, sheet, logicalIndexCellLocation);
        }
        setIndexMatrix(workbook, sheet, table, logicalIndexCellLocation, logicalIndexMatrixCellStyle, true);
    }

    final CellLocation physicalIndexCellLocation = POIUtils.findCell(sheet, KEYWORD_PHYSICAL_INDEX_MATRIX);

    if (physicalIndexCellLocation != null) {
        if (physicalIndexMatrixCellStyle == null) {
            physicalIndexMatrixCellStyle = this.createMatrixCellStyle(workbook, sheet, physicalIndexCellLocation);
        }
        setIndexMatrix(workbook, sheet, table, physicalIndexCellLocation, physicalIndexMatrixCellStyle, false);
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:20,代码来源:TableSheetGenerator.java

示例2: setComplexUniqueKeyMatrix

import org.insightech.er.util.POIUtils; //导入方法依赖的package包/类
private void setComplexUniqueKeyMatrix(final HSSFWorkbook workbook, final HSSFSheet sheet, final ERTable table) {
    final CellLocation logicalCellLocation = POIUtils.findCell(sheet, KEYWORD_LOGICAL_COMPLEX_UNIQUE_KEY_MATRIX);

    if (logicalCellLocation != null) {
        if (logicalComplexUniqueKeyMatrixCellStyle == null) {
            logicalComplexUniqueKeyMatrixCellStyle = this.createMatrixCellStyle(workbook, sheet, logicalCellLocation);
        }
        setComplexUniqueKeyMatrix(workbook, sheet, table, logicalCellLocation, logicalComplexUniqueKeyMatrixCellStyle, true);
    }

    final CellLocation physicalCellLocation = POIUtils.findCell(sheet, KEYWORD_PHYSICAL_COMPLEX_UNIQUE_KEY_MATRIX);

    if (physicalCellLocation != null) {
        if (physicalComplexUniqueKeyMatrixCellStyle == null) {
            physicalComplexUniqueKeyMatrixCellStyle = this.createMatrixCellStyle(workbook, sheet, physicalCellLocation);
        }

        this.setComplexUniqueKeyMatrix(workbook, sheet, table, physicalCellLocation, physicalComplexUniqueKeyMatrixCellStyle, false);
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:21,代码来源:TableSheetGenerator.java

示例3: buildKeywordsValueMap

import org.insightech.er.util.POIUtils; //导入方法依赖的package包/类
protected Map<String, String> buildKeywordsValueMap(final HSSFSheet wordsSheet, final int columnNo, final String[] keywords) {
    final Map<String, String> keywordsValueMap = new HashMap<String, String>();

    for (final String keyword : keywords) {
        final CellLocation location = POIUtils.findCell(wordsSheet, keyword, columnNo);
        if (location != null) {
            final HSSFRow row = wordsSheet.getRow(location.r);

            final HSSFCell cell = row.getCell(location.c + 2);
            final String value = cell.getRichStringCellValue().getString();

            if (value != null) {
                keywordsValueMap.put(keyword, value);
            }
        }
    }

    return keywordsValueMap;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:20,代码来源:AbstractSheetGenerator.java

示例4: setIndexMatrix

import org.insightech.er.util.POIUtils; //导入方法依赖的package包/类
private void setIndexMatrix(HSSFWorkbook workbook, HSSFSheet sheet,
		ERTable table) {
	CellLocation logicalIndexCellLocation = POIUtils.findCell(sheet,
			KEYWORD_LOGICAL_INDEX_MATRIX);

	if (logicalIndexCellLocation != null) {
		if (this.logicalIndexMatrixCellStyle == null) {
			this.logicalIndexMatrixCellStyle = this.createMatrixCellStyle(
					workbook, sheet, logicalIndexCellLocation);
		}
		setIndexMatrix(workbook, sheet, table, logicalIndexCellLocation,
				this.logicalIndexMatrixCellStyle, true);
	}

	CellLocation physicalIndexCellLocation = POIUtils.findCell(sheet,
			KEYWORD_PHYSICAL_INDEX_MATRIX);

	if (physicalIndexCellLocation != null) {
		if (this.physicalIndexMatrixCellStyle == null) {
			this.physicalIndexMatrixCellStyle = this.createMatrixCellStyle(
					workbook, sheet, physicalIndexCellLocation);
		}
		setIndexMatrix(workbook, sheet, table, physicalIndexCellLocation,
				this.physicalIndexMatrixCellStyle, false);
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:27,代码来源:TableSheetGenerator.java

示例5: buildKeywordsValueMap

import org.insightech.er.util.POIUtils; //导入方法依赖的package包/类
protected Map<String, String> buildKeywordsValueMap(HSSFSheet wordsSheet,
		int columnNo, String[] keywords) {
	Map<String, String> keywordsValueMap = new HashMap<String, String>();

	for (String keyword : keywords) {
		CellLocation location = POIUtils.findCell(wordsSheet, keyword,
				columnNo);
		if (location != null) {
			HSSFRow row = wordsSheet.getRow(location.r);

			HSSFCell cell = row.getCell(location.c + 2);
			String value = cell.getRichStringCellValue().getString();

			if (value != null) {
				keywordsValueMap.put(keyword, value);
			}
		}
	}

	return keywordsValueMap;
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:22,代码来源:AbstractSheetGenerator.java

示例6: setIndexData

import org.insightech.er.util.POIUtils; //导入方法依赖的package包/类
/**
 * �C���f�b�N�X�V�[�g�Ƀf�[�^��ݒ肵�܂�.
 * 
 * @param workbook
 * @param sheet
 * @param index
 */
public void setIndexData(final HSSFWorkbook workbook, final HSSFSheet sheet, final Index index) {
    POIUtils.replace(sheet, KEYWORD_PHYSICAL_INDEX_NAME, getValue(keywordsValueMap, KEYWORD_PHYSICAL_INDEX_NAME, index.getName()));
    POIUtils.replace(sheet, KEYWORD_INDEX_TYPE, getValue(keywordsValueMap, KEYWORD_INDEX_TYPE, index.getType()));
    POIUtils.replace(sheet, KEYWORD_UNIQUE_INDEX, getValue(keywordsValueMap, KEYWORD_UNIQUE_INDEX, !index.isNonUnique()));
    POIUtils.replace(sheet, KEYWORD_PHYSICAL_TABLE_NAME, getValue(keywordsValueMap, KEYWORD_PHYSICAL_TABLE_NAME, index.getTable().getPhysicalName()));
    POIUtils.replace(sheet, KEYWORD_LOGICAL_TABLE_NAME, getValue(keywordsValueMap, KEYWORD_LOGICAL_TABLE_NAME, index.getTable().getLogicalName()));
    POIUtils.replace(sheet, KEYWORD_INDEX_DESCRIPTION, getValue(keywordsValueMap, KEYWORD_INDEX_DESCRIPTION, index.getDescription()));

    final CellLocation cellLocation = POIUtils.findCell(sheet, FIND_KEYWORDS_OF_COLUMN);

    if (cellLocation != null) {
        int rowNum = cellLocation.r;
        final HSSFRow templateRow = sheet.getRow(rowNum);

        if (columnTemplate == null) {
            columnTemplate = loadColumnTemplate(workbook, sheet, cellLocation);
        }

        int order = 1;

        for (final NormalColumn normalColumn : index.getColumns()) {
            final HSSFRow row = POIUtils.insertRow(sheet, rowNum++);
            setColumnData(keywordsValueMap, columnTemplate, row, normalColumn, index.getTable(), order);
            order++;
        }

        setCellStyle(columnTemplate, sheet, cellLocation.r, rowNum - cellLocation.r, templateRow.getFirstCellNum());
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:37,代码来源:IndexSheetGenerator.java

示例7: setAllColumnsData

import org.insightech.er.util.POIUtils; //导入方法依赖的package包/类
public void setAllColumnsData(final ProgressMonitor monitor, final HSSFWorkbook workbook, final HSSFSheet sheet, final ERDiagram diagram) throws InterruptedException {
    clear();

    final CellLocation cellLocation = POIUtils.findCell(sheet, FIND_KEYWORDS_OF_COLUMN);

    if (cellLocation != null) {
        int rowNum = cellLocation.r;
        final HSSFRow templateRow = sheet.getRow(rowNum);

        if (columnTemplate == null) {
            columnTemplate = loadColumnTemplate(workbook, sheet, cellLocation);
        }

        int order = 1;

        for (final ERTable table : diagram.getDiagramContents().getContents().getTableSet()) {

            if (diagram.getCurrentCategory() != null && !diagram.getCurrentCategory().contains(table)) {
                continue;
            }

            monitor.subTaskWithCounter(sheet.getSheetName() + " - " + table.getName());

            for (final NormalColumn normalColumn : table.getExpandedColumns()) {

                final HSSFRow row = POIUtils.insertRow(sheet, rowNum++);
                setColumnData(keywordsValueMap, columnTemplate, row, normalColumn, table, order);
                order++;
            }

            monitor.worked(1);
        }

        setCellStyle(columnTemplate, sheet, cellLocation.r, rowNum - cellLocation.r, templateRow.getFirstCellNum());
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:37,代码来源:ColumnSheetGenerator.java

示例8: setComplexUniqueKeyMatrix

import org.insightech.er.util.POIUtils; //导入方法依赖的package包/类
private void setComplexUniqueKeyMatrix(HSSFWorkbook workbook,
		HSSFSheet sheet, ERTable table) {
	CellLocation logicalCellLocation = POIUtils.findCell(sheet,
			KEYWORD_LOGICAL_COMPLEX_UNIQUE_KEY_MATRIX);

	if (logicalCellLocation != null) {
		if (this.logicalComplexUniqueKeyMatrixCellStyle == null) {
			this.logicalComplexUniqueKeyMatrixCellStyle = this
					.createMatrixCellStyle(workbook, sheet,
							logicalCellLocation);
		}
		setComplexUniqueKeyMatrix(workbook, sheet, table,
				logicalCellLocation,
				this.logicalComplexUniqueKeyMatrixCellStyle, true);
	}

	CellLocation physicalCellLocation = POIUtils.findCell(sheet,
			KEYWORD_PHYSICAL_COMPLEX_UNIQUE_KEY_MATRIX);

	if (physicalCellLocation != null) {
		if (this.physicalComplexUniqueKeyMatrixCellStyle == null) {
			this.physicalComplexUniqueKeyMatrixCellStyle = this
					.createMatrixCellStyle(workbook, sheet,
							physicalCellLocation);
		}

		this.setComplexUniqueKeyMatrix(workbook, sheet, table,
				physicalCellLocation,
				this.physicalComplexUniqueKeyMatrixCellStyle, false);
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:32,代码来源:TableSheetGenerator.java

示例9: setIndexData

import org.insightech.er.util.POIUtils; //导入方法依赖的package包/类
/**
 * �C���f�b�N�X�V�[�g�Ƀf�[�^��ݒ肵�܂�.
 * 
 * @param workbook
 * @param sheet
 * @param index
 */
public void setIndexData(HSSFWorkbook workbook, HSSFSheet sheet, Index index) {
	POIUtils.replace(sheet, KEYWORD_PHYSICAL_INDEX_NAME, this.getValue(
			this.keywordsValueMap, KEYWORD_PHYSICAL_INDEX_NAME,
			index.getName()));
	POIUtils.replace(
			sheet,
			KEYWORD_INDEX_TYPE,
			this.getValue(this.keywordsValueMap, KEYWORD_INDEX_TYPE,
					index.getType()));
	POIUtils.replace(sheet, KEYWORD_UNIQUE_INDEX, this.getValue(
			this.keywordsValueMap, KEYWORD_UNIQUE_INDEX,
			!index.isNonUnique()));
	POIUtils.replace(sheet, KEYWORD_PHYSICAL_TABLE_NAME, this.getValue(
			this.keywordsValueMap, KEYWORD_PHYSICAL_TABLE_NAME, index
					.getTable().getPhysicalName()));
	POIUtils.replace(sheet, KEYWORD_LOGICAL_TABLE_NAME, this.getValue(
			this.keywordsValueMap, KEYWORD_LOGICAL_TABLE_NAME, index
					.getTable().getLogicalName()));
	POIUtils.replace(sheet, KEYWORD_INDEX_DESCRIPTION, this.getValue(
			this.keywordsValueMap, KEYWORD_INDEX_DESCRIPTION,
			index.getDescription()));

	CellLocation cellLocation = POIUtils.findCell(sheet,
			FIND_KEYWORDS_OF_COLUMN);

	if (cellLocation != null) {
		int rowNum = cellLocation.r;
		HSSFRow templateRow = sheet.getRow(rowNum);

		if (this.columnTemplate == null) {
			this.columnTemplate = loadColumnTemplate(workbook, sheet,
					cellLocation);
		}

		int order = 1;

		for (NormalColumn normalColumn : index.getColumns()) {
			HSSFRow row = POIUtils.insertRow(sheet, rowNum++);
			this.setColumnData(this.keywordsValueMap, columnTemplate, row,
					normalColumn, index.getTable(), order);
			order++;
		}

		this.setCellStyle(columnTemplate, sheet, cellLocation.r, rowNum
				- cellLocation.r, templateRow.getFirstCellNum());
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:55,代码来源:IndexSheetGenerator.java

示例10: setAllColumnsData

import org.insightech.er.util.POIUtils; //导入方法依赖的package包/类
public void setAllColumnsData(ProgressMonitor monitor,
		HSSFWorkbook workbook, HSSFSheet sheet, ERDiagram diagram)
		throws InterruptedException {
	this.clear();

	CellLocation cellLocation = POIUtils.findCell(sheet,
			FIND_KEYWORDS_OF_COLUMN);

	if (cellLocation != null) {
		int rowNum = cellLocation.r;
		HSSFRow templateRow = sheet.getRow(rowNum);

		if (this.columnTemplate == null) {
			this.columnTemplate = this.loadColumnTemplate(workbook, sheet,
					cellLocation);
		}

		int order = 1;

		for (ERTable table : diagram.getDiagramContents().getContents()
				.getTableSet()) {

			if (diagram.getCurrentCategory() != null
					&& !diagram.getCurrentCategory().contains(table)) {
				continue;
			}

			monitor.subTaskWithCounter(sheet.getSheetName() + " - "
					+ table.getName());

			for (NormalColumn normalColumn : table.getExpandedColumns()) {

				HSSFRow row = POIUtils.insertRow(sheet, rowNum++);
				this.setColumnData(this.keywordsValueMap, columnTemplate,
						row, normalColumn, table, order);
				order++;
			}

			monitor.worked(1);
		}

		this.setCellStyle(columnTemplate, sheet, cellLocation.r, rowNum
				- cellLocation.r, templateRow.getFirstCellNum());
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:46,代码来源:ColumnSheetGenerator.java


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