private Widget addPopupMenu( final MenuLabel menuLabel, final MenuSource menuSource, boolean left) { final Widget label = menuLabel.asWidget(); label.setStylePrimaryName("rstudio-StrongLabel"); label.getElement().getStyle().setCursor(Style.Cursor.DEFAULT); label.getElement().getStyle().setOverflow(Overflow.HIDDEN); if (left) addLeftWidget(label); else addRightWidget(label); Image image = new Image(ThemeResources.INSTANCE.menuDownArrow()); image.getElement().getStyle().setMarginLeft(5, Unit.PX); image.getElement().getStyle().setMarginRight(8, Unit.PX); image.getElement().getStyle().setMarginBottom(2, Unit.PX); if (left) addLeftWidget(image); else addRightWidget(image); final ClickHandler clickHandler = new ClickHandler() { public void onClick(ClickEvent event) { ToolbarPopupMenu menu = menuSource.getMenu(); menu.showRelativeTo(label); menu.getElement().getStyle().setPaddingTop(3, Style.Unit.PX); } }; menuLabel.addClickHandler(clickHandler); image.addClickHandler(clickHandler); return image; }
public DeviceUc(SimplePanel wrapperPanel, HeaderUc headerUc) { initWidget(uiBinder.createAndBindUi(this)); this.headerUc = headerUc; this.wrapperPanel = wrapperPanel; androidSectiondiv.getElement().setId("pnlAndroidSectiondiv"); ipadSectiondiv.getElement().setId("pnlIpadSectiondiv"); msglinkPanel.getElement().setId("pnlMsglinkPanel"); msgPanel.getElement().setId("pnlMsgPanel"); closeAndriodBtn.getElement().setId("imgCloseAndriodBtn"); closeIpadBtn.getElement().setId("imgCloseIpadBtn"); gooruPanel.getElement().setId("pnlGooruPanel"); ednovoPanel.getElement().setId("pnlEdnovoPanel"); appstorePanel.getElement().setId("pnlAppstorePanel"); viewAnchor.getElement().setId("lnkViewAnchor"); setUiText(); if (isIpad && !StringUtil.IPAD_MESSAGE_Close_Click) { ipadSectiondiv.setVisible(true); androidSectiondiv.setVisible(false); ipadSectiondiv.getElement().setAttribute("style", "margin-top:-20px;"); wrapperPanel.getElement().setAttribute("style", "margin-top:0px;"); headerUc.getElement().getFirstChildElement().setAttribute("style", "position:relative;"); } else if (isAndriod && !StringUtil.IPAD_MESSAGE_Close_Click) { ipadSectiondiv.setVisible(false); androidSectiondiv.setVisible(true); androidSectiondiv.getElement().setAttribute("style", "margin-top:-20px;"); wrapperPanel.getElement().setAttribute("style", "margin-top:0px;"); headerUc.getElement().getFirstChildElement().setAttribute("style", "position:relative;"); } }
private void addToolbar(Element el, boolean isSetupChunk, AceEditorNative editor) { FlowPanel toolbarPanel = new FlowPanel(); toolbarPanel.addStyleName(ThemeStyles.INSTANCE.inlineChunkToolbar()); boolean isDark = themes_.isDark(themes_.getEffectiveThemeName(uiPrefs_.theme().getValue())); if (isSetupChunk) { Image optionsIcon = createOptionsIcon(isDark, true); toolbarPanel.add(optionsIcon); } else { Image optionsIcon = createOptionsIcon(isDark, false); optionsIcon.getElement().getStyle().setMarginRight(9, Unit.PX); toolbarPanel.add(optionsIcon); // Note that 'run current chunk' currently only operates within Rmd if (editor.getSession().getMode().getId().equals("mode/rmarkdown")) { Image runPreviousIcon = createRunPreviousIcon(isDark); runPreviousIcon.getElement().getStyle().setMarginRight(8, Unit.PX); toolbarPanel.add(runPreviousIcon); Image runIcon = createRunIcon(); toolbarPanel.add(runIcon); } } display(toolbarPanel, el); }
@Override public void withLogo(ImageResource resource) { final Image logo = new Image(resource); logo.getElement().getStyle().setMarginTop(-18, Style.Unit.PX); logo.getElement().getStyle().setMarginBottom(-18, Style.Unit.PX); logo.setStyleName(Styles.IMG_RESPONSIVE); root.appendChild(logo.getElement()); }
/** * Create a slider bar. * * @param minValue the minimum value in the range * @param maxValue the maximum value in the range * @param labelFormatter the label formatter * @param images the images to use for the slider */ public SliderBar(double minValue, double maxValue, LabelFormatter labelFormatter) { super(); resources.sliderBarCss().ensureInjected(); this.minValue = minValue; this.maxValue = maxValue; setLabelFormatter(labelFormatter); // Create the outer shell DOM.setStyleAttribute(getElement(), "position", "relative"); // $NON-NLS-1$ //$NON-NLS-2$ setStyleName("gwt-SliderBar-shell"); // $NON-NLS-1$ // Create the line lineElement = DOM.createDiv(); DOM.appendChild(getElement(), lineElement); DOM.setStyleAttribute(lineElement, "position", "absolute"); // $NON-NLS-1$ //$NON-NLS-2$ DOM.setElementProperty( lineElement, "className", "gwt-SliderBar-line"); // $NON-NLS-1$ //$NON-NLS-2$ // Create the knob knobImage.setResource(resources.slider()); Element knobElement = knobImage.getElement(); DOM.appendChild(getElement(), knobElement); DOM.setStyleAttribute(knobElement, "position", "absolute"); // $NON-NLS-1$ //$NON-NLS-2$ DOM.setElementProperty( knobElement, "className", "gwt-SliderBar-knob"); // $NON-NLS-1$ //$NON-NLS-2$ sinkEvents(Event.MOUSEEVENTS | Event.KEYEVENTS | Event.FOCUSEVENTS); }
public SimpleComposite() { label = new Label(); img = new Image("img/logo.PNG"); img.getElement().setId("pc-template-img"); // The wrapper panel FlowPanel panel = new FlowPanel(); panel.getElement().setClassName("composite"); panel.add(img); panel.add(label); // All composites must call initWidget() in their constructors. initWidget(panel); // Add mouse move handler to the image img.addMouseMoveHandler( new MouseMoveHandler() { public void onMouseMove(MouseMoveEvent event) { label.setText("mouse moved on picture !"); } }); }
/** * @function setLabelsAndIds * @created_date : Jan 2, 2014 * @description To set Labels and Id for buttons. * @parm(s) : * @return : void * @throws : <Mentioned if any exceptions> */ private void setLabelsAndIds() { btnResourceLink.setText(i18n.GL0548()); btnResourceLink.getElement().setId("btnResourceLink"); btnResourceLink.getElement().setAttribute("alt", i18n.GL0548()); btnResourceLink.getElement().setAttribute("title", i18n.GL0548()); lblGooruFieldTrip.setText(i18n.GL0549()); lblGooruFieldTrip.getElement().setId("lblGooruFieldTrip"); lblGooruFieldTrip.getElement().setAttribute("alt", i18n.GL0549()); lblGooruFieldTrip.getElement().setAttribute("title", i18n.GL0549()); // lblGooruFieldTripDescUnforseen.setText(i18n.GL0550); // lblGooruFieldTripDescOriginal.setText(i18n.GL0552); lblGooruFieldTripDescOriginal.setText(""); lblGooruFieldTripDescOriginal.getElement().setId("lblGooruFieldTripDescOriginal"); lblGooruFieldTripDescOriginal.getElement().setAttribute("alt", ""); lblGooruFieldTripDescOriginal.getElement().setAttribute("title", ""); lblDontForget.setText(i18n.GL0551()); lblDontForget.getElement().setId("lblDontForget"); lblDontForget.getElement().setAttribute("alt", i18n.GL0551()); lblDontForget.getElement().setAttribute("title", i18n.GL0551()); imgFieldTrip.getElement().setId("imgFieldTrip"); imgFieldTrip.setUrl("images/framebraker/field-trip.png"); resoruceFrameBrakerContainer.getElement().setId("fpnlResoruceFrameBrakerContainer"); resourceCategory.getElement().setId("pnlResourceCategory"); lblGooruFieldTripDescUnforseen.getElement().setId("lblGooruFieldTripDescUnforseen"); supportTip.getElement().setId("lblSupportTip"); // learnMoreLbl.setText("Learn more."); }
@UiConstructor public PreviewResourceView(CollectionItemDo collectionItemDo, int itemIndex) { initWidget(uiBinder.createAndBindUi(this)); resourceThumbContainer.getElement().setId("fpnlResourceThumbContainer"); resourceImageContainer.getElement().setId("fpnlResourceImageContainer"); resourceThumbnail.getElement().setId("imgResourceThumbnail"); resourceTypeImage.getElement().setId("lblResourceTypeImage"); resourceNumber.getElement().setId("lblResourceNumber"); resourceTitle.getElement().setId("htmlResourceTitle"); resourceIndex.getElement().setId("lblResourceIndex"); resourceHoverTitle.getElement().setId("htmlResourceHoverTitle"); resourceCategory.getElement().setId("lblResourceCategory"); resourceSourceName.getElement().setId("lblResourceSourceName"); ratingWidgetPanel.getElement().setId("fpnlRatingWidgetPanel"); this.collectionItemDo = collectionItemDo; setNavigationResourceTitle(collectionItemDo.getResource().getTitle()); if (collectionItemDo.getResource().getResourceFormat() != null) { setResourceTypeIcon(collectionItemDo.getResource().getResourceFormat().getDisplayName()); } setResourceCategory(); setReourceSourceName(); setResourceSequence(itemIndex + 1); setResourcePlayLink(); if (AppClientFactory.getCurrentPlaceToken().equalsIgnoreCase(PlaceTokens.COLLECTION_PLAY)) { setAvgRatingWidget(); AppClientFactory.getEventBus() .addHandler(UpdateRatingsInRealTimeEvent.TYPE, setRatingWidgetMetaData); } }
private Image createRunIcon() { Image icon = new Image(ThemeResources.INSTANCE.runChunk()); icon.addStyleName(ThemeStyles.INSTANCE.highlightIcon()); icon.setTitle(commands_.executeCurrentChunk().getTooltip()); bindNativeClickToExecuteChunk(this, icon.getElement()); return icon; }
/** * Utility method to create anchor tags * * @param image Image * @param relValue anchor "rel" attribute value * @return anchorElement Element */ private Element createAnchor(Image image, String relValue) { Element anchorElement = DOM.createAnchor(); DOM.setAttribute(anchorElement, "rel", relValue); DOM.setAttribute(anchorElement, "href", image.getUrl()); DOM.setAttribute(anchorElement, "title", image.getTitle()); DOM.appendChild(anchorElement, image.getElement()); return anchorElement; }
@UiConstructor public ImageAnchor(String imageUrl) { image = new Image(imageUrl); image.getElement().getStyle().setBorderStyle(BorderStyle.NONE); image.getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE); subtitle = new Label(); subtitle.setVisible(false); anchor = new Anchor(); initWidget(anchor); anchor.setHref("javascript:;"); anchor.getElement().appendChild(image.getElement()); anchor.getElement().appendChild(subtitle.getElement()); // Removes the dotted outline anchor.getElement().getStyle().setProperty("outline", "0"); }
public ProfilePageUserInfoWidget(UserFollowDo userFollowDo, String tab) { this.userFollowDo = userFollowDo; this.tab = tab; initWidget(uiBinder.createAndBindUi(this)); SetData(); authorPanel.getElement().setId("pnlAuthorPanel"); profileThumbnailImage.getElement().setId("imgProfileThumbnailImage"); userNameLabel.getElement().setId("lblUserNameLabel"); userCollections.getElement().setId("lblUserCollections"); userFollowDetails.getElement().setId("lblUserFollowDetails"); }
private Image createRunPreviousIcon(boolean dark) { Image icon = new Image( dark ? ThemeResources.INSTANCE.runPreviousChunksDark() : ThemeResources.INSTANCE.runPreviousChunksLight()); icon.addStyleName(ThemeStyles.INSTANCE.highlightIcon()); icon.setTitle(commands_.executePreviousChunks().getTooltip()); bindNativeClickToExecutePreviousChunks(this, icon.getElement()); return icon; }
public int addZone() { Image deleteZone = new Image(AppPresenter.images.closeIcon().getURL()); int rowIndex = listOfZoneDesigner.getRowCount(); deleteZone.getElement().getStyle().setCursor(Cursor.POINTER); listOfZoneDesigner.setWidget(rowIndex, 0, deleteZone); CustomListBox listOfTemplate = new CustomListBox(); listOfZoneDesigner.setWidget(rowIndex, 1, listOfTemplate); return rowIndex - 1; }
/** * Start sliding the knob. * * @param highlight true to change the style * @param fireEvent true to fire the event */ private void startSliding(boolean highlight, boolean fireEvent) { if (highlight) { DOM.setElementProperty( lineElement, "className", //$NON-NLS-1$ "gwt-SliderBar-line gwt-SliderBar-line-sliding"); //$NON-NLS-1$ DOM.setElementProperty( knobImage.getElement(), "className", //$NON-NLS-1$ "gwt-SliderBar-knob gwt-SliderBar-knob-sliding"); //$NON-NLS-1$ knobImage.setResource(resources.sliderSliding()); } }
@Override public void setBall(TileIndex index) { if (m_ball == null) { m_ball = new Image(Res.INSTANCE.ball()); } /* * PATCH: Juste pour être sure que la ball est devant le joueur. * En fonction de la direction il faudrait la passer derrier. */ m_ball.getElement().getStyle().setZIndex(100); add(m_ball); setBallPosition(index); }
/** Draw the knob where it is supposed to be relative to the line. */ private void drawKnob() { // Abort if not attached if (!isAttached()) { return; } // Move the knob to the correct position Element knobElement = knobImage.getElement(); int lineWidth = lineElement.getOffsetWidth(); int knobWidth = knobElement.getOffsetWidth(); int knobLeftOffset = lineLeftOffset + ((int) getKnobPercent() * lineWidth) - (knobWidth / 2); knobLeftOffset = Math.min(knobLeftOffset, lineLeftOffset + lineWidth - (knobWidth / 2) - 1); DOM.setStyleAttribute(knobElement, "left", knobLeftOffset + "px"); // $NON-NLS-1$ //$NON-NLS-2$ }
@Override public void setPlatform(Platform platform) { Image image = new Image(Utils.getPlatformIcon(platform)); image.setTitle(Utils.getPlatformText(platform)); image.getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE); Label label = new Label(Utils.getPlatformText(platform)); targetPlatformPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); targetPlatformPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); targetPlatformPanel.add(image); targetPlatformPanel.setCellWidth(image, "32px"); targetPlatformPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); targetPlatformPanel.add(label); label.getElement().getStyle().setPaddingLeft(8, Unit.PX); }
private Image createOptionsIcon(boolean dark, boolean setupChunk) { Image icon = new Image( dark ? ThemeResources.INSTANCE.chunkOptionsDark() : ThemeResources.INSTANCE.chunkOptionsLight()); icon.addStyleName(ThemeStyles.INSTANCE.highlightIcon()); if (setupChunk) icon.addStyleName(RES.styles().setupChunk()); icon.setTitle("Modify chunk options"); bindNativeClickToOpenOptions(this, icon.getElement()); return icon; }
@Override public void resetQuestionView() { openEndedQuestionText.setHTML(""); hintsButton.setText(i18n.GL0667()); hintsButton.getElement().setAttribute("alt", i18n.GL0667()); hintsButton.getElement().setAttribute("title", i18n.GL0667()); hintsButton.setStyleName(oeStyle.hintsActiveButton()); explanaionButton.setStyleName(oeStyle.hintsActiveButton()); explanationContainer.removeStyleName(oeStyle.explanationTextBorder()); hintsContainer.clear(); explanationContainer.clear(); clearAnswerOptionsContainer(); openEndedQuestionImage.getElement().removeAttribute("src"); }
public PreviewResourceView() { initWidget(uiBinder.createAndBindUi(this)); resourceThumbContainer.getElement().setId("fpnlResourceThumbContainer"); resourceImageContainer.getElement().setId("fpnlResourceImageContainer"); resourceThumbnail.getElement().setId("imgResourceThumbnail"); resourceTypeImage.getElement().setId("lblResourceTypeImage"); resourceNumber.getElement().setId("lblResourceNumber"); resourceTitle.getElement().setId("htmlResourceTitle"); resourceIndex.getElement().setId("lblResourceIndex"); resourceHoverTitle.getElement().setId("htmlResourceHoverTitle"); resourceCategory.getElement().setId("lblResourceCategory"); resourceSourceName.getElement().setId("lblResourceSourceName"); ratingWidgetPanel.getElement().setId("fpnlRatingWidgetPanel"); }
/** * The treasureChests have their own method to place seeds in * * @param treasurePanel where the seeds are being placed in * @param seedAmount how many seeds are being placed into the pit */ private void addSeedsToTreasureChest(AbsolutePanel treasurePanel, int seedAmount) { treasurePanel.clear(); for (int i = 0; i < seedAmount; i++) { final Image seed = new Image(); seed.setResource(gameImages.redSeed()); DOM.setStyleAttribute(seed.getElement(), "backgroundSize", "20px 20px"); int[] point = getTargetPointTreasureChest(i); treasurePanel.add(seed, point[0], point[1]); } Label countLabel = new Label(seedAmount + ""); countLabel.setWidth(TREASURE_CHEST_WIDTH + "px"); countLabel.setHorizontalAlignment(Label.ALIGN_CENTER); treasurePanel.add(countLabel, 0, 22 * 3); }
/** * Sets the image to use in this menu button. * * @param image */ public void setImage(ImageResource image) { this.image = image; Image imageHtml = new Image(image.getSafeUri()); Style imageStyle = imageHtml.getElement().getStyle(); imageStyle.setDisplay(Display.BLOCK); imageStyle.setProperty("margin", "1.25em auto 0"); imageStyle.setProperty("maxWidth", "60%"); imageStyle.setPosition(Position.ABSOLUTE); imageStyle.setTop(0, Unit.PX); imageStyle.setRight(0, Unit.PX); imageStyle.setBottom(0, Unit.PX); imageStyle.setLeft(0, Unit.PX); panel.add(imageHtml); }
private DefaultHeader(final DisclosurePanelImages images, final String text) { super(DOM.createAnchor()); this.images = images; final Element elem = getElement(); DOM.setElementProperty(elem, "href", "javascript:void(0);"); // Avoids layout problems from having blocks in inlines. DOM.setStyleAttribute(elem, "display", "block"); sinkEvents(Event.ONCLICK); setStyleName(STYLENAME_HEADER); iconImage = isOpen ? images.disclosurePanelOpen().createImage() : images.disclosurePanelClosed().createImage(); // I do not need any Widgets here, just a DOM structure. final Element root = DOM.createTable(); final Element tbody = DOM.createTBody(); final Element tr = DOM.createTR(); final Element imageTD = DOM.createTD(); labelTD = DOM.createTD(); setElement(root); DOM.appendChild(root, tbody); DOM.appendChild(tbody, tr); DOM.appendChild(tr, imageTD); DOM.appendChild(tr, labelTD); // set image TD to be same width as image. DOM.setElementProperty(imageTD, "align", "center"); DOM.setElementProperty(imageTD, "valign", "middle"); DOM.setStyleAttribute(imageTD, "width", iconImage.getWidth() + "px"); DOM.appendChild(imageTD, iconImage.getElement()); setText(text); addEventHandler(this); setStyle(); }
@Override public void setFeatures(List<Feature> features) { for (int i = 0; i < features.size(); i++) { Feature feature = features.get(i); Image image = new Image(Utils.getFeatureIcon(feature)); image.setTitle(Utils.getFeatureText(feature)); image.getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE); Label label = new Label(Utils.getFeatureText(feature)); featuresPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); featuresPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); featuresPanel.add(image); featuresPanel.setCellWidth(image, "32px"); featuresPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); featuresPanel.add(label); if (i < features.size() - 1) { label.getElement().getStyle().setPaddingRight(10, Unit.PX); } label.getElement().getStyle().setPaddingLeft(8, Unit.PX); } }
public ToolsButtonsPanel(final TopBarView.Presenter presenter) { super(); if (LocationHelper.isAnalysisAvailable()) { analysisButton = new CustomButton(); analysisButton.setTitle("Analyse your data"); analysisButton.setResourceNoBorder(ReactomeImages.INSTANCE.analysisTool()); analysisButton.addClickHandler( new ClickHandler() { @Override public void onClick(ClickEvent clickEvent) { presenter.analysisToolSelected(); } }); add(analysisButton); } else { Image img = new Image(ReactomeImages.INSTANCE.analysisToolsDisabled()); img.getElement().getStyle().setWidth(28, Style.Unit.PX); img.getElement().getStyle().setHeight(28, Style.Unit.PX); img.setTitle("Analysis tool not available in this server"); add(img); } }
// timer for GeoGebraExam private FlowPanel getTimer() { final Label timer = new Label(); timer.getElement().setClassName("timer"); timer.getElement().setId("timer"); timer.getElement().setPropertyBoolean("started", false); // https://groups.google.com/forum/#!msg/google-web-toolkit/VrF3KD1iLh4/-y4hkIDt5BUJ AnimationScheduler.get() .requestAnimationFrame( new AnimationCallback() { @Override public void execute(double timestamp) { if (app.getExam().isCheating()) { makeRed(getElement()); } timer.setText(app.getExam().timeToString(System.currentTimeMillis())); AnimationScheduler.get().requestAnimationFrame(this); } }); visibilityEventMain(); FlowPanel fp = new FlowPanel(); fp.add(timer); Image info = new Image(GuiResourcesSimple.INSTANCE.dialog_info().getSafeUri()); fp.add(info); info.getElement().getStyle().setMarginLeft(5, Unit.PX); fp.addDomHandler( new ClickHandler() { public void onClick(ClickEvent event) { app.showMessage(app.getExam().getLog(app.getLocalization())); } }, ClickEvent.getType()); return fp; }
private void setElementId() { btnPositive.getElement().setId("btnPositive"); btnNegitive.getElement().setId("btnNegitive"); lblTitle.getElement().setId("lblTitle"); txtConfirmAction.getElement().setId("txtConfirmAction"); lblRemoving.getElement().setId("lblRemoving"); closeBtn.getElement().getStyle().setCursor(Cursor.POINTER); h5Panel.setText("Warning: this cannot be undone"); paragraphPnl.setText("Please type in delete"); chkBoxList.add(chkBox1); chkBoxList.add(chkBox2); chkBoxList.add(chkBox3); chkBox1.getElement().setId("checkboxG12"); chkBox2.getElement().setId("checkboxG13"); chkBox3.getElement().setId("checkboxG14"); checkboxG12.getElement().setAttribute("for", "checkboxG12"); checkboxG13.getElement().setAttribute("for", "checkboxG13"); checkboxG14.getElement().setAttribute("for", "checkboxG14"); chkBox1.setValue(false); chkBox2.setValue(false); chkBox3.setValue(false); if (AppClientFactory.getPlaceManager() .getCurrentPlaceRequest() .getNameToken() .equals(PlaceTokens.EDIT_CLASS)) { checkboxG12.setText(i18n.GL3575()); checkboxG13.setText(i18n.GL3576()); checkboxG14.setText(i18n.GL3577()); checkboxG13.getElement().getStyle().setLineHeight(18, Unit.PX); } else { checkboxG12.setText(i18n.GL3579()); checkboxG13.setText(i18n.GL3573()); checkboxG14.setText(i18n.GL3574()); } }
@Override public void onMouseDown(MouseDownEvent event) { Element fullImageElement = fullImage.getElement(); int x_pos = event.getRelativeX(fullImageElement); int imageWidth = fullImageElement.getClientWidth(); if (x_pos > (imageWidth / 2)) { PhotoModel nextPhotoModel = currIdx < (photoModelList.size() - 1) ? photoModelList.get(currIdx + 1) : null; if (nextPhotoModel != null) { loadNewImage(nextPhotoModel, currIdx + 1); } } else { PhotoModel prePhotoModel = currIdx > 0 ? photoModelList.get(currIdx - 1) : null; if (prePhotoModel != null) { loadNewImage(prePhotoModel, currIdx - 1); } } }
@Inject public QuestionResourceView() { setWidget(uiBinder.createAndBindUi(this)); questiontext.getElement().setInnerHTML(i18n.GL0308()); questiontext.getElement().setId("pnlQuestiontext"); questiontext.getElement().setAttribute("alt", i18n.GL0308()); questiontext.getElement().setAttribute("title", i18n.GL0308()); hintsButton.setText(i18n.GL0667()); hintsButton.getElement().setId("btnHintsButton"); hintsButton.getElement().setAttribute("alt", i18n.GL0667()); hintsButton.getElement().setAttribute("title", i18n.GL0667()); explanaionButton.setText(i18n.GL0316()); explanaionButton.getElement().setId("btnexplanaionButton"); explanaionButton.getElement().setAttribute("alt", i18n.GL0316()); explanaionButton.getElement().setAttribute("title", i18n.GL0316()); openEndedQuestionText.getElement().setId("htmlOpenEndedQuestionText"); questionContainer.getElement().setId("fpnlQuestionContainer"); openEndedQuestionImage.getElement().setId("imgOpenEndedQuestionImage"); hintsContainer.getElement().setId("fpnlHintsContainer"); explanationContainer.getElement().setId("pnlExplanationContainer"); }