Package org.locationtech.udig.ui.operations

Examples of org.locationtech.udig.ui.operations.OpFilter


          }else{
            defaultCursorID = ModalTool.DEFAULT_CURSOR;
          }
        }
       
        OpFilter parseEnablement = EnablementUtil.parseEnablement( extension.getNamespaceIdentifier()+"."+definition.getName(), definition.getChildren("enablement")); //$NON-NLS-1$ //$NON-NLS-2$;
        enablement = new LazyOpFilter(this, parseEnablement);
        operationCategories = parseOperationCategories(definition);
       
        String bool = definition.getAttribute("hasCustomControl"); //$NON-NLS-1$
        hasControl = ((bool != null) && bool.equalsIgnoreCase("true")) ? true : false; //$NON-NLS-1$
View Full Code Here


     * @param categories
     */
    private void disable( List<? extends ToolCategory> categories ) {
        for( ToolCategory category : categories ) {
            for( ModalItem item : category ) {
                OpFilter enablesFor = item.getEnablesFor();
                if( enablesFor instanceof LazyOpFilter)
                    ((LazyOpFilter)enablesFor).disable();
            }
        }
    }
View Full Code Here

        if(!map.getEditManager().containsListener(selectedLayerListener))
          map.getEditManager().addListener(selectedLayerListener);
       
        for( ToolCategory cat : categories ) {
            for( ModalItem item : cat ) {
                OpFilter enablesFor = item.getEnablesFor();
                ILayer selectedLayer = map.getEditManager().getSelectedLayer();

                // JG: I don't trust asserts in production code!
                // assert enablesFor instanceof LazyOpFilter;
               
                if( !(enablesFor instanceof LazyOpFilter) ){
                    enablesFor = new LazyOpFilter(item, enablesFor);
                }
               
                boolean accept = enablesFor.accept(selectedLayer);
                item.setEnabled(accept);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.locationtech.udig.ui.operations.OpFilter

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.