private void createLanguagesGroup(Composite parent) { final Group langGroup = NSISWizardDialogUtil.createGroup( parent, 1, "language.support.group.label", null, false); // $NON-NLS-1$ GridData data = (GridData) langGroup.getLayoutData(); data.verticalAlignment = SWT.FILL; data.grabExcessVerticalSpace = true; data.horizontalAlignment = SWT.FILL; data.grabExcessHorizontalSpace = true; NSISWizardSettings settings = mWizard.getSettings(); final Button enableLangSupport = NSISWizardDialogUtil.createCheckBox( langGroup, "enable.language.support.label", settings.isEnableLanguageSupport(), true, null, false); //$NON-NLS-1$ enableLangSupport.addSelectionListener( new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { boolean selection = enableLangSupport.getSelection(); mWizard.getSettings().setEnableLanguageSupport(selection); validateField(LANG_CHECK); } }); final MasterSlaveController m = new MasterSlaveController(enableLangSupport); final Composite listsComposite = new Composite(langGroup, SWT.NONE); data = new GridData(SWT.FILL, SWT.FILL, true, true); listsComposite.setLayoutData(data); GridLayout layout = new GridLayout(2, true); layout.marginHeight = 0; layout.marginWidth = 0; listsComposite.setLayout(layout); java.util.List<NSISLanguage> selectedLanguages = settings.getLanguages(); if (selectedLanguages.isEmpty()) { NSISLanguage defaultLanguage = NSISLanguageManager.getInstance().getDefaultLanguage(); if (defaultLanguage != null) { selectedLanguages.add(defaultLanguage); } } java.util.List<NSISLanguage> availableLanguages = NSISLanguageManager.getInstance().getLanguages(); availableLanguages.removeAll(selectedLanguages); Composite leftComposite = new Composite(listsComposite, SWT.NONE); leftComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); layout = new GridLayout(2, false); layout.marginHeight = 0; layout.marginWidth = 0; leftComposite.setLayout(layout); ((GridData) NSISWizardDialogUtil.createLabel( leftComposite, "available.languages.label", //$NON-NLS-1$ true, m, false) .getLayoutData()) .horizontalSpan = 2; final List availableLangList = new List(leftComposite, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI); data = new GridData(SWT.FILL, SWT.FILL, true, true); Dialog.applyDialogFont(availableLangList); data.heightHint = Common.calculateControlSize(availableLangList, 0, 12).y; availableLangList.setLayoutData(data); m.addSlave(availableLangList); final ListViewer availableLangViewer = new ListViewer(availableLangList); CollectionContentProvider collectionContentProvider = new CollectionContentProvider(); availableLangViewer.setContentProvider(collectionContentProvider); availableLangViewer.setInput(availableLanguages); availableLangViewer.setSorter(new ViewerSorter(cLanguageCollator)); final Composite buttonsComposite1 = new Composite(leftComposite, SWT.NONE); layout = new GridLayout(1, false); layout.marginHeight = 0; layout.marginWidth = 0; buttonsComposite1.setLayout(layout); data = new GridData(SWT.FILL, SWT.CENTER, false, false); buttonsComposite1.setLayoutData(data); final Button allRightButton = new Button(buttonsComposite1, SWT.PUSH); data = new GridData(SWT.FILL, SWT.CENTER, true, false); allRightButton.setLayoutData(data); allRightButton.setImage( EclipseNSISPlugin.getImageManager() .getImage(EclipseNSISPlugin.getResourceString("all.right.icon"))); // $NON-NLS-1$ allRightButton.setToolTipText( EclipseNSISPlugin.getResourceString("all.right.tooltip")); // $NON-NLS-1$ final Button rightButton = new Button(buttonsComposite1, SWT.PUSH); data = new GridData(SWT.FILL, SWT.CENTER, true, false); rightButton.setLayoutData(data); rightButton.setImage( EclipseNSISPlugin.getImageManager() .getImage(EclipseNSISPlugin.getResourceString("right.icon"))); // $NON-NLS-1$ rightButton.setToolTipText(EclipseNSISPlugin.getResourceString("right.tooltip")); // $NON-NLS-1$ final Button leftButton = new Button(buttonsComposite1, SWT.PUSH); data = new GridData(SWT.FILL, SWT.CENTER, true, false); leftButton.setLayoutData(data); leftButton.setImage( EclipseNSISPlugin.getImageManager() .getImage(EclipseNSISPlugin.getResourceString("left.icon"))); // $NON-NLS-1$ leftButton.setToolTipText(EclipseNSISPlugin.getResourceString("left.tooltip")); // $NON-NLS-1$ final Button allLeftButton = new Button(buttonsComposite1, SWT.PUSH); data = new GridData(SWT.FILL, SWT.CENTER, true, false); allLeftButton.setLayoutData(data); allLeftButton.setImage( EclipseNSISPlugin.getImageManager() .getImage(EclipseNSISPlugin.getResourceString("all.left.icon"))); // $NON-NLS-1$ allLeftButton.setToolTipText( EclipseNSISPlugin.getResourceString("all.left.tooltip")); // $NON-NLS-1$ Composite rightComposite = new Composite(listsComposite, SWT.NONE); rightComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); layout = new GridLayout(2, false); layout.marginHeight = 0; layout.marginWidth = 0; rightComposite.setLayout(layout); ((GridData) NSISWizardDialogUtil.createLabel( rightComposite, "selected.languages.label", //$NON-NLS-1$ true, m, isScriptWizard()) .getLayoutData()) .horizontalSpan = 2; final List selectedLangList = new List(rightComposite, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI); data = new GridData(SWT.FILL, SWT.FILL, true, true); Dialog.applyDialogFont(selectedLangList); data.heightHint = Common.calculateControlSize(selectedLangList, 0, 12).y; selectedLangList.setLayoutData(data); m.addSlave(selectedLangList); final ListViewer selectedLangViewer = new ListViewer(selectedLangList); selectedLangViewer.setContentProvider(collectionContentProvider); selectedLangViewer.setInput(selectedLanguages); final ListViewerUpDownMover<java.util.List<NSISLanguage>, NSISLanguage> mover = new ListViewerUpDownMover<java.util.List<NSISLanguage>, NSISLanguage>() { @Override @SuppressWarnings("unchecked") protected java.util.List<NSISLanguage> getAllElements() { return (java.util.List<NSISLanguage>) ((ListViewer) getViewer()).getInput(); } @Override protected void updateStructuredViewerInput( java.util.List<NSISLanguage> input, java.util.List<NSISLanguage> elements, java.util.List<NSISLanguage> move, boolean isDown) { (input).clear(); (input).addAll(elements); } }; mover.setViewer(selectedLangViewer); final Composite buttonsComposite2 = new Composite(rightComposite, SWT.NONE); layout = new GridLayout(1, false); layout.marginHeight = 0; layout.marginWidth = 0; buttonsComposite2.setLayout(layout); data = new GridData(SWT.FILL, SWT.CENTER, false, false); buttonsComposite2.setLayoutData(data); final Button upButton = new Button(buttonsComposite2, SWT.PUSH); data = new GridData(SWT.FILL, SWT.CENTER, true, false); upButton.setLayoutData(data); upButton.setImage( EclipseNSISPlugin.getImageManager() .getImage(EclipseNSISPlugin.getResourceString("up.icon"))); // $NON-NLS-1$ upButton.setToolTipText(EclipseNSISPlugin.getResourceString("up.tooltip")); // $NON-NLS-1$ m.addSlave(upButton); final Button downButton = new Button(buttonsComposite2, SWT.PUSH); data = new GridData(SWT.FILL, SWT.CENTER, true, false); downButton.setLayoutData(data); downButton.setImage( EclipseNSISPlugin.getImageManager() .getImage(EclipseNSISPlugin.getResourceString("down.icon"))); // $NON-NLS-1$ downButton.setToolTipText(EclipseNSISPlugin.getResourceString("down.tooltip")); // $NON-NLS-1$ m.addSlave(downButton); Composite langOptions = langGroup; boolean showSupportedLangOption = NSISPreferences.getInstance().getNSISVersion().compareTo(INSISVersions.VERSION_2_26) >= 0; if (showSupportedLangOption) { langOptions = new Composite(langGroup, SWT.None); layout = new GridLayout(2, false); layout.marginHeight = 0; layout.marginWidth = 0; langOptions.setLayout(layout); data = new GridData(SWT.FILL, SWT.FILL, true, false); langOptions.setLayoutData(data); } final Button selectLang = NSISWizardDialogUtil.createCheckBox( langOptions, "select.language.label", settings.isSelectLanguage(), true, m, false); //$NON-NLS-1$ final Button displaySupported; if (showSupportedLangOption) { ((GridData) selectLang.getLayoutData()).horizontalSpan = 1; displaySupported = NSISWizardDialogUtil.createCheckBox( langOptions, "display.supported.languages.label", settings.isDisplaySupportedLanguages(), // $NON-NLS-1$ true, m, false); ((GridData) displaySupported.getLayoutData()).horizontalSpan = 1; displaySupported.addSelectionListener( new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { mWizard.getSettings().setDisplaySupportedLanguages(displaySupported.getSelection()); } }); } else { displaySupported = null; } final MasterSlaveEnabler mse = new MasterSlaveEnabler() { public void enabled(Control control, boolean flag) {} @SuppressWarnings("unchecked") public boolean canEnable(Control control) { NSISWizardSettings settings = mWizard.getSettings(); if (control == allRightButton) { return settings.isEnableLanguageSupport() && availableLangViewer.getList().getItemCount() > 0; } else if (control == rightButton) { return settings.isEnableLanguageSupport() && !availableLangViewer.getSelection().isEmpty(); } else if (control == allLeftButton) { return settings.isEnableLanguageSupport() && selectedLangViewer.getList().getItemCount() > 0; } else if (control == leftButton) { return settings.isEnableLanguageSupport() && !selectedLangViewer.getSelection().isEmpty(); } else if (control == upButton) { return settings.isEnableLanguageSupport() && mover.canMoveUp(); } else if (control == downButton) { return settings.isEnableLanguageSupport() && mover.canMoveDown(); } else if (control == selectLang) { java.util.List<NSISLanguage> selectedLanguages = (java.util.List<NSISLanguage>) selectedLangViewer.getInput(); return settings.getInstallerType() != INSTALLER_TYPE_SILENT && settings.isEnableLanguageSupport() && selectedLanguages.size() > 1; } else if (control == displaySupported && displaySupported != null) { java.util.List<NSISLanguage> selectedLanguages = (java.util.List<NSISLanguage>) selectedLangViewer.getInput(); return settings.getInstallerType() != INSTALLER_TYPE_SILENT && settings.isEnableLanguageSupport() && selectedLanguages.size() > 1 && selectLang.getSelection(); } else { return true; } } }; m.addSlave(rightButton, mse); m.addSlave(allRightButton, mse); m.addSlave(leftButton, mse); m.addSlave(allLeftButton, mse); m.setEnabler(upButton, mse); m.setEnabler(downButton, mse); m.setEnabler(selectLang, mse); if (displaySupported != null) { m.setEnabler(displaySupported, mse); } selectLang.addSelectionListener( new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { mWizard.getSettings().setSelectLanguage(selectLang.getSelection()); if (displaySupported != null) { displaySupported.setEnabled(mse.canEnable(displaySupported)); } } }); final Runnable langRunnable = new Runnable() { public void run() { availableLangViewer.refresh(false); selectedLangViewer.refresh(false); allRightButton.setEnabled(mse.canEnable(allRightButton)); allLeftButton.setEnabled(mse.canEnable(allLeftButton)); rightButton.setEnabled(mse.canEnable(rightButton)); leftButton.setEnabled(mse.canEnable(leftButton)); upButton.setEnabled(mse.canEnable(upButton)); downButton.setEnabled(mse.canEnable(downButton)); selectLang.setEnabled(mse.canEnable(selectLang)); if (displaySupported != null) { displaySupported.setEnabled(mse.canEnable(displaySupported)); } setPageComplete(validateField(LANG_CHECK)); } }; rightButton.addSelectionListener( new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent se) { moveAcross( availableLangViewer, selectedLangViewer, Common.makeGenericList( NSISLanguage.class, ((IStructuredSelection) availableLangViewer.getSelection()).toList())); langRunnable.run(); } }); allRightButton.addSelectionListener( new SelectionAdapter() { @Override @SuppressWarnings("unchecked") public void widgetSelected(SelectionEvent se) { moveAcross( availableLangViewer, selectedLangViewer, (java.util.List<NSISLanguage>) availableLangViewer.getInput()); langRunnable.run(); } }); leftButton.addSelectionListener( new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent se) { moveAcross( selectedLangViewer, availableLangViewer, Common.makeGenericList( NSISLanguage.class, ((IStructuredSelection) selectedLangViewer.getSelection()).toList())); langRunnable.run(); } }); allLeftButton.addSelectionListener( new SelectionAdapter() { @Override @SuppressWarnings("unchecked") public void widgetSelected(SelectionEvent se) { moveAcross( selectedLangViewer, availableLangViewer, (java.util.List<NSISLanguage>) selectedLangViewer.getInput()); langRunnable.run(); } }); upButton.addSelectionListener( new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent se) { mover.moveUp(); langRunnable.run(); } }); downButton.addSelectionListener( new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent se) { mover.moveDown(); langRunnable.run(); } }); availableLangViewer.addSelectionChangedListener( new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent event) { rightButton.setEnabled(mse.canEnable(rightButton)); allRightButton.setEnabled(mse.canEnable(allRightButton)); } }); availableLangViewer .getList() .addSelectionListener( new SelectionAdapter() { @Override public void widgetDefaultSelected(SelectionEvent event) { IStructuredSelection sel = (IStructuredSelection) availableLangViewer.getSelection(); if (!sel.isEmpty()) { moveAcross( availableLangViewer, selectedLangViewer, Common.makeGenericList(NSISLanguage.class, sel.toList())); selectedLangViewer.reveal(sel.getFirstElement()); langRunnable.run(); } } }); selectedLangViewer.addSelectionChangedListener( new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent event) { leftButton.setEnabled(mse.canEnable(leftButton)); allLeftButton.setEnabled(mse.canEnable(allLeftButton)); upButton.setEnabled(mse.canEnable(upButton)); downButton.setEnabled(mse.canEnable(downButton)); selectLang.setEnabled(mse.canEnable(selectLang)); if (displaySupported != null) { displaySupported.setEnabled(mse.canEnable(displaySupported)); } } }); selectedLangViewer .getList() .addSelectionListener( new SelectionAdapter() { @Override public void widgetDefaultSelected(SelectionEvent event) { IStructuredSelection sel = (IStructuredSelection) selectedLangViewer.getSelection(); if (!sel.isEmpty()) { moveAcross( selectedLangViewer, availableLangViewer, Common.makeGenericList(NSISLanguage.class, sel.toList())); availableLangViewer.reveal(sel.getFirstElement()); langRunnable.run(); } } }); m.updateSlaves(); listsComposite.addListener( SWT.Resize, new Listener() { boolean init = false; public void handleEvent(Event e) { if (!init) { // Stupid hack so that the height hint doesn't get changed // on the first resize, // i.e., when the page is drawn for the first time. init = true; } else { Point size = listsComposite.getSize(); GridLayout layout = (GridLayout) listsComposite.getLayout(); int heightHint = size.y - 2 * layout.marginHeight; ((GridData) availableLangList.getLayoutData()).heightHint = heightHint; ((GridData) selectedLangList.getLayoutData()).heightHint = heightHint; int totalWidth = size.x - 2 * layout.marginWidth - 3 * layout.horizontalSpacing; int listWidth = (int) (totalWidth * 0.4); int buttonWidth = (int) (0.5 * (totalWidth - 2 * listWidth)); size = availableLangList.computeSize(listWidth, SWT.DEFAULT); int delta = 0; if (size.x > listWidth) { delta = size.x - listWidth; listWidth = listWidth - delta; } ((GridData) availableLangList.getLayoutData()).widthHint = listWidth; ((GridData) buttonsComposite1.getLayoutData()).widthHint = totalWidth - 2 * (listWidth + delta) - buttonWidth; ((GridData) selectedLangList.getLayoutData()).widthHint = listWidth; ((GridData) buttonsComposite2.getLayoutData()).widthHint = buttonWidth; listsComposite.layout(); } } }); addPageChangedRunnable( new Runnable() { public void run() { if (isCurrentPage()) { selectLang.setEnabled(mse.canEnable(selectLang)); if (displaySupported != null) { displaySupported.setEnabled(mse.canEnable(displaySupported)); } } } }); mWizard.addSettingsListener( new INSISWizardSettingsListener() { public void settingsChanged( NSISWizardSettings oldSettings, NSISWizardSettings newSettings) { enableLangSupport.setSelection(newSettings.isEnableLanguageSupport()); m.updateSlaves(); selectLang.setSelection(newSettings.isSelectLanguage()); if (displaySupported != null) { displaySupported.setSelection(newSettings.isDisplaySupportedLanguages()); } java.util.List<NSISLanguage> selectedLanguages = newSettings.getLanguages(); java.util.List<NSISLanguage> availableLanguages = NSISLanguageManager.getInstance().getLanguages(); if (selectedLanguages.isEmpty()) { NSISWizardWelcomePage welcomePage = (NSISWizardWelcomePage) mWizard.getPage(NSISWizardWelcomePage.NAME); if (welcomePage != null) { if (!welcomePage.isCreateFromTemplate()) { NSISLanguage defaultLanguage = NSISLanguageManager.getInstance().getDefaultLanguage(); if (defaultLanguage != null && availableLanguages.contains(defaultLanguage)) { selectedLanguages.add(defaultLanguage); } } } } selectedLangViewer.setInput(selectedLanguages); availableLanguages.removeAll(selectedLanguages); availableLangViewer.setInput(availableLanguages); } }); }
public Composite createSashForm(final Composite composite) { if (!tv.isTabViewsEnabled()) { tableComposite = tv.createMainPanel(composite); return tableComposite; } ConfigurationManager configMan = ConfigurationManager.getInstance(); int iNumViews = 0; UIFunctionsSWT uiFunctions = UIFunctionsManagerSWT.getUIFunctionsSWT(); UISWTViewEventListenerWrapper[] pluginViews = null; if (uiFunctions != null) { UISWTInstance pluginUI = uiFunctions.getUISWTInstance(); if (pluginUI != null) { pluginViews = pluginUI.getViewListeners(tv.getTableID()); iNumViews += pluginViews.length; } } if (iNumViews == 0) { tableComposite = tv.createMainPanel(composite); return tableComposite; } FormData formData; final Composite form = new Composite(composite, SWT.NONE); FormLayout flayout = new FormLayout(); flayout.marginHeight = 0; flayout.marginWidth = 0; form.setLayout(flayout); GridData gridData; gridData = new GridData(GridData.FILL_BOTH); form.setLayoutData(gridData); // Create them in reverse order, so we can have the table auto-grow, and // set the tabFolder's height manually final int TABHEIGHT = 20; tabFolder = new CTabFolder(form, SWT.TOP | SWT.BORDER); tabFolder.setMinimizeVisible(true); tabFolder.setTabHeight(TABHEIGHT); final int iFolderHeightAdj = tabFolder.computeSize(SWT.DEFAULT, 0).y; final Sash sash = new Sash(form, SWT.HORIZONTAL); tableComposite = tv.createMainPanel(form); Composite cFixLayout = tableComposite; while (cFixLayout != null && cFixLayout.getParent() != form) { cFixLayout = cFixLayout.getParent(); } if (cFixLayout == null) { cFixLayout = tableComposite; } GridLayout layout = new GridLayout(); layout.numColumns = 1; layout.horizontalSpacing = 0; layout.verticalSpacing = 0; layout.marginHeight = 0; layout.marginWidth = 0; cFixLayout.setLayout(layout); // FormData for Folder formData = new FormData(); formData.left = new FormAttachment(0, 0); formData.right = new FormAttachment(100, 0); formData.bottom = new FormAttachment(100, 0); int iSplitAt = configMan.getIntParameter(tv.getPropertiesPrefix() + ".SplitAt", 3000); // Was stored at whole if (iSplitAt < 100) { iSplitAt *= 100; } double pct = iSplitAt / 10000.0; if (pct < 0.03) { pct = 0.03; } else if (pct > 0.97) { pct = 0.97; } // height will be set on first resize call sash.setData("PCT", new Double(pct)); tabFolder.setLayoutData(formData); final FormData tabFolderData = formData; // FormData for Sash formData = new FormData(); formData.left = new FormAttachment(0, 0); formData.right = new FormAttachment(100, 0); formData.bottom = new FormAttachment(tabFolder); formData.height = 5; sash.setLayoutData(formData); // FormData for table Composite formData = new FormData(); formData.left = new FormAttachment(0, 0); formData.right = new FormAttachment(100, 0); formData.top = new FormAttachment(0, 0); formData.bottom = new FormAttachment(sash); cFixLayout.setLayoutData(formData); // Listeners to size the folder sash.addSelectionListener( new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { final boolean FASTDRAG = true; if (FASTDRAG && e.detail == SWT.DRAG) { return; } if (tabFolder.getMinimized()) { tabFolder.setMinimized(false); refreshSelectedSubView(); ConfigurationManager configMan = ConfigurationManager.getInstance(); configMan.setParameter(tv.getPropertiesPrefix() + ".subViews.minimized", false); } Rectangle area = form.getClientArea(); tabFolderData.height = area.height - e.y - e.height - iFolderHeightAdj; form.layout(); Double l = new Double((double) tabFolder.getBounds().height / form.getBounds().height); sash.setData("PCT", l); if (e.detail != SWT.DRAG) { ConfigurationManager configMan = ConfigurationManager.getInstance(); configMan.setParameter( tv.getPropertiesPrefix() + ".SplitAt", (int) (l.doubleValue() * 10000)); } } }); final CTabFolder2Adapter folderListener = new CTabFolder2Adapter() { public void minimize(CTabFolderEvent event) { tabFolder.setMinimized(true); tabFolderData.height = iFolderHeightAdj; CTabItem[] items = tabFolder.getItems(); for (int i = 0; i < items.length; i++) { CTabItem tabItem = items[i]; tabItem.getControl().setVisible(false); } form.layout(); UISWTViewCore view = getActiveSubView(); if (view != null) { view.triggerEvent(UISWTViewEvent.TYPE_FOCUSLOST, null); } ConfigurationManager configMan = ConfigurationManager.getInstance(); configMan.setParameter(tv.getPropertiesPrefix() + ".subViews.minimized", true); } public void restore(CTabFolderEvent event) { tabFolder.setMinimized(false); CTabItem selection = tabFolder.getSelection(); if (selection != null) { selection.getControl().setVisible(true); } form.notifyListeners(SWT.Resize, null); UISWTViewCore view = getActiveSubView(); if (view != null) { view.triggerEvent(UISWTViewEvent.TYPE_FOCUSGAINED, null); } refreshSelectedSubView(); ConfigurationManager configMan = ConfigurationManager.getInstance(); configMan.setParameter(tv.getPropertiesPrefix() + ".subViews.minimized", false); } }; tabFolder.addCTabFolder2Listener(folderListener); tabFolder.addSelectionListener( new SelectionListener() { public void widgetSelected(SelectionEvent e) { // make sure its above try { ((CTabItem) e.item).getControl().setVisible(true); ((CTabItem) e.item).getControl().moveAbove(null); // TODO: Need to viewDeactivated old one UISWTViewCore view = getActiveSubView(); if (view != null) { view.triggerEvent(UISWTViewEvent.TYPE_FOCUSGAINED, null); } } catch (Exception t) { } } public void widgetDefaultSelected(SelectionEvent e) {} }); tabFolder.addMouseListener( new MouseAdapter() { public void mouseDown(MouseEvent e) { if (tabFolder.getMinimized()) { folderListener.restore(null); // If the user clicked down on the restore button, and we restore // before the CTabFolder does, CTabFolder will minimize us again // There's no way that I know of to determine if the mouse is // on that button! // one of these will tell tabFolder to cancel e.button = 0; tabFolder.notifyListeners(SWT.MouseExit, null); } } }); form.addListener( SWT.Resize, new Listener() { public void handleEvent(Event e) { if (tabFolder.getMinimized()) { return; } Double l = (Double) sash.getData("PCT"); if (l != null) { tabFolderData.height = (int) (form.getBounds().height * l.doubleValue()) - iFolderHeightAdj; form.layout(); } } }); // Call plugin listeners if (pluginViews != null) { for (UISWTViewEventListenerWrapper l : pluginViews) { if (l != null) { try { UISWTViewImpl view = new UISWTViewImpl(tv.getTableID(), l.getViewID(), l, null); addTabView(view); } catch (Exception e) { // skip, plugin probably specifically asked to not be added } } } } if (configMan.getBooleanParameter(tv.getPropertiesPrefix() + ".subViews.minimized", false)) { tabFolder.setMinimized(true); tabFolderData.height = iFolderHeightAdj; } else { tabFolder.setMinimized(false); } tabFolder.setSelection(0); return form; }