List of usage examples for com.google.gwt.user.client.ui HoverPopupPanel flashCallbackElement
Element flashCallbackElement
To view the source code for com.google.gwt.user.client.ui HoverPopupPanel flashCallbackElement.
Click Source Link
From source file:com.dimdim.conference.ui.layout.client.widget.ConsoleTopPanel.java
License:Open Source License
public ConsoleTopPanel(NewLayout console, UIRosterEntry currentUser) { this.console = console; this.currentUser = currentUser; userManager = new UserRosterManager(currentUser); this.initWidget(topPanel); DOM.setAttribute(topPanel.getElement(), "id", "console-topPanel"); topPanel.setStyleName("console-top-panel"); topPanel.add(links, DockPanel.EAST); topPanel.setCellHorizontalAlignment(links, DockPanel.ALIGN_RIGHT); topPanel.setCellVerticalAlignment(links, HasVerticalAlignment.ALIGN_TOP); UIParams uiParams = UIParams.getUIParams(); //String top_links_sign_out = uiParams.getStringParamValue("top_links_sign_out", "true"); //Window.alert("top_links_sign_out = "+top_links_sign_out); //Window.alert("top_links_about = "+uiParams.getStringParamValue("top_links_about", "true")); HTML seperator1 = new HTML("|"); seperator1.setStyleName("console-top-panel-seperator"); HTML seperator2 = new HTML("|"); seperator2.setStyleName("console-top-panel-seperator"); HTML seperator3 = new HTML("|"); seperator3.setStyleName("console-top-panel-seperator"); HTML seperator4 = new HTML("|"); seperator4.setStyleName("console-top-panel-seperator"); HTML seperator5 = new HTML("|"); seperator5.setStyleName("console-top-panel-seperator"); HTML seperator6 = new HTML("|"); seperator6.setStyleName("console-top-panel-seperator"); // Top links line1. String nm = this.currentUser.getDisplayName(); nameLabel = new FixedLengthLabel(nm, 25); if (nm.length() > 25) { nameLabel.setTitle(nm);/* www . j ava 2 s . com*/ } nameLabel.setWordWrap(false); nameLabel.setStyleName("common-text"); nameLabel.addStyleName("common-label"); // nameLabel.addClickListener(FlashCallbackHandler.getHandler()); // nameLabel.addClickListener(new ClickListener() // { // public void onClick(Widget sender) // { // String reloadUrl = (new CommandURLFactory()).getReloadConsoleURL(); // setLocation(reloadUrl); // } // }); // DOM.setAttribute(nameLabel.getElement(),"id","flash_bridge"); HoverPopupPanel.flashCallbackElement = nameLabel.getElement(); if ("true".equalsIgnoreCase(uiParams.getStringParamValue("top_links_settings", "true"))) { settingsLabel = new Label(UIStrings.getSettingsLabel()); settingsLabel.setWordWrap(false); settingsLabel.setTitle(ConferenceGlobals.getTooltip("settings_link")); settingsLabel.addClickListener(this); settingsLabel.setStyleName("console-top-panel-link"); } assistantLabel = new Label(UIGlobals.getAssistantSubTabLabel()); assistantLabel.setWordWrap(false); assistantLabel.setTitle(ConferenceGlobals.getTooltip("assistant_link")); assistantLabel.addClickListener(this); assistantLabel.setStyleName("console-top-panel-link"); if ("true".equalsIgnoreCase(uiParams.getStringParamValue("top_links_info", "true"))) { meetingLabel = new Label(UIStrings.getMeetingInfoLabel()); meetingLabel.setWordWrap(false); meetingLabel.setTitle(ConferenceGlobals.getTooltip("meetinginfo_link")); meetingLabel.addClickListener(this); meetingLabel.setStyleName("console-top-panel-link"); } if ("true".equalsIgnoreCase(uiParams.getStringParamValue("top_links_sign_out", "true"))) { if (UIGlobals.isPresenter(this.currentUser)) { logoutLabel = new Label(UIStrings.getPresenterSignOutLabel()); } else { logoutLabel = new Label(UIStrings.getAttendeeSignOutLabel()); } logoutLabel.setTitle(ConferenceGlobals.getTooltip("signout_link")); logoutLabel.setWordWrap(false); logoutLabel.addClickListener(this); logoutLabel.setStyleName("console-top-panel-link"); } if ("true".equalsIgnoreCase(uiParams.getStringParamValue("top_links_feedback", "true"))) { feedbackLabel = new Label(UIStrings.getFeedbackLabel()); feedbackLabel.setTitle(ConferenceGlobals.getTooltip("feedback_link")); feedbackLabel.addClickListener(this); feedbackLabel.setStyleName("console-top-panel-link"); } if ("true".equalsIgnoreCase(uiParams.getStringParamValue("top_links_about", "true"))) { aboutLabel = new Label(UIStrings.getAboutLabel()); aboutLabel.setTitle(ConferenceGlobals.getTooltip("about_link")); aboutLabel.addClickListener(this); aboutLabel.setStyleName("console-top-panel-link"); } linksLine1.setStyleName("console-top-links-line"); linksLine1.add(nameLabel); linksLine1.setCellVerticalAlignment(nameLabel, VerticalPanel.ALIGN_MIDDLE); if (UIGlobals.isPresenter(this.currentUser)) { if ("true".equalsIgnoreCase(uiParams.getStringParamValue("top_links_settings", "true"))) { linksLine1.add(seperator1); linksLine1.setCellVerticalAlignment(seperator1, VerticalPanel.ALIGN_MIDDLE); linksLine1.add(settingsLabel); linksLine1.setCellVerticalAlignment(settingsLabel, VerticalPanel.ALIGN_MIDDLE); } } if (UIGlobals.isPresenter(this.currentUser) && ConferenceGlobals.isAssistantEnabled()) { linksLine1.add(seperator6); linksLine1.setCellVerticalAlignment(seperator6, VerticalPanel.ALIGN_MIDDLE); linksLine1.add(assistantLabel); linksLine1.setCellVerticalAlignment(assistantLabel, VerticalPanel.ALIGN_MIDDLE); } if ("true".equalsIgnoreCase(uiParams.getStringParamValue("top_links_info", "true"))) { linksLine1.add(seperator2); linksLine1.setCellVerticalAlignment(seperator2, VerticalPanel.ALIGN_MIDDLE); linksLine1.add(meetingLabel); linksLine1.setCellVerticalAlignment(meetingLabel, VerticalPanel.ALIGN_MIDDLE); } if ("true".equalsIgnoreCase(uiParams.getStringParamValue("top_links_feedback", "true"))) { linksLine1.add(seperator3); linksLine1.setCellVerticalAlignment(seperator3, VerticalPanel.ALIGN_MIDDLE); linksLine1.add(feedbackLabel); linksLine1.setCellVerticalAlignment(feedbackLabel, VerticalPanel.ALIGN_MIDDLE); } if ("true".equalsIgnoreCase(uiParams.getStringParamValue("top_links_about", "true"))) { linksLine1.add(seperator4); linksLine1.setCellVerticalAlignment(seperator4, VerticalPanel.ALIGN_MIDDLE); linksLine1.add(aboutLabel); linksLine1.setCellVerticalAlignment(aboutLabel, VerticalPanel.ALIGN_MIDDLE); } if ("true".equalsIgnoreCase(uiParams.getStringParamValue("top_links_sign_out", "true"))) { linksLine1.add(seperator5); linksLine1.setCellVerticalAlignment(seperator4, VerticalPanel.ALIGN_MIDDLE); linksLine1.add(logoutLabel); linksLine1.setCellVerticalAlignment(logoutLabel, VerticalPanel.ALIGN_MIDDLE); } // if (UIGlobals.isOrganizer(this.currentUser)) // { // if (LayoutGlobals.isWhiteboardSupported() && ConferenceGlobals.whiteboardEnabled) // { // String rtmpUrl = UIGlobals.getStreamingUrlsTable().getWhiteboardRtmpUrl(); // String rtmptUrl = UIGlobals.getStreamingUrlsTable().getWhiteboardRtmptUrl(); // // String fullMovieUrl = "swf/wb_2.swf"+"?"+ConferenceGlobals.getConferenceKey()+ // "$"+rtmpUrl+"$"+rtmptUrl+"$2$2"; // this.wbMovie = new DmFlashWidget2("WB2","WB2N", // "2px","2px",fullMovieUrl,"black"); // linksLine1.add(wbMovie); // wbMovie.show(); // } // } // Top links line 2. // linksLine1.setStyleName("console-top-links-line"); links.setStyleName("console-top-links-panel"); links.add(linksLine1); links.setCellHorizontalAlignment(linksLine1, HorizontalPanel.ALIGN_RIGHT); //links.add(linksLine2); //links.setCellHorizontalAlignment(linksLine2,HorizontalPanel.ALIGN_RIGHT); topPanel.add(heading, DockPanel.CENTER); topPanel.setVerticalAlignment(DockPanel.ALIGN_TOP); topPanel.setCellWidth(heading, "100%"); }
From source file:com.dimdim.conference.ui.layout2.client.ToolsPopupPanel.java
License:Open Source License
private void writeToolsPanel() { ToolsClickListener tcl = new ToolsClickListener(this); toolsCount = 0;/*from ww w . j av a 2 s .c o m*/ Label lastLabel = null; // Top links line1. UIParams uiParams = UIParams.getUIParams(); String nm = this.currentUser.getDisplayName(); nameLabel = new FixedLengthLabel(nm, 25); if (nm.length() > 25) { nameLabel.setTitle(nm); } nameLabel.setWordWrap(false); nameLabel.setStyleName("common-text"); nameLabel.addStyleName("common-label"); HoverPopupPanel.flashCallbackElement = nameLabel.getElement(); if (this.currentUser.isHost()) { if ("true".equalsIgnoreCase(uiParams.getStringParamValue("top_links_settings", "true"))) { settingsLabel = new Label(UIStrings.getSettingsLabel()); settingsLabel.setWordWrap(false); settingsLabel.setTitle(ConferenceGlobals.getTooltip("settings_link")); settingsLabel.addClickListener(tcl); settingsLabel.setStyleName("tool-entry"); settingsLabel.addStyleName("settings-tool-entry"); settingsLabel.addMouseListener(labelHoverStyler); toolsPanel.add(settingsLabel); toolsCount++; lastLabel = settingsLabel; } } if (this.currentUser.isActivePresenter() && ConferenceGlobals.isAssistantEnabled()) { assistantLabel = new Label(UIGlobals.getAssistantSubTabLabel()); assistantLabel.setWordWrap(false); assistantLabel.setTitle(ConferenceGlobals.getTooltip("assistant_link")); assistantLabel.addClickListener(tcl); assistantLabel.setStyleName("tool-entry"); assistantLabel.addStyleName("assistant-tool-entry"); assistantLabel.addMouseListener(labelHoverStyler); toolsPanel.add(assistantLabel); toolsCount++; lastLabel = assistantLabel; } if ("true".equalsIgnoreCase(uiParams.getStringParamValue("top_links_info", "true"))) { meetingLabel = new Label(UIStrings.getMeetingInfoLabel()); meetingLabel.setWordWrap(false); meetingLabel.setTitle(ConferenceGlobals.getTooltip("meetinginfo_link")); meetingLabel.addClickListener(tcl); meetingLabel.setStyleName("tool-entry"); meetingLabel.addStyleName("meeting-info-tool-entry"); meetingLabel.addMouseListener(labelHoverStyler); toolsPanel.add(meetingLabel); toolsCount++; lastLabel = meetingLabel; } if ("true".equalsIgnoreCase(uiParams.getStringParamValue("top_links_feedback", "true"))) { feedbackLabel = new Label(UIStrings.getFeedbackLabel()); feedbackLabel.setTitle(ConferenceGlobals.getTooltip("feedback_link")); feedbackLabel.addClickListener(tcl); feedbackLabel.setStyleName("tool-entry"); feedbackLabel.addStyleName("feedback-tool-entry"); feedbackLabel.addMouseListener(labelHoverStyler); toolsPanel.add(feedbackLabel); toolsCount++; lastLabel = feedbackLabel; } if ("true".equalsIgnoreCase(uiParams.getStringParamValue("top_links_about", "true"))) { aboutLabel = new Label(UIStrings.getAboutLabel()); aboutLabel.setTitle(ConferenceGlobals.getTooltip("about_link")); aboutLabel.addClickListener(tcl); aboutLabel.setStyleName("tool-entry"); aboutLabel.addStyleName("about-tool-entry"); aboutLabel.addMouseListener(labelHoverStyler); toolsPanel.add(aboutLabel); toolsCount++; lastLabel = aboutLabel; } if (lastLabel != null) { lastLabel.addStyleName("last-tool-entry"); } }