List of usage examples for com.google.gwt.user.client.ui Image addMouseOutHandler
public HandlerRegistration addMouseOutHandler(MouseOutHandler handler)
From source file:de.eckhartarnold.client.Filmstrip.java
License:Apache License
/** * The constructor of class <code>Filmstrip</code> * @param thumbnailImages the thumb nail images to be displayed on the * film strip/*w w w .j ava2 s . c o m*/ */ public Filmstrip(Thumbnails thumbnailImages) { this.thumbnails = thumbnailImages; envelope = new SimplePanel(); envelope.addStyleName("filmstripEnvelope"); panel = new AbsolutePanel(); panel.addStyleName("filmstripPanel"); envelope.setWidget(panel); initWidget(envelope); // sinkEvents(Event.ONMOUSEWHEEL); ClickHandler imageClickHandler = new ClickHandler() { public void onClick(ClickEvent event) { Widget sender = (Widget) event.getSource(); if (pickImageCallback != null) { pickImageCallback.onPickImage(thumbnails.indexOf((Image) sender)); } } }; MouseDownHandler imageMouseDownHandler = new MouseDownHandler() { public void onMouseDown(MouseDownEvent event) { Widget sender = (Widget) event.getSource(); if (pickImageCallback != null && sender != thumbnails.get(cursor)) { sender.addStyleName("filmstripPressed"); } } }; MouseOverHandler imageMouseOverHandler = new MouseOverHandler() { public void onMouseOver(MouseOverEvent event) { Widget sender = (Widget) event.getSource(); if (pickImageCallback != null && sender != thumbnails.get(cursor)) { sender.addStyleName("filmstripTouched"); } } }; MouseOutHandler imageMouseOutHandler = new MouseOutHandler() { public void onMouseOut(MouseOutEvent event) { Widget sender = (Widget) event.getSource(); if (pickImageCallback != null && sender != thumbnails.get(cursor)) { sender.removeStyleName("filmstripTouched"); sender.removeStyleName("filmstripPressed"); } } }; MouseUpHandler imageMouseUpHandler = new MouseUpHandler() { public void onMouseUp(MouseUpEvent event) { Widget sender = (Widget) event.getSource(); if (pickImageCallback != null && sender != thumbnails.get(cursor)) { sender.removeStyleName("filmstripPressed"); } } }; for (int i = 0; i < thumbnails.size(); i++) { Image img = thumbnails.get(i); if (i == cursor) img.setStyleName("filmstripHighlighted"); else img.setStyleName("filmstrip"); img.addClickHandler(imageClickHandler); img.addMouseDownHandler(imageMouseDownHandler); img.addMouseOverHandler(imageMouseOverHandler); img.addMouseOutHandler(imageMouseOutHandler); img.addMouseUpHandler(imageMouseUpHandler); } visible = new HashSet<Image>(); }
From source file:de.eckhartarnold.client.GalleryWidget.java
License:Apache License
private void initRawGallery() { assert panel == null; panel = new VerticalPanel(); panel.addStyleName("gallery"); panel.getElement().setAttribute("align", "center"); panel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); // add a filler so that the vertical panel is not empty (and its // horizontal size not zero) when the thumbnail pictures are added. // filler = new HTML(" "); // panel.add(filler); ClickHandler imageClickHandler = new ClickHandler() { public void onClick(ClickEvent event) { Widget sender = (Widget) event.getSource(); // String id = DOM.getElementAttribute(sender.getElement(), "id"); String id = sender.getElement().getAttribute("id"); firePickImage(Integer.parseInt(id)); sender.removeStyleName("galleryTouched"); sender.removeStyleName("galleryPressed"); }/*from w ww. jav a 2 s . c o m*/ }; MouseDownHandler imageMouseDownHandler = new MouseDownHandler() { public void onMouseDown(MouseDownEvent event) { Widget sender = (Widget) event.getSource(); sender.addStyleName("galleryPressed"); } }; MouseOverHandler imageMouseOverHandler = new MouseOverHandler() { public void onMouseOver(MouseOverEvent event) { Widget sender = (Widget) event.getSource(); sender.addStyleName("galleryTouched"); } }; MouseOutHandler imageMouseOutHandler = new MouseOutHandler() { public void onMouseOut(MouseOutEvent event) { Widget sender = (Widget) event.getSource(); sender.removeStyleName("galleryTouched"); sender.removeStyleName("galleryPressed"); } }; for (int i = 0; i < thumbnails.size(); i++) { Image img = thumbnails.get(i); img.setStyleName("galleryImage"); Element imgElement = img.getElement(); // DOM.setElementAttribute(imgElement, "id", String.valueOf(i)); imgElement.setAttribute("id", String.valueOf(i)); img.addClickHandler(imageClickHandler); img.addMouseDownHandler(imageMouseDownHandler); img.addMouseOverHandler(imageMouseOverHandler); img.addMouseOutHandler(imageMouseOutHandler); } initWidget(panel); }
From source file:org.bonitasoft.console.client.view.ItemFilterEditor.java
License:Open Source License
protected SimplePanel createNaturalSearchElement(HTML aSearchScopeExplanations) { DecoratorPanel theNaturalSearchPanel = new DecoratorPanel(); theNaturalSearchPanel.setStylePrimaryName(ROUNDED_STYLE); final SuggestBox theSearchSB = new SuggestBox(mySearchOracle); HorizontalPanel theNaturalSearch = new HorizontalPanel(); final Image theMagnifyIcon = new Image(PICTURE_PLACE_HOLDER); theMagnifyIcon.setStylePrimaryName(CSSClassManager.SEARCH_ICON); if (aSearchScopeExplanations != null) { final DecoratedPopupPanel theExplanationsPopup = new DecoratedPopupPanel(true, false); theExplanationsPopup.setWidget(aSearchScopeExplanations); theMagnifyIcon.addMouseOverHandler(new MouseOverHandler() { public void onMouseOver(MouseOverEvent aEvent) { theExplanationsPopup.setPopupPositionAndShow(new PopupPanel.PositionCallback() { public void setPosition(int anOffsetWidth, int anOffsetHeight) { int left = theMagnifyIcon.getAbsoluteLeft() - (anOffsetWidth / 2); int top = theMagnifyIcon.getAbsoluteTop() + theMagnifyIcon.getHeight() + 7; theExplanationsPopup.setPopupPosition(left, top); }/* w ww . j a v a 2 s . c o m*/ }); } }); theMagnifyIcon.addMouseOutHandler(new MouseOutHandler() { public void onMouseOut(MouseOutEvent aEvent) { theExplanationsPopup.hide(); } }); } final Image theActionIcon = new Image(PICTURE_PLACE_HOLDER); theActionIcon.setStylePrimaryName(CSSClassManager.SEARCH_CLEAR_ICON); theActionIcon.setVisible(false); theActionIcon.addClickHandler(new ClickHandler() { public void onClick(ClickEvent aEvent) { theSearchSB.setValue(null); theActionIcon.setVisible(false); clearFilterPatternAndNotify(); } }); final DecoratedPopupPanel theClearTooltip = new DecoratedPopupPanel(true, false); theClearTooltip.setWidget(new HTML(constants.clearFilter())); theActionIcon.addMouseOverHandler(new MouseOverHandler() { public void onMouseOver(MouseOverEvent aEvent) { theClearTooltip.setPopupPositionAndShow(new PopupPanel.PositionCallback() { public void setPosition(int anOffsetWidth, int anOffsetHeight) { int left = theActionIcon.getAbsoluteLeft() - (anOffsetWidth / 2); int top = theActionIcon.getAbsoluteTop() + theActionIcon.getHeight() + 7; theClearTooltip.setPopupPosition(left, top); } }); } }); // theActionIcon.addMouseMoveHandler(new MouseMoveHandler() { // // public void onMouseMove(MouseMoveEvent aEvent) { // theClearTooltip.setPopupPositionAndShow(new PopupPanel.PositionCallback() // { // public void setPosition(int anOffsetWidth, int anOffsetHeight) { // int left = theActionIcon.getAbsoluteLeft() - (anOffsetWidth / 2); // int top = theActionIcon.getAbsoluteTop() + theActionIcon.getHeight() + 7; // theClearTooltip.setPopupPosition(left, top); // } // }); // } // // }); theActionIcon.addMouseOutHandler(new MouseOutHandler() { public void onMouseOut(MouseOutEvent aEvent) { theClearTooltip.hide(); } }); theSearchSB.getTextBox().addKeyDownHandler(new KeyDownHandler() { public void onKeyDown(KeyDownEvent anEvent) { int theKey = anEvent.getNativeKeyCode(); if (KeyCodes.KEY_ENTER == theKey) { if (performNaturalSearch(theSearchSB)) { theActionIcon.setVisible(true); } else { theActionIcon.setVisible(false); } } } }); theSearchSB.getTextBox().addBlurHandler(new BlurHandler() { public void onBlur(BlurEvent aEvent) { theSearchSB.setValue(myFilter.getSearchPattern()); if (theSearchSB.getValue() == null || theSearchSB.getValue().length() == 0) { theActionIcon.setVisible(false); } else { theActionIcon.setVisible(true); } } }); theNaturalSearch.add(theMagnifyIcon); theNaturalSearch.add(theSearchSB); theNaturalSearch.add(theActionIcon); theNaturalSearchPanel.add(theNaturalSearch); return theNaturalSearchPanel; }
From source file:org.bonitasoft.console.client.view.labels.LabelAssociationWidget.java
License:Open Source License
/** * Update the UI.// ww w . jav a2 s . c o m */ private void update() { // first of all clean the panel myLabelSelection.clear(); final List<LabelModel> theLabels = myLabelDataSource.getAllLabels(); // CheckBox theCheckBox; Image theSelectorImage; LabelModel theLabelModel; Image theLabelIcon; Label theLabel; MouseHandler theMouseHandler; LabelClickHandler theClickHandler; int theNbSelectedCaseHavingCurrentLabel; int theNbCaseSelected = myCaseSelection.getSelectedItems().size(); int row = 0; // Create an entry for each label. for (int i = 0; i < theLabels.size(); i++) { theLabelModel = theLabels.get(i); if (theLabelModel.isAssignableByUser()) { // The state of the checkbox depends on the number of // occurrences. // If the label is associated to all cases it must be // selected. // If the label is not associated to any case it must NOT be // selected. // If it is associated at least one but not all cases, it must // be // "partially" selected. theSelectorImage = new Image(PICTURE_PLACE_HOLDER); theNbSelectedCaseHavingCurrentLabel = countSelectedCases(theLabelModel.getUUID()); // myCaseSelection.getSelectedCaseCount(theLabelModel); if (theNbSelectedCaseHavingCurrentLabel == 0 || theNbCaseSelected == 0) { // Empty checkbox theSelectorImage.setStylePrimaryName(EMPTY_TRISTATECHECKBOX); theClickHandler = new LabelClickHandler(theLabelModel.getUUID(), TriState.EMPTY, theSelectorImage); theSelectorImage.addClickHandler(theClickHandler); } else { if (theNbSelectedCaseHavingCurrentLabel == theNbCaseSelected) { // Checkbox fully checked theSelectorImage.setStylePrimaryName(CHECKED_TRISTATECHECKBOX); theClickHandler = new LabelClickHandler(theLabelModel.getUUID(), TriState.FULL, theSelectorImage); theSelectorImage.addClickHandler(theClickHandler); } else { // Checkbox partially checked theSelectorImage.setStylePrimaryName(PARTIALLY_CHECKED_TRISTATECHECKBOX); theClickHandler = new LabelClickHandler(theLabelModel.getUUID(), TriState.PARTIAL, theSelectorImage); theSelectorImage.addClickHandler(theClickHandler); } } theLabel = new Label(LocaleUtil.translate(theLabelModel.getUUID())); theMouseHandler = new MouseHandler(row); theLabel.addMouseOverHandler(theMouseHandler); theLabel.addMouseOutHandler(theMouseHandler); // Bind the same click handler as the checkbox, to allow the // user to click on the label or the check box to achieve the // same result. theLabel.addClickHandler(theClickHandler); theLabelIcon = new Image(PICTURE_PLACE_HOLDER); if (theLabelModel.getIconCSSStyle() != null && theLabelModel.getIconCSSStyle().trim().length() > 0) { theLabelIcon.setStylePrimaryName(theLabelModel.getIconCSSStyle()); } else { theLabelIcon.setWidth("60%"); } theLabelIcon.addMouseOverHandler(theMouseHandler); theLabelIcon.addMouseOutHandler(theMouseHandler); // Bind the same click handler as the checkbox, to allow the // user to click on the label or the check box to achieve the // same result. theLabelIcon.addClickHandler(theClickHandler); myLabelSelection.setWidget(row, 0, theSelectorImage); myLabelSelection.setWidget(row, 1, theLabel); myLabelSelection.setWidget(row, 2, theLabelIcon); myLabelSelection.getRowFormatter().setStyleName(row, CSSClassManager.POPUP_MENU_ENTRY); myLabelSelection.getFlexCellFormatter().setColSpan(row, 0, 1); row++; } } if (row > 0) { myLabelSelection.getRowFormatter().setStyleName(row, "menu_separator"); myLabelSelection.getFlexCellFormatter().setColSpan(row, 0, 3); row++; myLabelSelection.setWidget(row, 0, myApplyLabel); myLabelSelection.getFlexCellFormatter().setColSpan(row, 0, 3); myLabelSelection.getFlexCellFormatter().setHorizontalAlignment(row, 0, HasHorizontalAlignment.ALIGN_CENTER); myLabelSelection.getRowFormatter().setStyleName(row, CSSClassManager.POPUP_MENU_ENTRY); theMouseHandler = new MouseHandler(row); myApplyLabel.addMouseOverHandler(theMouseHandler); myApplyLabel.addMouseOutHandler(theMouseHandler); } }
From source file:org.bonitasoft.console.client.view.StartCasePanel.java
License:Open Source License
/** * Update the User Interface.//from ww w .j a v a 2s .c o m * * @param aProcessesList * */ private void update(Collection<BonitaProcess> aProcessesList) { // First of all clean up the panel. myVisibleEntries.clear(); myHiddenEntries.clear(); // myProcessOracle.clear(); if (aProcessesList != null && !aProcessesList.isEmpty()) { // Create an entry for each process the current user is allowed to // start. Label theLabel; ProcessMouseHandler theMouseHandler; Image theStartIcon; int theRow = 0; String theProcessDisplayName = null; for (BonitaProcess theProcessDefinition : aProcessesList) { theMouseHandler = new ProcessMouseHandler(theProcessDefinition, new Label(constants.startCase())); // When the name of the process is to long, add of "..." a the end of the name if (theProcessDefinition.getDisplayName() != null) { StringBuilder nameDisplayed = new StringBuilder(); String[] nameSplitted = theProcessDefinition.getDisplayName().split(" "); for (int i = 0; i < nameSplitted.length; i++) { if (nameSplitted[i].length() > 22) { nameDisplayed.append(nameSplitted[i].substring(0, 19)); nameDisplayed.append("..."); break; } else { nameDisplayed.append(nameSplitted[i]); nameDisplayed.append(" "); } } theProcessDisplayName = nameDisplayed.toString(); } theLabel = new Label(theProcessDisplayName); theLabel.addMouseOverHandler(theMouseHandler); theLabel.addMouseOutHandler(theMouseHandler); theLabel.addClickHandler(new ProcessClickHandler(theProcessDefinition)); theLabel.setStyleName("menu_choice"); theStartIcon = new Image(PICTURE_PLACE_HOLDER); theStartIcon.addMouseOverHandler(theMouseHandler); theStartIcon.addMouseOutHandler(theMouseHandler); theStartIcon.addClickHandler(new ProcessClickHandler(theProcessDefinition)); theStartIcon.setStyleName("start_case_icon"); if (theProcessDefinition.isVisible()) { myVisibleEntries.setWidget(theRow, 0, theLabel); myVisibleEntries.setWidget(theRow, 1, theStartIcon); } else { myHiddenEntries.setWidget(theRow, 0, theLabel); myHiddenEntries.setWidget(theRow, 1, theStartIcon); } // add the process into the suggestbox's oracle // myProcessOracle.add(theProcessDisplayName); theRow++; } if (myHiddenEntries.getRowCount() > 0) { myOuterPanel.add(myMoreMenu); } else { myOuterPanel.remove(myMoreMenu); } } else { myVisibleEntries.setWidget(0, 0, myEmptyListMessage); myOuterPanel.remove(myMoreMenu); } }
From source file:org.drools.guvnor.client.simulation.TimeLineWidget.java
License:Apache License
private Image createStepWidget(SimulationPathModel path, final SimulationStepModel step) { ImageResource imageResource = simulationResources.stepEmpty(); final Image image = new Image(imageResource); final PopupPanel popupPanel = new PopupPanel(true); popupPanel.setWidget(//from ww w . ja v a2 s . co m new Label(path.getName() + " @ " + SimulationTestUtils.formatMillis(step.getDistanceMillis()))); image.addMouseOverHandler(new MouseOverHandler() { public void onMouseOver(MouseOverEvent event) { popupPanel.showRelativeTo(image); } }); image.addMouseOutHandler(new MouseOutHandler() { public void onMouseOut(MouseOutEvent event) { popupPanel.hide(); } }); popupPanel.setAutoHideOnHistoryEventsEnabled(true); image.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { simulationTestEventHandler.selectStep(step); } }); return image; }
From source file:org.ednovo.gooru.client.mvp.assessments.play.collection.info.AssessmentsResourceInfoView.java
License:Open Source License
public void setResourceLicenceLogo(String assetUrl, LicenseDo licenseDo) { if (licenseDo != null) { if (!StringUtil.isEmpty(licenseDo.getIcon())) { Image image = new Image(); image.setUrl(assetUrl + licenseDo.getIcon()); image.addMouseOverHandler(//from www . j a v a 2s . c o m new MouseOverShowStandardToolTip(licenseDo.getCode(), licenseDo.getName())); image.addMouseOutHandler(new MouseOutHideToolTip()); licenceContainer.setVisible(true); rightsLogoContainer.clear(); rightsLogoContainer.add(image); } else { licenceContainer.setVisible(false); rightsLogoContainer.clear(); } } else { licenceContainer.setVisible(false); rightsLogoContainer.clear(); } }
From source file:org.ednovo.gooru.client.mvp.classpage.studentclassview.learningmap.assessmentchild.SlmAssessmentChildView.java
License:Open Source License
private void setResourceData(ArrayList<PlanContentDo> resourceList, String collectionType) { int size = resourceList.size(); if (size > 0) { if (size > 10) { size = 10;//from w w w . j a v a2 s. co m } for (int i = 0; i < size; i++) { try { final PlanContentDo resourceDo = resourceList.get(i); String categoryString = ""; if (resourceDo.getResourceFormat() != null) { categoryString = resourceDo.getResourceFormat().getDisplayName(); } final String category = categoryString; final HTMLEventPanel resourcePanel = new HTMLEventPanel(""); //resourcePanel.setStyleName(libraryStyle.resourceImage()); final Image resourceImage = new Image(); String resourceTitle = null; try { resourceTitle = resourceDo.getTitle().replaceAll("\\<[^>]*>", ""); resourceDo.setTitle(resourceTitle); } catch (Exception e) { AppClientFactory.printSevereLogger( "SimAssessmentChileView : setResourceData 1 : " + e.getMessage()); } resourceImage.setAltText(resourceTitle); resourceImage.setTitle(resourceTitle); final HTMLEventPanel resourceCategoryIcon = new HTMLEventPanel(""); resourceCategoryIcon.addMouseOverHandler(new MouseOverHandler() { @Override public void onMouseOver(MouseOverEvent event) { try { toolTipPopupPanel.clear(); toolTipPopupPanel .setWidget(new LibraryTopicCollectionToolTip(resourceDo.getTitle())); toolTipPopupPanel.setStyleName(""); toolTipPopupPanel.setPopupPosition(event.getRelativeElement().getAbsoluteLeft() - 2, event.getRelativeElement().getAbsoluteTop() + 55); toolTipPopupPanel.show(); } catch (Exception ex) { AppClientFactory.printSevereLogger( "SimAssessmentChileView : setResourceData 2 : " + ex.getMessage()); } } }); resourceCategoryIcon.addMouseOutHandler(new MouseOutHandler() { @Override public void onMouseOut(MouseOutEvent event) { toolTipPopupPanel.hide(); } }); resourceCategoryIcon.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { } }); resourceImage.addMouseOverHandler(new MouseOverHandler() { @Override public void onMouseOver(MouseOverEvent event) { try { toolTipPopupPanel.clear(); toolTipPopupPanel .setWidget(new LibraryTopicCollectionToolTip(resourceDo.getTitle())); toolTipPopupPanel.setStyleName(""); toolTipPopupPanel.setPopupPosition(event.getRelativeElement().getAbsoluteLeft() - 2, event.getRelativeElement().getAbsoluteTop() + 55); toolTipPopupPanel.show(); } catch (Exception ex) { AppClientFactory.printSevereLogger( "SimAssessmentChileView : setResourceData 3 : " + ex.getMessage()); } } }); resourceImage.addMouseOutHandler(new MouseOutHandler() { @Override public void onMouseOut(MouseOutEvent event) { toolTipPopupPanel.hide(); } }); try { if (resourceDo.getThumbnails() != null && resourceDo.getThumbnails().getUrl() != null && !resourceDo.getThumbnails().getUrl().isEmpty()) { resourceImage.setUrl(resourceDo.getThumbnails().getUrl()); } else { resourceImage.setUrl( DEFULT_IMAGE_PREFIX + getDetaultResourceImage(category.toLowerCase()) + PNG); } resourceImage.addErrorHandler(new ErrorHandler() { @Override public void onError(ErrorEvent event) { resourceImage.setUrl(DEFULT_IMAGE_PREFIX + getDetaultResourceImage(category.toLowerCase()) + PNG); } }); } catch (Exception e) { e.printStackTrace(); resourceImage.setUrl( DEFULT_IMAGE_PREFIX + getDetaultResourceImage(category.toLowerCase()) + PNG); resourceImage.setAltText(resourceDo.getTitle()); resourceImage.setTitle(resourceDo.getTitle()); AppClientFactory.printSevereLogger( "SimAssessmentChileView : setResourceData 4 : " + e.getMessage()); } resourcePanel.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { } }); resourceCategoryIcon.addStyleName("resourceName"); resourceCategoryIcon.addStyleName(getDetaultResourceImage(category.toLowerCase()) + SMALL); resourcePanel.add(resourceImage); resourcePanel.add(resourceCategoryIcon); resourceImgContainer.add(resourcePanel); } catch (Exception e) { e.printStackTrace(); } } } else { if (collectionType != null && collectionType.equalsIgnoreCase(UrlNavigationTokens.TEACHER_CLASSPAGE_COLLECTION)) { resourceImgContainer.add(new Label(i18n.GL3466_1())); } else { resourceImgContainer.add(new Label(i18n.GL3466_2())); } } }
From source file:org.ednovo.gooru.client.mvp.classpage.teach.edit.EditClassSettingsView.java
License:Open Source License
public void setIds() { gradeWidget.getElement().setId("gooruSearchMainContainer"); gooruGradesPresenterWidget.getView().getGradeHeader().setVisible(false); gradeBlock.clear();//from ww w. j a va2 s .c o m gooruGradesPresenterWidget.setPageType("editclass"); gradeBlock.add(gooruGradesPresenterWidget.getWidget()); publicPanel.getElement().setId("panelPublic"); publicPanel.getElement().setAttribute("alt", "public"); publicPanel.getElement().setAttribute("title", "public"); privatePanel.getElement().setId("panelPrivate"); publicPanel.getElement().setAttribute("alt", "public"); publicPanel.getElement().setAttribute("title", "public"); anyonwwithLink.getElement().setInnerText(i18n.GL3338()); anyonwwithLinkTxt.getElement().setInnerText(i18n.GL3339()); privateLbl.getElement().setInnerText(i18n.GL3340()); privateLblTxt.getElement().setInnerText(i18n.GL3341()); classTitleLbl.setText(i18n.GL3401()); classTitleLbl.getElement().setId("classTitleLblId"); classTitleLbl.getElement().setAttribute("alt", i18n.GL3401()); classTitleLbl.getElement().setAttribute("title", i18n.GL3401()); gradePanel.setText(i18n.GL0325()); gradePanel.getElement().setId("classGradeLblId"); gradePanel.getElement().setAttribute("alt", i18n.GL0325()); gradePanel.getElement().setAttribute("title", i18n.GL0325()); bannerImagePanel.setText(i18n.GL3402()); bannerImagePanel.getElement().setId("baneerImageLblId"); bannerImagePanel.getElement().setAttribute("alt", i18n.GL3402()); bannerImagePanel.getElement().setAttribute("title", i18n.GL3402()); uploadImagePanel.setText(i18n.GL0912()); uploadImagePanel.getElement().setId("uploadImageLblId"); uploadImagePanel.getElement().setAttribute("alt", i18n.GL0912()); uploadImagePanel.getElement().setAttribute("title", i18n.GL0912()); classCodePanel.setText(i18n.GL1592()); classCodePanel.getElement().setId("classCodeLblId"); classCodePanel.getElement().setAttribute("alt", i18n.GL1592()); classCodePanel.getElement().setAttribute("title", i18n.GL1592()); sharePanel.setText(i18n.GL1594()); sharePanel.getElement().setId("sharePanelId"); sharePanel.getElement().setAttribute("alt", i18n.GL1594()); visiblityPanel.setText(i18n.GL3342()); visiblityPanel.getElement().setId("sharePanelId"); visiblityPanel.getElement().setAttribute("alt", i18n.GL3342()); Image image = new Image(QUESTIONIMAGE); image.addMouseOverHandler(new MouseOverShowClassCodeToolTip1()); image.addMouseOutHandler(new MouseOutHideToolTip1()); Image shareImage = new Image(QUESTIONIMAGE); shareImage.addMouseOverHandler(new MouseOverShowClassCodeToolTip2()); shareImage.addMouseOutHandler(new MouseOutHideToolTip2()); saveBtn.setText(i18n.GL0141()); saveBtn.getElement().setId("saveBtnId"); saveBtn.getElement().setAttribute("alt", i18n.GL0141()); saveBtn.getElement().setAttribute("title", i18n.GL0141()); saveBtn.addStyleName(CssTokens.DISABLED); saveBtn.setEnabled(false); saveLbl.setText(i18n.GL3426()); saveLbl.getElement().setId("saveLblId"); saveLbl.getElement().setAttribute("alt", i18n.GL3426()); saveLbl.getElement().setAttribute("title", i18n.GL3426()); classImage.getElement().setId("thumbnailImage"); classImage.setVisible(false); shareUrlTxtLbl.setReadOnly(true); shareUrlTxtLbl.getElement().getStyle().setBackgroundColor("#FFF"); shareUrlTxtLbl.getElement().getStyle().setCursor(Cursor.DEFAULT); StringUtil.setAttributes(shareUrlTxtLbl, true); fullTxtBox.setReadOnly(true); fullTxtBox.getElement().setAttribute("style", "background-color: #FFF;cursor: default"); StringUtil.setAttributes(fullTxtBox, true); classCodePanel.add(image); sharePanel.add(shareImage); errorLbl.setVisible(false); saveLbl.setVisible(false); }
From source file:org.ednovo.gooru.client.mvp.classpage.teach.edit.student.EditClassStudentView.java
License:Open Source License
public void setIds() { classCodePanel.setText(i18n.GL0184()); classCodePanel.getElement().setId("classCodePanelId"); shareLnkPanel.setText(i18n.GL1594()); shareLnkPanel.getElement().setId("sharelnkPanel"); inviteEmailTxt.setText(i18n.GL3419()); inviteEmailTxt.getElement().setId("inviteEmailTxtId"); emailAddTxt.setText(i18n.GL1591());/*from ww w .j a v a 2s . c o m*/ emailAddTxt.getElement().setId("emailAddTextId"); inviteBtn.setText(i18n.GL3450_17()); inviteBtn.getElement().setId("inviteBtnId"); studentJoinPanel.setText(i18n.GL1526()); studentJoinPanel.getElement().setId("studentJoinPanelId"); analyPanel.setText(i18n.GL1633()); analyPanel.getElement().setId("analyPanelId"); Image image = new Image(QUESTIONIMAGE); image.getElement().setId("classCodeImageId"); image.addMouseOverHandler(new MouseOverShowClassCodeToolTip1()); image.addMouseOutHandler(new MouseOutHideToolTip1()); Image image2 = new Image(QUESTIONIMAGE); image2.getElement().setId("sharLnkId"); image2.addMouseOverHandler(new MouseOverShowClassCodeToolTip2()); image2.addMouseOutHandler(new MouseOutHideToolTip2()); lblPleaseWait.setText(i18n.GL1137()); lblPleaseWait.getElement().setId("lblPleaseWait"); lblPleaseWait.getElement().setAttribute("alt", i18n.GL1137()); lblPleaseWait.getElement().setAttribute("title", i18n.GL1137()); ancPendingListSeeMore.setText(i18n.GL0508().toLowerCase()); ancPendingListSeeMore.getElement().setId("lnkPendingListSeeMore"); ancPendingListSeeMore.getElement().setAttribute("alt", i18n.GL0508().toLowerCase()); ancPendingListSeeMore.getElement().setAttribute("title", i18n.GL0508().toLowerCase()); ancPendingListSeeMore.setVisible(false); ancActiveListSeeMore.setText(i18n.GL0508().toLowerCase()); ancActiveListSeeMore.getElement().setId("lnkActiveListSeeMore"); ancActiveListSeeMore.getElement().setAttribute("alt", i18n.GL0508().toLowerCase()); ancActiveListSeeMore.getElement().setAttribute("title", i18n.GL0508().toLowerCase()); ancActiveListSeeMore.setVisible(false); lblPendingPleaseWait.setVisible(false); lblActivePleaseWait.setVisible(false); lblPendingPleaseWait.setText(i18n.GL0339().toLowerCase()); lblPendingPleaseWait.getElement().setId("lblPendingPleaseWait"); lblPendingPleaseWait.getElement().setAttribute("alt", i18n.GL0339().toLowerCase()); lblPendingPleaseWait.getElement().setAttribute("title", i18n.GL0339().toLowerCase()); lblActivePleaseWait.setText(i18n.GL0339().toLowerCase()); lblActivePleaseWait.getElement().setId("lblActivePleaseWait"); lblActivePleaseWait.getElement().setAttribute("alt", i18n.GL0339().toLowerCase()); lblActivePleaseWait.getElement().setAttribute("title", i18n.GL0339().toLowerCase()); classCodePanel.add(image); shareLnkPanel.add(image2); studentPendingPanel.setText(i18n.GL1525()); studentPendingPanel.getElement().setId("studentPendingPanelId"); panelSuggestBox.getElement().setId("pnlSuggestbox"); sharTxtBox.setReadOnly(true); sharTxtBox.getElement().getStyle().setBackgroundColor("#FFF"); sharTxtBox.getElement().getStyle().setCursor(Cursor.DEFAULT); StringUtil.setAttributes(sharTxtBox, true); fullTxtBox.setReadOnly(true); fullTxtBox.getElement().setAttribute("style", "margin:10px 0px;background-color: #FFF;cursor: default"); StringUtil.setAttributes(fullTxtBox, true); createAutoSuggestBox(); }