List of usage examples for com.google.gwt.user.client.ui DockPanel DockPanel
public DockPanel()
From source file:com.bramosystems.oss.player.core.client.skin.CustomPlayerControl.java
License:Apache License
private Widget getPlayerWidget(final UIStyleResource imgPack) { imgPack.ensureInjected();// ww w . ja va 2 s. c o m seekbar = new CSSSeekBar(5); seekbar.setStylePrimaryName(STYLE_NAME); seekbar.addStyleDependentName("seekbar"); seekbar.setWidth("95%"); seekbar.addSeekChangeHandler(new SeekChangeHandler() { @Override public void onSeekChanged(SeekChangeEvent event) { player.setPlayPosition(event.getSeekPosition() * player.getMediaDuration()); } }); playTimer = new Timer() { @Override public void run() { updateSeekState(); } }; play = new CPCButton(imgPack.playDisabled(), new ClickHandler() { @Override public void onClick(ClickEvent event) { switch (playState) { case Stop: case Pause: try { // play media... play.setEnabled(false); // avoid multiple clicks player.playMedia(); } catch (PlayException ex) { DebugEvent.fire(player, DebugEvent.MessageType.Error, ex.getMessage()); } break; case Playing: player.pauseMedia(); } } }); play.setStyleName(imgPack.play()); play.setEnabled(false); stop = new CPCButton(imgPack.stopDisabled(), new ClickHandler() { @Override public void onClick(ClickEvent event) { player.stopMedia(); } }); stop.setStyleName(imgPack.stop()); stop.setEnabled(false); prev = new CPCButton(imgPack.prevDisabled(), new ClickHandler() { @Override public void onClick(ClickEvent event) { if (player instanceof PlaylistSupport) { try { ((PlaylistSupport) player).playPrevious(); } catch (PlayException ex) { next.setEnabled(false); DebugEvent.fire(player, DebugEvent.MessageType.Info, ex.getMessage()); } } } }); prev.setStyleName(imgPack.prev()); prev.setEnabled(false); next = new CPCButton(imgPack.nextDisabled(), new ClickHandler() { @Override public void onClick(ClickEvent event) { if (player instanceof PlaylistSupport) { try { ((PlaylistSupport) player).playNext(); } catch (PlayException ex) { next.setEnabled(false); DebugEvent.fire(player, DebugEvent.MessageType.Info, ex.getMessage()); } } } }); next.setStyleName(imgPack.next()); next.setEnabled(false); vc = new VolumeControl(5); vc.setStyleName(imgPack.volume()); vc.setPopupStyleName(STYLE_NAME + "-volumeControl"); vc.addVolumeChangeHandler(new VolumeChangeHandler() { @Override public void onVolumeChanged(VolumeChangeEvent event) { player.setVolume(event.getNewVolume()); } }); player.addLoadingProgressHandler(new LoadingProgressHandler() { @Override public void onLoadingProgress(LoadingProgressEvent event) { seekbar.setLoadingProgress(event.getProgress()); vc.setVolume(player.getVolume()); updateSeekState(); } }); player.addPlayStateHandler(new PlayStateHandler() { @Override public void onPlayStateChanged(PlayStateEvent event) { int index = event.getItemIndex(); switch (event.getPlayState()) { case Paused: toPlayState(PlayState.Pause, imgPack); next.setEnabled(index < (((PlaylistSupport) player).getPlaylistSize() - 1)); prev.setEnabled(index > 0); break; case Started: toPlayState(PlayState.Playing, imgPack); next.setEnabled(index < (((PlaylistSupport) player).getPlaylistSize() - 1)); prev.setEnabled(index > 0); break; case Stopped: case Finished: toPlayState(PlayState.Stop, imgPack); next.setEnabled(false); prev.setEnabled(false); break; } } }); player.addPlayerStateHandler(new PlayerStateHandler() { @Override public void onPlayerStateChanged(PlayerStateEvent event) { switch (event.getPlayerState()) { case Ready: play.setEnabled(true); vc.setVolume(player.getVolume()); } } }); // Time label.. timeLabel = new Label("--:-- / --:--"); timeLabel.setWordWrap(false); timeLabel.setHorizontalAlignment(Label.ALIGN_CENTER); // build the UI... DockPanel face = new DockPanel(); face.setStyleName(""); face.setVerticalAlignment(DockPanel.ALIGN_MIDDLE); face.setSpacing(3); face.add(vc, DockPanel.WEST); face.add(play, DockPanel.WEST); face.add(stop, DockPanel.WEST); face.add(prev, DockPanel.WEST); face.add(next, DockPanel.WEST); face.add(timeLabel, DockPanel.EAST); face.add(seekbar, DockPanel.CENTER); face.setCellWidth(seekbar, "100%"); face.setCellHorizontalAlignment(seekbar, DockPanel.ALIGN_CENTER); return face; }
From source file:com.bramosystems.oss.player.provider.sample.client.Capsule.java
License:Apache License
/** * Constructs <code>Capsule</code> player to automatically playback the * media located at {@code mediaURL}, if {@code autoplay} is {@code true} using * the specified {@code plugin}.//from w ww. j av a 2 s .c o m * * @param plugin plugin to use for playback. * @param mediaURL the URL of the media to playback * @param autoplay {@code true} to start playing automatically, {@code false} otherwise * @param uiResource the CSS resource to use for the UI * * @throws PluginVersionException if the required plugin version is not installed on the client. * @throws PluginNotFoundException if the plugin is not installed on the client. * * @see Plugin * @since 1.2 */ public Capsule(Plugin plugin, String mediaURL, boolean autoplay, CapsuleUIResource uiResource) throws PluginNotFoundException, PluginVersionException, LoadException { // TODO: remove LoadEx on API 2.0.3 release ... super(plugin, mediaURL, autoplay, "64px", "100%"); uiRes = uiResource; uiRes.ensureInjected(); playState = PlayState.Stop; mItems = new ArrayList<MediaInfo.MediaInfoKey>(); progress = new ProgressBar(); progress.setWidth("95%"); playTimer = new Timer() { @Override public void run() { progress.setTime(getPlayPosition(), getMediaDuration()); } }; infoTimer = new Timer() { @Override public void run() { if (mItems.size() > 0) { MediaInfo.MediaInfoKey item = mItems.get(infoIndex); progress.setInfo(item.toString() + ": " + mInfo.getItem(item)); infoIndex++; infoIndex %= mItems.size(); } else { cancel(); } } @Override public void cancel() { super.cancel(); progress.setInfo(""); } }; play = new CButton(uiRes.pauseDisabled(), new ClickHandler() { @Override public void onClick(ClickEvent event) { switch (playState) { case Stop: case Pause: try { // play media... play.setEnabled(false); playMedia(); } catch (PlayException ex) { fireError(ex.getMessage()); } break; case Playing: pauseMedia(); } } }); play.setStyleName(uiRes.play()); play.setEnabled(false); stop = new CButton(uiRes.stopDisabled(), new ClickHandler() { @Override public void onClick(ClickEvent event) { stopMedia(); } }); stop.setStyleName(uiRes.stop()); stop.setEnabled(false); vc = new VolumeControl(5); vc.setStyleName(uiRes.volume()); vc.addVolumeChangeHandler(new VolumeChangeHandler() { @Override public void onVolumeChanged(VolumeChangeEvent event) { setVolume(event.getNewVolume()); } }); vc.setPopupStyleName("player-Capsule-volumeControl"); addLoadingProgressHandler(new LoadingProgressHandler() { @Override public void onLoadingProgress(LoadingProgressEvent event) { double prog = event.getProgress(); progress.setLoadingProgress(prog); if (prog == 1.0) { progress.setTime(0, getMediaDuration()); vc.setVolume(getVolume()); } } }); addPlayStateHandler(new PlayStateHandler() { @Override public void onPlayStateChanged(PlayStateEvent event) { switch (event.getPlayState()) { case Stopped: case Finished: toPlayState(PlayState.Stop); break; case Paused: toPlayState(PlayState.Pause); break; case Started: toPlayState(PlayState.Playing); break; } } }); addPlayerStateHandler(new PlayerStateHandler() { @Override public void onPlayerStateChanged(PlayerStateEvent event) { switch (event.getPlayerState()) { case BufferingFinished: case BufferingStarted: break; case Ready: play.setEnabled(true); vc.setVolume(getVolume()); } } }); // build the UI... DockPanel main = new DockPanel(); main.setStyleName("player-Capsule"); main.setSpacing(0); main.setVerticalAlignment(DockPanel.ALIGN_MIDDLE); main.setSize("100%", "64px"); main.add(new CEdge(uiRes.leftEdge()), DockPanel.WEST); main.add(play, DockPanel.WEST); main.add(stop, DockPanel.WEST); main.add(new CEdge(uiRes.rightEdge()), DockPanel.EAST); main.add(vc, DockPanel.EAST); main.add(progress, DockPanel.CENTER); main.setCellWidth(progress, "100%"); main.setCellHorizontalAlignment(progress, DockPanel.ALIGN_CENTER); setPlayerControlWidget(main); setWidth("100%"); }
From source file:com.dimdim.conference.ui.common.client.list.ListEntryHoverPopupPanel.java
License:Open Source License
public ListEntryHoverPopupPanel() { super(false); this.setStyleName("dm-hover-popup"); //pane.setSize("100%","100%"); // pane.addMouseListener(this); // pane.addFocusListener(this); DockPanel outer = new DockPanel(); // outer.setSize("100%","100%"); outer.setStyleName("dm-hover-popup-body"); // pane.add(outer); headerPanel.setStyleName("dm-hover-popup-header"); outer.add(headerPanel, DockPanel.NORTH); outer.setCellWidth(headerPanel, "100%"); this.contentPanel.setStyleName("dm-hover-popup-content"); outer.add(contentPanel, DockPanel.NORTH); // outer.setCellWidth(contentPanel,"100%"); outer.setCellHeight(contentPanel, "100%"); this.linksPanel.setStyleName("dm-hover-popup-links-panel"); outer.add(linksPanel, DockPanel.SOUTH); // outer.setCellWidth(contentPanel,"100%"); outer.setCellHeight(linksPanel, "100%"); // this.add(pane); this.add(outer); this.addPopupListener(this); }
From source file:com.dimdim.conference.ui.common.client.tab.CommonTabbedPage.java
License:Open Source License
protected void createPanels() { this.tabsPanel = new DockPanel(); this.tabsPanel.setStyleName("dm-tab-bar"); this.subTabsPanel = new DockPanel(); this.subTabsPanel.setStyleName("dm-sub-tab-bar"); this.contentPanel = new DockPanel(); leftGroupTabs = new HorizontalPanel(); tabsPanel.add(leftGroupTabs, DockPanel.WEST); tabsPanel.setCellVerticalAlignment(leftGroupTabs, VerticalPanel.ALIGN_BOTTOM); tabsPanel.setCellHorizontalAlignment(leftGroupTabs, HorizontalPanel.ALIGN_LEFT); leftGroupSubTabs = new HorizontalPanel(); subTabsPanel.add(leftGroupSubTabs, DockPanel.WEST); subTabsPanel.setCellHorizontalAlignment(leftGroupSubTabs, HorizontalPanel.ALIGN_LEFT); subTabsPanel.setCellVerticalAlignment(leftGroupSubTabs, VerticalPanel.ALIGN_MIDDLE); leftGroupContentPanel = new VerticalPanel(); leftGroupContentPanel.setStyleName("left-group-content-panel"); contentPanel.add(leftGroupContentPanel, DockPanel.WEST); contentPanel.setCellHorizontalAlignment(leftGroupContentPanel, HorizontalPanel.ALIGN_CENTER); contentPanel.setCellVerticalAlignment(leftGroupContentPanel, VerticalPanel.ALIGN_TOP); poppedOutWorkspaceContent = new HorizontalPanel(); poppedOutWorkspaceContent.add(new Label(".")); leftTabGroup = new CommonTabGroup(this, name, CommonTabGroup.LEFT, leftGroupTabs, leftGroupSubTabs, leftGroupContentPanel, this.leftGroupContentWidth, this.leftGroupContentHeight); if (this.rightGroupName != null && this.rightGroupWidth != null) { this.rightGroupContentVisible = true; rightGroupTabs = new HorizontalPanel(); rightGroupTabs.setWidth(rightGroupWidth); tabsPanel.add(rightGroupTabs, DockPanel.EAST); tabsPanel.setCellVerticalAlignment(rightGroupTabs, VerticalPanel.ALIGN_BOTTOM); tabsPanel.setCellHorizontalAlignment(rightGroupTabs, HorizontalPanel.ALIGN_RIGHT); rightGroupTabs.add(meetingClock); rightGroupTabs.setCellVerticalAlignment(meetingClock, VerticalPanel.ALIGN_BOTTOM); rightGroupTabs.setCellHorizontalAlignment(meetingClock, HorizontalPanel.ALIGN_RIGHT); rightGroupSubTabs = new HorizontalPanel(); rightGroupSubTabs.setWidth(rightGroupWidth); subTabsPanel.add(rightGroupSubTabs, DockPanel.EAST); subTabsPanel.setCellHorizontalAlignment(rightGroupSubTabs, HorizontalPanel.ALIGN_RIGHT); subTabsPanel.setCellVerticalAlignment(rightGroupSubTabs, VerticalPanel.ALIGN_MIDDLE); rightGroupContentPanel = new VerticalPanel(); rightGroupContentPanel.setWidth(rightGroupWidth); contentPanel.add(rightGroupContentPanel, DockPanel.EAST); contentPanel.setCellHorizontalAlignment(rightGroupContentPanel, HorizontalPanel.ALIGN_LEFT); contentPanel.setCellVerticalAlignment(rightGroupContentPanel, VerticalPanel.ALIGN_TOP); rightTabGroup = new CommonTabGroup(this, name, CommonTabGroup.RIGHT, rightGroupTabs, rightGroupSubTabs, rightGroupContentPanel, this.rightGroupContentWidth, this.rightGroupContentHeight); this.rightGroupHideControl = new Image("images/opentriangle.gif");//,15,15); this.rightGroupHideControl.addClickListener(this); this.rightGroupHideControl.setStyleName("hide-discuss-panel-button"); rightTabGroup.setHideControl(this.rightGroupHideControl); rightTabGroup.setOpenControlListener(this); } else {/*from ww w. jav a 2 s .co m*/ // Just to make sure that the subtabs panel expands horizontally. rightGroupSubTabs = new HorizontalPanel(); rightGroupSubTabs.add(new HTML(" ")); subTabsPanel.add(rightGroupSubTabs, DockPanel.EAST); subTabsPanel.setCellHorizontalAlignment(rightGroupSubTabs, HorizontalPanel.ALIGN_RIGHT); subTabsPanel.setCellVerticalAlignment(rightGroupSubTabs, VerticalPanel.ALIGN_MIDDLE); } subTabsAndContentPanel = new DockPanel(); subTabsAndContentPanel.setStyleName("dm-tab-content"); subTabsAndContentPanel.add(subTabsPanel, DockPanel.NORTH); subTabsAndContentPanel.add(poppedOutWorkspaceContent, DockPanel.NORTH); this.poppedOutWorkspaceContent.setVisible(false); subTabsAndContentPanel.add(contentPanel, DockPanel.CENTER); roundedPanel = new RoundedPanel(subTabsAndContentPanel); tabbedPage.add(tabsPanel); tabbedPage.add(roundedPanel); }
From source file:com.dimdim.conference.ui.common.client.tab.CommonTabGroup.java
License:Open Source License
public CommonTabGroup(CommonTabbedPage tabbedPage, String name, int orientation, HorizontalPanel tabsPanel, HorizontalPanel subTabsPanel, VerticalPanel contentPanel, int contentWidth, int contentHeight) { // Window.alert("Creating CommonTabGroup:"+1); this.tabbedPage = tabbedPage; this.name = name; this.orientation = orientation; this.tabsPanel = tabsPanel; this.subTabsPanel = subTabsPanel; this.contentPanel = contentPanel; this.tabsOrientationPanel = new DockPanel(); this.tabsPanel.add(this.tabsOrientationPanel); this.tabsPanel.setCellWidth(this.tabsOrientationPanel, "100%"); this.tabs = new Vector(); this.contentWidth = contentWidth; this.contentHeight = contentHeight; // Window.alert("Creating CommonTabGroup:"+2); this.tabContentPanel = new CommonTabContentPanel(name); this.tabContentPanel.setStyleName("tab-content-panel"); // this.tabContentPanel.setSize("100%","100%"); this.contentPanel.add(this.tabContentPanel); // this.contentPanel.setCellHeight(this.tabContentPanel,"100%"); // this.contentPanel.setCellWidth(this.tabContentPanel,"100%"); // Window.alert("Creating CommonTabGroup:"+3); }
From source file:com.dimdim.conference.ui.common.client.user.NewChatPopup.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. *///ww w. j av a 2s. c o m public NewChatPopup(NewChatPanel chatPanel, int index) { super(false); this.index = index; this.chatPanel = chatPanel; this.me = this.chatPanel.getMe(); this.other = this.chatPanel.getOther(); this.rosterModel = ClientModel.getClientModel().getRosterModel(); // Add header. header = new DockPanel(); header.setStyleName("dm-user-info-header"); header.setWidth("248px"); header.setSpacing(4); String role = this.me.getRole(); if (other != null) { role = other.getRole(); toId = other.getUserId(); } Image image = UserGlobals.getUserGlobals().getRoleImageUrl(role); header.add(image, DockPanel.WEST); header.setCellVerticalAlignment(image, VerticalPanel.ALIGN_MIDDLE); String name = this.me.getDisplayName(); if (other != null) { name = other.getDisplayName(); } name = ConferenceGlobals.getDisplayString("console.private.chat.with", "Private chat with") + " " + name; nameLabel = new FixedLengthLabel(name, 27); nameLabel.setStyleName("dm-popup-header-label"); nameLabel.addStyleName("draggable-panel-header"); nameLabel.addClickListener(this); nameLabel.setWordWrap(false); nameLabel.addMouseListener(this); header.add(nameLabel, DockPanel.WEST); header.setCellVerticalAlignment(nameLabel, VerticalPanel.ALIGN_MIDDLE); HTML filler = new HTML(""); header.add(filler, DockPanel.CENTER); header.setCellVerticalAlignment(filler, VerticalPanel.ALIGN_MIDDLE); headerButtons = new HorizontalPanel(); headerButtons.setStyleName("chat-header-buttons-panel"); minimizeImage = UIImages.getImageBundle(UIImages.defaultSkin).getMinimize(); //minimizeImage.setStyleName("minimize-chat-popup"); minimizeImage.addStyleName("chat-header-button"); headerButtons.add(minimizeImage); minimizeImage.addClickListener(this); closeImage = UIImages.getImageBundle(UIImages.defaultSkin).getClose(); //closeImage.setStyleName("close-chat-popup"); closeImage.addStyleName("chat-header-button"); headerButtons.add(closeImage); closeImage.addClickListener(this); this.setImage(); header.add(headerButtons, DockPanel.EAST); header.setCellWidth(filler, "100%"); // Assemble the overall chat panel. add(pane); this.setHeight(NewChatPopup.privateChatPanelHeight + "px"); pane.setWidth("100%"); if (ConferenceGlobals.isBrowserFirefox()) { pane.add(scWrapperPanel); scWrapperPanel.setSize("248px", NewChatPopup.privateChatPanelHeight + "px"); scWrapperPanel.add(outer); scWrapperPanel.setAlwaysShowScrollBars(false); } else { pane.add(hzWrapperPanel); hzWrapperPanel.setSize("248px", NewChatPopup.privateChatPanelHeight + "px"); hzWrapperPanel.add(outer); } outer.add(header, DockPanel.NORTH); outer.add(this.chatPanel, DockPanel.CENTER); outer.setCellWidth(chatPanel, "100%"); setStyleName("dm-chat-popup"); // Window.addWindowResizeListener(this); addPopupListener(this); chatPanel.setUnreadMessaeListener(this); this.setHeight(); }
From source file:com.dimdim.conference.ui.envcheck.client.layout.CommonMessagePopup.java
License:Open Source License
protected void drawDialog() { vp = new VerticalPanel(); RoundedPanel rp = new RoundedPanel(vp); vp.setStyleName("common-dialog-outer-panel"); rp.setStyleName("common-dialog-rounded-corner-panel"); DockPanel buttonPanel = new DockPanel(); if (this.showCloseButton) { closeButton = new Button(closeButtonText, new ClickListener() { public void onClick(Widget sender) { hide();//from w w w . j av a 2 s . c o m History.back(); // TODO move out into a listener. } }); closeButton.setStyleName("dm-popup-close-button"); buttonPanel.add(closeButton, DockPanel.EAST); buttonPanel.setSpacing(0); HTML filler1 = new HTML(" "); buttonPanel.add(filler1, DockPanel.EAST); } if (this.dialogName != null) { // 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"; content.addStyleName(contentWidthStyle); HorizontalPanel upperPanel = new HorizontalPanel(); HTML upperLeftBar = new HTML(" "); upperLeftBar.setStyleName(heightStyle1); upperPanel.add(upperLeftBar); upperPanel.add(content); upperPanel.setCellWidth(content, "100%"); upperPanel.setCellVerticalAlignment(content, 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); vp.add(upperPanel); vp.add(lowerPanel); this.addStyleName(this.dialogName + "-dialog-size"); } else { vp.add(content); vp.setCellWidth(content, "100%"); vp.add(buttonPanel); vp.setCellWidth(buttonPanel, "100%"); vp.setCellHorizontalAlignment(buttonPanel, HorizontalPanel.ALIGN_RIGHT); } this.addPopupListener(this); this.add(vp); }
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);//from w w w . j a v a 2 s .c o m 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);//from ww w . j a va 2s . 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%"); 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.layout2.client.ToolsPopupPanel.java
License:Open Source License
public ToolsPopupPanel(ResourceRoster resRoster, ClickListener shareClickListener, UIRosterEntry currentUser) { super(false); this.setStyleName("dm-hover-popup"); this.addStyleName("tool-popup-panel"); this.resRoster = resRoster; this.shareClickListener = shareClickListener; this.currentUser = currentUser; userManager = new UserRosterManager(currentUser); // pane.addMouseListener(this); // pane.addFocusListener(this); DockPanel outer = new DockPanel(); outer.setStyleName("dm-hover-popup-body"); // pane.add(outer); // headerPanel.setStyleName("dm-hover-popup-header"); // outer.add(headerPanel,DockPanel.NORTH); // outer.setCellWidth(headerPanel,"100%"); this.contentPanel.setStyleName("dm-hover-popup-content"); outer.add(contentPanel, DockPanel.NORTH); // outer.setCellHeight(contentPanel,"100%"); this.contentPanel.add(this.toolsPanel); // this.contentPanel.setCellHeight(this.toolsPanel, "100%"); // this.contentPanel.setCellWidth(this.toolsPanel, "100%"); this.writeToolsPanel(); // this.linksPanel.setStyleName("dm-hover-popup-links-panel"); // outer.add(linksPanel,DockPanel.SOUTH); // outer.setCellHeight(linksPanel,"100%"); // this.add(pane); this.add(outer); this.addPopupListener(this); }