List of usage examples for com.google.gwt.user.client.ui HTMLPanel HTMLPanel
private HTMLPanel(Element elem)
From source file:org.ednovo.gooru.client.mvp.folder.toc.FolderTocView.java
License:Open Source License
/** * This method is used to display loading text to the user. * @return/*from w ww . j a v a 2 s .c om*/ */ public TreeItem getLoadingImage() { HTMLPanel loadingImg = new HTMLPanel(i18n.GL3120()); loadingImg.setStyleName(FolderContainerCBundle.INSTANCE.css().loadingImageMainDiv()); Label loadingText = new Label(""); loadingText.setStyleName(FolderContainerCBundle.INSTANCE.css().loadingImageForSelfEdit()); loadingImg.add(loadingText); return new TreeItem(loadingImg); }
From source file:org.ednovo.gooru.client.mvp.gsearch.SearchAbstractView.java
License:Open Source License
@Override public void postSearch(SearchDo<T> searchDo, boolean isApiCalled) { if (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken() .equalsIgnoreCase(PlaceTokens.SEARCH_COLLECTION)) { btnSearchType.setText(i18n.GL0645()); btnSearchType.getElement().appendChild(cart.getElement()); } else {// w w w . j av a 2s. co m btnSearchType.setText(i18n.GL1110()); btnSearchType.getElement().appendChild(cart.getElement()); } searchDoGbl = searchDo; pnlBackToTop.setVisible(true); if (searchDo.getSearchResults() != null && searchDo.getSearchResults().size() > 0) { long startTime = System.currentTimeMillis(); searchResults.setVisible(true); panelBorderBox.getElement().getStyle().clearBackgroundColor(); resultCountVal = searchDo.getSearchResults().size() + resultCountVal; if (searchDo.getQuery() != null && !searchDo.getQuery().equalsIgnoreCase("*")) { searchResults.setText( i18n.GL3257() + " " + searchDo.getQuery() + " " + "(" + searchDo.getSearchHits() + ")"); } else { searchResults.setText(i18n.GL3275() + " " + "(" + searchDo.getSearchHits() + ")"); } if (isInsertTems) { if (Document.get().getElementById(searchDo.getSearchResults().get(0).getGooruOid()) == null) { HTMLPanel widgetsContainer = new HTMLPanel(""); widgetsContainer.getElement().setId((pageNumber - 10) + ""); searchResultPanel.insert(widgetsContainer, 0); for (T searchResult : searchDo.getSearchResults()) { widgetsContainer.add(renderSearchResult(searchResult)); } } if (pageCountForStorage > 3) { Window.scrollTo(0, getWidgetHeight() * 4); } lblLoadingTextPrevious.setVisible(false); isApiInProgressBack = true; } else { HTMLPanel widgetsContainer = new HTMLPanel(""); widgetsContainer.getElement().setId(pageNumber + ""); searchResultPanel.add(widgetsContainer); for (T searchResult : searchDo.getSearchResults()) { widgetsContainer.add(renderSearchResult(searchResult)); } long stopTime = System.currentTimeMillis(); long elapsedTime = stopTime - startTime; AppClientFactory.printInfoLogger("FE render Difference time:" + elapsedTime + " ms"); if (pageNumber == 1) { pnlFirstTempData = searchResultPanel.getWidget(0); } isApiInProgress = true; } lblLoadingText.setVisible(false); lblLoadingTextPrevious.setVisible(false); //removeTopWidgets(isInsertTems); } else if (pageNumber == 1) { lblLoadingText.setVisible(false); searchResults.setVisible(true); searchResults.setText(i18n.GL3210()); pnlBackToTop.setVisible(false); panelBorderBox.getElement().getStyle().setBackgroundColor("#FFFFFF"); searchResults.setVisible(false); searchResultPanel.clear(); searchResultPanel.add(NoSearchResultWidget.getInstance()); } else { lblLoadingText.setVisible(false); lblLoadingTextPrevious.setVisible(false); } if (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken() .equals(PlaceTokens.SEARCH_COLLECTION)) { // collectionPanel.setStyleName("active"); // resourcePanel.removeStyleName("active"); resourceSearchPanel.setVisible(false); collectionSearchPanel.setVisible(true); } else { // collectionPanel.removeStyleName("active"); // resourcePanel.setStyleName("active"); resourceSearchPanel.setVisible(true); collectionSearchPanel.setVisible(false); } pnlAddFilters.clear(); clearUlPanels(ulSubjectPanel); showGradesFilter(); showCategoryFilter(); showSubjectsFilter(); showOERFilter(); showAuthorFilter(); showStandardsFilter(); showMobileFriendlyFilter(); showAccessModeFilter(); showPublisherFilter(); showAggregatorFilter(); showContributorFilter(); showReviewFilter(); setStyleForCollectionType(); showRatingsFilter(); }
From source file:org.ednovo.gooru.client.mvp.gsearch.SearchAbstractView.java
License:Open Source License
public final void populateStandardValues() { for (String standardsTypesArray1 : standardsTypesArray) { List<String> standardsDescriptionList = Arrays.asList(standardsTypesArray1.split(",")); LiPanel liPanel = new LiPanel(); for (int j = 0; j < standardsDescriptionList.size(); j++) { HTMLPanel headerDiv = new HTMLPanel(""); if (j == 0) { if (standardsDescriptionList.get(j).equalsIgnoreCase("CA SS")) { liPanel.getElement().setId("CA"); } else { liPanel.getElement().setId(standardsDescriptionList.get(j)); }/* ww w.j av a2 s.co m*/ if ((!isCCSSAvailable) && standardsDescriptionList.get(j).equalsIgnoreCase("CCSS")) { liPanel.getElement().setAttribute("style", "opacity:0.5;"); } else if ((!isCAAvailable) && standardsDescriptionList.get(j).equalsIgnoreCase("CA SS")) { liPanel.getElement().setAttribute("style", "opacity:0.5;"); } else if ((!isNGSSAvailable) && standardsDescriptionList.get(j).equalsIgnoreCase("NGSS")) { liPanel.getElement().setAttribute("style", "opacity:0.5;"); } else if ((!isTEKSAvailable) && standardsDescriptionList.get(j).equalsIgnoreCase("TEKS")) { liPanel.getElement().setAttribute("style", "opacity:0.5;"); } headerDiv.setStyleName("liPanelStyle"); } else { if (standardsDescriptionList.get(j).equalsIgnoreCase("College Career and Civic Life")) { standardsDescriptionList.set(j, "College, Career, and Civic Life"); headerDiv.setStyleName("liPanelStylenonBold"); liPanel.getElement().setAttribute("standarddesc", "College, Career, and Civic Life"); } else { headerDiv.setStyleName("liPanelStylenonBold"); liPanel.getElement().setAttribute("standarddesc", standardsDescriptionList.get(j)); } } headerDiv.getElement().setInnerHTML(standardsDescriptionList.get(j)); liPanel.add(headerDiv); } if (liPanel.getElement().getAttribute("style") != null && !liPanel.getElement().getAttribute("style").equalsIgnoreCase("opacity:0.5;")) { liPanel.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { String standardsVal = event.getRelativeElement().getAttribute("id"); String standardsDesc = event.getRelativeElement().getAttribute("standarddesc"); searchLiPanelWithCloseArray.clear(); // setUpdatedStandards /* for(int i=0;i<ulSelectedItems.getWidgetCount();i++){ searchLiPanelWithCloseArray.add((LiPanelWithClose) ulSelectedItems.getWidget(i)); }*/ getUiHandlers().showStandardsPopup(standardsVal, standardsDesc, searchLiPanelWithCloseArray); } }); } standardsDropListValues.add(liPanel); } }
From source file:org.ednovo.gooru.client.mvp.gshelf.collectiondetails.CollectionInfoView.java
License:Open Source License
public final void populateStandardValues() { for (String standardsTypesArray1 : standardsTypesArray) { List<String> standardsDescriptionList = Arrays.asList(standardsTypesArray1.split(",")); LiPanel liPanel = new LiPanel(); for (int j = 0; j < standardsDescriptionList.size(); j++) { HTMLPanel headerDiv = new HTMLPanel(""); if (j == 0) { if (standardsDescriptionList.get(j).equalsIgnoreCase("CA SS")) { liPanel.getElement().setId("CA"); } else { liPanel.getElement().setId(standardsDescriptionList.get(j)); }/* www. jav a 2 s. c om*/ if ((!isCCSSAvailable) && standardsDescriptionList.get(j).equalsIgnoreCase("CCSS")) { liPanel.getElement().setAttribute("style", "opacity:0.5;"); } else if ((!isCAAvailable) && standardsDescriptionList.get(j).equalsIgnoreCase("CA SS")) { liPanel.getElement().setAttribute("style", "opacity:0.5;"); } else if ((!isNGSSAvailable) && standardsDescriptionList.get(j).equalsIgnoreCase("NGSS")) { liPanel.getElement().setAttribute("style", "opacity:0.5;"); } else if ((!isTEKSAvailable) && standardsDescriptionList.get(j).equalsIgnoreCase("TEKS")) { liPanel.getElement().setAttribute("style", "opacity:0.5;"); } headerDiv.setStyleName("liPanelStyle"); } else { if (standardsDescriptionList.get(j).equalsIgnoreCase("College Career and Civic Life")) { standardsDescriptionList.set(j, "College, Career, and Civic Life"); headerDiv.setStyleName("liPanelStylenonBold"); liPanel.getElement().setAttribute("standarddesc", "College, Career, and Civic Life"); } else { headerDiv.setStyleName("liPanelStylenonBold"); liPanel.getElement().setAttribute("standarddesc", standardsDescriptionList.get(j)); } } headerDiv.getElement().setInnerHTML(standardsDescriptionList.get(j)); liPanel.add(headerDiv); } if (liPanel.getElement().getAttribute("style") != null && !liPanel.getElement().getAttribute("style").equalsIgnoreCase("opacity:0.5;")) { liPanel.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { String standardsVal = event.getRelativeElement().getAttribute("id"); String standardsDesc = event.getRelativeElement().getAttribute("standarddesc"); collectionLiPanelWithCloseArray.clear(); for (int i = 0; i < ulSelectedItems.getWidgetCount(); i++) { collectionLiPanelWithCloseArray.add((LiPanelWithClose) ulSelectedItems.getWidget(i)); } getUiHandlers().showStandardsPopup(standardsVal, standardsDesc, collectionLiPanelWithCloseArray); } }); } standardsDropListValues.add(liPanel); } }
From source file:org.ednovo.gooru.client.mvp.gshelf.lessondetails.LessonInfoView.java
License:Open Source License
public final void populateStandardValues() { for (String standardsTypesArray1 : standardsTypesArray) { List<String> standardsDescriptionList = Arrays.asList(standardsTypesArray1.split(",")); LiPanel liPanel = new LiPanel(); for (int j = 0; j < standardsDescriptionList.size(); j++) { HTMLPanel headerDiv = new HTMLPanel(""); if (j == 0) { if (standardsDescriptionList.get(j).equalsIgnoreCase("CA SS")) { liPanel.getElement().setId("CA"); } else { liPanel.getElement().setId(standardsDescriptionList.get(j)); }/*from w w w. j a v a2 s . c om*/ if ((!isCCSSAvailable) && standardsDescriptionList.get(j).equalsIgnoreCase("CCSS")) { liPanel.getElement().setAttribute("style", "opacity:0.5;"); } else if ((!isCAAvailable) && standardsDescriptionList.get(j).equalsIgnoreCase("CA SS")) { liPanel.getElement().setAttribute("style", "opacity:0.5;"); } else if ((!isNGSSAvailable) && standardsDescriptionList.get(j).equalsIgnoreCase("NGSS")) { liPanel.getElement().setAttribute("style", "opacity:0.5;"); } else if ((!isTEKSAvailable) && standardsDescriptionList.get(j).equalsIgnoreCase("TEKS")) { liPanel.getElement().setAttribute("style", "opacity:0.5;"); } headerDiv.setStyleName("liPanelStyle"); } else { if (standardsDescriptionList.get(j).equalsIgnoreCase("College Career and Civic Life")) { standardsDescriptionList.set(j, "College, Career, and Civic Life"); headerDiv.setStyleName("liPanelStylenonBold"); liPanel.getElement().setAttribute("standarddesc", "College, Career, and Civic Life"); } else { headerDiv.setStyleName("liPanelStylenonBold"); liPanel.getElement().setAttribute("standarddesc", standardsDescriptionList.get(j)); } } headerDiv.getElement().setInnerHTML(standardsDescriptionList.get(j)); liPanel.add(headerDiv); } if (liPanel.getElement().getAttribute("style") != null && !liPanel.getElement().getAttribute("style").equalsIgnoreCase("opacity:0.5;")) { liPanel.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { String standardsVal = event.getRelativeElement().getAttribute("id"); String standardsDesc = event.getRelativeElement().getAttribute("standarddesc"); lessonLiPanelWithCloseArray.clear(); for (int i = 0; i < ulSelectedItems.getWidgetCount(); i++) { lessonLiPanelWithCloseArray.add((LiPanelWithClose) ulSelectedItems.getWidget(i)); } getUiHandlers().showStandardsPopup(standardsVal, standardsDesc, lessonLiPanelWithCloseArray); } }); } standardsDropListValues.add(liPanel); } }
From source file:org.ednovo.gooru.client.mvp.gshelf.ShelfTreeWidget.java
License:Open Source License
public void setEmptyData() { htmlPanel = new HTMLPanel(i18n.GL0989()); htmlPanel.getElement().getStyle().setTextAlign(TextAlign.CENTER); htmlPanel.getElement().getStyle().setMarginLeft(19, Unit.PX); htmlPanel.getElement().getStyle().setColor("#999999"); htmlPanel.getElement().setId(collectionDo.getGooruOid()); }
From source file:org.ednovo.gooru.client.mvp.gshelf.ShelfTreeWidget.java
License:Open Source License
public void setAllResources(List<FolderDo> folderDo) { if (folderDo.size() > 0) { for (FolderDo folderItemDo : folderDo) { //addCollectionItem(folderItemDo, false); }// ww w . j a v a2 s . c o m } else { // /contentVerPanel.clear(); htmlPanel = new HTMLPanel(i18n.GL0854()); htmlPanel.getElement().getStyle().setTextAlign(TextAlign.CENTER); htmlPanel.getElement().getStyle().setMarginLeft(19, Unit.PX); htmlPanel.getElement().getStyle().setColor("#999999"); htmlPanel.getElement().getStyle().setFontStyle(FontStyle.ITALIC); htmlPanel.getElement().setId(collectionDo.getGooruOid()); //contentVerPanel.add(htmlPanel); } }
From source file:org.ednovo.gooru.client.mvp.home.landingpage.GooruInClassRoomVc.java
License:Open Source License
public GooruInClassRoomVc() { initWidget(uiBinder.createAndBindUi(this)); classroomText.setText(GL0200);//from ww w . jav a2 s . c o m backto.setText(GL1260); teachingMethodsLbl.setText(GL1322); gooruCrTab1.getElement().setInnerText(GL1323); gooruCrTab2.getElement().setInnerText(GL1324); gooruCrTab3.getElement().setInnerText(GL1325); gooruCrTab4.getElement().setInnerText(GL1326); gooruCrTab5.getElement().setInnerText(GL1327); tabContent1 = new HTMLPanel(""); tabContent2 = new HTMLPanel(""); tabContent3 = new HTMLPanel(""); tabContent4 = new HTMLPanel(""); tabContent5 = new HTMLPanel(""); loadingImage = new HTMLPanel(""); loadingImage.setStyleName(landingPageStyle.loadingImage()); methodsContentContainer.add(loadingImage); gooruCrTab1.addStyleName(landingPageStyle.methodsLiActive()); setTabbedContent(CLASSROOM_TAB1); panelGooruClassRoom.getElement().setId("panelGooruClassRoom"); backto.getElement().setId("lnkBackTo"); }
From source file:org.ednovo.gooru.client.mvp.home.landingpage.TeachersPickUc.java
License:Open Source License
public TeachersPickUc() { initWidget(uiBinder.createAndBindUi(this)); mathTab.addStyleName(landingPageStyle.courseTabsLiActive()); featuredContent = new HTMLPanel(""); mathContent = new HTMLPanel(""); scienceContent = new HTMLPanel(""); socialContent = new HTMLPanel(""); languageContent = new HTMLPanel(""); loadingImage = new HTMLPanel(""); mathTab.getElement().setInnerText(GL1001); scienceTab.getElement().setInnerText(GL1000); socialTab.getElement().setInnerText(GL1002); languageTab.getElement().setInnerText(GL1003); featuredTab.getElement().setInnerText(GL1009); loadingImage.setStyleName(landingPageStyle.loadingImage()); featuredContainer.add(loadingImage); teachersPickPanelLabel = new Label(GL0198); teachersPickPanel.add(teachersPickPanelLabel);//new DownToolTipWidgetUc(teachersPickPanelLabel, TEACHERS_PICK_DESCRIPTION)); getTeacherPickCollections(MATH_TAB); AppClientFactory.getEventBus().addHandler(SetTexasAccountEvent.TYPE, setTexasAccountHandler); panelTeachersPick.getElement().setId("panelTeachersPick"); }
From source file:org.ednovo.gooru.client.mvp.home.landingpage.TeachersPickUc.java
License:Open Source License
private void setTeacherPickCollections(final List<FeaturedCollectionContentDo> collectionList, String filterTab) {/*w w w . j a v a 2 s. c o m*/ if (filterTab.equalsIgnoreCase(FEATURED_TAB)) { for (int i = 0; i < collectionList.size(); i++) { featuredContent.add(new FeaturedCollectionUc(collectionList.get(i).getScollections().get(0))); } clearFix = new HTMLPanel(""); clearFix.setStyleName(landingPageStyle.clearfix()); featuredContent.add(clearFix); featuredContainer.add(featuredContent); } else if (filterTab.equalsIgnoreCase(MATH_TAB)) { for (int i = 0; i < collectionList.size(); i++) { mathContent.add(new FeaturedCollectionUc(collectionList.get(i).getScollections().get(0))); } clearFix = new HTMLPanel(""); clearFix.setStyleName(landingPageStyle.clearfix()); mathContent.add(clearFix); featuredContainer.add(mathContent); } else if (filterTab.equalsIgnoreCase(SCIENCE_TAB)) { for (int i = 0; i < collectionList.size(); i++) { scienceContent.add(new FeaturedCollectionUc(collectionList.get(i).getScollections().get(0))); } clearFix = new HTMLPanel(""); clearFix.setStyleName(landingPageStyle.clearfix()); scienceContent.add(clearFix); featuredContainer.add(scienceContent); } else if (filterTab.equalsIgnoreCase(SOCIAL_TAB)) { for (int i = 0; i < collectionList.size(); i++) { socialContent.add(new FeaturedCollectionUc(collectionList.get(i).getScollections().get(0))); } clearFix = new HTMLPanel(""); clearFix.setStyleName(landingPageStyle.clearfix()); socialContent.add(clearFix); featuredContainer.add(socialContent); } else if (filterTab.equalsIgnoreCase(LANGUAGE_TAB)) { for (int i = 0; i < collectionList.size(); i++) { languageContent.add(new FeaturedCollectionUc(collectionList.get(i).getScollections().get(0))); } clearFix = new HTMLPanel(""); clearFix.setStyleName(landingPageStyle.clearfix()); languageContent.add(clearFix); featuredContainer.add(languageContent); } loadingImage.setVisible(false); }