Package org.locationtech.udig.project.ui

Examples of org.locationtech.udig.project.ui.IFeaturePanel


        }
    }

    private void disposeTabs(Collection tabs) {
        for (Iterator iter = tabs.iterator(); iter.hasNext();) {
            IFeaturePanel tab = (IFeaturePanel) iter.next();
            Composite composite = (Composite) tabToComposite.remove(tab);
            tab.dispose();
            if (composite != null) {
                composite.dispose();
            }
        }
    }
View Full Code Here


    protected void updateTabs(List<FeaturePanelTabDescriptor> descriptors) {
        Map<FeaturePanelTabDescriptor, IFeaturePanel> newTabs = new HashMap<FeaturePanelTabDescriptor, IFeaturePanel>(
                descriptors.size() * 2);
        boolean disposingCurrentTab = (currentTab != null);
        for (FeaturePanelTabDescriptor descriptor : descriptors) {
            IFeaturePanel tab = descriptorToTab.remove(descriptor);

            if (tab != null && tab.controlsHaveBeenCreated()) {
                if (tab == currentTab) {
                    disposingCurrentTab = false;
                }
            } else {
                tab = createTab(descriptor);
View Full Code Here

        /**
         * Shows the tab associated with the selection.
         */
        public void selectionChanged(SelectionChangedEvent event) {
            IStructuredSelection selection = (IStructuredSelection) event.getSelection();
            IFeaturePanel tab = null;
            FeaturePanelTabDescriptor descriptor = (FeaturePanelTabDescriptor) selection
                    .getFirstElement();

            if (descriptor == null) {
                // pretend the tab is empty.
                hideTab(currentTab);
            } else {
                // create tab if necessary
                // can not cache based on the id - tabs may have the same id,
                // but different section depending on the selection
                //
                tab = descriptorToTab.get(descriptor);

                if (tab != currentTab) {
                    hideTab(currentTab);
                }

                Composite tabComposite = (Composite) tabToComposite.get(tab);
                if (tabComposite == null) {
                    tabComposite = createTabComposite();
                    tab.createPartControl(tabComposite);
                    try {
                        tab.init(site, null);
                    } catch (PartInitException e) {
                        IStatus status = new Status(IStatus.ERROR, descriptor.getEntry().getId(),
                                "Problem initializing feature panel", e);
                        FeatureEditorPlugin.getDefault().getLog().log(status);
                    }
                    tabToComposite.put(tab, tabComposite);
                }
                // force widgets to be resized
                // tab.setInput(tabbedPropertyViewer.getWorkbenchPart(),(ISelection)
                // tabbedPropertyViewer.getInput());

                // store tab selection
                storeCurrentTabSelection(descriptor.getLabel());

                if (tab != currentTab) {
                    showTab(tab);
                }
                tab.refresh();
            }
            tabbedPropertyComposite.getTabComposite().layout(true);
            currentTab = tab;
            resizeScrolledComposite();

View Full Code Here

TOP

Related Classes of org.locationtech.udig.project.ui.IFeaturePanel

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.