private void hidePDFFrames(MenuItem item) { Frame frame = getActiveBrowserPerspectiveFrame(); if (frame == null) { return; } if (item.getSubMenu() != null && item.getSubMenu().isVisible()) { if (ElementUtils.elementsOverlap( item.getSubMenu().getElement(), getActiveBrowserPerspectiveFrame().getElement())) { FrameUtils.setEmbedVisibility(getActiveBrowserPerspectiveFrame(), false); } } else if (item.getParentMenu() != null) { // popups if (ElementUtils.elementsOverlap( item.getParentMenu().getElement(), getActiveBrowserPerspectiveFrame().getElement())) { FrameUtils.setEmbedVisibility(getActiveBrowserPerspectiveFrame(), false); } } }
@Override public void popupClosed(PopupPanel panel) { IFrameTabPanel iframeTab = SolutionBrowserPanel.getInstance().getContentTabPanel().getCurrentFrame(); if (iframeTab == null || iframeTab.getFrame() == null) { return; } Frame currentFrame = iframeTab.getFrame(); FrameUtils.setEmbedVisibility(currentFrame, true); }
public void center() { boundaryPanel.clear(); int left = (Window.getClientWidth() - windowPanel.getOffsetWidth()) >> 1; int top = (Window.getClientHeight() - windowPanel.getOffsetHeight()) >> 1; boundaryPanel.add(windowPanel, Window.getScrollLeft() + left, Window.getScrollTop() + top); left = (Window.getClientWidth() - windowPanel.getOffsetWidth()) >> 1; top = (Window.getClientHeight() - windowPanel.getOffsetHeight()) >> 1; boundaryPanel.clear(); boundaryPanel.add(windowPanel, Window.getScrollLeft() + left, Window.getScrollTop() + top); // hide <embeds> FrameUtils.toggleEmbedVisibility(false); }
@Override public void popupOpened(PopupPanel panel) { IFrameTabPanel iframeTab = SolutionBrowserPanel.getInstance().getContentTabPanel().getCurrentFrame(); if (iframeTab == null || iframeTab.getFrame() == null) { return; } Frame currentFrame = iframeTab.getFrame(); if (ElementUtils.elementsOverlap(panel.getElement(), currentFrame.getElement())) { FrameUtils.setEmbedVisibility(currentFrame, false); } }
public void hide() { boundaryPanel.clear(); RootPanel.get().remove(boundaryPanel); // show <embeds> FrameUtils.toggleEmbedVisibility(true); }