Package org.locationtech.udig.project.ui.summary

Examples of org.locationtech.udig.project.ui.summary.SummaryData


        bounds = map.getBounds(ProgressManager.instance().get());

        final List<SummaryData> data = new ArrayList<SummaryData>();

        String name = map.getName();
        nameData = new SummaryData(Messages.LayerSummary_name, name==null?"":name); //$NON-NLS-1$
        nameData.setModifier(new NameModifier());
        data.add(nameData);
        newName=oldName=nameData.getInfo();
       
        String abstract1 = map.getAbstract();
        abstractData = new SummaryData(Messages.MapSummary_abstract, abstract1==null?"":abstract1); //$NON-NLS-1$
        abstractData.setModifier(new AbstractModifier());
        data.add(abstractData);
        newAbstract=oldAbstract=abstractData.getInfo();
       
        data.add(new SummaryData(Messages.LayerSummary_id, map.getID()));
        data.add(new SummaryData(Messages.MapSummary_mapBounds, bounds == null
                ? Messages.LayerSummary_unknownBounds
                : LayerSummary.parseBounds(bounds)));
        data.add(new SummaryData(Messages.MapSummary_viewportBounds, LayerSummary.parseBounds(map
                .getViewportModel().getBounds())));

        summaryControl = new SummaryControl(data);
        return summaryControl.createControl(parent);
    }
View Full Code Here


        final CoordinateReferenceSystem layerCRS = layer.getCRS();
        ReferencedEnvelope bounds = layer.getBounds(ProgressManager.instance().get(), layerCRS);
       
        final List<SummaryData> data=new ArrayList<SummaryData>();
        String name = layer.getName();
        nameData=new SummaryData(Messages.LayerSummary_name, name==null?"":name); //$NON-NLS-1$
        nameData.setModifier(new NameModifier());
        data.add(nameData);
        newName=oldName=nameData.getInfo();
        data.add(new SummaryData(Messages.LayerSummary_id,layer.getID()));
        data.add(new SummaryData(Messages.LayerSummary_bounds, bounds==null?Messages.LayerSummary_unknownBounds:parseBounds(bounds)));
        data.add(new SummaryData(Messages.LayerSummary_selection,layer.getFilter()));
        data.add(new SummaryData(Messages.LayerSummary_status, layer.getStatusMessage()));
        if ( layer.getSchema()!=null ){
            SimpleFeatureType schema = layer.getSchema();
            SummaryData schemaData=new SummaryData(Messages.LayerSummary_featureType, schema.getName().getLocalPart());
            SummaryData[] children=new SummaryData[schema.getAttributeCount()];
           
            for( int i = 0; i < children.length; i++ ) {
                AttributeDescriptor attributeType = schema.getDescriptor(i);
                children[i]=new SummaryData(attributeType.getLocalName(), attributeType.getType().getBinding().getSimpleName());
                children[i].setParent(schemaData);
                List<SummaryData> attTypeChildren=new ArrayList<SummaryData>();
                attTypeChildren.add(new SummaryData(Messages.LayerSummary_nillable, attributeType.isNillable()));
                attTypeChildren.get(0).setParent(children[i]);
                List<Filter> restrictions = attributeType.getType().getRestrictions();
                for (Filter filter : restrictions) {
                    SummaryData summaryData = new SummaryData(Messages.LayerSummary_restriction, filter);
                    attTypeChildren.add(summaryData);
                    summaryData.setParent(children[i]);
                }
                SummaryData summaryData = new SummaryData(Messages.LayerSummary_maxOccurs, attributeType.getMaxOccurs());
                attTypeChildren.add(summaryData);
                summaryData.setParent(children[i]);
                summaryData = new SummaryData(Messages.LayerSummary_minOccurs, attributeType.getMinOccurs());
                attTypeChildren.add(summaryData);
                summaryData.setParent(children[i]);

                children[i].setChildren(attTypeChildren.toArray(new SummaryData[0]));
            }
            schemaData.setChildren(children);
            data.add(schemaData);
View Full Code Here

        final CoordinateReferenceSystem layerCRS = layer.getCRS();
        final Envelope bounds = layer.getBounds(monitor, layerCRS);
       
        final List<SummaryData> data=new ArrayList<SummaryData>();
       
        data.add(new SummaryData(Messages.LayerSummary_name, layer.getName()));
        data.add(new SummaryData(Messages.LayerSummary_id,layer.getID()));
        data.add(new SummaryData(Messages.LayerSummary_zorder,layer.getZorder()));
        data.add(new SummaryData(Messages.LayerSummary_crs,layerCRS.getName()));
        data.add(new SummaryData(Messages.LayerSummary_bounds, parseBounds(bounds)));
        data.add(new SummaryData(Messages.LayerSummary_selection,layer.getFilter()));

        display.asyncExec(new Runnable(){
            public void run() {
                SummaryDialog d=new SummaryDialog( display.getActiveShell(), Messages.LayerSummary_title
                        + layer.getName(), data );
View Full Code Here

        else
            crs = Messages.MultiTargetOp_unknown;
        crs=crs.replace('\n', ' ');
       
        try {
            data.add(new SummaryData(Messages.MultiTargetOp_name, info.getName()));
            data.add(new SummaryData( Messages.MultiTargetOp_title, info.getTitle()));
            data.add(new SummaryData( Messages.MultiTargetOp_bounds, LayerSummary.parseBounds(bounds) ));
            data.add(new SummaryData( Messages.MultiTargetOp_crs, crs));
            data.add(new SummaryData( Messages.MultiTargetOp_featuresource, resource.canResolve(FeatureSource.class)));
            data.add(new SummaryData( Messages.MultiTargetOp_featurestore, resource.canResolve(FeatureStore.class)));
            data.add(new SummaryData( Messages.MultiTargetOp_wms, resource.canResolve(WebMapServer.class)));
            boolean first=false;
            for( String word : info.getKeywords() ) {
                if( first )
                    data.add(new SummaryData( Messages.MultiTargetOp_keywords, word));
                else
                    data.add(new SummaryData( null , word ));
            }
        } catch (Exception e) {
            display.asyncExec(new Runnable(){
                public void run() {
                    MessageDialog.openError(display.getActiveShell(), Messages.MultiTargetOp_resource_summary,
View Full Code Here

        else
            crs = Messages.MultiTargetOp_unknown;
        crs=crs.replace('\n', ' ');
       
        try {
            data.add(new SummaryData(Messages.MultiTargetOp_name, info.getName()));
            data.add(new SummaryData( Messages.MultiTargetOp_title, info.getTitle()));
            data.add(new SummaryData( Messages.MultiTargetOp_bounds, LayerSummary.parseBounds(bounds) ));
            data.add(new SummaryData( Messages.MultiTargetOp_crs, crs));
            data.add(new SummaryData( Messages.MultiTargetOp_featuresource, resource.canResolve(FeatureSource.class)));
            data.add(new SummaryData( Messages.MultiTargetOp_featurestore, resource.canResolve(FeatureStore.class)));
            data.add(new SummaryData( Messages.MultiTargetOp_wms, resource.canResolve(WebMapServer.class)));
            boolean first=false;
            for( String word : info.getKeywords() ) {
                if( first )
                    data.add(new SummaryData( Messages.MultiTargetOp_keywords, word));
                else
                    data.add(new SummaryData( null , word ));
            }
        } catch (Exception e) {
            display.asyncExec(new Runnable(){
                public void run() {
                    MessageDialog.openError(display.getActiveShell(), Messages.MultiTargetOp_resource_summary,
View Full Code Here

TOP

Related Classes of org.locationtech.udig.project.ui.summary.SummaryData

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.