Tooltip back-button in exampleDialog

This commit is contained in:
Moritz Dieing 2021-07-11 12:01:15 +02:00
parent 478cd97706
commit 0cf0333289
3 changed files with 7 additions and 4 deletions

View File

@ -20,7 +20,7 @@ import com.vaadin.flow.component.textfield.TextField;
public class AssumptionExampleContent extends VerticalLayout { public class AssumptionExampleContent extends VerticalLayout {
private static final long serialVersionUID = -8157345417001452273L; private static final long serialVersionUID = -8157345417001452273L;
private static final String SELECTED_TERM_BAR_ID = "selected-term-bar"; // exchange with better name private static final String SELECTED_TERM_BAR_ID = "selected-term-bar";
private static final String SELCETED_TERM_ID = "selected-term"; private static final String SELCETED_TERM_ID = "selected-term";
/** /**
@ -37,10 +37,11 @@ public class AssumptionExampleContent extends VerticalLayout {
selectedTerm.setReadOnly(true); selectedTerm.setReadOnly(true);
selectedTerm.setId(SELCETED_TERM_ID); selectedTerm.setId(SELCETED_TERM_ID);
Icon goBack = VaadinIcon.ANGLE_DOUBLE_LEFT.create(); Icon backButton = VaadinIcon.ANGLE_DOUBLE_LEFT.create();
goBack.addClickListener(event -> backwardsCallback.run()); backButton.addClickListener(event -> backwardsCallback.run());
backButton.getElement().setAttribute("title", getTranslation("root.backButtonTooltip"));
VerticalLayout selectedTermBar = new VerticalLayout(goBack, selectedTerm); VerticalLayout selectedTermBar = new VerticalLayout(backButton, selectedTerm);
selectedTermBar.setId(SELECTED_TERM_BAR_ID); selectedTermBar.setId(SELECTED_TERM_BAR_ID);
this.add(selectedTermBar); this.add(selectedTermBar);

View File

@ -168,6 +168,7 @@ root.lastStepTooltip=Letzter Schritt
root.firstStepTooltip=Erster Schritt root.firstStepTooltip=Erster Schritt
root.previousStepTooltip=Vorheriger Schritt root.previousStepTooltip=Vorheriger Schritt
root.nextStepTooltip=Nächster Schritt root.nextStepTooltip=Nächster Schritt
root.backButtonTooltip=Zurück
root.selectedTerm=Ausgewählter Term root.selectedTerm=Ausgewählter Term
root.absLetLatex=\ root.absLetLatex=\

View File

@ -157,6 +157,7 @@ root.lastStepTooltip=Last step
root.firstStepTooltip=First step root.firstStepTooltip=First step
root.previousStepTooltip=Previous step root.previousStepTooltip=Previous step
root.nextStepTooltip=Next step root.nextStepTooltip=Next step
root.backButtonTooltip=Back
root.selectedTerm=Selected term root.selectedTerm=Selected term
root.absLetLatex=\ root.absLetLatex=\