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


Java JRDesignExpression.setValueClassName方法代码示例

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


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

示例1: createObject

import net.sf.jasperreports.engine.design.JRDesignExpression; //导入方法依赖的package包/类
@Override
public Object createObject(Attributes atts)
{
	JRDesignExpression expression = new JRDesignExpression();

	String className = atts.getValue(JRXmlConstants.ATTRIBUTE_class);
	if (className == null)
	{
		expression.setValueClass(java.lang.String.class);
	}
	else
	{
		expression.setValueClassName(className);
	}

	return expression;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:18,代码来源:JRStringExpressionFactory.java

示例2: createObject

import net.sf.jasperreports.engine.design.JRDesignExpression; //导入方法依赖的package包/类
@Override
public Object createObject(Attributes atts)
{
	JRDesignExpression expression = new JRDesignExpression();

	String value = atts.getValue(JRXmlConstants.ATTRIBUTE_class);
	
	if (value != null)
	{
		// being backward compatible
		if(value.equals("dori.jasper.engine.JasperReport"))
		{
			value = JasperReport.class.getName();
		}
		expression.setValueClassName(value);
	}
	else
	{
		expression.setValueClass(java.lang.String.class);
	}

	return expression;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:24,代码来源:JRSubreportExpressionFactory.java

示例3: createObject

import net.sf.jasperreports.engine.design.JRDesignExpression; //导入方法依赖的package包/类
@Override
public Object createObject(Attributes atts)
{
	JRDesignVariable variable = (JRDesignVariable)digester.peek();

	JRDesignExpression expression = new JRDesignExpression();
	if (
		variable.getCalculationValue() == CalculationEnum.COUNT
		|| variable.getCalculationValue() == CalculationEnum.DISTINCT_COUNT
		)
	{
		expression.setValueClassName(java.lang.Object.class.getName());
	}
	else
	{
		expression.setValueClassName(variable.getValueClassName());
	}

	return expression;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:21,代码来源:JRVariableExpressionFactory.java

示例4: createObject

import net.sf.jasperreports.engine.design.JRDesignExpression; //导入方法依赖的package包/类
@Override
public Object createObject(Attributes attributes)
{
	JRDesignCrosstabMeasure measure = (JRDesignCrosstabMeasure) digester.peek();

	JRDesignExpression expression = new JRDesignExpression();
	if (
		measure.getCalculationValue() == CalculationEnum.COUNT
		|| measure.getCalculationValue() == CalculationEnum.DISTINCT_COUNT
		)
	{
		expression.setValueClassName(Object.class.getName());
	}
	else
	{
		expression.setValueClassName(measure.getValueClassName());
	}

	return expression;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:21,代码来源:JRCrosstabMeasureExpressionFactory.java

示例5: setValues

import net.sf.jasperreports.engine.design.JRDesignExpression; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public static <T extends JRExpression> T setValues(T e, Object value, String valueClassName) {
	if (value == null)
		return null;
	String text = "";
	JRDesignExpression expr = (JRDesignExpression) e;
	expr = createExpression(expr);
	if (value instanceof JRDesignExpression) {
		return checkEmpty((T) value);
	} else if (value instanceof String) {
		text = (String) value;
	}
	expr.setText(text);
	if (valueClassName != null)
		expr.setValueClassName(valueClassName);
	return checkEmpty((T) expr);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:18,代码来源:ExprUtil.java

示例6: createExpression

import net.sf.jasperreports.engine.design.JRDesignExpression; //导入方法依赖的package包/类
/**
 * Create a JRDesignExpression by specifying the expression text. An optional value class name can be used as
 * expression class. Value class name should be specified only if strictly required, since it is deprecated by
 * JasperReports.
 * 
 * @param text
 *          - The text of the expression, or null for empty expressions
 * @param valueClassName
 *          - A string representing the class returned by the expression
 * 
 * @return a new JRDesignExpression
 */
@SuppressWarnings("deprecation")
public static JRDesignExpression createExpression(String text, String valueClassName) {
	JRDesignExpression exp = new JRDesignExpression();

	if (text != null) {
		exp.setText(text);
	}

	if (valueClassName != null) {
		exp.setValueClassName(valueClassName);
	}

	return exp;

}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:28,代码来源:ExprUtil.java

示例7: createObject

import net.sf.jasperreports.engine.design.JRDesignExpression; //导入方法依赖的package包/类
@Override
public Object createObject(Attributes atts)
{
	JRDesignVariable variable = (JRDesignVariable)digester.peek();

	JRDesignExpression expression = new JRDesignExpression();
	expression.setValueClassName(variable.getValueClassName());

	return expression;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:11,代码来源:JRInitialValueExpressionFactory.java

示例8: createObject

import net.sf.jasperreports.engine.design.JRDesignExpression; //导入方法依赖的package包/类
@Override
public Object createObject(Attributes atts)
{
	JRDesignParameter parameter = (JRDesignParameter)digester.peek();

	JRDesignExpression expression = new JRDesignExpression();
	expression.setValueClassName(parameter.getValueClassName());

	return expression;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:11,代码来源:JRDefaultValueExpressionFactory.java

示例9: createObject

import net.sf.jasperreports.engine.design.JRDesignExpression; //导入方法依赖的package包/类
@Override
public Object createObject( Attributes attrs ){
	JRDesignExpression expression = new JRDesignExpression();
	expression.setValueClassName( String.class.getName() );
	
	ExpressionTypeEnum type = ExpressionTypeEnum.getByName(attrs.getValue(JRXmlConstants.ATTRIBUTE_type));
	if (type != null)
	{
		expression.setType(type);
	}
	
	return expression;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:14,代码来源:JRExpressionFactory.java

示例10: createJRElement

import net.sf.jasperreports.engine.design.JRDesignExpression; //导入方法依赖的package包/类
@Override
public JRDesignElement createJRElement(JasperDesign jasperDesign) {
	JRDesignComponentElement el = new JRDesignComponentElement();
	HtmlComponent component = new HtmlComponent();
	JRDesignExpression exp = new JRDesignExpression();
	exp.setValueClassName("java.lang.String"); //$NON-NLS-1$
	exp.setText("\"<p style='background-color:yellow;'>HTML paragraph</p>\""); //$NON-NLS-1$
	component.setHtmlContentExpression(exp);
	el.setComponent(component);
	el.setComponentKey(new ComponentKey(
			"http://jasperreports.sourceforge.net/htmlcomponent", "hc", "html")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
	return el;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:14,代码来源:MHtml.java


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