public void reflow() { categoryPageBook.reflow(true); }
/** * Shows a page with no children to be used if the desire is to not show * any registered page. */ public void showEmptyPage() { if (emptyPage == null) { emptyPage = createPage(); emptyPage.setLayout(new GridLayout()); } pageBook.showPage(emptyPage); currentPage = emptyPage; reflow(true); } /**
/** * Shows a page with no children to be used if the desire is to not show * any registered page. */ public void showEmptyPage() { if (emptyPage == null) { emptyPage = createPage(); emptyPage.setLayout(new GridLayout()); } pageBook.showPage(emptyPage); currentPage = emptyPage; reflow(true); } /**
/** * Shows the page with the provided key and hides the page previously * showing. Does nothing if the page with that key does not exist. * * @param key * the page key */ public void showPage(Object key) { Control page = pages.get(key); if (page != null) { pageBook.showPage(page); if (currentPage != null && currentPage != page) { // switching pages - force layout if (page instanceof Composite) ((Composite) page).layout(false); } currentPage = page; } else { showEmptyPage(); } reflow(true); } /**
/** * Shows the page with the provided key and hides the page previously * showing. Does nothing if the page with that key does not exist. * * @param key * the page key */ public void showPage(Object key) { Control page = pages.get(key); if (page != null) { pageBook.showPage(page); if (currentPage != null && currentPage != page) { // switching pages - force layout if (page instanceof Composite) ((Composite) page).layout(false); } currentPage = page; } else { showEmptyPage(); } reflow(true); } /**
/** * Layouts the main composite and reflows the managed form. */ private void layoutAndReflow() { main.layout(true, true); boolean reflow = false; // this is a hack in order to get the ScrolledPageBook when part is used in details part of // the details master block and reflow it Composite parent = getSection().getParent(); while (parent != null) { if (parent instanceof ScrolledPageBook) { ((ScrolledPageBook) parent).reflow(true); reflow = true; break; } parent = parent.getParent(); } // if we are not in details part then reflow to managed form if (!reflow) { getManagedForm().reflow(true); } }
/** * Clear page cache for the page that contains this provider. Remove the * form from the correct pagebook that refers to the page we need to * refresh. This will force a call to createContents on all content * providers the next time this page needs to be displayed. * * @see org.eclipse.ui.intro.config.IIntroContentProviderSite#reflow(org.eclipse.ui.intro.config.IIntroContentProvider, * boolean) */ @Override public void reflow(IIntroContentProvider provider, boolean incremental) { AbstractIntroPage page = ContentProviderManager.getInst() .getContentProviderParentPage(provider); if (incremental) { if (pageForm.hasPage(page.getId())) pageForm.reflow(); else if (pageFormWithNav.hasPage(page.getId())) pageFormWithNav.reflow(); else if (mainPageBook.hasPage(page.getId())) mainPageBook.reflow(true); } else { removeCachedPage(page); showPage(model.getCurrentPage()); } }