@Override public void createControl(Composite parent) { pagebook = new PageBook(parent, SWT.NONE); if (currentPage != null) { setPageActive(currentPage); } }
@Override public void run() { // running async: check first if view still exists if (fPagebook != null && !fPagebook.isDisposed()) { doRestoreState(memento, hierarchyInput); } } });
private Display getDisplay() { if (fPagebook != null && !fPagebook.isDisposed()) { return fPagebook.getDisplay(); } return null; }
protected boolean showPage(CatalogElementPage page) { if (pageContainer.isDisposed()) { return false; } selectedPage = page; pageContainer.setVisible(true); pageContainer.showPage(selectedPage.getControl()); fCatalogElement = selectedPage.getData(); return true; }
@Override public void setFocus() { // first set focus on the page book, in case the page // doesn't properly handle setFocus if (book != null && !book.isDisposed()) { book.setFocus(); } // then set focus on the page, if any if (activeRec != null && !activeRec.page.getControl().isDisposed()) { activeRec.page.setFocus(); } }
pageBook = new PageBook(this, SWT.NONE); pageBook.setLayoutData(new GridData(GridData.FILL_BOTH)); pageBook.showPage(tableSection);
public void createContents(int numColumns, Composite parent) { fPageBook= new PageBook(parent, SWT.NONE); fPageBook.setLayoutData(createGridData(numColumns, GridData.FILL_BOTH, SWT.DEFAULT)); fJavaElementComponent.createContents(numColumns, fPageBook); fSyntaxComponent.createContents(numColumns, fPageBook); fSwitchCombo= new Combo(parent, SWT.READ_ONLY); final GridData gd= createGridData(numColumns, GridData.HORIZONTAL_ALIGN_END, SWT.DEFAULT); fSwitchCombo.setLayoutData(gd); fSwitchCombo.setItems(fItems); }
/** * Shows this view's viewer page. */ public void showViewer() { if (getPageBook().isDisposed()) { return; } getPageBook().showPage(getDefaultPage().getControl()); }
private void createContents() { GridLayout layout= new GridLayout(); layout.numColumns= 1; layout.marginWidth= 0; layout.marginHeight= 0; setLayout(layout); ViewerPane contextPane= new ViewerPane(this, SWT.BORDER | SWT.FLAT); contextPane.setText(RefactoringUIMessages.RefactoringStatusViewer_Found_problems); ToolBarManager tbm= contextPane.getToolBarManager(); tbm.add(fNextProblem= new NextProblem()); tbm.add(fPreviousProblem= new PreviousProblem()); tbm.update(true); createTableViewer(contextPane); contextPane.setContent(fTableViewer.getControl()); fContextViewerContainer= new PageBook(this, SWT.NONE); fNullContextViewer= new NullContextViewer(); fNullContextViewer.createControl(fContextViewerContainer); fContextViewerContainer.showPage(fNullContextViewer.getControl()); fCurrentContextViewer= fNullContextViewer; fCurrentContextViewer= fNullContextViewer; fCurrentDescriptor= null; setWeights(new int[]{35, 65}); }
private void setExplorerVisible(String id) { Control [] excontrols = explorerContainer.getChildren(); TaskExplorer explorer=null; for (int i=0; i<excontrols.length; i++) { Control excontrol = excontrols[i]; explorer = (TaskExplorer)excontrol.getData(ICompositeCheatsheetTags.EXPLORER); if (explorer.getId().equals(id)) { explorerContainer.showPage(excontrol); setCurrentExplorer(explorer); return; } } }
@Override public void setFocus() { fPagebook.setFocus(); }
@Override public void dispose() { if (pagebook != null && !pagebook.isDisposed()) pagebook.dispose(); if (emptyPage != null) { emptyPage.dispose(); emptyPage = null; } if (currentPage != null) { currentPage.removeSelectionChangedListener(this); currentPage = null; } pagebook = null; listeners = null; editor = null; // Workaround for leak in Platform if (fToggleLinkWithEditorAction != null) { fToggleLinkWithEditorAction.fEditor = null; fToggleLinkWithEditorAction = null; } }
/** * Registers the given runnable with the display * associated with this view's control, if any. * * @see org.eclipse.swt.widgets.Display#asyncExec(java.lang.Runnable) */ public void asyncExec(Runnable r) { if (isAvailable()) { getPageBook().getDisplay().asyncExec(r); } }
@Override public void createPartControl(Composite parent) { createActions(); fPageContent= new Composite(parent, SWT.NONE); GridLayout layout= new GridLayout(); layout.marginHeight= 0; layout.marginWidth= 0; layout.horizontalSpacing= 0; layout.verticalSpacing= 0; fPageContent.setLayout(layout); fDescriptionComposite= null; super.createPartControl(fPageContent); getPageBook().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); fDefaultPartName= getPartName(); initializeToolBar(); InternalSearchUI.getInstance().getSearchManager().addQueryListener(this); initializePageSwitcher(); PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, ISearchHelpContextIds.New_SEARCH_VIEW); restorePageFromMemento(); showLatestSearch(); }
radioButton[1].addSelectionListener(this); pageBook = new PageBook(this, SWT.NONE); pageBook.setLayoutData(new GridData(GridData.FILL_BOTH)); pageBook.showPage(selectSingleFileView.getControl());
protected Composite createMainComponent(Composite composite) { if (fCatalogElement != null) // "edit" action { Composite composite1 = new Composite(composite, SWT.NONE); GridData data = new GridData(GridData.FILL_BOTH); composite1.setLayoutData(data); GridLayout layout = new GridLayout(); composite1.setLayout(layout); pageContainer = new PageBook(composite1, SWT.NONE); pageContainer.setLayoutData(new GridData(GridData.FILL_BOTH)); if (fCatalogElement.getType() == ICatalogElement.TYPE_ENTRY) { CatalogElementPage entryPage = new CatalogEntryPage(); entryPage.createControl(pageContainer); showPage(entryPage); } else if (fCatalogElement.getType() == ICatalogElement.TYPE_NEXT_CATALOG) { CatalogElementPage nextCatalogPage = new NextCatalogPage(); nextCatalogPage.createControl(pageContainer); showPage(nextCatalogPage); } return composite1; } return createMainComponentWithToolbar(composite); }
protected void updatePage(Composite message) { if (getContainer().isDisposed()) return; if(messageArea != null) { messageArea.dispose(); messageArea = null; } messageArea = message; if (message == null) { Control control = getChangesViewer().getControl(); if (!getContainer().isDisposed() && !control.isDisposed()) { getContainer().showPage(control); } } else { getContainer().showPage(messageArea); } }
private Display getDisplay() { if (fPagebook != null && !fPagebook.isDisposed()) { return fPagebook.getDisplay(); } return null; }
@Override public void setFocus() { fPagebook.setFocus(); }