org.eclipse.ui.part.PageBook Java Examples
The following examples show how to use
org.eclipse.ui.part.PageBook.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WebAppLaunchView.java From gwt-eclipse-plugin with Eclipse Public License 1.0 | 6 votes |
private void createLayouts(Composite parent) { pageBook = new PageBook(parent, SWT.NONE); WebAppDebugModel model = WebAppDebugModel.getInstance(); treeLayout = new TreeNavigationView(pageBook, SWT.NONE); treeLayout.addSelectionChangedListener(new ClearLogViewerEnablementController()); treeLayout.addSelectionChangedListener(new ClearTerminatedLaunchesEnablementController()); treeLayout.addSelectionChangedListener(new ReloadServerEnablementController()); treeLayout.addSelectionChangedListener(new TerminateLaunchEnablementController()); treeLayout.setInput(model); breadcrumbLayout = new BreadcrumbNavigationView(pageBook, SWT.NONE); breadcrumbLayout.addSelectionChangedListener(new ClearLogViewerEnablementController()); breadcrumbLayout.addSelectionChangedListener(new ClearTerminatedLaunchesEnablementController()); breadcrumbLayout.addSelectionChangedListener(new ReloadServerEnablementController()); breadcrumbLayout.addSelectionChangedListener(new TerminateLaunchEnablementController()); breadcrumbLayout.setInput(model); }
Example #2
Source File: ContentPanel.java From gwt-eclipse-plugin with Eclipse Public License 1.0 | 6 votes |
public ContentPanel(Composite parent, int style) { super(parent, style); GridLayout layout = new GridLayout(); layout.marginHeight = 0; layout.marginWidth = 0; layout.horizontalSpacing = 0; layout.verticalSpacing = 0; setLayout(layout); GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true); setLayoutData(layoutData); pageBook = new PageBook(this, SWT.NONE); // pageBook.setLayout(new GridLayout()); pageBook.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); EMPTY_PANEL = new Composite(pageBook, SWT.NONE); EMPTY_PANEL.setLayout(new GridLayout()); }
Example #3
Source File: AnnotationEditorView.java From uima-uimaj with Apache License 2.0 | 5 votes |
@Override protected IPage createDefaultPage(PageBook book) { MessagePage page = new MessagePage(); initPage(page); page.createControl(book); page.setMessage(editorNotAvailableMessage); return page; }
Example #4
Source File: CasEditorViewPage.java From uima-uimaj with Apache License 2.0 | 5 votes |
@Override public void createControl(Composite parent) { book = new PageBook(parent, SWT.NONE); messageText = new Text(book, SWT.WRAP | SWT.READ_ONLY); messageText.setBackground(parent.getShell().getBackground()); messageText.setText(notAvailableMessage); getSite().setSelectionProvider(this); // Page might be set before the page is initialized initializeAndShowPage(casViewPage); }
Example #5
Source File: CasEditorView.java From uima-uimaj with Apache License 2.0 | 5 votes |
@Override protected IPage createDefaultPage(PageBook book) { MessagePage page = new MessagePage(); initPage(page); page.createControl(book); page.setMessage(editorNotAvailableMessage); return page; }
Example #6
Source File: BonitaTreeOutlinePage.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
@Override public void createControl(final Composite parent) { pageBook = new PageBook(parent, SWT.NONE); outline = getViewer().createControl(pageBook); pageBook.showPage(outline); configureOutlineViewer(); hookOutlineViewer(); initializeOutlineViewer(); }
Example #7
Source File: ProcessDiagramEditor.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
public void createControl(Composite parent) { pageBook = new PageBook(parent, SWT.NONE); outline = getViewer().createControl(pageBook); overview = new Canvas(pageBook, SWT.NONE); pageBook.showPage(outline); configureOutlineViewer(); hookOutlineViewer(); initializeOutlineViewer(); }
Example #8
Source File: AttributeView.java From birt with Eclipse Public License 1.0 | 5 votes |
protected IPage createDefaultPage( PageBook book ) { MessagePage page = new MessagePage( ); initPage( page ); page.createControl( book ); page.setMessage( defaultText ); if ( defaultPartName == null ) { defaultPartName = getPartName( ); } return page; }
Example #9
Source File: DataView.java From birt with Eclipse Public License 1.0 | 5 votes |
/** * Creates and returns the default page for this view. * * @param book * the pagebook control * @return the default page */ protected IPage createDefaultPage( PageBook book ) { MessagePage page = new MessagePage( ); initPage( page ); page.createControl( book ); page.setMessage( defaultText ); return page; }
Example #10
Source File: LibraryExplorerView.java From birt with Eclipse Public License 1.0 | 5 votes |
/** * Creates and returns the default page for this view. * * @param book * the pagebook control * @return the default page */ protected IPage createDefaultPage( PageBook book ) { MessagePage page = new MessagePage( ); initPage( page ); page.createControl( book ); page.setMessage( defaultText ); return page; }
Example #11
Source File: SpringConfigurationView.java From tesb-studio-se with Apache License 2.0 | 5 votes |
@Override protected IPage createDefaultPage(PageBook book) { MessagePage page = new MessagePage(); initPage(page); page.createControl(book); page.setMessage(CamelDesignerMessages.getString("SpringConfigurationView_defaultMessage")); //$NON-NLS-1$ return page; }
Example #12
Source File: WhiteSpaceTabPage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
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); SWTUtil.setDefaultVisibleItemCount(fSwitchCombo); final GridData gd= createGridData(numColumns, GridData.HORIZONTAL_ALIGN_END, SWT.DEFAULT); fSwitchCombo.setLayoutData(gd); fSwitchCombo.setItems(fItems); }
Example #13
Source File: InvasiveThemeHijacker.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
protected void hijackCallHierarchy(final IViewPart view, final boolean revertToDefaults) { try { Field f = view.getClass().getDeclaredField("fPagebook"); //$NON-NLS-1$ f.setAccessible(true); PageBook pageBook = (PageBook) f.get(view); f = pageBook.getClass().getDeclaredField("currentPage"); //$NON-NLS-1$ f.setAccessible(true); Control control = (Control) f.get(pageBook); if (control instanceof Label) { hookTheme(control, revertToDefaults); return; } Method m = view.getClass().getMethod("getViewer"); //$NON-NLS-1$ TreeViewer treeViewer = (TreeViewer) m.invoke(view); hookTheme(treeViewer, revertToDefaults); m = view.getClass().getDeclaredMethod("getLocationViewer"); //$NON-NLS-1$ if (m != null) { m.setAccessible(true); Viewer viewer = (Viewer) m.invoke(view); hookTheme(viewer, revertToDefaults); } } catch (Exception e) { // ignore } }
Example #14
Source File: ReportMultiBookPage.java From birt with Eclipse Public License 1.0 | 4 votes |
public void createControl( Composite parent ) { pagebook = new PageBook( parent, SWT.NONE ); }
Example #15
Source File: ReportMultiBookPage.java From birt with Eclipse Public License 1.0 | 4 votes |
public PageBook getPagebook( ) { return pagebook; }
Example #16
Source File: TypeHierarchyViewPart.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
private Control createTypeViewerControl(Composite parent) { fViewerbook= new PageBook(parent, SWT.NULL); KeyListener keyListener= createKeyListener(); // Create the viewers TypeHierarchyViewer superTypesViewer= new SuperTypeHierarchyViewer(fViewerbook, fHierarchyLifeCycle); initializeTypesViewer(superTypesViewer, keyListener, IContextMenuConstants.TARGET_ID_SUPERTYPES_VIEW); TypeHierarchyViewer subTypesViewer= new SubTypeHierarchyViewer(fViewerbook, fHierarchyLifeCycle); initializeTypesViewer(subTypesViewer, keyListener, IContextMenuConstants.TARGET_ID_SUBTYPES_VIEW); TypeHierarchyViewer vajViewer= new TraditionalHierarchyViewer(fViewerbook, fHierarchyLifeCycle); initializeTypesViewer(vajViewer, keyListener, IContextMenuConstants.TARGET_ID_HIERARCHY_VIEW); fAllViewers= new TypeHierarchyViewer[3]; fAllViewers[HIERARCHY_MODE_SUPERTYPES]= superTypesViewer; fAllViewers[HIERARCHY_MODE_SUBTYPES]= subTypesViewer; fAllViewers[HIERARCHY_MODE_CLASSIC]= vajViewer; int currViewerIndex; try { currViewerIndex= fDialogSettings.getInt(DIALOGSTORE_HIERARCHYVIEW); if (currViewerIndex < 0 || currViewerIndex > 2) { currViewerIndex= HIERARCHY_MODE_CLASSIC; } } catch (NumberFormatException e) { currViewerIndex= HIERARCHY_MODE_CLASSIC; } fEmptyTypesViewer= new Label(fViewerbook, SWT.TOP | SWT.LEFT | SWT.WRAP); for (int i= 0; i < fAllViewers.length; i++) { fAllViewers[i].setInput(fAllViewers[i]); } // force the update fCurrentViewerIndex= -1; setHierarchyMode(currViewerIndex); return fViewerbook; }
Example #17
Source File: CallHierarchyViewPart.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
@Override public void createPartControl(Composite parent) { fParent= parent; addResizeListener(parent); fPagebook = new PageBook(parent, SWT.NONE); // Page 1: Viewers createHierarchyLocationSplitter(fPagebook); createCallHierarchyViewer(fHierarchyLocationSplitter); createLocationViewer(fHierarchyLocationSplitter); // Page 2: Nothing selected fNoHierarchyShownLabel = new Label(fPagebook, SWT.TOP + SWT.LEFT + SWT.WRAP); fNoHierarchyShownLabel.setText(CallHierarchyMessages.CallHierarchyViewPart_empty); // showPage(PAGE_EMPTY); PlatformUI.getWorkbench().getHelpSystem().setHelp(fPagebook, IJavaHelpContextIds.CALL_HIERARCHY_VIEW); fSelectionProviderMediator = new CallHierarchySelectionProvider(new StructuredViewer[] { fCallHierarchyViewer, fLocationViewer }); IStatusLineManager slManager = getViewSite().getActionBars().getStatusLineManager(); fSelectionProviderMediator.addSelectionChangedListener(new StatusBarUpdater(slManager)); getSite().setSelectionProvider(fSelectionProviderMediator); fCallHierarchyViewer.initContextMenu( new IMenuListener() { public void menuAboutToShow(IMenuManager menu) { fillCallHierarchyViewerContextMenu(menu); } }, getSite(), fSelectionProviderMediator); fClipboard= new Clipboard(parent.getDisplay()); makeActions(); fillViewMenu(); fillActionBars(); initDragAndDrop(); initOrientation(); initCallMode(); initFieldMode(); if (fMemento != null) { restoreState(fMemento); } restoreSplitterRatio(); addPartListener(); }
Example #18
Source File: ReferenceSearchViewPage.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
@Override public void createControl(Composite parent) { pagebook = new PageBook(parent, SWT.NULL); pagebook.setLayoutData(new GridData(GridData.FILL_BOTH)); busyLabel = new Table(pagebook, SWT.NONE); TableItem item = new TableItem(busyLabel, SWT.NONE); item.setText(Messages.ReferenceSearchViewPage_busyLabel); busyLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); control = new Composite(pagebook, SWT.NULL); control.setLayoutData(new GridData(GridData.FILL_BOTH)); control.setSize(100, 100); control.setLayout(new FillLayout()); viewer = new TreeViewer(control, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); viewer.setContentProvider(contentProvider); viewer.setLabelProvider(labelProvider); viewer.setComparator(sorter); createOpenAndLinkWithEditorHandler(); IToolBarManager tbm = getSite().getActionBars().getToolBarManager(); fillToolbar(tbm); tbm.update(true); pagebook.showPage(control); isBusyShowing = false; queryListener = createQueryListener(); NewSearchUI.addQueryListener(queryListener); menu = new MenuManager("#PopUp"); //$NON-NLS-1$ menu.setRemoveAllWhenShown(true); menu.setParent(getSite().getActionBars().getMenuManager()); menu.addMenuListener(mgr -> { fillContextMenu(mgr); part.fillContextMenu(mgr); }); viewer.getControl().setMenu(menu.createContextMenu(viewer.getControl())); viewer.getControl().addKeyListener(KeyListener.keyPressedAdapter(e -> { if (e.keyCode == SWT.DEL) { removeSelectedMatchesAction.run(); } else if ((e.stateMask | SWT.COMMAND) != 0 && e.keyCode == 'c') { copyAction.run(); } })); }