Package org.locationtech.udig.project.internal

Examples of org.locationtech.udig.project.internal.LayerLegendItem


            Object item = iter.next();
            if (item instanceof ILayer) {
                ILayer layer = (ILayer) item;
                selection.add(layer);
            } else if (item instanceof LayerLegendItem) {
                final LayerLegendItem layerItem = (LayerLegendItem) item;
                selection.add(layerItem.getLayer());
            }
        }
    }
View Full Code Here


            Object item = iter.next();
            if (item instanceof ILayer) {
                ILayer layer = (ILayer) item;
                selection.add(layer);
            } else if (item instanceof LayerLegendItem) {
                final LayerLegendItem layerItem = (LayerLegendItem) item;
                selection.add(layerItem.getLayer());
            }
        }
    }
View Full Code Here

            final Object item = iter.next();
            ILayer layer = null;
            if (item instanceof ILayer) {
                layer = (ILayer) item;
            } else if (item instanceof LayerLegendItem) {
                final LayerLegendItem layerItem = (LayerLegendItem) item;
                layer = layerItem.getLayer();
            }
            if (layer != null) {
                selection.add(layer);
                index.add(getIndex(map, layer));
            }
View Full Code Here

        final List<Object> adaptedObjs = new ArrayList<Object>();
        for (Object obj : strucSelection.toList()) {
            if (obj instanceof Folder) {
                adaptedObjs.add(obj);
            } else if (obj instanceof LayerLegendItem) {
                final LayerLegendItem layerItem = (LayerLegendItem) obj;
                adaptedObjs.add(layerItem.getLayer());
            }   
        }
       
        final StructuredSelection adaptedSelection = new StructuredSelection(adaptedObjs);
        return adaptedSelection;
View Full Code Here

            final IStructuredSelection structSelection = (IStructuredSelection) selection;
            final Object obj = structSelection.getFirstElement();
            final IStatusLineManager statusLineManager = getViewSite().getActionBars().getStatusLineManager();
           
            if (obj instanceof LayerLegendItem) {
                final LayerLegendItem layerItem = ((LayerLegendItem) obj);
                final Layer layer = layerItem.getLayer();
                if (layer.getStatus() == ILayer.ERROR) {
                    statusLineManager.setErrorMessage(layer.getStatusMessage());
                } else {
                    statusLineManager.setErrorMessage(null);
                    statusLineManager.setMessage(layer.getStatusMessage());
View Full Code Here

            obj = msg.getOldValue();
        }
       
        if (obj != null && obj instanceof LayerLegendItem) {

            final LayerLegendItem layerItem = (LayerLegendItem) obj;
            final Layer layer = layerItem.getLayer();
            if (Notification.ADD == eventType) {
                if (LegendViewUtils.isGridLayer(layer)) {
                    if (this.isLegendViewAddingGrid) {
                        layer.setVisible(false);
                        this.isLegendViewAddingGrid = false;
View Full Code Here

    private static List<Layer> getLayers(ILegendItem item) {
        final List<Layer> layers = new ArrayList<Layer>();
        if (item instanceof Folder) {
            layers.addAll(getLayers((Folder) item));
        } else if (item instanceof LayerLegendItem) {
            final LayerLegendItem layerItem = (LayerLegendItem) item;
            layers.add(layerItem.getLayer());
        }
        return layers;
    }
View Full Code Here

        final List<Layer> layers = new ArrayList<Layer>();
        for (ILegendItem item : folder.getItems()) {
            if (item instanceof Folder) {
                layers.addAll(getLayers((Folder) item));
            } else if (item instanceof LayerLegendItem) {
                final LayerLegendItem layerItem = (LayerLegendItem) item;
                layers.add(layerItem.getLayer());
            }
        }
        return layers;
    }
View Full Code Here

        for (ILegendItem item : legendItems) {
            if (item instanceof Folder) {
                final Folder folder = (Folder) item;
                for (ILegendItem folderItem : folder.getItems()) {
                    if (folderItem instanceof LayerLegendItem) {
                        final LayerLegendItem layerItem = (LayerLegendItem) folderItem;
                        final Layer layer = layerItem.getLayer();
                        if (isGridLayer(layer)) {
                            layers.add(layer);
                        }
                    }
                }
            } else if (item instanceof LayerLegendItem) {
                final LayerLegendItem layerItem = (LayerLegendItem) item;
                final Layer layer = layerItem.getLayer();
                if (isGridLayer(layer)) {
                    layers.add(layer);
                }
            }
        }
View Full Code Here

        }

        @Override
        public boolean select( Viewer viewer, Object parentElement, Object element ) {
            if (element instanceof LayerLegendItem) {
                final LayerLegendItem layerItem = (LayerLegendItem) element;
                final Layer layer = layerItem.getLayer();
                if (!this.showLayer && isLayerType(layer)) {
                    return false;

                }
            }
View Full Code Here

TOP

Related Classes of org.locationtech.udig.project.internal.LayerLegendItem

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.