本文整理汇总了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;
}
示例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();
}
示例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();
}
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
}
示例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
);
}
示例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;
示例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
}
示例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);
}
}
示例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);
}
示例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
}
示例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);
}
示例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;
}