GWT.getHostPageBaseURL() + URL_SERVICE);
// 匿名インナークラス受渡し用変数へ格納する
this.resultPanel = this;
final Canvas canvas = Canvas.createIfSupported();
//final Context2d ctx = null;
if(canvas==null){
GWT.log("[ResultPanel:constructor] canvas not support");
// テーブルで代替
FlexTable resultTbl = new FlexTable();
if(y>0) resultTbl.setText(0, 0, TBL_2ND_EXT + TBL_COORD_X);
else resultTbl.setText(0, 1, TBL_2ND_EXT + TBL_COORD_X);
resultTbl.setText(0, 1, TBL_1ST + TBL_COORD_Y);
resultTbl.setText(1, 0, Integer.toString(x));
resultTbl.setText(1, 1, Integer.toString(y));
resultTbl.setBorderWidth(1);
resultTbl.setStyleName("center");
this.add(resultTbl);
GWT.log("[ResultPanel:constructor] added table");
}else{
// if(canvas!=null){
canvas.setCoordinateSpaceWidth(400);
canvas.setCoordinateSpaceHeight(400);
Context2d ctx = canvas.getContext2d();
// グラフベースを描画
ResultPanel.drawGraphBase(ctx);
// 結果を描画
ResultPanel.writePoint(ctx, x, y, 5,
Utils.getTypeColor(y, x));
// ツールチップでスコア詳細をだす
canvas.setTitle(ClientUtils.getTooltipMsg(x, y));
this.add(canvas);
GWT.log("[ResultPanel:constructor] added rader canvas");
}
// 非同期で統計情報を表示する
GWT.log("[ResultPanel:constructor] prepare requesting summary " +
"to server");
if(canvas!=null){
service.getResults(new AsyncCallback<List<long[]>>(){
@Override
public void onFailure(Throwable caught) {
GWT.log("[ResultPanel:constructor>Async:RESULTS:" +
"onFailure()] called", caught);
}
@Override
public void onSuccess(List<long[]> result) {
long elapse = System.currentTimeMillis();
GWT.log("[ResultPanel:constructor>Async:RESULTS:" +
"onFailure()] start: "+result);
Context2d ctx = canvas.getContext2d();
ResultPanel.writeGrayPoints(ctx, result);
ResultPanel.writePoint(ctx, x, y, 5,
Utils.getTypeColor(y, x));
GWT.log("[ResultPanel:constructor>Async:RESULTS:" +
"onFailure()] end: " +