List of usage examples for com.google.gwt.user.client.ui HorizontalPanel setCellVerticalAlignment
public void setCellVerticalAlignment(IsWidget w, VerticalAlignmentConstant align)
From source file:com.audata.client.checkout.CheckoutPanel.java
License:Open Source License
public void addRecord(String uuid, String title, String recordType, String cot) { HorizontalPanel hp = new HorizontalPanel(); hp.setWidth("100%"); hp.setSpacing(3);/*from w w w.j a v a 2s . com*/ //CaptionButton button = new CaptionButton("images/16x16/treerec.gif",title, CaptionButton.CAPTION_EAST); CaptionButton button = new CaptionButton(); button.setImageUrl("images/16x16/treerec.gif"); button.setCaptionText(title); button.addClickListener(new CheckoutClickListener(this, uuid, recordType, cot)); Image cButton = new Image("images/16x16/checkouts.gif"); cButton.addClickListener(new CheckinClickListener(uuid, title)); cButton.setTitle(LANG.check_in_Text() + " " + title); cButton.addStyleName("hand"); hp.add(button); hp.add(cButton); hp.setCellVerticalAlignment(cButton, HasAlignment.ALIGN_MIDDLE); this.records.add(hp); }
From source file:com.audata.client.record.RecordListPanel.java
License:Open Source License
private Panel buildMenu() { HorizontalPanel menuContainer = new HorizontalPanel(); menuContainer.addStyleName("audoc-commandPanel"); menuContainer.setWidth("100%"); HorizontalPanel menu = new HorizontalPanel(); menuContainer.add(menu);// w ww .j a v a 2s .c o m menu.setSpacing(4); //menu.addStyleName("audoc-commandPanel"); //menu.setWidth("100%"); menu.setHorizontalAlignment(HasAlignment.ALIGN_LEFT); //add Refresh button //CaptionButton refreshButton = new CaptionButton("images/16x16/refresh.gif", "Refresh", CaptionButton.CAPTION_EAST); CaptionButton refreshButton = new CaptionButton(); refreshButton.setCaptionText(LANG.refresh_Text()); refreshButton.setImageUrl("images/16x16/refresh.gif"); refreshButton.addClickListener(new CommandClickListener(this, CommandClickListener.COMMAND_REFRESH)); refreshButton.setTitle(LANG.refresh_title_Text()); menu.add(refreshButton); //add print button //CaptionButton printButton = new CaptionButton("images/16x16/print.gif", "Print", CaptionButton.CAPTION_EAST); CaptionButton printButton = new CaptionButton(); printButton.setCaptionText(LANG.print_Text()); printButton.setImageUrl("images/16x16/print.gif"); printButton.addClickListener(new CommandClickListener(this, CommandClickListener.COMMAND_PRINT)); printButton.setTitle(LANG.print_title_Text()); menu.add(printButton); Label pagesLabel = new Label(LANG.page_Text() + ": "); pagesLabel.addStyleName("audoc-label"); menu.add(pagesLabel); menu.setCellVerticalAlignment(pagesLabel, HasVerticalAlignment.ALIGN_MIDDLE); this.pages = new ListBox(); this.pages.addChangeListener(this); menu.add(this.pages); menu.setCellVerticalAlignment(this.pages, HasVerticalAlignment.ALIGN_MIDDLE); return menuContainer; }
From source file:com.audata.client.trays.TrayPanel.java
License:Open Source License
public void addTray(String uuid, String name, String description) { HorizontalPanel tp = new HorizontalPanel(); tp.setSpacing(2);// w w w. ja va2s.c o m tp.setWidth("100%"); //CaptionButton cp = new CaptionButton("images/16x16/tray.gif", name, CaptionButton.CAPTION_EAST); CaptionButton cp = new CaptionButton(); cp.setImageUrl("images/16x16/tray.gif"); cp.setCaptionText(name); cp.setCaptionStyleName("audoc-trayLabel"); cp.setTitle(description); cp.addClickListener(new TrayClickListener(this.parent, name, uuid)); Image dButton = new Image("images/16x16/logout.gif"); dButton.setTitle("delete " + name); dButton.addClickListener(new ItemDeleteClickListener(AuDoc.STACK_TRAYS, uuid)); dButton.addStyleName("hand"); tp.add(cp); tp.add(dButton); tp.setCellVerticalAlignment(dButton, HasAlignment.ALIGN_MIDDLE); this.trays.add(tp); this.show(); }
From source file:com.dimdim.conference.ui.common.client.list.DefaultListBrowseControl.java
License:Open Source License
protected Image setImage(HorizontalPanel panel, Image newImage, Image image) { panel.remove(image);/*from w ww.j a v a 2s. c o m*/ Image image2 = newImage; image2.addClickListener(this); image2.setStyleName("list-browse-control-image"); panel.add(image2); panel.setCellVerticalAlignment(image2, VerticalPanel.ALIGN_MIDDLE); return image2; }
From source file:com.dimdim.conference.ui.common.client.list.ListEntryPanel.java
License:Open Source License
protected Image setImage(DockPanel imagePanel, Image image, Image imageUrl, ClickListener clickListener, HorizontalPanel subPanel, String tooltip, boolean rightAlign) { Image image2 = image;// w w w. j av a 2 s.c om if (image != null) { //Window.alert("prev image = is not null"); if (subPanel != null) { //Window.alert("subpanel = is not null so removing.."); subPanel.remove(image); image2 = null; } else if (imagePanel != null) { imagePanel.remove(image); image2 = null; } } if (imageUrl != null) { /* if (imageUrl.endsWith("xxx")) { Image image = new Image(imageUrl); image.addStyleName("list-entry-panel-image"); imagePanel.add(image,DockPanel.WEST); imagePanel.setCellHorizontalAlignment(image,HorizontalPanel.ALIGN_CENTER); imagePanel.setCellVerticalAlignment(image,VerticalPanel.ALIGN_MIDDLE); if (clickListener != null) { image.addClickListener(clickListener); } } else */ // else { image2 = imageUrl; 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.common.client.user.NewChatPanel.java
License:Open Source License
/** * Same chat panel is used for global as well as personal chats. Global * chat is simply identified by using 'other' argument as null. *///from www.j a v a 2 s .c o m public NewChatPanel(UIRosterEntry me, UIRosterEntry other) { this.me = me; this.other = other; if (other != null) { this.toId = other.getUserId(); } this.lastActivityTime = System.currentTimeMillis(); if (ConferenceGlobals.isBrowserIE()) { spaceSequence = "DIMDIM_LTwbr>"; } // Add the central scroll panel that will hold the messages. scrollPanel = new ScrollPanel(); scrollPanel.add(this.chatMessages); scrollPanel.setStyleName("dm-chat-message-area"); // A small and short instructions / message area. instructionPanel = new HorizontalPanel(); instructionPanel.setStyleName("chat-instruction-panel"); instructionPanel.setWidth("248px"); //in public chat add powered by dimdim logo else have the help text if (null == toId) { HorizontalPanel hp = new HorizontalPanel(); HorizontalPanel tempSpacer = new HorizontalPanel(); tempSpacer.setWidth("10px"); tempSpacer.add(new Label(" ")); hp.add(tempSpacer); hp.setCellHorizontalAlignment(tempSpacer, HorizontalPanel.ALIGN_LEFT); hp.setCellVerticalAlignment(tempSpacer, VerticalPanel.ALIGN_MIDDLE); PNGImage image = new PNGImage("images/logo_powered.png", 8, 14); hp.add(image); //instructionPanel.setCellWidth(image,"100%"); hp.setCellHorizontalAlignment(image, HorizontalPanel.ALIGN_LEFT); hp.setCellVerticalAlignment(image, VerticalPanel.ALIGN_MIDDLE); //hp.setBorderWidth(1); HTML instruction = new HTML("Powered By <a href='#'><u> Dimdim </u></a>"); instruction.addClickListener(new ClickListener() { public void onClick(Widget sender) { openDimdimWebSite(); } }); instruction.setStyleName("poweredby-text"); hp.add(instruction); //instructionPanel.setCellWidth(instruction,"100%"); hp.setCellHorizontalAlignment(instruction, HorizontalPanel.ALIGN_LEFT); hp.setCellVerticalAlignment(instruction, VerticalPanel.ALIGN_MIDDLE); instructionPanel.add(hp); //instructionPanel.setCellWidth(instruction,"100%"); instructionPanel.setCellHorizontalAlignment(hp, HorizontalPanel.ALIGN_LEFT); instructionPanel.setCellVerticalAlignment(hp, VerticalPanel.ALIGN_MIDDLE); } else { Label instruction = new Label(UIStrings.getChatPanelInstruction()); instruction.setStyleName("chat-instruction"); instructionPanel.add(instruction); //instructionPanel.setCellWidth(instruction,"100%"); instructionPanel.setCellHorizontalAlignment(instruction, HorizontalPanel.ALIGN_LEFT); instructionPanel.setCellVerticalAlignment(instruction, VerticalPanel.ALIGN_MIDDLE); } Label emoticon = new Label(UIStrings.getChatPanelEmoticonInstruction()); emoticon.setStyleName("chat-emoticon-lable"); instructionPanel.add(emoticon); //instructionPanel.setCellWidth(emoticon,"30%"); instructionPanel.setCellHorizontalAlignment(emoticon, HorizontalPanel.ALIGN_RIGHT); instructionPanel.setCellVerticalAlignment(emoticon, VerticalPanel.ALIGN_MIDDLE); // Add the text area that the users will type their messages in. sendText = new TextArea(); sendText.setText(""); if (null == toId) { sendText.setText(UIStrings.getChatPanelInstruction()); sendText.setStyleName("chat-instruction"); } //if (ConferenceGlobals.isBrowserIE()) //{ sendText.setVisibleLines(2); //} //else //{ // sendText.setVisibleLines(1); //} sendText.setStyleName("chat-text-area"); keyboardListener = new KeyboardListenerAdapter() { public void onKeyDown(Widget sender, char keyCode, int modifiers) { } public void onKeyUp(Widget sender, char keyCode, int modifiers) { if (keyCode == KeyboardListener.KEY_ENTER) { sendChatMessage(); } } }; sendText.addKeyboardListener(keyboardListener); sendText.addFocusListener(this); // Assemble the overall chat panel. initWidget(pane); pane.setWidth("100%"); pane.add(outer); outer.setWidth("100%"); outer.add(scrollPanel); scrollPanel.addStyleName("dm-chat-message-area-pane"); outer.add(this.instructionPanel); outer.setCellWidth(this.instructionPanel, "100%"); outer.setCellHorizontalAlignment(this.instructionPanel, HorizontalPanel.ALIGN_LEFT); outer.add(this.sendText); outer.setCellWidth(this.sendText, "100%"); outer.setCellHorizontalAlignment(this.sendText, HorizontalPanel.ALIGN_CENTER); this.sendText.setStyleName("dm-chat-text-area"); this.rosterModel = ClientModel.getClientModel().getRosterModel(); // Window.alert("created popup.."); //setting up emoticons popup panel ePopUP = new EmoticonsPopup(sendText); emoticon.addMouseListener(new MouseListenerAdapter() { public void onMouseEnter(Widget sender) { int left = sender.getAbsoluteLeft() - 5; int top = sender.getAbsoluteTop() - 75; ePopUP.setPopupPosition(left, top); ePopUP.showHoverPopup(); ePopUP.popupVisible(); } }); if (emoticonsMap == null) { emoticonsMap = new HashMap(); prepareEmoticonsList(); // this is to handle :) and :( also } }
From source file:com.dimdim.conference.ui.common.client.util.CommonModalDialog.java
License:Open Source License
public void drawDialog() { this.defaultCloseListener = new ClickListener() { public void onClick(Widget sender) { hide();/*from w w w .j av a 2s.com*/ } }; closeButton = new Button(closeButtonText, this.defaultCloseListener); // DomUtil.setId(this, "dialog-styled"); vp = new VerticalPanel(); // setWidget(rp); vp.setStyleName("common-dialog-outer-panel"); // Window.alert("1"); if (this.closeListener != null) { this.closeButton.addClickListener(this.closeListener); } closeButton.setStyleName("dm-popup-close-button"); buttonPanel.add(closeButton, DockPanel.EAST); buttonPanel.setSpacing(0); HTML filler1 = new HTML(" "); buttonPanel.add(filler1, DockPanel.EAST); // Window.alert("2"); footerButtons = this.getFooterButtons(); if (footerButtons != null) { int size = footerButtons.size(); for (int i = 0; i < size; i++) { Button button = (Button) footerButtons.elementAt(i); buttonPanel.add(button, DockPanel.EAST); HTML filler2 = new HTML(" "); buttonPanel.add(filler2, DockPanel.EAST); } } // Window.alert("3"); this.messageLabel.setStyleName("common-text"); this.messageLabel.addStyleName("dialog-message-label"); buttonPanel.add(this.messageLabel, DockPanel.WEST); buttonPanel.setCellVerticalAlignment(this.messageLabel, VerticalPanel.ALIGN_MIDDLE); buttonPanel.setCellWidth(this.messageLabel, "100%"); Widget c = getContent(); if (this.dialogName != null) { // Window.alert("4"); // Create a width adjustment panel. String widthStyle = this.dialogName + "-dialog-width"; String heightStyle1 = this.dialogName + "-dialog-height-one"; String heightStyle2 = this.dialogName + "-dialog-height-two"; String contentWidthStyle = this.dialogName + "-dialog-content"; c.addStyleName(contentWidthStyle); upperPanel = new HorizontalPanel(); HTML upperLeftBar = new HTML(" "); upperLeftBar.setStyleName(heightStyle1); upperPanel.add(upperLeftBar); upperPanel.add(c); upperPanel.setCellWidth(c, "100%"); upperPanel.setCellVerticalAlignment(c, VerticalPanel.ALIGN_MIDDLE); HorizontalPanel lowerPanel = new HorizontalPanel(); lowerPanel.setStyleName(widthStyle); HTML lowerLeftBar = new HTML(" "); lowerLeftBar.setStyleName(heightStyle2); lowerPanel.add(lowerLeftBar); lowerPanel.add(buttonPanel); lowerPanel.setCellWidth(buttonPanel, "100%"); lowerPanel.setCellHorizontalAlignment(buttonPanel, HorizontalPanel.ALIGN_RIGHT); lowerPanel.setCellVerticalAlignment(buttonPanel, VerticalPanel.ALIGN_MIDDLE); // Window.alert("5"); vp.add(upperPanel); vp.add(lowerPanel); } else { // Window.alert("6"); vp.add(c); vp.setCellWidth(c, "100%"); vp.add(buttonPanel); vp.setCellWidth(buttonPanel, "100%"); vp.setCellHorizontalAlignment(buttonPanel, HorizontalPanel.ALIGN_RIGHT); // Window.alert("7"); } // RoundedPanel rp = new RoundedPanel(vp); // rp.setStyleName("common-dialog-rounded-corner-panel"); // Window.alert("8"); scrollPanel.add(vp); add(scrollPanel); /* FocusWidget fw = getFocusWidget(); if (fw != null) { this.getFocusModel().add(fw); } else { Window.alert("No focus widget provided"); } */ this.setFocusModel(new FocusModel() { public HasFocus getFocusWidget() { return getDmFocusModel(); } }); DmGlassPanel dgp = new DmGlassPanel(this); dgp.show(); // show(); }
From source file:com.dimdim.conference.ui.dialogues.client.common.PermissionsControlDialog.java
License:Open Source License
protected Widget getContent() { ScrollPanel scroller = new ScrollPanel(); scroller.setStyleName("list-popup-scroll-panel"); VerticalPanel table = new VerticalPanel(); VerticalPanel scrolledTable = new VerticalPanel(); scroller.add(scrolledTable);/*from w ww. jav a2 s. com*/ // table.setStyleName("list-control-table"); /* HorizontalPanel header1 = new HorizontalPanel(); header1.add(createLabel("Conference Permissions","conference-permissions-header")); Label chat1 = createLabel("Chat","conference-chat-button-header"); header1.add(chat1); Label audio1 = createLabel("Audio","conference-chat-button-header"); header1.add(audio1); Label video1 = createLabel("Video","conference-chat-button-header"); header1.add(video1); header1.addStyleName("common-dialog-row"); table.add(header1); HorizontalPanel defaultsRow = new HorizontalPanel(); defaultsRow.addStyleName("common-dialog-row"); Label text1 = createTextHTML("Let all attendees to:", "conference-permissions-comment-1"); defaultsRow.add(text1); HorizontalPanel hp21 = new HorizontalPanel(); CheckBox cb11 = new CheckBox(); hp21.add(cb11); hp21.setStyleName("user-chat-button"); hp21.setCellHorizontalAlignment(cb11,HorizontalPanel.ALIGN_LEFT); hp21.setCellVerticalAlignment(cb11,VerticalPanel.ALIGN_MIDDLE); defaultsRow.add(hp21); defaultsRow.setCellHorizontalAlignment(hp21,HorizontalPanel.ALIGN_LEFT); defaultsRow.setCellVerticalAlignment(hp21,VerticalPanel.ALIGN_MIDDLE); HorizontalPanel hp31 = new HorizontalPanel(); CheckBox cb21 = new CheckBox(); hp31.add(cb21); hp31.setStyleName("user-chat-button"); hp31.setCellHorizontalAlignment(cb21,HorizontalPanel.ALIGN_LEFT); hp31.setCellVerticalAlignment(cb21,VerticalPanel.ALIGN_MIDDLE); defaultsRow.add(hp31); defaultsRow.setCellHorizontalAlignment(hp31,HorizontalPanel.ALIGN_LEFT); defaultsRow.setCellVerticalAlignment(hp31,VerticalPanel.ALIGN_MIDDLE); HorizontalPanel hp41 = new HorizontalPanel(); CheckBox cb31 = new CheckBox(); hp41.add(cb31); hp41.setStyleName("user-chat-button"); hp41.setCellHorizontalAlignment(cb31,HorizontalPanel.ALIGN_LEFT); hp41.setCellVerticalAlignment(cb31,VerticalPanel.ALIGN_MIDDLE); defaultsRow.add(hp41); defaultsRow.setCellHorizontalAlignment(hp41,HorizontalPanel.ALIGN_LEFT); defaultsRow.setCellVerticalAlignment(hp41,VerticalPanel.ALIGN_MIDDLE); table.add(defaultsRow); HTML line1 = new HTML(" "); line1.setStyleName("section-break"); table.add(line1); HorizontalPanel header2 = new HorizontalPanel(); header2.add(createLabel("Enable Meeting Lobby","conference-permissions-header")); HorizontalPanel hp22 = new HorizontalPanel(); CheckBox cb12 = new CheckBox(); hp22.add(cb12); hp22.setStyleName("user-chat-button"); hp22.setCellHorizontalAlignment(cb12,HorizontalPanel.ALIGN_LEFT); hp22.setCellVerticalAlignment(cb12,VerticalPanel.ALIGN_MIDDLE); header2.add(hp22); header2.setCellHorizontalAlignment(hp22,HorizontalPanel.ALIGN_LEFT); header2.setCellVerticalAlignment(hp22,VerticalPanel.ALIGN_MIDDLE); HTML filler1 = new HTML("."); filler1.setStyleName("conference-button-filler"); header2.setCellHorizontalAlignment(filler1,HorizontalPanel.ALIGN_LEFT); header2.setCellVerticalAlignment(filler1,VerticalPanel.ALIGN_MIDDLE); header2.add(filler1); HTML filler2 = new HTML("."); filler2.setStyleName("conference-button-filler"); header2.setCellHorizontalAlignment(filler2,HorizontalPanel.ALIGN_LEFT); header2.setCellVerticalAlignment(filler2,VerticalPanel.ALIGN_MIDDLE); header2.add(filler2); header2.addStyleName("common-dialog-row"); table.add(header2); HTML line2 = new HTML(" "); line2.setStyleName("section-break"); table.add(line2); */ int size = this.listModel.getListSize(); // Now all the users if any are available. if (size > 0) { UIResources uiResources = UIResources.getUIResources(); HorizontalPanel header = new HorizontalPanel(); header.add(createLabel(ConferenceGlobals.getDisplayString("console.moodlabel", "Mood"), "user-image-header")); header.add(createLabel(UIStrings.getNameLabel(), "user-name-header")); //header.add(createLabel(UIStrings.getEmailLabel(),"user-email-header")); //if private chat is disbaled as feature if (ConferenceGlobals.privateChatEnabled) { chatHeaderLabel = createLabel(UIStrings.getChatLabel(), "user-chat-button-header"); chatHeaderLabel.addStyleName("common-anchor-default-color"); header.add(chatHeaderLabel); chatHeaderLabel.addClickListener(this); } if (!ConferenceGlobals.isPresenterAVAudioDisabled() && ConferenceGlobals.partListEnabled) { String label = UIStrings.getAudioLabel(); if (ConferenceGlobals.isPresenterAVVideoOnly()) { label = UIStrings.getVideoLabel(); audioCheckBoxSet.setMaxChecked(userManager.getMaximumAttendeeVideos()); } Label audio = createLabel(label, "user-chat-button-header"); header.add(audio); } // Label video = createLabel("Video","user-chat-button-header"); // header.add(video); header.addStyleName("common-dialog-row"); table.add(header); table.add(scroller); table.setCellWidth(scroller, "100%"); int i = 0; for (i = 0; i < size; i++) { UserListEntry ule = (UserListEntry) this.listModel.getListEntryAt(i); final UIRosterEntry user = ule.getUser(); if (user.isHost()) { continue; } HorizontalPanel row = new HorizontalPanel(); HorizontalPanel hp1 = new HorizontalPanel(); Image image = UserGlobals.getUserGlobals().getMoodImageUrl(user.getMood()); 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); Label nameLabel = createTextHTML(user.getDisplayName(), "user-name"); if (ConferenceGlobals.privateChatEnabled) { nameLabel.addClickListener(new ClickListener() { public void onClick(Widget sender) { NewChatController.getController().showChatPopupIfPossible(user); hide(); } }); nameLabel.addStyleName("common-anchor-default-color"); } row.add(nameLabel); if (ConferenceGlobals.privateChatEnabled) { HorizontalPanel hp2 = new HorizontalPanel(); CheckBox cb1 = new CheckBox(); hp2.add(cb1); hp2.setStyleName("user-chat-button"); hp2.setCellHorizontalAlignment(cb1, HorizontalPanel.ALIGN_LEFT); hp2.setCellVerticalAlignment(cb1, VerticalPanel.ALIGN_MIDDLE); row.add(hp2); row.setCellHorizontalAlignment(hp2, HorizontalPanel.ALIGN_LEFT); row.setCellVerticalAlignment(hp2, VerticalPanel.ALIGN_MIDDLE); cb1.setChecked(user.isChatOn()); this.chatCheckBoxes.put(user.getUserId(), cb1); } if (!ConferenceGlobals.isPresenterAVAudioDisabled() && ConferenceGlobals.partListEnabled) { 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); if (user.isVideoOn() && !ConferenceGlobals.isPresenterAVVideoOnly()) { cb2.setChecked(user.isVideoOn()); cb2.setEnabled(false); } else { cb2.setChecked(user.isAudioOn()); if (ConferenceGlobals.isPresenterAVVideoOnly()) { cb2.setChecked(user.isVideoOn()); } this.audioCheckBoxes.put(user.getUserId(), cb2); this.audioCheckBoxSet.addCheckBox(cb2); } } /* HorizontalPanel hp4 = new HorizontalPanel(); CheckBox cb3 = new CheckBox(); 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); cb3.setChecked(user.isVideoOn()); this.videoCheckBoxes.put(user.getUserId(),cb3); */ row.addStyleName("common-dialog-row"); scrolledTable.add(row); } } else { HorizontalPanel header2 = new HorizontalPanel(); header2.add(createLabel(UIStrings.getNoParticipantsMessage(), "conference-permissions-header")); table.add(header2); } return table; }
From source file:com.dimdim.conference.ui.dialogues.client.common.PermissionsControlDialog.java
License:Open Source License
protected Widget createHeaderWidget(String text, String style) { HorizontalPanel hp = new HorizontalPanel(); CheckBox cb = new CheckBox(); cb.setStyleName("control-table-header-checkbox"); hp.setCellVerticalAlignment(cb, VerticalPanel.ALIGN_MIDDLE); hp.add(createLabel(text, style));//from w w w .ja va 2 s . c o m hp.add(cb); hp.setStyleName("control-table-header-checkbox-combo"); return hp; }
From source file:com.dimdim.conference.ui.dialogues.client.common.UserControlDialog.java
License:Open Source License
protected Widget getContent() { ScrollPanel scroller = new ScrollPanel(); scroller.setStyleName("list-popup-scroll-panel"); VerticalPanel table = new VerticalPanel(); VerticalPanel scrolledTable = new VerticalPanel(); scroller.add(scrolledTable);//w w w. ja v a2s. com // table.setStyleName("list-control-table"); //UIResources uiResources = UIResources.getUIResources(); //String subject = uiResources.getConferenceInfo("subject"); int size = this.listModel.getListSize(); int i = 0; if (size > 0) { HorizontalPanel header = new HorizontalPanel(); header.add(createLabel(ConferenceGlobals.getDisplayString("console.moodlabel", "Mood"), "user-image-header")); header.add(createLabel(UIStrings.getNameLabel(), "user-name-header")); //header.add(createLabel(UIStrings.getEmailLabel(),"user-email-header")); if (this.allowUserControl) { Label chat = createLabel(UIStrings.getChatLabel(), "user-chat-button-header"); chat.addStyleName("common-anchor-default-color"); header.add(chat); String label = UIStrings.getAudioLabel(); if (ConferenceGlobals.isPresenterAVVideoOnly()) { label = UIStrings.getVideoLabel(); } Label audio = createLabel(label, "user-chat-button-header"); audio.addStyleName("common-anchor-default-color"); header.add(audio); } header.addStyleName("common-dialog-row"); table.add(header); table.add(scroller); table.setCellWidth(scroller, "100%"); for (i = 0; i < size; i++) { UserListEntry ule = (UserListEntry) this.listModel.getListEntryAt(i); final UIRosterEntry user = ule.getUser(); // UIListEntryPanelMouseAndClickListener mcl = new UIListEntryPanelMouseAndClickListener( // ule,this.userListAndEntryProperties,this.userListEntryManager); // mcl.setSecondLevelPopup(true); HorizontalPanel row = new HorizontalPanel(); HorizontalPanel hp1 = new HorizontalPanel(); Image image = UserGlobals.getUserGlobals().getMoodImageUrl(user.getMood()); 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 = createTextLabel(user.getDisplayName(), "user-name"); if (!me.getUserId().equals(user.getUserId())) { if (ConferenceGlobals.privateChatEnabled) { nameLabel.addStyleName("common-anchor-default-color"); nameLabel.addClickListener(new ClickListener() { public void onClick(Widget sender) { NewChatController.getController().showChatPopupIfPossible(user); hide(); } }); } } // nameLabel.addClickListener(mcl); // nameLabel.addMouseListener(mcl); row.add(nameLabel); if (this.allowUserControl) { HorizontalPanel hp2 = new HorizontalPanel(); CheckBox cb1 = new CheckBox(); hp2.add(cb1); hp2.setStyleName("user-chat-button"); hp2.setCellHorizontalAlignment(cb1, HorizontalPanel.ALIGN_LEFT); hp2.setCellVerticalAlignment(cb1, VerticalPanel.ALIGN_MIDDLE); row.add(hp2); row.setCellHorizontalAlignment(hp2, HorizontalPanel.ALIGN_LEFT); row.setCellVerticalAlignment(hp2, VerticalPanel.ALIGN_MIDDLE); 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); // HorizontalPanel hp4 = new HorizontalPanel(); // CheckBox cb3 = new CheckBox(); // 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); } } else { HorizontalPanel header2 = new HorizontalPanel(); header2.add(createLabel(UIStrings.getNoParticipantsMessage(), "conference-permissions-header")); table.add(header2); } return table; }