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


Java JRDataRange类代码示例

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


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

示例1: convertRange

import net.sf.jasperreports.charts.JRDataRange; //导入依赖的package包/类
/**
 * Converts a JasperReport data range into one understood by JFreeChart.
 *
 * @param dataRange the JasperReport version of the range
 * @param evaluation current expression evaluation phase
 * @return the JFreeChart version of the range
 * @throws JRException thrown when the low value of the range is greater than the
 * 						high value
 */
protected Range convertRange(JRDataRange dataRange) throws JRException
{
	if (dataRange == null)
		return null;

	Number low = (Number)evaluateExpression(dataRange.getLowExpression());
	Number high = (Number)evaluateExpression(dataRange.getHighExpression());
	return new Range( low != null ? low.doubleValue() : 0.0,
							 high != null ? high.doubleValue() : 100.0);
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:20,代码来源:GenericChartTheme.java

示例2: JRBaseDataRange

import net.sf.jasperreports.charts.JRDataRange; //导入依赖的package包/类
/**
	 * Constructs a copy of an existing range.
	 *
	 * @param dataRange the range to copy
	 */
	public JRBaseDataRange(JRDataRange dataRange)
	{
		if (dataRange != null)
		{
			this.lowExpression = dataRange.getLowExpression();
			this.highExpression = dataRange.getHighExpression();
		}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:14,代码来源:JRBaseDataRange.java

示例3: setDataRange

import net.sf.jasperreports.charts.JRDataRange; //导入依赖的package包/类
/**
 * Sets the range of values that can be displayed by this thermometer.
 * Specifies the upper and lower bounds of the display area of the meter.
 *
 * @param dataRange the range of values to display
 */
public void setDataRange(JRDataRange dataRange)
{
	Object old = this.dataRange;
	this.dataRange = dataRange;
	getEventSupport().firePropertyChange(PROPERTY_DATA_RANGE, old, this.dataRange);
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:13,代码来源:JRDesignThermometerPlot.java

示例4: setLowRange

import net.sf.jasperreports.charts.JRDataRange; //导入依赖的package包/类
/**
 * Specifies the low range of the thermometer.
 *
 * @param lowRange the low range of the thermometer
 */
public void setLowRange(JRDataRange lowRange)
{
	Object old = this.lowRange;
	this.lowRange = lowRange;
	getEventSupport().firePropertyChange(PROPERTY_LOW_RANGE, old, this.lowRange);
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:12,代码来源:JRDesignThermometerPlot.java

示例5: setMediumRange

import net.sf.jasperreports.charts.JRDataRange; //导入依赖的package包/类
/**
 * Specifies the medium range of the thermometer.
 *
 * @param mediumRange the medium range of the thermometer
 */
public void setMediumRange(JRDataRange mediumRange)
{
	Object old = this.mediumRange;
	this.mediumRange = mediumRange;
	getEventSupport().firePropertyChange(PROPERTY_MEDIUM_RANGE, old, this.mediumRange);
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:12,代码来源:JRDesignThermometerPlot.java

示例6: setHighRange

import net.sf.jasperreports.charts.JRDataRange; //导入依赖的package包/类
/**
 * Specifies the high range of the thermometer.
 *
 * @param highRange the high range of the thermometer
 */
public void setHighRange(JRDataRange highRange)
{
	Object old = this.highRange;
	this.highRange = highRange;
	getEventSupport().firePropertyChange(PROPERTY_HIGH_RANGE, old, this.highRange);
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:12,代码来源:JRDesignThermometerPlot.java

示例7: writeDataRange

import net.sf.jasperreports.charts.JRDataRange; //导入依赖的package包/类
/**
 * Writes a data range block to the output stream.
 *
 * @param dataRange the range to write
 */

public void writeDataRange(JRDataRange dataRange) throws IOException
{
	writer.startElement(JRXmlConstants.ELEMENT_dataRange, getNamespace());

	writeExpression(JRXmlConstants.ELEMENT_lowExpression, dataRange.getLowExpression(), false);
	writeExpression(JRXmlConstants.ELEMENT_highExpression, dataRange.getHighExpression(), false);
	writer.closeElement();
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:15,代码来源:JRXmlWriter.java

示例8: collect

import net.sf.jasperreports.charts.JRDataRange; //导入依赖的package包/类
/**
 *
 */
public void collect(JRDataRange dataRange)
{
	if (dataRange != null)
	{
		addExpression(dataRange.getLowExpression());
		addExpression(dataRange.getHighExpression());
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:12,代码来源:JRExpressionCollector.java

示例9: writeDataRange

import net.sf.jasperreports.charts.JRDataRange; //导入依赖的package包/类
/**
 * Writes a data range block to the output stream.
 *
 * @param dataRange the range to write
 */
public void writeDataRange( JRDataRange dataRange, String parentName, String dataRangeSuffix)
{
	if(dataRange != null)
	{
		String dataRangeName = parentName + dataRangeSuffix;
		write( "JRDesignDataRange " + dataRangeName + " = new JRDesignDataRange(" + parentName + ".get" + dataRangeSuffix + "());\n");
		writeExpression( dataRange.getLowExpression(), dataRangeName, "LowExpression");
		writeExpression( dataRange.getHighExpression(), dataRangeName, "HighExpression");
		write( parentName + ".set" + dataRangeSuffix + "(" + dataRangeName + ");\n");
		flush();
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:18,代码来源:JRApiWriter.java

示例10: convertRange

import net.sf.jasperreports.charts.JRDataRange; //导入依赖的package包/类
/**
 * Converts a JasperReport data range into one understood by JFreeChart.
 *
 * @param dataRange the JasperReport version of the range
 * @param evaluation current expression evaluation phase
 * @return the JFreeChart version of the range
 * @throws JRException thrown when the low value of the range is greater than the
 * 						high value
 */
protected Range convertRange(JRDataRange dataRange, byte evaluation) throws JRException
{
	if (dataRange == null)
	{
		return null;
	}
	Number low = (Number)evaluateExpression(dataRange.getLowExpression(), evaluation);
	Number high = (Number)evaluateExpression(dataRange.getHighExpression(), evaluation);
	return new Range( low != null ? low.doubleValue() : 0.0,
							 high != null ? high.doubleValue() : 100.0);
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:21,代码来源:JRFillChart.java

示例11: convertRange

import net.sf.jasperreports.charts.JRDataRange; //导入依赖的package包/类
/**
 * Converts a JasperReport data range into one understood by JFreeChart.
 *
 * @param dataRange the JasperReport version of the range
 * @return the JFreeChart version of the range
 * @throws JRException thrown when the low value of the range is greater than the
 * 						high value
 */
protected Range convertRange(JRDataRange dataRange) throws JRException
{
	if (dataRange == null)
	{
		return null;
	}

	Number low = (Number)evaluateExpression(dataRange.getLowExpression());
	Number high = (Number)evaluateExpression(dataRange.getHighExpression());
	return new Range( low != null ? low.doubleValue() : 0.0,
							 high != null ? high.doubleValue() : 100.0);
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:21,代码来源:DefaultChartTheme.java

示例12: getColumnText

import net.sf.jasperreports.charts.JRDataRange; //导入依赖的package包/类
/**
 * Return an appropriate string for every column of the table
 */
public String getColumnText(Object element, int columnIndex) {
	JRMeterInterval mi = (JRMeterInterval) element;
	JRDataRange dataRange = mi.getDataRange();

	switch (columnIndex) {
	case 0:
		return Misc.nvl(mi.getLabel(), ""); //$NON-NLS-1$
	case 1:
		AlfaRGB color = Colors.getSWTRGB4AWTGBColor(mi.getBackgroundColor());
		Double alfa = mi.getAlphaDouble();
		color.setAlfa(alfa != null ? alfa : 1.0d);
		RGB rgb = color.getRgb();
		return "RGBA (" + rgb.red + "," + rgb.green + "," + rgb.blue + "," + color.getAlfa()+")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
	case 2:
		if (dataRange != null) {
			JRExpression lowe = dataRange.getLowExpression();
			return lowe != null ? lowe.getText() : ""; //$NON-NLS-1$
		}
		break;
	case 3:
		if (dataRange != null) {
			JRExpression highe = dataRange.getHighExpression();
			return highe != null ? highe.getText() : ""; //$NON-NLS-1$
		}
		break;
	}
	return ""; //$NON-NLS-1$
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:32,代码来源:MeterIntervalsDialog.java

示例13: getDataRange

import net.sf.jasperreports.charts.JRDataRange; //导入依赖的package包/类
@Override
public JRDataRange getDataRange()
{
	return dataRange;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:6,代码来源:JRBaseThermometerPlot.java

示例14: getLowRange

import net.sf.jasperreports.charts.JRDataRange; //导入依赖的package包/类
@Override
public JRDataRange getLowRange()
{
	return lowRange;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:6,代码来源:JRBaseThermometerPlot.java

示例15: getMediumRange

import net.sf.jasperreports.charts.JRDataRange; //导入依赖的package包/类
@Override
public JRDataRange getMediumRange()
{
	return mediumRange;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:6,代码来源:JRBaseThermometerPlot.java


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