package com.csair.gsms.client.view.transfer;
import java.awt.Color;
import java.awt.Font;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.StandardChartTheme;
import org.jfree.chart.axis.DateAxis;
import org.jfree.chart.axis.DateTickUnit;
import org.jfree.chart.axis.NumberAxis;
import org.jfree.chart.labels.StandardXYToolTipGenerator;
import org.jfree.chart.plot.XYPlot;
import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer;
import org.jfree.data.time.Day;
import org.jfree.data.time.TimeSeries;
import org.jfree.data.time.TimeSeriesCollection;
import org.jfree.experimental.chart.swt.ChartComposite;
import com.csair.gsms.client.common.util.DateUtil;
import com.csair.gsms.ghc.client.core.fltPsgrLugStatistics.FDLTrsConditionItem;
import com.csair.gsms.ghc.client.core.fltPsgrLugStatistics.FDLTrsCountInfoItem;
public class TransferPredictionChart extends Composite {
public static final String[] lineTitle = {"中转人数","vip人数","两舱人数"};
public static final Integer lineCount = 1;
private String chartTitle;
private List<Map<String,Integer>> transList = new ArrayList<Map<String,Integer>>();
/**
* 重载的构造方法
* @param parent 父面板
* @param style 样式
*/
public TransferPredictionChart(Composite parent, int style) {
super(parent, style);
createContents();
}
/**
* 根据查询条件生成图形的标题(格式:始发站三字码-中转站三字码-目的地三字码)
* @param conditionItem 查询条件
*/
public void setChartTitle(FDLTrsConditionItem conditionItem){
StringBuffer title = new StringBuffer();
String depCd,arvCD;
depCd = conditionItem.getdDepCd()==null?"":conditionItem.getdDepCd();
depCd = "".equals(depCd)?conditionItem.getiDepCd()==null?"":conditionItem.getiDepCd():depCd;
arvCD = conditionItem.getdArvCd()==null?"":conditionItem.getdArvCd();
arvCD = "".equals(arvCD)?conditionItem.getiArvCd()==null?"":conditionItem.getiArvCd():arvCD;
title.append("".equals(depCd)?"全部":depCd);
title.append("-");
title.append(conditionItem.getTransferCd());
title.append("-");
title.append("".equals(arvCD)?"全部":arvCD);
this.chartTitle = title.toString();
import java.awt.Color;
import java.awt.Font;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.StandardChartTheme;
import org.jfree.chart.axis.DateAxis;
import org.jfree.chart.axis.DateTickUnit;
import org.jfree.chart.axis.NumberAxis;
import org.jfree.chart.labels.StandardXYToolTipGenerator;
import org.jfree.chart.plot.XYPlot;
import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer;
import org.jfree.data.time.Day;
import org.jfree.data.time.TimeSeries;
import org.jfree.data.time.TimeSeriesCollection;
import org.jfree.experimental.chart.swt.ChartComposite;
import com.csair.gsms.client.common.util.DateUtil;
import com.csair.gsms.ghc.client.core.fltPsgrLugStatistics.FDLTrsConditionItem;
import com.csair.gsms.ghc.client.core.fltPsgrLugStatistics.FDLTrsCountInfoItem;
public class TransferPredictionChart extends Composite {
public static final String[] lineTitle = {"中转人数","vip人数","两舱人数"};
public static final Integer lineCount = 1;
private String chartTitle;
private List<Map<String,Integer>> transList = new ArrayList<Map<String,Integer>>();
/**
* 重载的构造方法
* @param parent 父面板
* @param style 样式
*/
public TransferPredictionChart(Composite parent, int style) {
super(parent, style);
createContents();
}
/**
* 根据查询条件生成图形的标题(格式:始发站三字码-中转站三字码-目的地三字码)
* @param conditionItem 查询条件
*/
public void setChartTitle(FDLTrsConditionItem conditionItem){
StringBuffer title = new StringBuffer();
String depCd,arvCD;
depCd = conditionItem.getdDepCd()==null?"":conditionItem.getdDepCd();
depCd = "".equals(depCd)?conditionItem.getiDepCd()==null?"":conditionItem.getiDepCd():depCd;
arvCD = conditionItem.getdArvCd()==null?"":conditionItem.getdArvCd();
arvCD = "".equals(arvCD)?conditionItem.getiArvCd()==null?"":conditionItem.getiArvCd():arvCD;
title.append("".equals(depCd)?"全部":depCd);
title.append("-");
title.append(conditionItem.getTransferCd());
title.append("-");
title.append("".equals(arvCD)?"全部":arvCD);
this.chartTitle = title.toString();