@UiHandler("explanaionButton") public void ClickOnExplanationButton(ClickEvent clickEvent) { if (explanaionButton.getStyleName().equals(oeStyle.hintsActiveButton())) { explanationContainer.add(getHTML(collectionItemDo.getResource().getExplanation())); explanationContainer.addStyleName(oeStyle.explanationTextBorder()); explanaionButton.setStyleName(oeStyle.hintsInActiveButton()); startExplanationDataLogEvent(collectionItemDo.getResource().getExplanation()); } }
private Button buildRemoveParameterButton(final HorizontalPanel entry) { Button remButton = new Button(); remButton.setStyleName(removeParamButton.getStyleName()); remButton.setHTML(removeParamButton.getHTML()); remButton.addClickHandler( new ClickHandler() { public void onClick(ClickEvent event) { removeParameter(entry); enableSaveButton(); } }); return remButton; }
@UiHandler("hintsButton") public void ClickOnHintButton(ClickEvent clickEvent) { if (hintsButton.getStyleName().equals(oeStyle.hintsActiveButton())) { if (collectionItemDo.getResource().getHints().size() > hintsLength) { startHintDataLogEvent(getQuestionHintsDo(hintsLength).getHintId()); hintsContainer.add( getHTML(getQuestionHintsDo(hintsLength).getHintText(), oeStyle.hintsText())); hintsButton.setText( "" + i18n.GL0317() + " (" + ((collectionItemDo.getResource().getHints().size() - hintsLength) - 1) + " Left)"); hintsButton .getElement() .setAttribute( "alt", " " + i18n.GL0317() + " (" + collectionItemDo.getResource().getHints().size() + " Left)"); hintsButton .getElement() .setAttribute( "title", " " + i18n.GL0317() + " (" + collectionItemDo.getResource().getHints().size() + " Left)"); hintsLength++; if (collectionItemDo.getResource().getHints().size() == hintsLength) { hintsButton.setStyleName(oeStyle.hintsInActiveButton()); } } else { hintsButton.setStyleName(oeStyle.hintsInActiveButton()); } } }