Package org.locationtech.udig.aoi

Examples of org.locationtech.udig.aoi.IAOIService


        }

        Dimension screen = context.getMapDisplay().getDisplaySize();

        // get the AOI
        IAOIService aOIService = PlatformGIS.getAOIService();
        Geometry multiGeometry = aOIService.getGeometry();
        if (multiGeometry != null) {
       
            Geometry innerPolygons = null;
            Polygon polygon = null;
            // draw the rectangle around the active region green:143
View Full Code Here


        filter.text = text.getText();
        filter.bbox = new Envelope();
        //if (bbox.getSelection()) {
        boolean aoiFilter2 = isAOIFilter();
        if (aoiFilter2) {
          IAOIService aOIService = PlatformGIS.getAOIService();
          try {
            filter.bbox = aOIService.getExtent();
          } catch (Throwable t) {
            CatalogUIPlugin.log("Unable to create search:"+t, t); //$NON-NLS-1$
          }
        }
        return filter;
View Full Code Here

   
    // We would overrride init if we needed to (remmeber to call super)
    @Override
    public void init(IPageSite pageSite){
        super.init(pageSite); // provides access to stuff
        IAOIService service = PlatformGIS.getAOIService();
        strategy = service.findProxy(BookmarkAOIStrategy.ID);       
    }
View Full Code Here

   * <p>
   * As an example the "AOI" property is checked with "Screen".
   */
  @Override
  public boolean isTrue(Object object, String value) {
      IAOIService aOIService = PlatformGIS.getAOIService();
    String name = aOIService.getProxy().getName();
        return name.equals(value);
  }
View Full Code Here

    @Override
    public void addListener( IOpFilterListener listener ) {
        super.addListener(listener);
        if( listeners.size()==1){
            // this is the 1st listener we better watch the AOIService for change!
            IAOIService aOIService = PlatformGIS.getAOIService();
            aOIService.addListener( watcher );
        }
    }
View Full Code Here

    @Override
    public void removeListener( IOpFilterListener listener ) {
        super.removeListener(listener);
        if( listeners.isEmpty() ){
            // stop watching the AOI service
            IAOIService aOIService = PlatformGIS.getAOIService();
            aOIService.removeListener( watcher );
        }
    }
View Full Code Here

    public AOIView() {
    }
   

    private void publishAOIStrategy( AOIProxy selected ) {
        IAOIService aOIService = PlatformGIS.getAOIService();
        aOIService.setProxy(selected);
    }
View Full Code Here

            comboViewer.removeSelectionChangedListener(comboListener);
        }
    }

    protected void listenService( boolean listen ) {
        IAOIService aOIService = PlatformGIS.getAOIService();
        if (listen) {
            aOIService.addListener(serviceWatcher);
        } else {
            aOIService.removeListener(serviceWatcher);
        }
    }
View Full Code Here

   
    @Override
    public void saveState( IMemento memento ) {
        super.saveState(memento);
       
        IAOIService service = PlatformGIS.getAOIService();
        String id = service.getProxy().getId();
       
        memento.putString("AOI", id );
    }
View Full Code Here

        Label label = new Label(parent, SWT.LEFT);
        label.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false));
        label.setText("Area of Interest: ");

        // get the current strategy
        IAOIService aOIService = PlatformGIS.getAOIService();
        listenService(true);

        // eclipse combo viewer
        comboViewer = new ComboViewer(parent, SWT.READ_ONLY);
        comboViewer.setContentProvider(new ArrayContentProvider());
        comboViewer.setLabelProvider(new LabelProvider(){
            @Override
            public String getText( Object element ) {
                if (element instanceof IAOIStrategy) {
                    IAOIStrategy comboStrategy = (IAOIStrategy) element;
                    return comboStrategy.getName();
                }
                return super.getText(element);
            }
        });
        comboViewer.setInput(aOIService.getProxyList());
        // set the current strategy
        AOIProxy proxy = aOIService.getProxy();
        if (proxy == null) {
            proxy = aOIService.getDefault();
        }
        comboViewer.setSelection(new StructuredSelection(proxy));

        // now that we are configured we can start to listen!
        listenCombo(true);
View Full Code Here

TOP

Related Classes of org.locationtech.udig.aoi.IAOIService

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.