private static final String HEIGHT_PX = "500px";
public static void showDialog(ProjectId projectId, OWLEntity target) {
final DiscussionThreadPresenter presenter = new DiscussionThreadPresenter(projectId);
presenter.setTarget(target);
final Widget widget = presenter.getWidget();
widget.setSize(WIDTH_PX, HEIGHT_PX);
WebProtegeOKCancelDialogController<Void> controller = new WebProtegeOKCancelDialogController<Void>("Discussions") {
@Override
public Widget getWidget() {
return widget;
}
@Override
public Optional<Focusable> getInitialFocusable() {
return Optional.absent();
}
@Override
public Void getData() {
return null;
}
};
controller.setDialogButtonHandler(DialogButton.OK, new WebProtegeDialogButtonHandler<Void>() {
@Override
public void handleHide(Void data, WebProtegeDialogCloser closer) {
presenter.dispose();
closer.hide();
}
});
WebProtegeDialog.showDialog(controller);
}