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;"); } }
public FolderInfoWidget() { initWidget(uiBinder.createAndBindUi(this)); folderInfo.getElement().setId("pnlCollectionInfo"); folderInfo.getElement().getStyle().setHeight(Window.getClientHeight(), Unit.PX); titleDetailsPnl.getElement().setAttribute("style", "border-bottom: 0px solid #ddd;"); Window.addResizeHandler( new ResizeHandler() { @Override public void onResize(ResizeEvent event) { folderInfo.getElement().getStyle().setHeight(Window.getClientHeight(), Unit.PX); } }); }
/** * @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."); }
/** * This method is used to print scored questions data * * @param scoredQuestionsData */ void setQuestionsPrintData(ArrayList<UserDataDo> scoredQuestionsData) { scoredPrintWidget.clear(); final SortTable sortableTable = new SortTable(); sortableTable.setStyleName(res.css().tableMain()); sortableTable.getElement().setId("results"); sortableTable.setBorderWidth(1); sortableTable.setCellPadding(4); sortableTable.setCellSpacing(1); sortableTable.addColumnHeader(i18n.GL3259(), 0); sortableTable.addColumnHeader(i18n.GL0308(), 1); sortableTable.addColumnHeader(i18n.GL2229(), 2); sortableTable.addColumnHeader(i18n.GL3269(), 3); sortableTable.addColumnHeader(i18n.GL2084(), 4); sortableTable.addColumnHeader(i18n.GL3261(), 5); sortableTable.getRowFormatter().addStyleName(0, res.css().tableHeader()); // To add scored questions scoredQuestionHeading.setText(i18n.GL2282()); scoredQuestionHeading.getElement().getStyle().setClear(Clear.BOTH); scoredQuestionHeading.getElement().getStyle().setPaddingTop(15, Unit.PX); scoredQuestionHeading.getElement().getStyle().setPaddingBottom(20, Unit.PX); scoredQuestionHeading.getElement().getStyle().setTextAlign(TextAlign.LEFT); printWidget.add(scoredQuestionHeading); scoredPrintWidget.add(sortableTable); scoredPrintWidget.getElement().getStyle().setPaddingTop(15, Unit.PX); if (scoredQuestionsData.size() != 0) { setSortedData(scoredQuestionsData, sortableTable, true); } else { Label erroeMsg = new Label(); erroeMsg.setStyleName(res.css().displayMessageTextForScoredQuestions()); erroeMsg.setText(i18n.GL3265()); scoredPrintWidget.add(erroeMsg); } scoredPrintWidget.setVisible(false); }
private void initScroller() { String id = DOM.createUniqueId(); HTMLPanel target = new HTMLPanel(""); target.getElement().setId(id); panelLoadStories.add(target); initScroller(this, id); }
public void populate(List<JobModel> modelList) { stopLoading(); jobList.render(modelList); if (modelList != null && modelList.size() > 0) { noJobMessage.getElement().getStyle().setDisplay(Display.NONE); } else { noJobMessage.getElement().getStyle().setDisplay(Display.BLOCK); } scrollPanel.refresh(); // Check if there is any unread mail, it there is, post rean notification event handleNotification(); }
public StatusPage() { msg = GWT.create(StatusMessages.class); setPageTitle(msg.title().asString()); initWidget(uiBinder.createAndBindUi(this)); container.getElement().setId("update-statut"); status.getElement().setAttribute("x-webkit-speech", "x-webkit-speech"); status.getElement().setAttribute("speech", "speech"); }
public void createTd(Widget widget, TextAlign align, String width) { HTMLPanel td = (HTMLPanel) getTd(widget); td.getElement().getStyle().setTextAlign(align); if (width != null) { td.setWidth(width); } row.add(td); }
/** Class constructor */ public CommunityView() { setWidget(uiBinder.createAndBindUi(this)); libraryView = new LibraryView(PlaceTokens.DISCOVER); // libraryView.getCourseTabs().setVisible(false); Window.scrollTo(0, 0); landingpagePanel.add(libraryView); landingpagePanel.getElement().setId("pnlPartnerPanel"); // landingpagePanel.getElement().getStyle().setMarginTop(39, Unit.PX); }
/** * @function setUiText * @created_date : 26-Feb-2015 * @description * @parm(s) : * @return : void * @throws : <Mentioned if any exceptions> */ public void setUiText() { msgPanel.getElement().setInnerHTML(i18n.GL1983()); msgPanel.getElement().setAttribute("alt", i18n.GL1983()); msgPanel.getElement().setAttribute("title", i18n.GL1983()); msglinkPanel.getElement().setInnerHTML(i18n.GL1984()); msglinkPanel.getElement().setAttribute("alt", i18n.GL1984()); msglinkPanel.getElement().setAttribute("title", i18n.GL1984()); gooruPanel.getElement().setInnerHTML(i18n.GL0733()); gooruPanel.getElement().setAttribute("alt", i18n.GL0733()); gooruPanel.getElement().setAttribute("title", i18n.GL0733()); ednovoPanel.getElement().setInnerHTML(i18n.GL1985()); ednovoPanel.getElement().setAttribute("alt", i18n.GL1985()); ednovoPanel.getElement().setAttribute("title", i18n.GL1985()); appstorePanel.getElement().setInnerHTML(i18n.GL1986()); appstorePanel.getElement().setAttribute("alt", i18n.GL1986()); appstorePanel.getElement().setAttribute("title", i18n.GL1986()); viewAnchor.setText(i18n.GL1428()); viewAnchor.getElement().setAttribute("alt", i18n.GL1428()); viewAnchor.getElement().setAttribute("title", i18n.GL1428()); }
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"); }
/** * Call Twitter share event * * @param clickEvent instance of {@link ClickEvent} */ @UiHandler("twitterPanel") public void onTwitterClickEvent(ClickEvent event) { if (!(socialDo.getShareType().equalsIgnoreCase("private"))) { if (AppClientFactory.getCurrentPlaceToken().equals(PlaceTokens.RESOURCE_SEARCH)) { MixpanelUtil.Click_Twitter_FromResource(); } else if (AppClientFactory.getCurrentPlaceToken().equals(PlaceTokens.COLLECTION_SEARCH)) { MixpanelUtil.Click_Twitter_FromCollection(); } else if (AppClientFactory.getCurrentPlaceToken().equals(PlaceTokens.COLLECTION_PLAY) || AppClientFactory.getCurrentPlaceToken().equals(PlaceTokens.PREVIEW_PLAY)) { if (socialShareContainer.getElement().getId().equalsIgnoreCase("collectionShareViewPage")) { MixpanelUtil.ClickTwitterFromShareInCollectionplayer(); } else if (socialShareContainer .getElement() .getId() .equalsIgnoreCase("collectionShareSummaryPage")) { MixpanelUtil.ClickTwitterFromSummaryPageInCollectionplayer(); } } onTwisterShareEvent(); } }
protected void addWidget(T wrapped, Widget widget) { if (HasWidgets.class.isInstance(wrapped)) { // hack for GWT 2.0.3 if (wrapped instanceof HTMLPanel) { HTMLPanel htmlPanel = (HTMLPanel) wrapped; GwtReflectionUtils.callPrivateMethod(htmlPanel, "add", widget, htmlPanel.getElement()); } else { ((HasWidgets) wrapped).add(widget); } } }
public void setData(List<UserTagsResourceDO> result) { tagContainer.setVisible(true); TagTextMessage.setText(i18n.GL1915()); TagTextMessage.getElement().setId("lblTagTextMessage"); TagTextMessage.getElement().setAttribute("alt", i18n.GL1915()); TagTextMessage.getElement().setAttribute("title", i18n.GL1915()); tagMessage.setText(i18n.GL1944()); tagMessage.getElement().setId("lblTagMessage"); tagMessage.getElement().setAttribute("alt", i18n.GL1944()); tagMessage.getElement().setAttribute("title", i18n.GL1944()); tagContainer.getElement().setAttribute("alt", labelName); tagContainer.setTitle(labelName); /*if(labelName.length()>=12){ labelName = labelName.substring(0, 12) + "..."; }*/ tagType.setText(labelName); tagType.getElement().setId("lblTagType"); tagType.getElement().setAttribute("alt", labelName); tagType.getElement().setAttribute("title", labelName); tagCount.setText(count); tagCount.getElement().setId("lblTagCount"); tagCount.getElement().setAttribute("alt", count); tagCount.getElement().setAttribute("title", count); userTagsResourceContainerConatiner.clear(); for (int i = 0; i < result.size(); i++) { ProfileUserTagsResourceWidget profileUserTagsResourceWidget = new ProfileUserTagsResourceWidget(result.get(i)); userTagsResourceContainerConatiner.add(profileUserTagsResourceWidget); } tagContainer.getElement().setId("pnlTagContainer"); tagScrollPanel.getElement().setId("sbTagScrollPanel"); userTagsResourceContainerConatiner.getElement().setId("pnlUserTagsResourceContainerConatiner"); }
public com.google.gwt.user.client.ui.Widget createAndBindUi( final com.google.gwt.requestfactory.ui.client.LoginWidget owner) { com.google.gwt.requestfactory.ui.client.LoginWidget_BinderImpl_GenBundle clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay = (com.google.gwt.requestfactory.ui.client.LoginWidget_BinderImpl_GenBundle) GWT.create( com.google.gwt.requestfactory.ui.client.LoginWidget_BinderImpl_GenBundle.class); com.google.gwt.requestfactory.ui.client.LoginWidget_BinderImpl_GenCss_style style = clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay.style(); com.google.gwt.dom.client.SpanElement name = null; java.lang.String domId0 = com.google.gwt.dom.client.Document.get().createUniqueId(); java.lang.String domId1 = com.google.gwt.dom.client.Document.get().createUniqueId(); com.google.gwt.user.client.ui.InlineLabel logoutLink = (com.google.gwt.user.client.ui.InlineLabel) GWT.create(com.google.gwt.user.client.ui.InlineLabel.class); com.google.gwt.user.client.ui.HTMLPanel f_HTMLPanel1 = new com.google.gwt.user.client.ui.HTMLPanel( "<div> <span id='" + domId0 + "'>Not logged in</span> | <span id='" + domId1 + "'></span> </div>"); logoutLink.setText("Sign out"); logoutLink.addStyleName("" + style.link() + ""); UiBinderUtil.TempAttachment attachRecord0 = UiBinderUtil.attachToDom(f_HTMLPanel1.getElement()); name = com.google.gwt.dom.client.Document.get().getElementById(domId0).cast(); name.removeAttribute("id"); com.google.gwt.user.client.Element domId1Element = com.google.gwt.dom.client.Document.get().getElementById(domId1).cast(); attachRecord0.detach(); f_HTMLPanel1.addAndReplaceElement(logoutLink, domId1Element); final com.google.gwt.event.dom.client.ClickHandler handlerMethodWithNameVeryUnlikelyToCollideWithUserFieldNames1 = new com.google.gwt.event.dom.client.ClickHandler() { public void onClick(com.google.gwt.event.dom.client.ClickEvent event) { owner.handleClick(event); } }; logoutLink.addClickHandler(handlerMethodWithNameVeryUnlikelyToCollideWithUserFieldNames1); owner.name = name; clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay.style().ensureInjected(); return f_HTMLPanel1; }
@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"); }
private void generateProfile() { panel.clear(); MaterialImage profile = new MaterialImage(); MaterialLink3 link = new MaterialLink3(); link.getElement().getStyle().setFontWeight(FontWeight.BOLD); link.setTextColor("white"); link.setText(profileName); profile.setType("circle"); profile.setUrl(profileImageUrl); profile.getElement().getStyle().setWidth(60, Unit.PX); profile.getElement().getStyle().setHeight(60, Unit.PX); panel.add(profile); panel.add(link); customPanel.getElement().getStyle().setMarginTop(20, Unit.PX); panel.add(customPanel); }
/** * Sets the title to display with this menu button. * * @param label */ public void setLabel(String label) { this.label = label; HTMLPanel labelHtml = new HTMLPanel(label); Style labelStyle = labelHtml.getElement().getStyle(); labelStyle.setColor("white"); labelStyle.setFontSize(0.8, Unit.EM); labelStyle.setFontWeight(FontWeight.BOLD); labelStyle.setPosition(Position.ABSOLUTE); labelStyle.setTextAlign(TextAlign.CENTER); labelStyle.setTop(75, Unit.PCT); labelStyle.setWidth(100, Unit.PCT); panel.add(labelHtml); }
public TopBar() { initWidget(uiBinder.createAndBindUi(this)); elementsInPrimaryTab = new HashMap<String, Element>(); elementsInSecondaryTab = new HashMap<String, Element>(); mapTextsInPrimaryTab = new HashMap<String, String>(); mapTextsInSecondaryTab = new HashMap<String, String>(); textsInPrimaryTab = new ArrayList<String>(); textsInSecondaryTab = new ArrayList<String>(); // Create hierarchy of elements Element top = DOM.createDiv(); top.setClassName("navbar"); top.addClassName("navbar-fixed-top"); Element topInner = DOM.createDiv(); topInner.setClassName("navbar-inner"); Element containerInner = DOM.createDiv(); containerInner.addClassName("container-fluid"); topInner.appendChild(containerInner); top.appendChild(topInner); // Create title Element titleAnchor = DOM.createAnchor(); titleAnchor.addClassName("brand"); titleAnchor.setAttribute("style", "height: 16px; margin-top: -5px;"); titleAnchor.setAttribute("href", "#welcome"); Element logoImage = DOM.createImg(); logoImage.setAttribute("src", "images/logo.png"); titleAnchor.appendChild(logoImage); // titleAnchor.setInnerText("Nublic"); containerInner.appendChild(titleAnchor); // Primary navigation primaryNav = DOM.createElement("ul"); primaryNav.setClassName("nav"); containerInner.appendChild(primaryNav); // Separation /* Element separation = DOM.createDiv(); separation.setClassName("pull-left"); containerInner.appendChild(separation);*/ // Secondary navigation secondaryNav = DOM.createElement("ul"); secondaryNav.setClassName("nav"); secondaryNav.addClassName("secondary-nav"); secondaryNav.addClassName("pull-right"); containerInner.appendChild(secondaryNav); root.getElement().appendChild(top); }
@Inject public AddCollectionView() { setWidget(uiBinder.createAndBindUi(this)); hideText.setText(i18n.GL0592()); hideText.getElement().setId("lblHideText"); hideText.getElement().setAttribute("alt", i18n.GL0592()); hideText.getElement().setAttribute("title", i18n.GL0592()); addcollectionText.getElement().setInnerHTML(i18n.GL0690()); addcollectionText.getElement().setId("pnlAddcollectionText"); addcollectionText.getElement().setAttribute("alt", i18n.GL0690()); addcollectionText.getElement().setAttribute("title", i18n.GL0690()); renameText.setText(i18n.GL0593()); renameText.getElement().setId("lblRenameText"); renameText.getElement().setAttribute("alt", i18n.GL0593()); renameText.getElement().setAttribute("title", i18n.GL0593()); addToShelfCollectionButton.setText(i18n.GL0590()); addToShelfCollectionButton.getElement().setId("btnAddToShelfCollectionButton"); addToShelfCollectionButton.getElement().setAttribute("alt", i18n.GL0590()); addToShelfCollectionButton.getElement().setAttribute("title", i18n.GL0590()); collectionAddedSuccessMessageContainer.setVisible(false); getAddToShelfCollectionButton().addClickHandler(new OnAddCollectionClick()); collectionTitleInCoverPage.addKeyUpHandler(new onKeyErrorMsg()); workSpaceLink.setText(i18n.GL0589()); workSpaceLink.getElement().setId("lnkWorkSpaceLink"); workSpaceLink.getElement().setAttribute("alt", i18n.GL0589()); workSpaceLink.getElement().setAttribute("title", i18n.GL0589()); addToCollectionWidgetContainer.getElement().setId("pnlAddToCollectionWidgetContainer"); collectionAddImageContainer.getElement().setId("pnlCollectionAddImageContainer"); addResourceInsteadLabelContainerInCollectionImage .getElement() .setId("pnlAddResourceInsteadLabelContainerInCollectionImage"); collectionAddedSuccessMessageContainer .getElement() .setId("pnlCollectionAddedSuccessMessageContainer"); successMessageLabelText.getElement().setId("lblSuccessMessageLabelText"); addCollectionInsteadLabelContainer.getElement().setId("pnlAddCollectionInsteadLabelContainer"); collectionTitleInCoverPage.getElement().setId("txtCollectionTitleInCoverPage"); StringUtil.setAttributes(collectionTitleInCoverPage, true); addingLabel.getElement().setId("lblAddingLabel"); addErrorLabel.getElement().setId("errlblAddErrorLabel"); hideButton.getElement().setId("epnlHideButton"); }
@Override public void showSection(UIObject display, String section, String sub_section) { String sectionToSelect = section; if (sub_section != "") sectionToSelect = sectionToSelect + "_" + sub_section; setSelectedItem(sectionToSelect, null); tree.ensureSelectedItemVisible(); if (!section.equals(currentSection)) { HTMLPanel container = new HTMLPanel(""); container.setStylePrimaryName(resources.style().help_container()); container.getElement().appendChild(display.getElement()); contentContainer.setWidget(container); currentSection = section; currentSubSection = sub_section; } else { currentSubSection = sub_section; } if (!currentSubSection.equals("")) { Element elem = DOM.getElementById(currentSection + "_" + currentSubSection); if (elem != null) { elem.scrollIntoView(); } } else contentContainer.getWidget().getElement().setScrollTop(0); }
@Override public void clear() { jobList.render(new ArrayList<JobModel>()); scrollPanel.refresh(); noJobMessage.getElement().getStyle().setDisplay(Display.NONE); }
public void setPadding(String padding) { this.padding = padding; panel.getElement().getStyle().setPadding(Double.parseDouble(padding), Unit.PCT); panel.getElement().getStyle().setPaddingBottom(200, Unit.PX); }
public void setPanelPosition() { panelArrow.getElement().getStyle().setPosition(Position.ABSOLUTE); }
private void generateBackground(String url) { panel.addStyleName(MaterialResources.INSTANCE.materialcss().fullBackground()); panel .getElement() .setAttribute("style", "background-image: url(" + url + "); background-size: 100%;"); }
public void setSocialShareContainerId(String socialShareId) { socialShareContainer.getElement().setId(socialShareId); }
/** * Class constructor * * @param collectionDo instance of {@link CollectionDo} */ public SocialShareView(SocialShareDo shareDo) { this.socialDo = shareDo; initWidget(uiBinder.createAndBindUi(this)); shareTextPanel.getElement().setId("pnlShareTextPanel"); fbPanel.getElement().setId("epnlFbPanel"); twitterPanel.getElement().setId("epnlTwitterPanel"); emailPanel.getElement().setId("epnlEmailPanel"); panelTwitter.getElement().setId("pnlPanelTwitter"); panelEmail.getElement().setId("pnlPanelEmail"); emailText.getElement().setInnerHTML(i18n.GL0212()); emailText.getElement().setId("pnlEmailText"); emailText.getElement().setAttribute("alt", i18n.GL0212()); emailText.getElement().setAttribute("title", i18n.GL0212()); twitterText.getElement().setInnerHTML(i18n.GL0647()); twitterText.getElement().setId("pnlTwitterText"); twitterText.getElement().setAttribute("alt", i18n.GL0647()); twitterText.getElement().setAttribute("title", i18n.GL0647()); facbookText.getElement().setInnerHTML(i18n.GL0646()); facbookText.getElement().setId("pnlFacbookText"); facbookText.getElement().setAttribute("alt", i18n.GL0646()); facbookText.getElement().setAttribute("title", i18n.GL0646()); shareIconPanel.getElement().setId("pnlShareIconPanel"); fbIconPanel.getElement().setId("epnlFbIconPanel"); panelfbIcon.getElement().setId("pnlPanelfbIcon"); twIconPanel.getElement().setId("epnlTwIconPanel"); panelTwIcon.getElement().setId("pnlPanelTwIcon"); emailIconPanel.getElement().setId("epnlEmailIconPanel"); panelEmailIcon.getElement().setId("pnlPanelEmailIcon"); categoryImage.getElement().setId("imgCategoryImage"); category = socialDo.getCategoryType() != null ? socialDo.getCategoryType() : "collection"; description = socialDo.getDescription(); String title = socialDo.getTitle(); if (description == null) { description = ""; } else { description = description.replaceAll("\\<.*?\\>", ""); } if (title == null) { title = ""; } setPresenter(new SocialSharePresenter(this)); // shareTextPanel.getElement().getStyle().setCursor(Cursor.POINTER); try { if (socialDo.getIsSearchShare()) { socialShareContainer.getElement().getStyle().setWidth(100, Unit.PX); } } catch (Exception e) { } if (socialDo.isOnlyIcon()) { shareTextPanel.setVisible(false); shareIconPanel.setVisible(true); } else { shareIconPanel.setVisible(false); shareTextPanel.setVisible(true); } if (title.contains("img")) { socialDo.setTitle(i18n.GL0308()); } else { if (title.length() > 50) { title = title.substring(0, 50) + "..."; socialDo.setTitle(title.replaceAll("<p>", "").replaceAll("</p>", "")); } else { socialDo.setTitle(title.replaceAll("<p>", "").replaceAll("</p>", "")); } } // if(AppClientFactory.getCurrentPlaceToken().equals(PlaceTokens.SHELF)){ if ((socialDo.getShareType().equalsIgnoreCase("private"))) { panelfbIcon.setStyleName(socialShareStyle.classPageShareButtonsFTEBgDisable()); panelTwIcon.setStyleName(socialShareStyle.classPageShareButtonsFTEBgDisable()); panelEmailIcon.setStyleName(socialShareStyle.classPageShareButtonsFTEBgDisable()); fbPanel.setStyleName(socialShareStyle.classPageShareButtonsBgDisable()); panelTwitter.setStyleName(socialShareStyle.classPageShareButtonsBgDisable()); panelEmail.setStyleName(socialShareStyle.classPageShareButtonsBgDisable()); // shareTextPanel.getElement().getStyle().setCursor(Cursor.DEFAULT); // shareIconPanel.getElement().getStyle().setCursor(Cursor.DEFAULT); } else { panelfbIcon.setStyleName(socialShareStyle.fbPageShareIconButtonsBg()); panelTwIcon.setStyleName(socialShareStyle.twitterPageShareIconButtonsBg()); panelEmailIcon.setStyleName(socialShareStyle.classPageShareButtonsFTEBg()); fbPanel.setStyleName(socialShareStyle.fbPageShareButtonsBg()); panelTwitter.setStyleName(socialShareStyle.twitterPageShareButtonsBg()); panelEmail.setStyleName(socialShareStyle.classPageShareButtonsBg()); // shareTextPanel.getElement().getStyle().setCursor(Cursor.POINTER); // shareIconPanel.getElement().getStyle().setCursor(Cursor.POINTER); } // } // categoryImage.addErrorHandler(new ErrorHandler() { // // @Override // public void onError(ErrorEvent event) { // String url = socialDo.getThumbnailurl(); // if (url == null || url.endsWith("null") || url.contains("null") || url.endsWith("/")){ // if(category==null){ // categoryImage.setUrl(DEFULT_IMAGE); // } // else if (category.equalsIgnoreCase("collection")) { // categoryImage.setUrl(DEFULT_IMAGE); // } else if (category.equalsIgnoreCase("video")) { // categoryImage.setUrl(DEFULT_VIMAGE); // } else if (category.equalsIgnoreCase("question")) { // categoryImage.setUrl(DEFULT_QIMAGE); // } else if (category.equalsIgnoreCase("interactive")) { // categoryImage.setUrl(DEFULT_IIMAGE); // } else if // (category.equalsIgnoreCase("website")||category.equalsIgnoreCase("exam")||category.equalsIgnoreCase("webpage")) { // categoryImage.setUrl(DEFULT_WIMAGE); // } else if (category.equalsIgnoreCase("slide")||category.equalsIgnoreCase("image")){ // categoryImage.setUrl(DEFULT_ITYPEIMAGE); // } else if // (category.equalsIgnoreCase("textbook")||category.equalsIgnoreCase("handout")||category.equalsIgnoreCase("lesson")||category.equalsIgnoreCase("text")) { // categoryImage.setUrl(DEFULT_TEXTIMAGE); // } else if (category.equalsIgnoreCase("audio")) { // categoryImage.setUrl(DEFULT_AIMAGE); // } else if (category.equalsIgnoreCase("other")) { // categoryImage.setUrl(DEFULT_OIMAGE); // } else if (category.equalsIgnoreCase("profile")){ // categoryImage.setUrl(DEFAULT_PROFILEIMAGE); // } // } // socialDo.setThumbnailurl(categoryImage.getUrl()); // } // }); // setUrl(socialDo.getThumbnailurl()); if (AppClientFactory.getCurrentPlaceToken().equalsIgnoreCase(PlaceTokens.PROFILE_PAGE)) { isProfilePageView = true; } /** * Adding Event Handler. * * @param UpdateSocialShareMetaDataEvent.TYPE is type of event. * @param setHeader is Object of Handler. */ AppClientFactory.getEventBus().addHandler(UpdateSocialShareMetaDataEvent.TYPE, setHeader); }
public com.google.gwt.user.client.ui.Widget createAndBindUi( final org.restlet.example.book.restlet.ch09.client.TopPanel owner) { org.restlet.example.book.restlet.ch09.client.TopPanel_BinderImpl_GenBundle clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay = (org.restlet.example.book.restlet.ch09.client.TopPanel_BinderImpl_GenBundle) GWT.create( org.restlet.example.book.restlet.ch09.client.TopPanel_BinderImpl_GenBundle .class); com.google.gwt.resources.client.ImageResource logo = clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay.logo(); com.google.gwt.resources.client.DataResource logoIe6Data = clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay.logoIe6Data(); org.restlet.example.book.restlet.ch09.client.TopPanel_BinderImpl_GenCss_style style = clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay.style(); java.lang.String domId0 = com.google.gwt.dom.client.Document.get().createUniqueId(); com.google.gwt.user.client.ui.Anchor signOutLink = (com.google.gwt.user.client.ui.Anchor) GWT.create(com.google.gwt.user.client.ui.Anchor.class); java.lang.String domId1 = com.google.gwt.dom.client.Document.get().createUniqueId(); com.google.gwt.user.client.ui.Anchor aboutLink = (com.google.gwt.user.client.ui.Anchor) GWT.create(com.google.gwt.user.client.ui.Anchor.class); com.google.gwt.user.client.ui.HTMLPanel f_HTMLPanel1 = new com.google.gwt.user.client.ui.HTMLPanel( template .html3( "" + style.logo() + "", "" + style.statusDiv() + "", "" + style.linksDiv() + "", domId0, domId1) .asString()); signOutLink.setHTML(template.html1().asString()); signOutLink.setHref("javascript:;"); aboutLink.setHTML(template.html2().asString()); aboutLink.setHref("javascript:;"); UiBinderUtil.TempAttachment attachRecord0 = UiBinderUtil.attachToDom(f_HTMLPanel1.getElement()); com.google.gwt.user.client.Element domId0Element = com.google.gwt.dom.client.Document.get().getElementById(domId0).cast(); com.google.gwt.user.client.Element domId1Element = com.google.gwt.dom.client.Document.get().getElementById(domId1).cast(); attachRecord0.detach(); f_HTMLPanel1.addAndReplaceElement(signOutLink, domId0Element); f_HTMLPanel1.addAndReplaceElement(aboutLink, domId1Element); final com.google.gwt.event.dom.client.ClickHandler handlerMethodWithNameVeryUnlikelyToCollideWithUserFieldNames1 = new com.google.gwt.event.dom.client.ClickHandler() { public void onClick(com.google.gwt.event.dom.client.ClickEvent event) { owner.onAboutClicked(event); } }; aboutLink.addClickHandler(handlerMethodWithNameVeryUnlikelyToCollideWithUserFieldNames1); final com.google.gwt.event.dom.client.ClickHandler handlerMethodWithNameVeryUnlikelyToCollideWithUserFieldNames2 = new com.google.gwt.event.dom.client.ClickHandler() { public void onClick(com.google.gwt.event.dom.client.ClickEvent event) { owner.onSignOutClicked(event); } }; signOutLink.addClickHandler(handlerMethodWithNameVeryUnlikelyToCollideWithUserFieldNames2); owner.aboutLink = aboutLink; owner.signOutLink = signOutLink; clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay.style().ensureInjected(); return f_HTMLPanel1; }
/** Constructor, builds the HTML code. */ public MenuButton() { panel = new HTMLPanel(""); panel.getElement().getStyle().setMarginTop(100, Unit.PCT); setElement(panel.getElement()); }
/** * This is used to print opened questions data * * @param result */ void setOpenendedQuestionsPrintData(ArrayList<UserDataDo> result) { try { printOpendedData.clear(); int totalUserCount = collectionMetaData.getUserCount(); final AdvancedFlexTable adTable = new AdvancedFlexTable(); adTable.getElement().setAttribute("style", "background: #fff; width: 1000px;"); adTable.setHeaderWidget(0, getHeaderLbl(i18n.GL3259(), 25)); adTable.setHeaderWidget(1, getHeaderLbl(i18n.GL0308(), 35)); adTable.setHeaderWidget(2, getHeaderLbl(i18n.GL3260(), 500)); adTable.setHeaderWidget(3, getHeaderLbl(i18n.GL2084(), 70)); adTable.setHeaderWidget(4, getHeaderLbl(i18n.GL3261(), 30)); adTable.setHeaderWidget(5, getHeaderLbl(i18n.GL3273(), 80)); if (result.size() != 0) { for (int i = 0; i < result.size(); i++) { adTable.setWidget(i, 0, new Label(String.valueOf(result.get(i).getItemSequence()))); // Set Question Title Label questionTitle = new Label( AnalyticsUtil.html2text( result.get(i).getTitle() != null ? result.get(i).getTitle() : "")); questionTitle.setStyleName(res.css().alignCenterAndBackground()); questionTitle.addStyleName(res.css().alignLeft()); adTable.setWidget(i, 1, questionTitle); // Set completion HTMLPanel completionpnl = new HTMLPanel(""); Label progressBar = new Label(); progressBar.setStyleName(res.css().setProgressBar()); completionpnl.add(progressBar); Label incompleteProgressBar = new Label(); incompleteProgressBar.setStyleName(res.css().setIncorrectProgressBar()); completionpnl.add(incompleteProgressBar); int attemptedCount = result.get(i).getTotalAttemptUserCount(); float maxAvgVal = ((float) attemptedCount) / ((float) totalUserCount); progressBar.getElement().getStyle().setWidth(maxAvgVal * 100, Unit.PX); incompleteProgressBar.getElement().getStyle().setWidth((100 - maxAvgVal * 100), Unit.PX); Label studentTextlbl = new Label(attemptedCount + "/" + totalUserCount + " Students"); studentTextlbl.setStyleName(res.css().alignCenterAndBackground()); studentTextlbl.getElement().getStyle().setWidth(100, Unit.PX); completionpnl.add(studentTextlbl); adTable.setWidget(i, 2, completionpnl); // Set time spent adTable.setWidget(i, 3, AnalyticsUtil.getTimeStampLabel(result.get(i).getAvgTimeSpent())); // Set reactions int reaction = result.get(i).getAvgReaction(); HTMLPanel reactionpnl = new HTMLPanel(""); reactionpnl.add(new AnalyticsReactionWidget(reaction)); Label reactioncount = new Label(); reactionpnl.add(reactioncount); reactioncount.setText(reaction + "/5"); reactioncount.setStyleName(res.css().alignCenterAndBackground()); adTable.setWidget(i, 4, reactionpnl); // set View response label Label viewResponselbl = new Label(""); viewResponselbl.setStyleName(res.css().viewResponseTextOpended()); adTable.setWidget(i, 5, viewResponselbl); } } adTable.getElement().setId("opendedData"); printOpendedData.add(adTable); if (result.size() == 0) { Label erroeMsg = new Label(); erroeMsg.setStyleName(res.css().displayMessageTextForOEQuestions()); erroeMsg.setText(i18n.GL3264()); printOpendedData.add(erroeMsg); } // To add OE questions opendedQuestionHeading.setText(i18n.GL3266()); opendedQuestionHeading.getElement().getStyle().setPaddingTop(15, Unit.PX); opendedQuestionHeading.getElement().getStyle().setPaddingBottom(20, Unit.PX); opendedQuestionHeading.getElement().getStyle().setTextAlign(TextAlign.LEFT); printWidget.add(opendedQuestionHeading); printWidget.add(printOpendedData); printOpendedData.getElement().getStyle().setPaddingBottom(20, Unit.PX); } catch (Exception e) { AppClientFactory.printSevereLogger( "CollectionSummaryTeacherView : setOpenendedQuestionsPrintData : " + e.getMessage()); } }