Package org.eclipse.ui.internal.presentations.defaultpresentation

Examples of org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder


    /* (non-Javadoc)
     * @see org.eclipse.ui.presentations.AbstractPresentationFactory#createEditorPresentation(org.eclipse.swt.widgets.Composite, org.eclipse.ui.presentations.IStackPresentationSite)
     */
    public StackPresentation createEditorPresentation(Composite parent,
            IStackPresentationSite site) {
        DefaultTabFolder folder = new DefaultTabFolder(parent, editorTabPosition | SWT.BORDER,
                site.supportsState(IStackPresentationSite.STATE_MINIMIZED),
                site.supportsState(IStackPresentationSite.STATE_MAXIMIZED));
       
        /*
         * Set the minimum characters to display, if the preference is something
         * other than the default. This is mainly intended for RCP applications
         * or for expert users (i.e., via the plug-in customization file).
         *
         * Bug 32789.
         */
        final IPreferenceStore store = PlatformUI.getPreferenceStore();
        if (store
                .contains(IWorkbenchPreferenceConstants.EDITOR_MINIMUM_CHARACTERS)) {
            final int minimumCharacters = store
                    .getInt(IWorkbenchPreferenceConstants.EDITOR_MINIMUM_CHARACTERS);
            if (minimumCharacters >= 0) {
                folder.setMinimumCharacters(minimumCharacters);
            }
        }
       
        PresentablePartFolder partFolder = new PresentablePartFolder(folder);
       
View Full Code Here


   *      org.eclipse.ui.presentations.IStackPresentationSite)
   */
    public StackPresentation createViewPresentation(Composite parent,
            IStackPresentationSite site) {
       
        DefaultTabFolder folder = new DefaultTabFolder(parent, viewTabPosition | SWT.BORDER,
                site.supportsState(IStackPresentationSite.STATE_MINIMIZED),
                site.supportsState(IStackPresentationSite.STATE_MAXIMIZED));

        final IPreferenceStore store = PlatformUI.getPreferenceStore();
        final int minimumCharacters = store
                .getInt(IWorkbenchPreferenceConstants.VIEW_MINIMUM_CHARACTERS);
        if (minimumCharacters >= 0) {
            folder.setMinimumCharacters(minimumCharacters);
        }
       
        PresentablePartFolder partFolder = new PresentablePartFolder(folder);
       
        folder.setUnselectedCloseVisible(false);
        folder.setUnselectedImageVisible(false);
       
        TabbedStackPresentation result = new TabbedStackPresentation(site, partFolder,
                new StandardViewSystemMenu(site));
       
        DefaultThemeListener themeListener = new DefaultThemeListener(folder, result.getTheme());
View Full Code Here

TOP

Related Classes of org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.