/** * Creates and adds a new page containing the given control to this * multi-page editor. The control may be <code>null</code>, allowing it * to be created and set later using <code>setControl</code>. * * @param control * the control, or <code>null</code> * @return the index of the new page * * @see MultiPageEditorPart#setControl(int, Control) */ public int addPage(Control control) { int index = getPageCount(); addPage(index, control); return index; }
/** * Adds a simple SWT control as a page. Overrides superclass implementation * to keep track of pages. * * @param control * the page control to add * @return the 0-based index of the newly added page */ @Override public int addPage(Control control) { int i = super.addPage(control); try { registerPage(-1, control); } catch (PartInitException e) { // cannot happen for controls } return i; }
/** * Adds a simple SWT control as a page. Overrides superclass implementation * to keep track of pages. * * @param control * the page control to add * @return the 0-based index of the newly added page */ @Override public int addPage(Control control) { int i = super.addPage(control); try { registerPage(-1, control); } catch (PartInitException e) { // cannot happen for controls } return i; }
/** * Creates and adds a new page containing the given editor to this * multi-page editor. This also hooks a property change listener on the * nested editor. * * @param editor * the nested editor * @param input * the input for the nested editor * @return the index of the new page * @exception PartInitException * if a new page could not be created * * @see MultiPageEditorPart#handlePropertyChange(int) the handler for * property change events from the nested editor */ public int addPage(IEditorPart editor, IEditorInput input) throws PartInitException { int index = getPageCount(); addPage(index, editor, input); return index; }
/** * Adds the form page to this editor. Form page will be loaded lazily. Its * part control will not be created until it is activated for the first * time. * * @param page * the form page to add */ public int addPage(IFormPage page) throws PartInitException { int i = super.addPage(page.getPartControl()); configurePage(i, page); return i; }
/** * Adds the form page to this editor. Form page will be loaded lazily. Its * part control will not be created until it is activated for the first * time. * * @param page * the form page to add */ public int addPage(IFormPage page) throws PartInitException { int i = super.addPage(page.getPartControl()); configurePage(i, page); return i; }
/** * Adds a complete editor part to the multi-page editor. * * @see MultiPageEditorPart#addPage(IEditorPart, IEditorInput) */ @Override public int addPage(IEditorPart editor, IEditorInput input) throws PartInitException { int index = super.addPage(editor, input); if (editor instanceof IFormPage) configurePage(index, (IFormPage) editor); else registerPage(-1, editor); return index; }
/** * Adds a complete editor part to the multi-page editor. * * @see MultiPageEditorPart#addPage(IEditorPart, IEditorInput) */ @Override public int addPage(IEditorPart editor, IEditorInput input) throws PartInitException { int index = super.addPage(editor, input); if (editor instanceof IFormPage) configurePage(index, (IFormPage) editor); else registerPage(-1, editor); return index; }
/** * Adds a simple SWT control as a page. Overrides superclass implementation * to keep track of pages. * * @param control * the page control to add * @param index * the index at which to add the page (0-based) * @since 3.1 */ @Override public void addPage(int index, Control control) { super.addPage(index, control); try { registerPage(index, control); } catch (PartInitException e) { // cannot happen for controls } updatePageIndices(index+1); }
/** * Adds a simple SWT control as a page. Overrides superclass implementation * to keep track of pages. * * @param control * the page control to add * @param index * the index at which to add the page (0-based) * @since 3.1 */ @Override public void addPage(int index, Control control) { super.addPage(index, control); try { registerPage(index, control); } catch (PartInitException e) { // cannot happen for controls } updatePageIndices(index+1); }
/** * Adds the form page to this editor at the specified index (0-based). Form * page will be loaded lazily. Its part control will not be created until it * is activated for the first time. * * @param index * the position to add the page at (0-based) * @param page * the form page to add * @since 3.1 */ public void addPage(int index, IFormPage page) throws PartInitException { super.addPage(index, page.getPartControl()); configurePage(index, page); updatePageIndices(index+1); }
/** * Adds a complete editor part to the multi-page editor at the specified * position. * * @see MultiPageEditorPart#addPage(int, IEditorPart, IEditorInput) * @since 3.1 */ @Override public void addPage(int index, IEditorPart editor, IEditorInput input) throws PartInitException { super.addPage(index, editor, input); if (editor instanceof IFormPage) configurePage(index, (IFormPage) editor); else registerPage(index, editor); updatePageIndices(index+1); }
/** * Adds the form page to this editor at the specified index (0-based). Form * page will be loaded lazily. Its part control will not be created until it * is activated for the first time. * * @param index * the position to add the page at (0-based) * @param page * the form page to add * @since 3.1 */ public void addPage(int index, IFormPage page) throws PartInitException { super.addPage(index, page.getPartControl()); configurePage(index, page); updatePageIndices(index+1); }
/** * Adds a complete editor part to the multi-page editor at the specified * position. * * @see MultiPageEditorPart#addPage(int, IEditorPart, IEditorInput) * @since 3.1 */ @Override public void addPage(int index, IEditorPart editor, IEditorInput input) throws PartInitException { super.addPage(index, editor, input); if (editor instanceof IFormPage) configurePage(index, (IFormPage) editor); else registerPage(index, editor); updatePageIndices(index+1); }