setHorizontalAlignment が 2 つのボタンを左から中央に移動することを期待します。なぜこれが機能しないのですか?関連するコードはすべて以下にあり、非常に簡単です。
public void onClick(ClickEvent event) {
final DialogBox deleteDialog = new DialogBox();
deleteDialog.setModal(false);
deleteDialog.setGlassEnabled(true);
HorizontalPanel buttonPane = new HorizontalPanel();
buttonPane.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
buttonPane.add(deleteDialogOKButton);
buttonPane.add(deleteDialogCancelButton);
deleteDialog.center();
deleteDialog.add(buttonPane);
deleteDialog.setText("Delete this Station?");
deleteDialogOKButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
stationService.deleteStation(station, new DeleteStationCallback());
deleteDialog.hide();
}});
deleteDialogCancelButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
deleteDialog.hide();
}});
deleteDialog.show();
//stationService.deleteStation(station, new DeleteStationCallback());
}
}