mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-08 18:30:42 +00:00
fix some warnings
This commit is contained in:
parent
85bf7df675
commit
43d1a80242
@ -11,16 +11,19 @@ import com.vaadin.flow.i18n.LocaleChangeObserver;
|
||||
* Provides a GUI in form of buttons for the user to navigate through steps.
|
||||
*/
|
||||
public class ControlPanel extends HorizontalLayout implements LocaleChangeObserver {
|
||||
public static final String ID = "control-panel";
|
||||
|
||||
private static final String ATTRIBUTE_TITLE = "title";
|
||||
|
||||
private static final String ID = "control-panel";
|
||||
|
||||
private final Button firstStep;
|
||||
public static final String FIRST_STEP_ID = "first-step";
|
||||
private static final String FIRST_STEP_ID = "first-step";
|
||||
private final Button lastStep;
|
||||
public static final String LAST_STEP_ID = "last-step";
|
||||
private static final String LAST_STEP_ID = "last-step";
|
||||
private final Button nextStep;
|
||||
public static final String NEXT_STEP_ID = "next-step";
|
||||
private static final String NEXT_STEP_ID = "next-step";
|
||||
private final Button previousStep;
|
||||
public static final String PREVIOUS_STEP_ID = "previous-step";
|
||||
private static final String PREVIOUS_STEP_ID = "previous-step";
|
||||
private final Button share;
|
||||
|
||||
/**
|
||||
@ -90,10 +93,10 @@ public class ControlPanel extends HorizontalLayout implements LocaleChangeObserv
|
||||
|
||||
@Override
|
||||
public void localeChange(LocaleChangeEvent event) {
|
||||
share.getElement().setAttribute("title", getTranslation("root.shareButtonTooltip"));
|
||||
firstStep.getElement().setAttribute("title", getTranslation("root.firstStepTooltip"));
|
||||
previousStep.getElement().setAttribute("title", getTranslation("root.previousStepTooltip"));
|
||||
nextStep.getElement().setAttribute("title", getTranslation("root.nextStepTooltip"));
|
||||
lastStep.getElement().setAttribute("title", getTranslation("root.lastStepTooltip"));
|
||||
share.getElement().setAttribute(ATTRIBUTE_TITLE, getTranslation("root.shareButtonTooltip"));
|
||||
firstStep.getElement().setAttribute(ATTRIBUTE_TITLE, getTranslation("root.firstStepTooltip"));
|
||||
previousStep.getElement().setAttribute(ATTRIBUTE_TITLE, getTranslation("root.previousStepTooltip"));
|
||||
nextStep.getElement().setAttribute(ATTRIBUTE_TITLE, getTranslation("root.nextStepTooltip"));
|
||||
lastStep.getElement().setAttribute(ATTRIBUTE_TITLE, getTranslation("root.lastStepTooltip"));
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ public class MathjaxProofTree extends LitTemplate implements MathjaxAdapter {
|
||||
|
||||
private int stepCount = -1;
|
||||
|
||||
// initialized by Vaadin
|
||||
@Id("tc-content")
|
||||
private Div content;
|
||||
|
||||
@ -36,6 +37,10 @@ public class MathjaxProofTree extends LitTemplate implements MathjaxAdapter {
|
||||
content.add(latex);
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by mathjax-proof-tree.ts to set the calculated number of steps in the tree.
|
||||
* @param stepCount number of steps in tree
|
||||
*/
|
||||
@ClientCallable
|
||||
private void setStepCount(int stepCount) {
|
||||
this.stepCount = stepCount;
|
||||
|
@ -20,6 +20,7 @@ public class MathjaxUnification extends LitTemplate implements MathjaxAdapter {
|
||||
|
||||
private final String[] latex;
|
||||
|
||||
// initialized by Vaadin
|
||||
@Id("tc-content")
|
||||
private Div content;
|
||||
|
||||
|
@ -27,13 +27,14 @@ public class ConstraintSetIndexFactory {
|
||||
* @return the next constraint set index
|
||||
*/
|
||||
protected String nextConstraintSetIndex() {
|
||||
String index = nextConstraintSetIndex == FIRST_CONSTRAINT_SET_INDEX
|
||||
? ""
|
||||
: nextConstraintSetIndex == FIRST_CONSTRAINT_SET_INDEX + 1
|
||||
String realIndex = nextConstraintSetIndex == FIRST_CONSTRAINT_SET_INDEX + 1
|
||||
? "" + UNDERSCORE + CURLY_LEFT + LET + CURLY_RIGHT
|
||||
: "" + UNDERSCORE + CURLY_LEFT + LET + UNDERSCORE
|
||||
+ CURLY_LEFT + nextConstraintSetIndex + CURLY_RIGHT + CURLY_RIGHT;
|
||||
|
||||
String index = nextConstraintSetIndex == FIRST_CONSTRAINT_SET_INDEX
|
||||
? ""
|
||||
: realIndex;
|
||||
nextConstraintSetIndex++;
|
||||
return index;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user