/** * Creates the Control of this outline page. By default this is a PageBook, which can toggle between a hierarchical Outline and a graphical Thumbnail. * * @param parent * the parent * @see org.eclipse.gef.ui.parts.ContentOutlinePage#createControl(Composite) */ @Override public void createControl(Composite parent) { _pageBook = new PageBook(parent, SWT.NONE); _outline = getViewer().createControl(_pageBook); _overview = new Canvas(_pageBook, SWT.NONE); _pageBook.showPage(_outline); createOutlineViewer(); // register listeners _selectionSynchronizer.addViewer(getViewer()); if (_diagramEditor.getWorkbenchPart() != null) { _diagramEditor.getWorkbenchPart().addPropertyListener(this); } initContents(); }
@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.setSorter(sorter); createOpenAndLinkWithEditorHandler(); IToolBarManager tbm = getSite().getActionBars().getToolBarManager(); fillToolbar(tbm); tbm.update(true); pagebook.showPage(control); isBusyShowing = false; queryListener = createQueryListener(); NewSearchUI.addQueryListener(queryListener); }
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); }
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()); }
private void createUI(final Composite parent) { final Color bgColor = Display.getCurrent().getSystemColor(SWT.COLOR_LIST_BACKGROUND); _pageBook = new PageBook(parent, SWT.NONE); GridDataFactory.fillDefaults().grab(true, true).applyTo(_pageBook); _page_NoBrowser = new Composite(_pageBook, SWT.NONE); _page_NoBrowser.setBackground(bgColor); GridDataFactory.fillDefaults().grab(true, true).applyTo(_page_NoBrowser); GridLayoutFactory.fillDefaults().numColumns(1).applyTo(_page_NoBrowser); { _txtNoBrowser = new Text(_page_NoBrowser, SWT.MULTI | SWT.READ_ONLY | SWT.H_SCROLL | SWT.V_SCROLL); _txtNoBrowser.setBackground(bgColor); GridDataFactory.fillDefaults()// .grab(true, true) .align(SWT.FILL, SWT.FILL) .applyTo(_txtNoBrowser); } }
private void createUI(final Composite parent) { _pageBookUI = new PageBook(parent, SWT.NONE); _pageNoData = new Composite(_pageBookUI, SWT.NONE); GridDataFactory.fillDefaults().grab(true, false).applyTo(_pageNoData); GridLayoutFactory.swtDefaults().numColumns(1).applyTo(_pageNoData); { final Label lblNoData = new Label(_pageNoData, SWT.WRAP); GridDataFactory.fillDefaults().grab(true, true).applyTo(lblNoData); lblNoData.setText(Messages.Tour_Segmenter_Label_no_chart); } _pageSegmenter = new Composite(_pageBookUI, SWT.NONE); GridLayoutFactory.fillDefaults().spacing(0, 0).applyTo(_pageSegmenter); { createUI_10_Header(_pageSegmenter); createUI_70_Viewer(_pageSegmenter); } }
private void createUI(final Composite parent) { _pageBook = new PageBook(parent, SWT.NONE); _page_NoTour = UI.createPage(_tk, _pageBook, Messages.UI_Label_TourIsNotSelected); _page_InvalidData = _tk.createComposite(_pageBook); GridDataFactory.fillDefaults().grab(true, false).applyTo(_page_InvalidData); GridLayoutFactory.swtDefaults().applyTo(_page_InvalidData); { _lblInvalidData = _tk.createLabel(_page_InvalidData, Messages.UI_Label_TourIsNotSelected, SWT.WRAP); GridDataFactory.fillDefaults().grab(true, false).applyTo(_lblInvalidData); } _page_Chart = createUI_10_ChartPage(_pageBook); }
/** * @param parent */ private void createUI(final Composite parent) { initUI(parent); _partContainer = parent; _pageBook = new PageBook(parent, SWT.NONE); GridDataFactory.fillDefaults().grab(true, true).applyTo(_pageBook); _pageNoData = UI.createUI_PageNoData(_pageBook, Messages.TourAnalyzer_Label_NoTourOrChart); _pageAnalyzer = new Composite(_pageBook, SWT.NONE); GridLayoutFactory.fillDefaults().applyTo(_pageAnalyzer); _pageAnalyzer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_GREEN)); // _pageAnalyzer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_LIST_BACKGROUND)); }
private void createUI(final Composite parent) { _pageBook = new PageBook(parent, SWT.NONE); GridDataFactory.fillDefaults().grab(true, true).applyTo(_pageBook); _pageNoData = UI.createUI_PageNoData(_pageBook, Messages.UI_Label_no_chart_is_selected); _pageNoBrowser = new Composite(_pageBook, SWT.NONE); GridDataFactory.fillDefaults().grab(true, true).applyTo(_pageNoBrowser); GridLayoutFactory.swtDefaults().numColumns(1).applyTo(_pageNoBrowser); _pageNoBrowser.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_LIST_BACKGROUND)); { _txtNoBrowser = new Text(_pageNoBrowser, SWT.WRAP | SWT.READ_ONLY); GridDataFactory.fillDefaults()// .grab(true, true) .align(SWT.FILL, SWT.BEGINNING) .applyTo(_txtNoBrowser); _txtNoBrowser.setText(Messages.UI_Label_BrowserCannotBeCreated); } _pageContent = new Composite(_pageBook, SWT.NONE); GridLayoutFactory.fillDefaults().applyTo(_pageContent); { createUI_10_Browser(_pageContent); } }
private void createUI(final Composite parent) { // GridLayoutFactory.fillDefaults().applyTo(parent); _statContainer = new Composite(parent, SWT.NONE); GridDataFactory.fillDefaults().grab(true, true).applyTo(_statContainer); GridLayoutFactory.fillDefaults().spacing(0, 0).applyTo(_statContainer); { createUI_10_Toolbar(_statContainer); // pagebook: statistics _pageBookStatistic = new PageBook(_statContainer, SWT.NONE); _pageBookStatistic.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); } }
private void createUI_05(final Composite parent) { final Composite container = new Composite(parent, SWT.NONE); GridDataFactory.fillDefaults().grab(true, true).applyTo(container); GridLayoutFactory.fillDefaults().numColumns(1).spacing(0, 0).applyTo(container); // container.setBackground(_display.getSystemColor(SWT.COLOR_DARK_RED)); { if (_isShowThumbsize || _isShowCustomActionBar) { _galleryActionBar = new GalleryActionBar(container, this, _isShowThumbsize, _isShowCustomActionBar); } _pageBook = new PageBook(container, SWT.NONE); GridDataFactory.fillDefaults().grab(true, true).applyTo(_pageBook); { createUI_20_PageGallery(_pageBook); createUI_30_PageDetails(_pageBook); createUI_99_PageDefault(_pageBook); createUI_40_PageGalleryInfo(_pageBook); } } _photoGalleryTooltip = new PhotoGalleryToolTip(_galleryMT20); _photoGalleryTooltip.setReceiveMouseMoveEvent(true); _galleryMT20.addItemListener(this); }
/** * Creates the part of the dialog that displays the lists the available * layout modes. * * @param parent * the parent composite * @return the newly created Control */ protected Control createLayoutSettings(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); composite.setFont(parent.getFont()); GridLayout layout = new GridLayout(2, false); composite.setLayout(layout); Control layoutOptions = createLayoutOptions(composite); GridData data = new GridData(GridData.VERTICAL_ALIGN_BEGINNING); layoutOptions.setLayoutData(data); book = new PageBook(composite, SWT.NONE); book.setFont(composite.getFont()); data = new GridData(GridData.FILL_BOTH); book.setLayoutData(data); columnsPanel = createColumnsOptions(book); listPanel = createListOptions(book); iconsPanel = createIconsOnlyOptions(book); detailsPanel = createDetailsOptions(book); // Show the right page in the book handleLayoutSettingChanged(prefs.getLayoutSetting()); return composite; }
private void scheduleRandomPageSelection( PageBook pageBook, Control page1, Control page2, Runnable page2Changer, int showPageRecurranceNumberToRunChange ) { displayHelper.getDisplay().timerExec( 2000, () -> { int newShowPageRecurranceNumberToRunChange = showPageRecurranceNumberToRunChange; pageBook.showPage( page1 ); if( new Random().nextBoolean() ) { if( showPageRecurranceNumberToRunChange == 0 ) { page2Changer.run(); } pageBook.showPage( page2 ); newShowPageRecurranceNumberToRunChange--; } scheduleRandomPageSelection( pageBook, page1, page2, page2Changer, newShowPageRecurranceNumberToRunChange ); } ); }
public void createControl(Composite parent){ // initialize outline viewer with model pageBook = new PageBook(parent, SWT.NONE); outline = getViewer().createControl(pageBook); overview = new Canvas(pageBook, SWT.NONE); pageBook.showPage(outline); configureOutlineViewer(); initializeOutlineViewer(); }
@Override protected IPage createDefaultPage(PageBook book) { MessagePage defaultPage = new MessagePage(); initPage(defaultPage); defaultPage.setMessage(m_defaultMsg); defaultPage.createControl(book); setPartName(m_defaultTitle); return defaultPage; }
/** * Creates the Control of this outline page. By default this is a PageBook, * which can toggle between a hierarchical Outline and a graphical * Thumbnail. * * @param parent * the parent * * @see org.eclipse.gef.ui.parts.ContentOutlinePage#createControl(Composite) */ @Override public void createControl(Composite parent) { _pageBook = new PageBook(parent, SWT.NONE); _outline = getViewer().createControl(_pageBook); _overview = new Canvas(_pageBook, SWT.NONE); _pageBook.showPage(_outline); createOutlineViewer(); // register listeners _selectionSynchronizer.addViewer(getViewer()); _diagramEditor.addPropertyListener(this); initContents(); }
/** * Enables or disables a tree of controls starting at the specified root. * We spare tabbed notebooks and pagebooks to allow for user navigation. * * @param root - the root composite * @param enabled - true if controls shall be enabled */ private void setControlsEnabled(Composite root, boolean enabled) { Control[] children = root.getChildren(); for (int i = 0; i < children.length; i++) { Control child = children[i]; if (!(child instanceof CTabFolder) && !(child instanceof TabFolder) && !(child instanceof PageBook)) child.setEnabled(enabled); if (child instanceof Composite) setControlsEnabled((Composite) child, enabled); } }
/** * Enables or disables a tree of controls starting at the specified root. We spare tabbed notebooks and pagebooks to * allow for user navigation. * * @param root * - the root composite * @param enabled * - true if controls shall be enabled */ private void setControlsEnabled(Composite root, boolean enabled) { Control[] children = root.getChildren(); for (int i = 0; i < children.length; i++) { Control child = children[i]; if (!(child instanceof CTabFolder) && !(child instanceof TabFolder) && !(child instanceof PageBook)) child.setEnabled(enabled); if (child instanceof Composite) setControlsEnabled((Composite) child, enabled); } }
@Override public void createControl(Composite parent) { pagebook = new PageBook(parent, SWT.NONE); listeners = new ArrayList<ISelectionChangedListener>(); if (editor instanceof IMultiEditor) { IMultiEditor ed = (IMultiEditor) editor; IContentOutlinePage cop = (IContentOutlinePage) ed.getActiveEditor().getAdapter(IContentOutlinePage.class); if (cop != null) setPageActive(cop); } }
@Override protected IPage createDefaultPage(PageBook book) { ReportStatePage page = new ReportStatePage(null); initPage(page); page.createControl(book); return page; }
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 } }
/** * create options for each adjustment type in a pagebook */ private void createUI_30_Options(final Composite parent) { _pageBookOptions = new PageBook(parent, SWT.NONE); GridDataFactory.fillDefaults().grab(true, false).applyTo(_pageBookOptions); { _pageEmpty = new Label(_pageBookOptions, SWT.NONE); _pageOption_SRTM = createUI_40_Option_WithSRTM(_pageBookOptions); _pageOption_SRTMSpline = createUI_50_Option_WithSRTMSpline(_pageBookOptions); _pageOption_NoSRTM = createUI_60_Option_WithoutSRTM(_pageBookOptions); _pageOption_GeoPosition = createUI_70_Option_GeoPosition(_pageBookOptions); } }
private void createUI(final Composite parent) { _pageBook = new PageBook(parent, SWT.NONE); { _pageViewer = new Composite(_pageBook, SWT.NONE); GridDataFactory.fillDefaults().grab(true, true).applyTo(_pageViewer); GridLayoutFactory.fillDefaults().applyTo(_pageViewer); _pageViewer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_RED)); { createUI_20_Tours(_pageViewer); } _pageNoImage = createUI_90_PageNoImage(_pageBook); } }
/** * Page: Not used * * @return */ private Label createUI_552_IL_Page_NoTourType(final PageBook parent) { final Label label = new Label(parent, SWT.NONE); GridDataFactory.fillDefaults().applyTo(label); label.setText(UI.EMPTY_STRING); return label; }
private void createUI(final Composite parent) { _pageBook = new PageBook(parent, SWT.NONE); GridDataFactory.fillDefaults().grab(true, true).applyTo(_pageBook); if (UI.IS_WIN) { // internal browser _pageWinInternalBrowser = new Composite(_pageBook, SWT.NONE); GridDataFactory.fillDefaults().grab(true, true).applyTo(_pageWinInternalBrowser); GridLayoutFactory.fillDefaults().applyTo(_pageWinInternalBrowser); createUI_10_SearchInternal(_pageWinInternalBrowser); // external browser _pageWinExternalBrowser = new Composite(_pageBook, SWT.NONE); GridDataFactory.fillDefaults().grab(true, true).applyTo(_pageWinExternalBrowser); GridLayoutFactory.fillDefaults().applyTo(_pageWinExternalBrowser); createUI_20_SearchExternal(_pageWinExternalBrowser); } else { // external browser _pageLinux = new Composite(_pageBook, SWT.NONE); GridDataFactory.fillDefaults().grab(true, true).applyTo(_pageLinux); GridLayoutFactory.fillDefaults().applyTo(_pageLinux); createUI_30_Linux(_pageLinux); } }
private void createUI_12_PageBook(final Composite parent) { _pageBook = new PageBook(parent, SWT.NONE); GridDataFactory.fillDefaults().grab(true, true).applyTo(_pageBook); _page_HrZones = createUI_20_PageHrZones(_pageBook); _page_NoHrZones = createUI_14_PageNoHrZones(_pageBook); _page_NoPerson = UI.createPage(_tk, _pageBook, Messages.UI_Label_PersonIsRequired); _page_NoTour = UI.createPage(_tk, _pageBook, Messages.UI_Label_no_chart_is_selected); _page_NoPulse = UI.createPage(_tk, _pageBook, Messages.Training_View_Label_NoPulseData); }
private Composite createUI_50_TourChart(final Composite parent, final Composite detailContainer) { // chart group _groupChart = new Group(detailContainer, SWT.NONE); _groupChart.setLayout(new GridLayout()); _groupChart.setText(Messages.tourCatalog_wizard_Group_selected_tour); _groupChart.setEnabled(false); { /* * create pagebook with the chart and the no-chart page */ _pageBook = new PageBook(_groupChart, SWT.NONE); _pageBook.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); { _compareTourChart = new Chart(_pageBook, SWT.NONE); _compareTourChart.setBackgroundColor(parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); net.tourbook.ui.UI.updateChartProperties( _compareTourChart, WizardTourComparer.GRID_PREFIX_REF_TOUR_COMPARE_TOUR); // show title _compareTourChart.getChartTitleSegmentConfig().isShowSegmentTitle = true; _pageTourIsNotSelected = new Label(_pageBook, SWT.NONE); _pageTourIsNotSelected.setText(Messages.tourCatalog_wizard_Label_a_tour_is_not_selected); _pageTourIsNotSelected.setEnabled(false); } } return _groupChart; }
private void createUI(final Composite parent) { _pageBook = new PageBook(parent, SWT.NONE); _pageBook.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); _pageNoData = net.tourbook.common.UI.createUI_PageNoData(_pageBook, Messages.UI_Label_no_chart_is_selected); _viewerContainer = new Composite(_pageBook, SWT.NONE); GridLayoutFactory.fillDefaults().applyTo(_viewerContainer); { createUI_10_WaypointViewer(_viewerContainer); } }
private void createUI(final Composite parent) { _pageBook = new PageBook(parent, SWT.NONE); GridDataFactory.fillDefaults().grab(true, true).applyTo(_pageBook); _pageNoData = net.tourbook.common.UI.createUI_PageNoData(_pageBook, Messages.UI_Label_no_chart_is_selected); _viewerContainer = new Composite(_pageBook, SWT.NONE); GridLayoutFactory.fillDefaults().applyTo(_viewerContainer); { createUI_10_TableViewer(_viewerContainer); } }
private void createUI(final Composite parent) { _topPageBook = new PageBook(parent, SWT.NONE); GridDataFactory.fillDefaults().grab(true, true).applyTo(_topPageBook); _topPage_OldUI = createUI_05_Page_OldUI(_topPageBook); _topPage_Startup = createUI_10_Page_Startup(_topPageBook); _topPage_ImportViewer = createUI_90_Page_TourViewer(_topPageBook); _topPageBook.showPage(_topPage_Startup); }
private Composite createUI_20_Page_Dashboard(final Composite parent) { final Color bgColor = Display.getCurrent().getSystemColor(SWT.COLOR_LIST_BACKGROUND); _dashboard_PageBook = new PageBook(parent, SWT.NONE); GridDataFactory.fillDefaults().grab(true, true).applyTo(_dashboard_PageBook); _dashboardPage_NoBrowser = new Composite(_dashboard_PageBook, SWT.NONE); _dashboardPage_NoBrowser.setBackground(bgColor); GridDataFactory.fillDefaults().grab(true, true).applyTo(_dashboardPage_NoBrowser); GridLayoutFactory.swtDefaults().numColumns(1).applyTo(_dashboardPage_NoBrowser); { _txtNoBrowser = new Text(_dashboardPage_NoBrowser, SWT.WRAP | SWT.READ_ONLY); _txtNoBrowser.setText(Messages.UI_Label_BrowserCannotBeCreated); _txtNoBrowser.setBackground(bgColor); GridDataFactory.fillDefaults()// .grab(true, true) .align(SWT.FILL, SWT.BEGINNING) .applyTo(_txtNoBrowser); } _dashboardPage_WithBrowser = new Composite(_dashboard_PageBook, SWT.NONE); GridLayoutFactory.fillDefaults().applyTo(_dashboardPage_WithBrowser); { createUI_22_Browser(_dashboardPage_WithBrowser); } return _dashboard_PageBook; }
private void createUI_20_SmoothingPagebook( final Composite parent, final boolean isShowDescription, final boolean isShowAdditionalActions) { /* * pagebook: smoothing algorithm */ _pagebookSmoothingAlgo = new PageBook(parent, SWT.NONE); GridDataFactory .fillDefaults()// .grab(true, true) .span(2, 1) .applyTo(_pagebookSmoothingAlgo); { _pageInitialUI = _smoothingInitial.createUI(// this, _pagebookSmoothingAlgo, _tk, isShowDescription, isShowAdditionalActions); _pageJametUI = _smoothingJamet.createUI(// this, _pagebookSmoothingAlgo, _tk, isShowDescription, isShowAdditionalActions); } }
private void createUI(final Composite parent) { initUI(parent); _pageBook = new PageBook(parent, SWT.NONE); _pageNoData = UI.createPage(_tk, _pageBook, Messages.UI_Label_TourIsNotSelected); _tourChart = new TourChart(_pageBook, SWT.FLAT, this); _tourChart.setCanShowTourSegments(true); _tourChart.setShowZoomActions(true); _tourChart.setShowSlider(true); _tourChart.setTourInfoActionsEnabled(true); _tourChart.setToolBarManager(getViewSite().getActionBars().getToolBarManager(), true); _tourChart.setContextProvider(new TourChartContextProvider(this), true); _tourChartConfig = TourManager.createDefaultTourChartConfig(); // set chart title _tourChart.addDataModelListener(new IDataModelListener() { @Override public void dataModelChanged(final ChartDataModel chartDataModel) { // chartDataModel.setTitle(TourManager.getTourTitleDetailed(_tourData)); } }); _tourChart.addTourModifyListener(this); // fire a slider move selection when a slider was moved in the tour chart _tourChart.addSliderMoveListener(new ISliderMoveListener() { @Override public void sliderMoved(final SelectionChartInfo chartInfoSelection) { fireSliderPosition(); } }); }
private void createUI_30_PageDetails(final PageBook parent) { _pageDetails = new Composite(parent, SWT.NONE); GridDataFactory.fillDefaults().grab(true, true).applyTo(_pageDetails); GridLayoutFactory.fillDefaults().spacing(0, 0).applyTo(_pageDetails); { createUI_32_PhotoViewer(_pageDetails); } }
private void createUI_40_PageGalleryInfo(final PageBook parent) { _pageGalleryInfo = new Composite(parent, SWT.NONE); // GridDataFactory.fillDefaults().grab(true, false).applyTo(container); GridLayoutFactory.fillDefaults()// .numColumns(1) .margins(5, 5) .applyTo(_pageGalleryInfo); { _lblGalleryInfo = new Label(_pageGalleryInfo, SWT.WRAP); GridDataFactory.fillDefaults()// .grab(true, false) .applyTo(_lblGalleryInfo); } }
private void createUI_99_PageDefault(final PageBook parent) { _pageDefault = new Composite(parent, SWT.NONE); GridLayoutFactory.fillDefaults()// .numColumns(1) .margins(5, 5) .applyTo(_pageDefault); { _lblDefaultPage = new Label(_pageDefault, SWT.WRAP); GridDataFactory.fillDefaults()// .grab(true, true) .align(SWT.FILL, SWT.FILL) .applyTo(_lblDefaultPage); } }
/** * {@inheritDoc} */ @Override protected IPage createDefaultPage(PageBook book) { MessagePage page = new MessagePage(); initPage(page); page.createControl(book); page.setMessage("default page"); return page; }
@Override protected IPage createDefaultPage(PageBook book) { IPage page = super.createDefaultPage(book); if (page instanceof MessagePage) { ((MessagePage)page).setMessage("Nothing currently selected."); } return page; }
/** * Creates, initializes and returns the default page for this view, giving it the default * message. Implements the abstract method from Eclipse class PageBookView. * @param book the PageBook control that will become the parent of the new page * @return the newly-created page */ @Override protected IPage createDefaultPage(PageBook book) { MessagePage page = new MessagePage(); initPage(page); page.createControl(book); page.setMessage(defaultMessage); return page; }
/** * Implement the abstract method declared in PageBookView. * @param part the associated editor * @return if the PageBook was disposed, return null; otherwise return a new page record */ @Override protected PageRec doCreatePage(IWorkbenchPart part) { PageBook pageBook = getPageBook(); if (pageBook.isDisposed()) { return null; } IEditorPart editor = (IEditorPart)part; PlanEditorModel model = CommonUtils.getAdapter(part, PlanEditorModel.class); Page page = createPage(editor, model); initPage(page); UndoRedoUtils.setupUndoRedo(page.getSite().getActionBars(), getSite(), model.getUndoContext()); page.createControl(pageBook); return new PageRec(part, page); }