List of usage examples for com.google.gwt.user.client.ui HorizontalPanel setCellHorizontalAlignment
public void setCellHorizontalAlignment(IsWidget w, HorizontalAlignmentConstant align)
From source file:com.dimdim.conference.ui.envcheck.client.layout.SignInControls.java
License:Open Source License
public SignInControls() { initWidget(basePanel);/* w w w.j a v a2 s. co m*/ /** * Assemble the form body top bar */ topBar = new HorizontalPanel(); PNGImage topLeftCorner = new PNGImage("images/form-area-leftcorner.png", 47, 47); topBar.add(topLeftCorner); topBar.setCellHorizontalAlignment(topLeftCorner, HorizontalPanel.ALIGN_LEFT); topBar.setCellVerticalAlignment(topLeftCorner, VerticalPanel.ALIGN_TOP); PNGImage topCenter = new PNGImage("images/formarea-top-back.png", 305, 47); topBar.add(topCenter); topBar.setCellHorizontalAlignment(topCenter, HorizontalPanel.ALIGN_LEFT); topBar.setCellVerticalAlignment(topCenter, VerticalPanel.ALIGN_TOP); PNGImage topRightCorner = new PNGImage("images/formarea-right-corner.png", 47, 47); topBar.add(topRightCorner); topBar.setCellHorizontalAlignment(topRightCorner, HorizontalPanel.ALIGN_LEFT); topBar.setCellVerticalAlignment(topRightCorner, VerticalPanel.ALIGN_TOP); basePanel.add(topBar); basePanel.setCellHorizontalAlignment(topBar, HorizontalPanel.ALIGN_LEFT); basePanel.setCellVerticalAlignment(topBar, VerticalPanel.ALIGN_TOP); /** * Assemble the form body */ formBody = new HorizontalPanel(); PNGImage bodyLeft = new PNGImage("images/formarea-left-tile.png", 47, 431); formBody.add(bodyLeft); formBody.setCellHorizontalAlignment(bodyLeft, HorizontalPanel.ALIGN_LEFT); formBody.setCellVerticalAlignment(bodyLeft, VerticalPanel.ALIGN_TOP); formContainer = new VerticalPanel(); formContainer.setWidth("305px"); formContainer.setHeight("431px"); buttonsContainer = new VerticalPanel(); buttonsContainer.setWidth("305px"); buttonsContainer.setHeight("431px"); buttonsPanel = new VerticalPanel(); buttonsPanel.setWidth("305px"); buttonsPanel.setHeight("431px"); formContainer.add(buttonsContainer); formContainer.setCellHorizontalAlignment(buttonsContainer, HorizontalPanel.ALIGN_CENTER); formContainer.setCellVerticalAlignment(buttonsContainer, VerticalPanel.ALIGN_TOP); formContainer.setStyleName("signin-form-body-center"); buttonsContainer.add(buttonsPanel); buttonsContainer.setCellHorizontalAlignment(buttonsPanel, HorizontalPanel.ALIGN_CENTER); buttonsContainer.setCellVerticalAlignment(buttonsPanel, VerticalPanel.ALIGN_MIDDLE); formBody.add(formContainer); formBody.setCellHorizontalAlignment(formContainer, HorizontalPanel.ALIGN_CENTER); formBody.setCellVerticalAlignment(formContainer, VerticalPanel.ALIGN_MIDDLE); PNGImage bodyRight = new PNGImage("images/formarea-right-tile.png", 47, 431); formBody.add(bodyRight); formBody.setCellHorizontalAlignment(bodyRight, HorizontalPanel.ALIGN_LEFT); formBody.setCellVerticalAlignment(bodyRight, VerticalPanel.ALIGN_TOP); basePanel.add(formBody); basePanel.setCellHorizontalAlignment(formBody, HorizontalPanel.ALIGN_LEFT); basePanel.setCellVerticalAlignment(formBody, VerticalPanel.ALIGN_TOP); /** * Assemble the form bottom bar */ bottomBar = new HorizontalPanel(); PNGImage bottomLeftCorner = new PNGImage("images/formarea-bot-left-corner.png", 47, 46); bottomBar.add(bottomLeftCorner); bottomBar.setCellHorizontalAlignment(bottomLeftCorner, HorizontalPanel.ALIGN_LEFT); bottomBar.setCellVerticalAlignment(bottomLeftCorner, VerticalPanel.ALIGN_TOP); PNGImage bottomCenter = new PNGImage("images/formarea-bottom-tile.png", 305, 46); bottomBar.add(bottomCenter); bottomBar.setCellHorizontalAlignment(bottomCenter, HorizontalPanel.ALIGN_LEFT); bottomBar.setCellVerticalAlignment(bottomCenter, VerticalPanel.ALIGN_TOP); PNGImage bottomRightCorner = new PNGImage("images/formarea-bot-right-corner.png", 47, 46); bottomBar.add(bottomRightCorner); bottomBar.setCellHorizontalAlignment(bottomRightCorner, HorizontalPanel.ALIGN_LEFT); bottomBar.setCellVerticalAlignment(bottomRightCorner, VerticalPanel.ALIGN_TOP); basePanel.add(bottomBar); basePanel.setCellHorizontalAlignment(bottomBar, HorizontalPanel.ALIGN_LEFT); basePanel.setCellVerticalAlignment(bottomBar, VerticalPanel.ALIGN_TOP); /** * Privacy and copyright policy links */ HorizontalPanel linksPanel = new HorizontalPanel(); linksPanel.setStyleName("bottom-panel-links"); privacyPolicyLink = new Label( EnvGlobals.getDisplayString("dimdim_privacy_policy_link", "dimdim privacy policy")); privacyPolicyLink.setStyleName("common-text"); privacyPolicyLink.addStyleName("common-anchor"); privacyPolicyLink.addStyleName("bottom-panel-link"); privacyPolicyLink.addClickListener(this); copyrightPolicyLink = new Label(EnvGlobals.getDisplayString("dimdim_copyright_policy_link", "dimdim trademark and copyright policy")); copyrightPolicyLink.setStyleName("common-text"); copyrightPolicyLink.addStyleName("common-anchor"); copyrightPolicyLink.addStyleName("bottom-panel-link"); copyrightPolicyLink.addClickListener(this); linksPanel.add(privacyPolicyLink); linksPanel.setCellHorizontalAlignment(privacyPolicyLink, HorizontalPanel.ALIGN_LEFT); linksPanel.setCellVerticalAlignment(privacyPolicyLink, VerticalPanel.ALIGN_MIDDLE); HTML seperator1 = new HTML("|"); seperator1.setStyleName("bottom-panel-links-seperator"); linksPanel.add(seperator1); linksPanel.setCellHorizontalAlignment(seperator1, HorizontalPanel.ALIGN_LEFT); linksPanel.setCellVerticalAlignment(seperator1, VerticalPanel.ALIGN_MIDDLE); linksPanel.add(copyrightPolicyLink); linksPanel.setCellHorizontalAlignment(copyrightPolicyLink, HorizontalPanel.ALIGN_LEFT); linksPanel.setCellVerticalAlignment(copyrightPolicyLink, VerticalPanel.ALIGN_MIDDLE); basePanel.add(linksPanel); basePanel.setCellHorizontalAlignment(linksPanel, HorizontalPanel.ALIGN_CENTER); basePanel.setCellVerticalAlignment(linksPanel, VerticalPanel.ALIGN_MIDDLE); }
From source file:com.dimdim.conference.ui.envcheck.client.main.EnvChecksSummaryPanel.java
License:Open Source License
private void prepareCheckResultPanel(HorizontalPanel row, PNGImage okImage, PNGImage errorImage, Label commentLabel, String comment) { row.add(okImage);// www. j av a2 s . c o m row.setCellHorizontalAlignment(okImage, HorizontalPanel.ALIGN_LEFT); row.setCellVerticalAlignment(okImage, VerticalPanel.ALIGN_MIDDLE); row.add(errorImage); row.setCellHorizontalAlignment(errorImage, HorizontalPanel.ALIGN_LEFT); row.setCellVerticalAlignment(errorImage, VerticalPanel.ALIGN_MIDDLE); commentLabel.setText(comment); commentLabel.setStyleName("common-text"); commentLabel.addStyleName("env-check-result-comment"); row.add(commentLabel); row.setCellWidth(commentLabel, "100%"); row.setCellHorizontalAlignment(commentLabel, HorizontalPanel.ALIGN_LEFT); row.setCellVerticalAlignment(commentLabel, VerticalPanel.ALIGN_MIDDLE); Window.alert("commentLabel = " + commentLabel); this.basePanel.add(row); row.setStyleName("env-check-result-row"); row.setVisible(false); }
From source file:com.dimdim.conference.ui.layout.client.widget.MeetingAssistentDialog.java
License:Open Source License
protected Widget getContent() { VerticalPanel basePanel = new VerticalPanel(); // VerticalPanel basePanel2 = new VerticalPanel(); basePanel.setStyleName("meeting-assistent-panel"); headerPanel1 = new DockPanel(); headerPanel1.setStyleName("meeting-assistent-header-1"); closeButton = new PNGImage("images/assistent/close.png", 16, 16); closeButton.addStyleName("anchor-cursor"); headerPanel1.add(closeButton, DockPanel.EAST); headerPanel1.setCellHorizontalAlignment(closeButton, HorizontalPanel.ALIGN_RIGHT); headerPanel1.setCellVerticalAlignment(closeButton, VerticalPanel.ALIGN_TOP); closeButton.addClickListener(this); Label filler1 = new Label(" "); HorizontalPanel filler1Panel = new HorizontalPanel(); filler1Panel.add(filler1);/* ww w .j a v a 2 s . c om*/ headerPanel1.add(filler1Panel, DockPanel.CENTER); headerPanel1.setCellWidth(filler1Panel, "100%"); basePanel.add(headerPanel1); basePanel.setCellHorizontalAlignment(headerPanel1, HorizontalPanel.ALIGN_RIGHT); basePanel.setCellVerticalAlignment(headerPanel1, VerticalPanel.ALIGN_TOP); basePanel.setCellWidth(headerPanel1, "100%"); // headerPanel2 = new DockPanel(); Label label = new Label(ConferenceGlobals.getDisplayString("meeting.assistant.title", "What would you like to do with Web Meeting today?")); label.setStyleName("meeting-assistent-header-2"); // headerPanel2.setStyleName("meeting-assistent-header-2"); // headerPanel2.add(label,DockPanel.CENTER); // headerPanel2.setCellHorizontalAlignment(label,HorizontalPanel.ALIGN_CENTER); // headerPanel2.setCellVerticalAlignment(label,VerticalPanel.ALIGN_TOP); // headerPanel2.setCellWidth(label,"100%"); HorizontalPanel labelPanel = new HorizontalPanel(); labelPanel.add(label); labelPanel.setCellHorizontalAlignment(label, HorizontalPanel.ALIGN_CENTER); basePanel.add(labelPanel); basePanel.setCellHorizontalAlignment(labelPanel, HorizontalPanel.ALIGN_CENTER); basePanel.setCellVerticalAlignment(labelPanel, VerticalPanel.ALIGN_TOP); basePanel.setCellWidth(labelPanel, "100%"); // basePanel.add(basePanel2); // basePanel.setCellHorizontalAlignment(basePanel2,HorizontalPanel.ALIGN_CENTER); // basePanel.setCellVerticalAlignment(basePanel2,VerticalPanel.ALIGN_TOP); // basePanel.setCellWidth(basePanel2,"100%"); // ImageButtonPanel desktopButton = new ImageButtonPanel("Share Desktop Screen",null, // "label-base","red-label-normal","red-label-mouseover"); String desktopButtonColor = "gray"; if (ConferenceGlobals.publisherEnabled) { desktopButtonColor = "red"; } desktopButton = new ImageButtonPanel2( ConferenceGlobals.getDisplayString("meeting.assistant.desktop", "Share Desktop Screen"), null, desktopButtonColor); basePanel.add(desktopButton); basePanel.setCellHorizontalAlignment(desktopButton, HorizontalPanel.ALIGN_RIGHT); basePanel.setCellVerticalAlignment(desktopButton, VerticalPanel.ALIGN_MIDDLE); desktopButton.addClickListener(this); String whiteboardButtonColor = "gray"; if (ConferenceGlobals.whiteboardEnabled) { whiteboardButtonColor = "green"; } whiteboardButton = new ImageButtonPanel2( ConferenceGlobals.getDisplayString("meeting.assistant.whiteboard", "Share Whiteboard"), null, whiteboardButtonColor); basePanel.add(whiteboardButton); basePanel.setCellHorizontalAlignment(whiteboardButton, HorizontalPanel.ALIGN_RIGHT); basePanel.setCellVerticalAlignment(whiteboardButton, VerticalPanel.ALIGN_MIDDLE); whiteboardButton.addClickListener(this); ImageButtonPanel2 pptButton = new ImageButtonPanel2( ConferenceGlobals.getDisplayString("meeting.assistant.presentation", "Share a Presentation"), null, "blue"); basePanel.add(pptButton); basePanel.setCellHorizontalAlignment(pptButton, HorizontalPanel.ALIGN_RIGHT); basePanel.setCellVerticalAlignment(pptButton, VerticalPanel.ALIGN_MIDDLE); //Window.alert("click lietener = "+middlePanel.getShareButtonListener()); pptButton.addClickListener(this); pptButton.addClickListener(middlePanel.getShareButtonListener()); Label label2 = new Label(" "); basePanel.add(label2); basePanel.setCellHorizontalAlignment(label2, HorizontalPanel.ALIGN_RIGHT); basePanel.setCellVerticalAlignment(label2, VerticalPanel.ALIGN_MIDDLE); ScrollPanel sPanel = new ScrollPanel(); sPanel.setSize("550px", "390px"); sPanel.add(basePanel); return sPanel; }
From source file:com.dimdim.conference.ui.layout2.client.MeetingAssistentDialog.java
License:Open Source License
protected Widget getContent() { VerticalPanel basePanel = new VerticalPanel(); basePanel.setStyleName("meeting-assistent-panel"); headerPanel1 = new DockPanel(); headerPanel1.setStyleName("meeting-assistent-header-1"); closeButton = new PNGImage("images/assistent/close.png", 16, 16); closeButton.addStyleName("anchor-cursor"); headerPanel1.add(closeButton, DockPanel.EAST); headerPanel1.setCellHorizontalAlignment(closeButton, HorizontalPanel.ALIGN_RIGHT); headerPanel1.setCellVerticalAlignment(closeButton, VerticalPanel.ALIGN_TOP); closeButton.addClickListener(this); Label filler1 = new Label(" "); HorizontalPanel filler1Panel = new HorizontalPanel(); filler1Panel.add(filler1);/* w w w .j a v a 2 s . com*/ headerPanel1.add(filler1Panel, DockPanel.CENTER); headerPanel1.setCellWidth(filler1Panel, "100%"); basePanel.add(headerPanel1); basePanel.setCellHorizontalAlignment(headerPanel1, HorizontalPanel.ALIGN_RIGHT); basePanel.setCellVerticalAlignment(headerPanel1, VerticalPanel.ALIGN_TOP); basePanel.setCellWidth(headerPanel1, "100%"); Label label = new Label(ConferenceGlobals.getDisplayString("meeting.assistant.title", "What would you like to do with Web Meeting today?")); label.setStyleName("meeting-assistent-header-2"); HorizontalPanel labelPanel = new HorizontalPanel(); labelPanel.add(label); labelPanel.setCellHorizontalAlignment(label, HorizontalPanel.ALIGN_CENTER); basePanel.add(labelPanel); basePanel.setCellHorizontalAlignment(labelPanel, HorizontalPanel.ALIGN_CENTER); basePanel.setCellVerticalAlignment(labelPanel, VerticalPanel.ALIGN_TOP); basePanel.setCellWidth(labelPanel, "100%"); String desktopButtonColor = "gray"; if (ConferenceGlobals.publisherEnabled) { desktopButtonColor = "red"; } desktopButton = new ImageButtonPanel2( ConferenceGlobals.getDisplayString("meeting.assistant.desktop", "Share Desktop Screen"), null, desktopButtonColor); basePanel.add(desktopButton); basePanel.setCellHorizontalAlignment(desktopButton, HorizontalPanel.ALIGN_RIGHT); basePanel.setCellVerticalAlignment(desktopButton, VerticalPanel.ALIGN_MIDDLE); desktopButton.addClickListener(this); String whiteboardButtonColor = "gray"; if (ConferenceGlobals.whiteboardEnabled) { whiteboardButtonColor = "green"; } whiteboardButton = new ImageButtonPanel2( ConferenceGlobals.getDisplayString("meeting.assistant.whiteboard", "Share Whiteboard"), null, whiteboardButtonColor); basePanel.add(whiteboardButton); basePanel.setCellHorizontalAlignment(whiteboardButton, HorizontalPanel.ALIGN_RIGHT); basePanel.setCellVerticalAlignment(whiteboardButton, VerticalPanel.ALIGN_MIDDLE); whiteboardButton.addClickListener(this); String pptButtonColor = "gray"; if (ConferenceGlobals.docEnabled) { pptButtonColor = "blue"; } ImageButtonPanel2 pptButton = new ImageButtonPanel2( ConferenceGlobals.getDisplayString("meeting.assistant.presentation", "Share a Presentation"), null, pptButtonColor); basePanel.add(pptButton); basePanel.setCellHorizontalAlignment(pptButton, HorizontalPanel.ALIGN_RIGHT); basePanel.setCellVerticalAlignment(pptButton, VerticalPanel.ALIGN_MIDDLE); // pptButton.addClickListener(middlePanel.getShareButtonListener()); if (ConferenceGlobals.docEnabled) { pptButton.addClickListener(this); pptButton.addClickListener(this.shareClickListener); } Label label2 = new Label(" "); basePanel.add(label2); basePanel.setCellHorizontalAlignment(label2, HorizontalPanel.ALIGN_RIGHT); basePanel.setCellVerticalAlignment(label2, VerticalPanel.ALIGN_MIDDLE); ScrollPanel sPanel = new ScrollPanel(); sPanel.setSize("550px", "390px"); sPanel.add(basePanel); return sPanel; }
From source file:com.dimdim.conference.ui.panels.client.ChatWidget.java
License:Open Source License
private void fillContent(WorkspacePanel workSpace) { chatWidget = new DiscussionWidget(ClientModel.getClientModel().getRosterModel().getCurrentUser(), workSpace);/*from w w w. j a v a 2 s.c o m*/ chatWidget.setSize("100%", "100%"); chatPanel.add(chatWidget); chatPanel.setCellHorizontalAlignment(chatWidget, HorizontalPanel.ALIGN_CENTER); FocusPanel otherLinksPanel = new FocusPanel(); HorizontalPanel h1 = new HorizontalPanel(); chatLink = new Label(ConferenceGlobals.getDisplayString("workspace.hide.chat.label", "Public Chat")); chatLink.setStyleName("common-text"); chatLink.addStyleName("common-bold-text"); h1.setWidth("100%"); h1.add(chatLink); h1.setCellWidth(chatLink, "100%"); h1.setCellHorizontalAlignment(chatLink, HorizontalPanel.ALIGN_CENTER); Image img = getPublicChatCloseImage(); h1.add(img); Label l = new Label(" "); l.setWidth("10px"); h1.add(l); otherLinksPanel.add(h1); otherLinksPanel .setTitle(ConferenceGlobals.getDisplayString("workspace.hide.chat.title", "Click to hide Chat")); verticalPanel.add(chatWidget); otherLinksPanel.setWidth("100%"); otherLinksPanel.addStyleName("anchor-cursor"); otherLinksPanel.addClickListener(this); workspaceLayout.addPanelToLayout("chat_pod_header", otherLinksPanel); workspaceLayout.addPanelToLayout("chat_pod_content", verticalPanel); addChatWidget(); }
From source file:com.dimdim.conference.ui.resources.client.ResourceControlDialog.java
License:Open Source License
protected Widget getContent() { table = new VerticalPanel(); Widget content = table;//from ww w . ja v a2s . c o m // table.setStyleName("list-control-table"); UIResourceObject currentActiveResource = ConferenceGlobals.getCurrentSharedResource(); HorizontalPanel header = new HorizontalPanel(); header.add(createLabel(".", "resource-image-header")); header.add(createLabel(UIStrings.getNameLabel(), "resource-name-header")); header.add(createLabel(UIStrings.getTypeLabel(), "resource-type-header")); if (this.allowResourceControl) { deleteHeader = createLabel(UIStrings.getDeleteLabel(), "resource-delete-button-header"); deleteHeader.addStyleName("common-anchor-default-color"); deleteHeader.addClickListener(this); header.add(deleteHeader); } header.addStyleName("common-dialog-row"); table.add(header); int size = this.listModel.getListSize(); if (size > 5) { VerticalPanel vp = new VerticalPanel(); ScrollPanel scroller = new ScrollPanel(); scroller.setStyleName("resource-control-dialog-height"); scroller.add(table); vp.add(scroller); content = vp; } int i = 0; Vector sortedList = getSortedList(listModel); for (i = 0; i < size; i++) { ResourceListEntry rle = (ResourceListEntry) sortedList.get(i); UIResourceObject res = rle.getResource(); if (this.typeName != null && !res.getResourceType().equals(this.typeName)) { continue; } // UIListEntryPanelMouseAndClickListener mcl = new UIListEntryPanelMouseAndClickListener( // rle,this.resourceListAndEntryProperties,this.listEntryManager); // mcl.setSecondLevelPopup(true); HorizontalPanel row = new HorizontalPanel(); HorizontalPanel hp1 = new HorizontalPanel(); Image image = getImage(res); hp1.add(image); hp1.setCellHorizontalAlignment(image, HorizontalPanel.ALIGN_CENTER); hp1.setCellVerticalAlignment(image, VerticalPanel.ALIGN_MIDDLE); hp1.addStyleName("resource-image"); row.add(hp1); row.setCellHorizontalAlignment(hp1, HorizontalPanel.ALIGN_CENTER); row.setCellVerticalAlignment(hp1, VerticalPanel.ALIGN_MIDDLE); // table.setWidget((i+1), 0, image); Label nameLabel = createTextHTML(res.getResourceName(), "resource-name", 23); // nameLabel.addStyleName("common-anchor"); // nameLabel.addClickListener(mcl); // nameLabel.addMouseListener(mcl); row.add(nameLabel); row.add(createTextHTML(ResourceGlobals.getResourceGlobals().getResourceTypeNiceName(res), "resource-type")); if (this.allowResourceControl) { HorizontalPanel hp2 = new HorizontalPanel(); CheckBox cb = new CheckBox(); hp2.add(cb); hp2.setStyleName("resource-delete-button"); hp2.setCellHorizontalAlignment(cb, HorizontalPanel.ALIGN_LEFT); hp2.setCellVerticalAlignment(cb, VerticalPanel.ALIGN_MIDDLE); row.add(hp2); row.setCellHorizontalAlignment(hp2, HorizontalPanel.ALIGN_LEFT); row.setCellVerticalAlignment(hp2, VerticalPanel.ALIGN_MIDDLE); cb.addClickListener(this); this.checkBoxes.put(res.getResourceId(), cb); this.checkBoxes2.put(cb, cb); if (!ResourceGlobals.allowDelete(res) || (currentActiveResource != null && currentActiveResource.getResourceId().equals(res.getResourceId()))) { cb.setEnabled(false); } } row.addStyleName("common-dialog-row"); table.add(row); this.rows.put(res.getResourceId(), row); } return content; }
From source file:com.dimdim.conference.ui.resources.client.ResourceTypeListEntryPanel.java
License:Open Source License
protected Image setImage(DockPanel imagePanel, Image currentImage, Image newImage, ClickListener clickListener, HorizontalPanel subPanel, String tooltip, boolean rightAlign) { Image image2 = currentImage;/*from w ww. j av a 2s.com*/ if (currentImage != null) { if (subPanel != null) { //Window.alert("subpanel = is not null so removing.."); subPanel.remove(currentImage); image2 = null; } else if (imagePanel != null) { imagePanel.remove(currentImage); image2 = null; } } if (newImage != null) { { image2 = newImage; image2.addStyleName("list-entry-panel-image"); if (subPanel != null) { subPanel.add(image2); subPanel.setCellHorizontalAlignment(image2, HorizontalPanel.ALIGN_CENTER); subPanel.setCellVerticalAlignment(image2, VerticalPanel.ALIGN_MIDDLE); } else { if (rightAlign) { imagePanel.add(image2, DockPanel.EAST); imagePanel.setCellHorizontalAlignment(image2, HorizontalPanel.ALIGN_RIGHT); imagePanel.setCellVerticalAlignment(image2, VerticalPanel.ALIGN_MIDDLE); } else { imagePanel.add(image2, DockPanel.WEST); imagePanel.setCellHorizontalAlignment(image2, HorizontalPanel.ALIGN_CENTER); imagePanel.setCellVerticalAlignment(image2, VerticalPanel.ALIGN_MIDDLE); } } if (clickListener != null) { image2.addClickListener(clickListener); //image2.addStyleName("anchor-cursor"); } if (tooltip != null) { image2.setTitle(tooltip); } } } return image2; }
From source file:com.dimdim.conference.ui.resources.client.ResourceTypeListEntryPopupPanel.java
License:Open Source License
private void writeListPanel(DockPanel outer) { Vector vec = new Vector(); UIResourceObject currentActiveResource = ConferenceGlobals.getCurrentSharedResource(); numberOfItems = 0;/*from w ww . ja v a2 s . c o m*/ int size = this.resourceList.getListSize(); for (int i = 0; i < size; i++) { UIResourceObject res = ((ResourceListEntry) this.resourceList.getListEntryAt(i)).getResource(); if (res.getResourceType().equals(this.typeName)) { Label resLabel = new FixedLengthLabel(res.getResourceName(), 26); // resLabel.setStyleName("tool-entry"); resLabel.setStyleName("resource-entry"); resLabel.addStyleName("anchor-cursor"); resLabel.addClickListener(this); resLabel.addClickListener(this.rtpcp.getNameLabelClickListener(res)); HorizontalPanel h1 = new HorizontalPanel(); Widget img = new HorizontalPanel(); if (currentActiveResource != null && currentActiveResource.getResourceId().equals(res.getResourceId())) { img = this.getSharingInProgressImageUrl(); // h2.add(img); // h2.setCellVerticalAlignment(img, VerticalPanel.ALIGN_MIDDLE); // h2.setCellHorizontalAlignment(img, HorizontalPanel.ALIGN_CENTER); } else { img = new Label(" "); img.setWidth("18px"); // h2.add(filler); } // h2.setWidth("18px"); h1.add(img); // h1.setCellWidth(img, "100%"); h1.setCellHeight(img, "100%"); h1.setCellHorizontalAlignment(img, HorizontalPanel.ALIGN_LEFT); h1.setCellVerticalAlignment(img, VerticalPanel.ALIGN_MIDDLE); h1.add(resLabel); h1.setCellWidth(resLabel, "100%"); h1.setCellHeight(resLabel, "100%"); h1.setCellVerticalAlignment(resLabel, VerticalPanel.ALIGN_MIDDLE); h1.setStyleName("resource-entry-panel"); if (numberOfItems == 0) { h1.addStyleName("first-resource-entry-panel"); } resLabel.addMouseListener(new ResourceHoverStyler(h1)); vec.add(h1); // panel.add(h1); // panel.setCellWidth(h1, "100%"); // panel.setCellHorizontalAlignment(h1, HorizontalPanel.ALIGN_LEFT); // panel.setCellVerticalAlignment(h1, VerticalPanel.ALIGN_MIDDLE); numberOfItems++; } } if (numberOfItems != 0) { int scrollLimit = UIParams.getUIParams().getBrowserParamIntValue("resource_popup_scroll_limit", 5); if (numberOfItems > scrollLimit) { ScrollPanel sp = new ScrollPanel(); int width = UIParams.getUIParams().getBrowserParamIntValue("resource_popup_scroll_width", 250); int barWidth = UIParams.getUIParams().getBrowserParamIntValue("resource_popup_scroll_bar_width", 250); int height = UIParams.getUIParams().getBrowserParamIntValue("resource_popup_scroll_height", 150); sp.setSize(width + "px", height + "px"); VerticalPanel panel = new VerticalPanel(); panel.setSize((width - barWidth) + "px", height + "px"); sp.add(panel); outer.add(sp, DockPanel.NORTH); outer.setCellHorizontalAlignment(sp, HorizontalPanel.ALIGN_LEFT); outer.setCellVerticalAlignment(sp, VerticalPanel.ALIGN_MIDDLE); int size2 = vec.size(); for (int i = 0; i < size2; i++) { HorizontalPanel h = (HorizontalPanel) vec.elementAt(i); panel.add(h); panel.setCellWidth(h, "100%"); panel.setCellHorizontalAlignment(h, HorizontalPanel.ALIGN_LEFT); panel.setCellVerticalAlignment(h, VerticalPanel.ALIGN_MIDDLE); } } else { int size2 = vec.size(); for (int i = 0; i < size2; i++) { HorizontalPanel h = (HorizontalPanel) vec.elementAt(i); outer.add(h, DockPanel.NORTH); outer.setCellWidth(h, "100%"); outer.setCellHorizontalAlignment(h, HorizontalPanel.ALIGN_LEFT); outer.setCellVerticalAlignment(h, VerticalPanel.ALIGN_MIDDLE); } } } else { } }
From source file:com.dimdim.conference.ui.user.client.email.EmailControlPanel.java
License:Open Source License
protected Widget getContent() { ScrollPanel scroller = new ScrollPanel(); scroller.setStyleName("list-popup-scroll-panel"); VerticalPanel table = new VerticalPanel(); scroller.add(scrolledTable);/*from w w w . ja v a 2 s. c o m*/ HorizontalPanel header = new HorizontalPanel(); header.add(createLabel(".", "user-image-header")); header.add(createLabel(UIStrings.getNameLabel(), "lobby-name")); header.add(createLabel(UIStrings.getEmailLabel(), "lobby-email")); Label accept = createLabel(UIStrings.getResolveLabel(), "user-chat-button-header"); accept.addStyleName("common-anchor"); header.add(accept); Label deny = createLabel("", "user-chat-button-header"); header.add(deny); header.addStyleName("common-dialog-row"); table.add(header); table.add(scroller); table.setCellWidth(scroller, "100%"); int size = this.listModel.getListSize(); int i = 0; for (i = 0; i < size; i++) { EmailTaskListEntry etle = (EmailTaskListEntry) this.listModel.getListEntryAt(i); this.results.addElement(etle); HorizontalPanel row = new HorizontalPanel(); HorizontalPanel hp1 = new HorizontalPanel(); Image image = etle.getImage1Url(); hp1.add(image); hp1.setCellHorizontalAlignment(image, HorizontalPanel.ALIGN_CENTER); hp1.setCellVerticalAlignment(image, VerticalPanel.ALIGN_MIDDLE); hp1.setStyleName("user-image"); row.add(hp1); row.setCellHorizontalAlignment(hp1, HorizontalPanel.ALIGN_CENTER); row.setCellVerticalAlignment(hp1, VerticalPanel.ALIGN_MIDDLE); // table.setWidget((i+1), 0, image); Label nameLabel = createTextHTML(etle.getName(), "lobby-name"); nameLabel.addStyleName("common-anchor"); row.add(nameLabel); Label emailLabel = createTextHTML(etle.getEmailResult().getTarget(), "lobby-email"); emailLabel.addStyleName("common-anchor"); row.add(emailLabel); HorizontalPanel hp3 = new HorizontalPanel(); CheckBox cb2 = new CheckBox(); hp3.add(cb2); hp3.setStyleName("user-chat-button"); hp3.setCellHorizontalAlignment(cb2, HorizontalPanel.ALIGN_LEFT); hp3.setCellVerticalAlignment(cb2, VerticalPanel.ALIGN_MIDDLE); row.add(hp3); row.setCellHorizontalAlignment(hp3, HorizontalPanel.ALIGN_LEFT); row.setCellVerticalAlignment(hp3, VerticalPanel.ALIGN_MIDDLE); this.checkBoxes.addElement(cb2); HorizontalPanel hp4 = new HorizontalPanel(); Label cb3 = new Label(""); hp4.add(cb3); hp4.setStyleName("user-chat-button"); hp4.setCellHorizontalAlignment(cb3, HorizontalPanel.ALIGN_LEFT); hp4.setCellVerticalAlignment(cb3, VerticalPanel.ALIGN_MIDDLE); row.add(hp4); row.setCellHorizontalAlignment(hp4, HorizontalPanel.ALIGN_LEFT); row.setCellVerticalAlignment(hp4, VerticalPanel.ALIGN_MIDDLE); row.addStyleName("common-dialog-row"); scrolledTable.add(row); this.rows.addElement(row); } return table; }
From source file:com.dimdim.conference.ui.user.client.meetinglobby.MeetingLobbyControlPanel.java
License:Open Source License
protected Widget getContent() { ScrollPanel scroller = new ScrollPanel(); scroller.setStyleName("list-popup-scroll-panel"); VerticalPanel table = new VerticalPanel(); scrolledTable = new VerticalPanel(); scroller.add(scrolledTable);/*w w w . j a v a2s .c om*/ // table.setStyleName("list-control-table"); HorizontalPanel header = new HorizontalPanel(); header.add(createLabel(".", "user-image-header")); header.add(createLabel(UIStrings.getNameLabel(), "lobby-name")); header.add(createLabel(UIStrings.getEmailLabel(), "lobby-email")); Label accept = createLabel(UIStrings.getAcceptLabel(), "user-chat-button-header"); accept.addStyleName("common-anchor"); accept.addClickListener(this.acceptList); header.add(accept); Label deny = createLabel(UIStrings.getDenyLabel(), "user-chat-button-header"); deny.addStyleName("common-anchor"); deny.addClickListener(this.denyList); header.add(deny); header.addStyleName("common-dialog-row"); table.add(header); table.add(scroller); table.setCellWidth(scroller, "100%"); int size = this.listModel.getListSize(); int i = 0; for (i = 0; i < size; i++) { UserListEntry ule = (UserListEntry) this.listModel.getListEntryAt(i); UIRosterEntry user = ule.getUser(); this.users.addElement(user); HorizontalPanel row = new HorizontalPanel(); HorizontalPanel hp1 = new HorizontalPanel(); Image image = ule.getImage1Url(); hp1.add(image); hp1.setCellHorizontalAlignment(image, HorizontalPanel.ALIGN_CENTER); hp1.setCellVerticalAlignment(image, VerticalPanel.ALIGN_MIDDLE); hp1.setStyleName("user-image"); row.add(hp1); row.setCellHorizontalAlignment(hp1, HorizontalPanel.ALIGN_CENTER); row.setCellVerticalAlignment(hp1, VerticalPanel.ALIGN_MIDDLE); // table.setWidget((i+1), 0, image); Label nameLabel = createTextHTML(user.getDisplayName(), "lobby-name"); nameLabel.addStyleName("common-anchor"); row.add(nameLabel); Label emailLabel = createTextHTML(user.getUserId(), "lobby-email"); emailLabel.addStyleName("common-anchor"); row.add(emailLabel); HorizontalPanel hp3 = new HorizontalPanel(); // CheckBox cb2 = new CheckBox(); RadioButton cb2 = new RadioButton(user.getUserId()); hp3.add(cb2); hp3.setStyleName("user-chat-button"); hp3.setCellHorizontalAlignment(cb2, HorizontalPanel.ALIGN_LEFT); hp3.setCellVerticalAlignment(cb2, VerticalPanel.ALIGN_MIDDLE); row.add(hp3); row.setCellHorizontalAlignment(hp3, HorizontalPanel.ALIGN_LEFT); row.setCellVerticalAlignment(hp3, VerticalPanel.ALIGN_MIDDLE); this.acceptBoxes.addElement(cb2); this.acceptList.addRadioButton(cb2); HorizontalPanel hp4 = new HorizontalPanel(); // CheckBox cb3 = new CheckBox(); RadioButton cb3 = new RadioButton(user.getUserId()); hp4.add(cb3); hp4.setStyleName("user-chat-button"); hp4.setCellHorizontalAlignment(cb3, HorizontalPanel.ALIGN_LEFT); hp4.setCellVerticalAlignment(cb3, VerticalPanel.ALIGN_MIDDLE); row.add(hp4); row.setCellHorizontalAlignment(hp4, HorizontalPanel.ALIGN_LEFT); row.setCellVerticalAlignment(hp4, VerticalPanel.ALIGN_MIDDLE); this.denyBoxes.addElement(cb3); this.denyList.addRadioButton(cb3); row.addStyleName("common-dialog-row"); scrolledTable.add(row); this.rows.addElement(row); } return table; }