Package org.locationtech.udig.project.ui.feature

Examples of org.locationtech.udig.project.ui.feature.FeatureSiteImpl


        messagePage.createControl(book);
       
        featurePage = new FeaturePanelPage(this);
       
        featurePage.init( pageSite );       
        featurePage.setFeatureSite(new FeatureSiteImpl());
        featurePage.createControl(book);
        final IMap map = ApplicationGIS.getActiveMap();
        if (map != ApplicationGIS.NO_MAP) {
            try {
                editFeatureChanged(map.getEditManager().getEditFeature());
View Full Code Here


        // pass the selection to the page
       
        IMap activeMap = ApplicationGIS.getActiveMap();
        IFeatureSite site = featurePage.getFeatureSite();
        if( site == null ){
            site = new FeatureSiteImpl(activeMap);
            featurePage.setFeatureSite(site);      
        }
        else {
            ((FeatureSiteImpl)site).setMapInternal( (Map) activeMap);
            ((FeatureSiteImpl)site).setFeature( feature );
View Full Code Here

    protected List<FeaturePanelTabDescriptor> filterTabDescriptors(
            List<FeaturePanelTabDescriptor> descriptors, IWorkbenchPart part, ISelection selection ) {
        IFeatureSite site = toFeatureSite(selection);
        if (site == null && part.getAdapter(IMap.class) != null) {
            IMap map = (IMap) part.getAdapter(IMap.class);
            site = new FeatureSiteImpl(map);
        } else {
            site = new FeatureSiteImpl(); // represents whatever is current?
        }

        List<FeaturePanelTabDescriptor> result = new ArrayList<FeaturePanelTabDescriptor>();
        for( FeaturePanelTabDescriptor descriptor : descriptors ) {
            FeaturePanelEntry entry = descriptor.getEntry();
View Full Code Here

        if (!selection.isEmpty() && selection instanceof IStructuredSelection) {
            IStructuredSelection selected = (IStructuredSelection) selection;
            for( Iterator< ? > iter = selected.iterator(); iter.hasNext(); ) {
                Object item = iter.next();
                if (item instanceof ILayer) {
                    return new FeatureSiteImpl((ILayer) item);
                } else if (item instanceof IMap) {
                    return new FeatureSiteImpl((IMap) item);
                } else if (item instanceof IAdaptable) {
                    IAdaptable adaptable = (IAdaptable) item;
                    ILayer layer = (ILayer) adaptable.getAdapter(ILayer.class);
                    if (layer != null) {
                        return new FeatureSiteImpl(layer);
                    }
                    IMap map = (IMap) adaptable.getAdapter(IMap.class);
                    if (map != null) {
                        return new FeatureSiteImpl(map);
                    }
                }
            }
        }
        return null;
View Full Code Here

TOP

Related Classes of org.locationtech.udig.project.ui.feature.FeatureSiteImpl

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.