use of com.sencha.gxt.widget.core.client.box.PromptMessageBox in project activityinfo by bedatadriven.
the class AnalysisView method ensureTitle.
private Promise<Void> ensureTitle() {
if (model.getWorking().isLoading()) {
return new Promise<>();
}
if (model.getWorking().get().getLabel().isPresent()) {
return Promise.done();
}
Promise<Void> result = new Promise<>();
PromptMessageBox box = new PromptMessageBox(I18N.CONSTANTS.save(), I18N.CONSTANTS.chooseReportTitle());
box.show();
box.addDialogHideHandler(new DialogHideEvent.DialogHideHandler() {
@Override
public void onDialogHide(DialogHideEvent event) {
if (event.getHideButton() == Dialog.PredefinedButton.OK) {
AnalysisView.this.model.updateTitle(box.getTextField().getValue());
result.resolve(null);
}
}
});
return result;
}
use of com.sencha.gxt.widget.core.client.box.PromptMessageBox in project activityinfo by bedatadriven.
the class DimensionPane method editTotalLabel.
private void editTotalLabel(EffectiveDimension dim) {
PromptMessageBox messageBox = new PromptMessageBox("Update total label:", "Enter the new label");
messageBox.getTextField().setText(dim.getTotalLabel());
messageBox.addDialogHideHandler(event -> {
if (event.getHideButton() == Dialog.PredefinedButton.OK) {
updateTotalLabel(dim, messageBox.getValue());
}
});
messageBox.show();
}
use of com.sencha.gxt.widget.core.client.box.PromptMessageBox in project activityinfo by bedatadriven.
the class DimensionPane method editLabel.
private void editLabel(DimensionModel dim) {
PromptMessageBox messageBox = new PromptMessageBox("Update dimension's label:", "Enter the new label");
messageBox.getTextField().setText(dim.getLabel());
messageBox.addDialogHideHandler(event -> {
if (event.getHideButton() == Dialog.PredefinedButton.OK) {
updateLabel(dim, messageBox.getValue());
}
});
messageBox.show();
}
use of com.sencha.gxt.widget.core.client.box.PromptMessageBox in project activityinfo by bedatadriven.
the class MeasurePane method editLabel.
private void editLabel(MeasureModel measure) {
PromptMessageBox messageBox = new PromptMessageBox("Update measure's alias:", "Enter the new alias");
messageBox.getTextField().setText(measure.getLabel());
messageBox.addDialogHideHandler(event -> {
if (event.getHideButton() == Dialog.PredefinedButton.OK) {
updateMeasureLabel(measure, messageBox.getValue());
}
});
messageBox.show();
}
Aggregations