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


Java WhenResourceMissingTypeEnum类代码示例

本文整理汇总了Java中net.sf.jasperreports.engine.type.WhenResourceMissingTypeEnum的典型用法代码示例。如果您正苦于以下问题:Java WhenResourceMissingTypeEnum类的具体用法?Java WhenResourceMissingTypeEnum怎么用?Java WhenResourceMissingTypeEnum使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


WhenResourceMissingTypeEnum类属于net.sf.jasperreports.engine.type包,在下文中一共展示了WhenResourceMissingTypeEnum类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createObject

import net.sf.jasperreports.engine.type.WhenResourceMissingTypeEnum; //导入依赖的package包/类
@Override
public Object createObject(Attributes attributes)
{
	JRXmlLoader xmlLoader = (JRXmlLoader)digester.peek(digester.getCount() - 1);
	JRDesignDataset dataset = new JRDesignDataset(xmlLoader.getJasperReportsContext(), false);
	
	dataset.setName(attributes.getValue(JRXmlConstants.ATTRIBUTE_name));
	dataset.setScriptletClass(attributes.getValue(JRXmlConstants.ATTRIBUTE_scriptletClass));
	
	dataset.setResourceBundle(attributes.getValue(JRXmlConstants.ATTRIBUTE_resourceBundle));

	WhenResourceMissingTypeEnum whenResourceMissingType = WhenResourceMissingTypeEnum.getByName(attributes.getValue(JRXmlConstants.ATTRIBUTE_whenResourceMissingType));
	if (whenResourceMissingType != null)
	{
		dataset.setWhenResourceMissingType(whenResourceMissingType);
	}
	
	String uuid = attributes.getValue(JRXmlConstants.ATTRIBUTE_uuid);
	if (uuid != null)
	{
		dataset.setUUID(UUID.fromString(uuid));
	}

	return dataset;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:26,代码来源:JRDatasetFactory.java

示例2: writeDataset

import net.sf.jasperreports.engine.type.WhenResourceMissingTypeEnum; //导入依赖的package包/类
public void writeDataset(JRDataset dataset) throws IOException
{
	writer.startElement(JRXmlConstants.ELEMENT_subDataset, getNamespace());
	writer.addEncodedAttribute(JRXmlConstants.ATTRIBUTE_name, dataset.getName());
	writer.addAttribute(JRXmlConstants.ATTRIBUTE_scriptletClass, dataset.getScriptletClass());
	writer.addEncodedAttribute(JRXmlConstants.ATTRIBUTE_resourceBundle, dataset.getResourceBundle());
	writer.addAttribute(JRXmlConstants.ATTRIBUTE_whenResourceMissingType, dataset.getWhenResourceMissingTypeValue(), WhenResourceMissingTypeEnum.NULL);
	if (
		isNewerVersionOrEqual(JRConstants.VERSION_4_6_0)
		&& !isExcludeUuids() 
		)
	{
		writer.addAttribute(JRXmlConstants.ATTRIBUTE_uuid, dataset.getUUID().toString());
	}

	writeProperties(dataset);

	if (isNewerVersionOrEqual(JRConstants.VERSION_6_3_1))
	{
		writePropertyExpressions(dataset.getPropertyExpressions());
	}

	writeDatasetContents(dataset);

	writer.closeElement();
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:27,代码来源:JRXmlWriter.java

示例3: writeDataset

import net.sf.jasperreports.engine.type.WhenResourceMissingTypeEnum; //导入依赖的package包/类
/**
 * 
 */
public void writeDataset( JRDataset dataset, String datasetName)
{
	if(dataset != null)
	{
		write( "JRDesignDataset " + datasetName + " = new JRDesignDataset(" + dataset.isMainDataset() + ");\n");	
		
		write( datasetName + ".setName(\"{0}\");\n", JRStringUtil.escapeJavaStringLiteral(dataset.getName()));
		write( datasetName + ".setScriptletClass(\"{0}\");\n", JRStringUtil.escapeJavaStringLiteral(dataset.getScriptletClass()));
		write( datasetName + ".setResourceBundle(\"{0}\");\n", JRStringUtil.escapeJavaStringLiteral(dataset.getResourceBundle()));
		write( datasetName + ".setWhenResourceMissingType({0});\n", dataset.getWhenResourceMissingTypeValue(), WhenResourceMissingTypeEnum.NULL);

		writeProperties( dataset, datasetName);
		writePropertyExpressions( dataset.getPropertyExpressions(), datasetName);

		writeDatasetContents( dataset, datasetName);
		flush();
	}
	
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:23,代码来源:JRApiWriter.java

示例4: init

import net.sf.jasperreports.engine.type.WhenResourceMissingTypeEnum; //导入依赖的package包/类
/**
 * Initializes the evaluator by setting the parameter, field and variable objects.
 * 
 * @param parametersMap the parameters indexed by name
 * @param fieldsMap the fields indexed by name
 * @param variablesMap the variables indexed by name
 * @param resourceMissingType the resource missing type
 * @throws JRException
 */
@Override
public void init(
		Map<String, JRFillParameter> parametersMap, 
		Map<String, JRFillField> fieldsMap, 
		Map<String, JRFillVariable> variablesMap, 
		WhenResourceMissingTypeEnum resourceMissingType,
		boolean ignoreNPE
		) throws JRException
{
	whenResourceMissingType = resourceMissingType;
	this.ignoreNPE = ignoreNPE;
	resourceBundle = parametersMap.get(JRParameter.REPORT_RESOURCE_BUNDLE);
	locale = parametersMap.get(JRParameter.REPORT_LOCALE);
	
	functions = new HashMap<String, FunctionSupport>();
	functionContext = new FillFunctionContext(parametersMap);
	
	customizedInit(parametersMap, fieldsMap, variablesMap);
	
	defaultValues = new FillExpressionDefaultValues(this, parametersMap, fieldsMap, variablesMap);
	oldValues =  new FillExpressionOldValues(this, parametersMap, fieldsMap, variablesMap);
	estimatedValues = new FillExpressionEstimatedValues(this, parametersMap, fieldsMap, variablesMap);
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:33,代码来源:JREvaluator.java

示例5: createEmpty

import net.sf.jasperreports.engine.type.WhenResourceMissingTypeEnum; //导入依赖的package包/类
static JasperDesign createEmpty(String tablename, int pageWidth, int pageHeight, boolean margins) {
	JasperDesign ret = new JasperDesign();
	ret.setName(Strings.removeExportIllegalChars(AppConstants.ORG_NAME + " - " + tablename));
	ret.setWhenNoDataType(WhenNoDataTypeEnum.ALL_SECTIONS_NO_DETAIL);
	ret.setWhenResourceMissingType(WhenResourceMissingTypeEnum.EMPTY);
	ret.setOrientation(OrientationEnum.LANDSCAPE);
	ret.setPageWidth(pageWidth);
	ret.setPageHeight(pageHeight);

	if (!margins) {
		ret.setLeftMargin(0);
		ret.setRightMargin(0);
		ret.setTopMargin(0);
		ret.setBottomMargin(0);
	}

	ret.setColumnWidth(Math.min(getAvailableWidth(ret), ret.getColumnWidth()));

	return ret;
}
 
开发者ID:PGWelch,项目名称:com.opendoorlogistics,代码行数:21,代码来源:ReportBuilderUtils.java

示例6: setWhenResourceMissingType

import net.sf.jasperreports.engine.type.WhenResourceMissingTypeEnum; //导入依赖的package包/类
@Override
public void setWhenResourceMissingType(WhenResourceMissingTypeEnum whenResourceMissingTypeValue)
{
	Object old = this.whenResourceMissingTypeValue;
	this.whenResourceMissingTypeValue = whenResourceMissingTypeValue;
	getEventSupport().firePropertyChange(PROPERTY_WHEN_RESOURCE_MISSING_TYPE, old, this.whenResourceMissingTypeValue);
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:8,代码来源:JRBaseDataset.java

示例7: readObject

import net.sf.jasperreports.engine.type.WhenResourceMissingTypeEnum; //导入依赖的package包/类
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
	in.defaultReadObject();
	
	if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)
	{
		whenResourceMissingTypeValue = WhenResourceMissingTypeEnum.getByValue(whenResourceMissingType);
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:11,代码来源:JRBaseDataset.java

示例8: init

import net.sf.jasperreports.engine.type.WhenResourceMissingTypeEnum; //导入依赖的package包/类
/**
 * Initializes the calculator.
 * 
 * @param dataset the dataset this calculator is used for
 * @throws JRException
 */
protected void init(JRFillDataset dataset) throws JRException
{
	this.dataset = dataset;
	parsm = dataset.parametersMap;
	fldsm = dataset.fieldsMap;
	varsm = dataset.variablesMap;
	variables = dataset.variables;
	groups = dataset.groups;
	datasets = dataset.elementDatasets;

	pageNumber = varsm.get(JRVariable.PAGE_NUMBER);
	columnNumber = varsm.get(JRVariable.COLUMN_NUMBER);
	
	WhenResourceMissingTypeEnum whenResourceMissingType = dataset.getWhenResourceMissingTypeValue();
	boolean ignoreNPE = 
		JRPropertiesUtil.getInstance(getFillDataset().getJasperReportsContext())
			.getBooleanProperty(
				getFillDataset(), 
				JREvaluator.PROPERTY_IGNORE_NPE, 
				true
				);
	evaluator.init(parsm, fldsm,varsm, whenResourceMissingType, ignoreNPE);
	
	legacyBandEvaluationEnabled = 
		JRPropertiesUtil.getInstance(getFillDataset().getJasperReportsContext())
			.getBooleanProperty(
				PROPERTY_LEGACY_BAND_EVALUATION_ENABLED
				);
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:36,代码来源:JRCalculator.java

示例9: init

import net.sf.jasperreports.engine.type.WhenResourceMissingTypeEnum; //导入依赖的package包/类
void init(
Map<String, JRFillParameter> parametersMap, 
Map<String, JRFillField> fieldsMap, 
Map<String, JRFillVariable> variablesMap, 
WhenResourceMissingTypeEnum resourceMissingType,
boolean ignoreNPE
) throws JRException;
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:8,代码来源:DatasetExpressionEvaluator.java

示例10: init

import net.sf.jasperreports.engine.type.WhenResourceMissingTypeEnum; //导入依赖的package包/类
@Override
public void init(Map<String, JRFillParameter> parametersMap,
		Map<String, JRFillField> fieldsMap, 
		Map<String, JRFillVariable> variablesMap,
		WhenResourceMissingTypeEnum resourceMissingType) throws JRException
{
	// NOP
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:9,代码来源:HeaderLabelUtil.java

示例11: init

import net.sf.jasperreports.engine.type.WhenResourceMissingTypeEnum; //导入依赖的package包/类
@Override
public void init(Map<String, JRFillParameter> parametersMap, 
		Map<String, JRFillField> fieldsMap, 
		Map<String, JRFillVariable> variablesMap, 
		WhenResourceMissingTypeEnum resourceMissingType,
		boolean ignoreNPE) throws JRException
{
	decorated.init(parametersMap, fieldsMap, variablesMap, resourceMissingType, ignoreNPE);
	
	for (BuiltinExpressionEvaluator builtinEvaluator : builtinEvaluators.values())
	{
		builtinEvaluator.init(parametersMap, fieldsMap, variablesMap, 
				resourceMissingType);
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:16,代码来源:BuiltinExpressionEvaluatorDecorator.java

示例12: init

import net.sf.jasperreports.engine.type.WhenResourceMissingTypeEnum; //导入依赖的package包/类
@Override
public void init(Map<String, JRFillParameter> parametersMap, 
		Map<String, JRFillField> fieldsMap, 
		Map<String, JRFillVariable> variablesMap, 
		WhenResourceMissingTypeEnum resourceMissingType)
		throws JRException
{
	tableScriptletParam = parametersMap.get(TABLE_SCRIPTLET_NAME 
			+ JRScriptlet.SCRIPTLET_PARAMETER_NAME_SUFFIX);
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:11,代码来源:TableReport.java

示例13: init

import net.sf.jasperreports.engine.type.WhenResourceMissingTypeEnum; //导入依赖的package包/类
@Override
public void init(Map<String, JRFillParameter> parametersMap,
		Map<String, JRFillField> fieldsMap,
		Map<String, JRFillVariable> variablesMap,
		WhenResourceMissingTypeEnum resourceMissingType,
		boolean ignoreNPE) throws JRException
{
	// NOP
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:10,代码来源:FillExpressionEvaluatorDatasetAdapter.java

示例14: WhenResourceMissingTypeProperty

import net.sf.jasperreports.engine.type.WhenResourceMissingTypeEnum; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public WhenResourceMissingTypeProperty(JRDesignDataset dataset)
{
    // TODO: Replace WhenNoDataType with the right constant
    super(WhenResourceMissingTypeEnum.class, dataset);
    this.dataset = dataset;
    setValue("suppressCustomEditor", Boolean.TRUE);
}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:9,代码来源:DatasetNode.java

示例15: getTagList

import net.sf.jasperreports.engine.type.WhenResourceMissingTypeEnum; //导入依赖的package包/类
@Override
public List getTagList()
{
    List tags = new java.util.ArrayList();
    tags.add(new Tag(WhenResourceMissingTypeEnum.EMPTY, I18n.getString("DatasetNode.Property.Empty")));
    tags.add(new Tag(WhenResourceMissingTypeEnum.ERROR, I18n.getString("DatasetNode.Property.Error")));
    tags.add(new Tag(WhenResourceMissingTypeEnum.KEY, I18n.getString("DatasetNode.Property.Key")));
    tags.add(new Tag(WhenResourceMissingTypeEnum.NULL, I18n.getString("DatasetNode.Property.Null")));
    return tags;
}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:11,代码来源:DatasetNode.java


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