當前位置: 首頁>>代碼示例>>Java>>正文


Java TimePeriodEnum類代碼示例

本文整理匯總了Java中net.sf.jasperreports.charts.type.TimePeriodEnum的典型用法代碼示例。如果您正苦於以下問題:Java TimePeriodEnum類的具體用法?Java TimePeriodEnum怎麽用?Java TimePeriodEnum使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TimePeriodEnum類屬於net.sf.jasperreports.charts.type包,在下文中一共展示了TimePeriodEnum類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: writeTimeSeriesDataset

import net.sf.jasperreports.charts.type.TimePeriodEnum; //導入依賴的package包/類
private void writeTimeSeriesDataset(JRTimeSeriesDataset dataset) throws IOException
{
	writer.startElement(JRXmlConstants.ELEMENT_timeSeriesDataset);
	writer.addAttribute(JRXmlConstants.ATTRIBUTE_timePeriod, TimePeriodEnum.getByValue(dataset.getTimePeriod()), TimePeriodEnum.DAY);

	writeElementDataset( dataset );

	JRTimeSeries[] timeSeries = dataset.getSeries();
	if( timeSeries != null && timeSeries.length > 0 )
	{
		for( int i = 0; i < timeSeries.length; i++ )
		{
			writeTimeSeries( timeSeries[i] );
		}
	}

	writer.closeElement();
}
 
開發者ID:TIBCOSoftware,項目名稱:jasperreports,代碼行數:19,代碼來源:JRXmlWriter.java

示例2: createPropertyDescriptors

import net.sf.jasperreports.charts.type.TimePeriodEnum; //導入依賴的package包/類
/**
 * Creates the property descriptors.
 * 
 * @param desc
 *            the desc
 */
@Override
public void createPropertyDescriptors(List<IPropertyDescriptor> desc,
		Map<String, Object> defaultsMap) {
	super.createPropertyDescriptors(desc, defaultsMap);

	JSSEnumPropertyDescriptor timePeriodD = new JSSEnumPropertyDescriptor(
			JRDesignTimeSeriesDataset.PROPERTY_TIME_PERIOD,
			Messages.MChartTimeSeriesDataset_time_period,
			TimePeriodEnum.class, NullEnum.NULL);
	timePeriodD
			.setDescription(Messages.MChartTimeSeriesDataset_time_period_description);
	desc.add(timePeriodD);

	timePeriodD
			.setCategory(Messages.MChartTimeSeriesDataset_chart_time_period_dataset_category);

	defaultsMap.put(JRDesignTimeSeriesDataset.PROPERTY_TIME_PERIOD,
			TimePeriodEnum.DAY.getTimePeriod());

	setHelpPrefix(desc,
			"net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#timeSeriesDataset");
}
 
開發者ID:OpenSoftwareSolutions,項目名稱:PDFReporter-Studio,代碼行數:29,代碼來源:MChartTimeSeriesDataset.java

示例3: getPropertyValue

import net.sf.jasperreports.charts.type.TimePeriodEnum; //導入依賴的package包/類
@Override
public Object getPropertyValue(Object id) {
	JRDesignTimeSeriesDataset jrElement = (JRDesignTimeSeriesDataset) getValue();
	if (jrElement != null)
		if (id.equals(JRDesignTimeSeriesDataset.PROPERTY_TIME_PERIOD)) {
			if (jrElement.getTimePeriod() == null)
				return 0;
			TimePeriodEnum tpe = TimePeriodEnum.getByValue(jrElement
					.getTimePeriod());
			TimePeriodEnum[] tpevalues = TimePeriodEnum.values();
			for (int i = 0; i < tpevalues.length; i++) {
				if (tpe.equals(tpevalues[i]))
					return i + 1;
			}
			// Class<?> timePeriod = jrElement.getTimePeriod();
			// if (timePeriod != null)
			// return timePeriod.toString();
			// return null;
		}

	return super.getPropertyValue(id);
}
 
開發者ID:OpenSoftwareSolutions,項目名稱:PDFReporter-Studio,代碼行數:23,代碼來源:MChartTimeSeriesDataset.java

示例4: setData

import net.sf.jasperreports.charts.type.TimePeriodEnum; //導入依賴的package包/類
@Override
public void setData(JSSDrawVisitor drawVisitor, JRDesignElement jrChart,
		JRDesignElementDataset eDataset,
		JasperReportsConfiguration jrContext) {
	Assert.isTrue(eDataset instanceof JRDesignTimeSeriesDataset);
	super.setData(drawVisitor, jrChart, eDataset, jrContext);
	dataset = (JRDesignTimeSeriesDataset) eDataset;
	setSeries(0);

	TimePeriodEnum tpe = TimePeriodEnum.getByValue(dataset.getTimePeriod());
	if (tpe == null) {
		timePeriodCombo.select(5);
	} else {
		TimePeriodEnum[] tpevalues = TimePeriodEnum.values();
		for (int i = 0; i < tpevalues.length; i++) {
			if (tpe.equals(tpevalues[i])) {
				timePeriodCombo.select(i + 1);
				break;
			}
		}
	}
}
 
開發者ID:OpenSoftwareSolutions,項目名稱:PDFReporter-Studio,代碼行數:23,代碼來源:DSTimeSeries.java

示例5: TimeSeriesDatasetPanel

import net.sf.jasperreports.charts.type.TimePeriodEnum; //導入依賴的package包/類
/** Creates new form PieDatasetPanel */
public TimeSeriesDatasetPanel() {
    initComponents();
    //applyI18n();
    
    // Year | Quarter | Month | Week | Day | Hour | Minute | Second | Milisecond
    // Year | Quarter | Month | Week | Day | Hour | Minute | Second | Milisecond
    this.jComboBoxPeriod.addItem(new Tag(TimePeriodEnum.YEAR.getTimePeriod() ,I18n.getString("Global.ComboBox.Year")));
    this.jComboBoxPeriod.addItem(new Tag(TimePeriodEnum.QUARTER.getTimePeriod(),I18n.getString("Global.ComboBox.Quarter")));
    this.jComboBoxPeriod.addItem(new Tag(TimePeriodEnum.MONTH.getTimePeriod(),I18n.getString("Global.ComboBox.Month")));
    this.jComboBoxPeriod.addItem(new Tag(TimePeriodEnum.WEEK.getTimePeriod(),I18n.getString("Global.ComboBox.Week")));
    this.jComboBoxPeriod.addItem(new Tag(TimePeriodEnum.DAY.getTimePeriod(),I18n.getString("Global.ComboBox.Day")));
    this.jComboBoxPeriod.addItem(new Tag(TimePeriodEnum.HOUR.getTimePeriod(),I18n.getString("Global.ComboBox.Hour")));
    this.jComboBoxPeriod.addItem(new Tag(TimePeriodEnum.MINUTE.getTimePeriod(),I18n.getString("Global.ComboBox.Minute")));
    this.jComboBoxPeriod.addItem(new Tag(TimePeriodEnum.SECOND.getTimePeriod(),I18n.getString("Global.ComboBox.Second")));
    this.jComboBoxPeriod.addItem(new Tag(TimePeriodEnum.MILLISECOND.getTimePeriod(),I18n.getString("Global.ComboBox.Milisecond")));
    
    jList1.setModel( new javax.swing.DefaultListModel());
    jList1.setCellRenderer(new DatasetListsCellRenderer());
}
 
開發者ID:JockiHendry,項目名稱:ireport-fork,代碼行數:21,代碼來源:TimeSeriesDatasetPanel.java

示例6: setTimeSeriesDataset

import net.sf.jasperreports.charts.type.TimePeriodEnum; //導入依賴的package包/類
public void setTimeSeriesDataset(JRDesignTimeSeriesDataset timeSeriesDataset) {
    
    init = true;
    this.timeSeriesDataset = timeSeriesDataset;
    
    jButtonModify.setEnabled( false );
    jButtonModify.setEnabled( false );
    javax.swing.DefaultListModel lm = (javax.swing.DefaultListModel)jList1.getModel();
    
    lm.removeAllElements();
    
    List series = timeSeriesDataset.getSeriesList();
                    
    for (int i=0; i< series.size(); ++i)
    {
        lm.addElement(series.get(i) );
    }
    
    if (timeSeriesDataset.getTimePeriod() == null)
    {
        timeSeriesDataset.setTimePeriod(TimePeriodEnum.DAY.getTimePeriod()); //JRXmlConstants.getTimePeriod("Day"));
    }
    
    Misc.setComboboxSelectedTagValue(jComboBoxPeriod, timeSeriesDataset.getTimePeriod() );
    init = false;
}
 
開發者ID:JockiHendry,項目名稱:ireport-fork,代碼行數:27,代碼來源:TimeSeriesDatasetPanel.java


注:本文中的net.sf.jasperreports.charts.type.TimePeriodEnum類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。