1

hii gwt プロジェクトでクリック可能なイメージ マップが必要です...単純な XY マップを作成しましたが、今はクリック可能なイメージマップが必要です...助けてください マウス オーバー効果が発生するグラフを作成したいだけです....ここに私のコードがあります

public class ChartGenerator extends ApplicationFrame{

private List<String> trainTypeArray = new ArrayList<String>();
private String lineType;
private List<Long> startTimeOfTrain = new ArrayList<Long>();
private List<Boolean> labelVisibility = new ArrayList<Boolean>();
private List<Integer>  stationDistance= new ArrayList<Integer>();
private List<String> lineColorArray = new ArrayList<String>();
private List<String> lineShadeArray = new ArrayList<String>();
private List<String> stationNames = new ArrayList<String>();
private List<String> trainArray = new ArrayList<String>();

private JFreeChart chart =null;
private int startTimeLong;
private int endTimeLong;
private String timezone;
private boolean prediction;
public ChartGenerator(String title, Date dt, String startTime, String endTime, String serviceDirection, String lineType, int delay, boolean prediction) throws BombardierBaseException, BombardierException {
    /*super(title)*/;       
    String[] startSplit = startTime.split(":");
    String[] endTimeSplit = endTime.split(":");
    this.timezone = startTime +"-"+endTime;
     startTimeLong = Integer.parseInt(startSplit[0])*60*60*1000+Integer.parseInt(startSplit[1])*60*1000;
     endTimeLong = Integer.parseInt(endTimeSplit[0])*60*60*1000+Integer.parseInt(endTimeSplit[1])*60*1000;
     endTimeLong = endTimeLong+(60*1000);
     this.prediction = prediction;
    SimpleDateFormat sdf = new SimpleDateFormat("dd-MMM-yy");
    String dtOfJourney = "'" +sdf.format(dt)+"'";
    this.lineType = lineType;
    System.out.println("Create data-set now");
    final XYDataset dataset = createDataset(dtOfJourney, startTimeLong,endTimeLong,serviceDirection);
    chart= createChart(dataset, dtOfJourney, serviceDirection);


}

public int getStartTimeLong() {
    return startTimeLong;
}

public void setStartTimeLong(int startTimeLong) {
    this.startTimeLong = startTimeLong;
}

public int getEndTimeLong() {
    return endTimeLong;
}

public JFreeChart getChart(){
    return chart;
}

public BufferedImage getBufferedImage(int width, int height){
    ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection());
    return this.chart.createBufferedImage(width,height, info);      
}



private double getStationDistion(String name){
    return InitializeProperties.getStationDistance(name);       
}


private XYDataset createDataset(String dtOfJourney, long startTime,long endTime,String serviceDirection) throws BombardierBaseException {
    ResultSet resultSet =null;
    Statement readstatement = null;
    Connection con = null;
    System.out.println("Entering get Connection now");
    System.out.flush();
    try{
        System.out.println("Getting connection");
        System.out.flush();
        con = InitializeProperties.getConnection();
        System.out.println("Connection initialized");
        System.out.flush();
        readstatement= con.createStatement();

        final XYSeriesCollection dataset1 = new XYSeriesCollection();


        String lineTypeFilter = "";
        if(!this.lineType.equals("A")){
            if(lineType.equals("L")){
                lineTypeFilter = "and lt.act_lineType like ' '";
            }else{
                lineTypeFilter = "and lt.act_lineType like '" + this.lineType + "'";
            }
        }


        int n = 0;
        String serviceDirectionClause = "";
4

0 に答える 0