Package org.locationtech.udig.ui

Examples of org.locationtech.udig.ui.WaitCondition


        handler.setTarget(destination);
        handler.performDrop(sldURL, null);
       
        final String expectedName="Test Style"; //$NON-NLS-1$
        UDIGTestUtil.inDisplayThreadWait(3000, new WaitCondition(){

            public boolean isTrue() {
                return isTestStyle(destination, expectedName);
            }
           
View Full Code Here


    @Test
    public void testMapOpeningInterceptor() throws Exception {
        assertNull(TestMapOpeningInterceptor.mapOpening);
        Map createDefaultMap = MapTests.createDefaultMap("ftn", 3, true, null); //$NON-NLS-1$
        ApplicationGIS.openMap(createDefaultMap);
        UDIGTestUtil.inDisplayThreadWait(2000, new WaitCondition(){

            public boolean isTrue() {
                return TestMapOpeningInterceptor.mapOpening!=null;
            }
           
View Full Code Here

        final TestAnimation anim1=new TestAnimation();
        TestAnimation anim2=new TestAnimation();
       
        AnimationUpdater.runTimer(map.getRenderManagerInternal().getMapDisplay(), anim1);
        AnimationUpdater.runTimer(map.getRenderManagerInternal().getMapDisplay(), anim2);
        UDIGTestUtil.inDisplayThreadWait(10000, new WaitCondition(){

            public boolean isTrue() {
                return !anim1.isValid();
            }
        }, true);
View Full Code Here

     */
    private void runAnimationTest() throws Exception {
        final TestAnimation testAnimation = new TestAnimation();
        AnimationUpdater.runTimer(map.getRenderManagerInternal().getMapDisplay(), testAnimation);
//      UDIGTestUtil.inDisplayThreadWait(10000, new Condition(){
      UDIGTestUtil.inDisplayThreadWait(100000000, new WaitCondition(){

            public boolean isTrue()  {
                return !testAnimation.isValid();
            }
        }, true);
View Full Code Here

        map = ProjectFactory.eINSTANCE.createMap(ProjectPlugin.getPlugin().getProjectRegistry().getCurrentProject(),
                "AnimationTest", new ArrayList<Layer>()); //$NON-NLS-1$
       
        ApplicationGIS.openMap(map);
        try {
            UDIGTestUtil.inDisplayThreadWait(2000, new WaitCondition(){

                public boolean isTrue()  {
                    return ApplicationGIS.getActiveMap()!=null;
                }
               
View Full Code Here

    public void setUp() throws Exception {
        map = MapTests.createDefaultMap("type1", 2, true, null); //$NON-NLS-1$
        map.setRenderManagerInternal(null);
        ApplicationGIS.openMap(map, true);
        map.getRenderManagerInternal().refresh(null);
        UDIGTestUtil.inDisplayThreadWait(1000000, new WaitCondition(){

            public boolean isTrue() {
                return map.getRenderManagerInternal().getRenderExecutor().getState()==IRenderer.DONE;
            }
           
View Full Code Here

       
        List<IGeoResource> resources=new ArrayList<IGeoResource>();
        SimpleFeature[] features = UDIGTestUtil.createDefaultTestFeatures("type2", 4); //$NON-NLS-1$
        resources.add(MapTests.createGeoResource(features, true));
        ApplicationGIS.addLayersToMap(map, resources, 0);
        UDIGTestUtil.inDisplayThreadWait(3000, new WaitCondition(){

            public boolean isTrue() {
                return 0<renders;
            }
           
View Full Code Here

        resources.add(MapTests.createGeoResource(features2, true));
        IGeoResource createGeoResource = MapTests.createGeoResource(features3, true);
        resources.add(createGeoResource);
        resources.add(createGeoResource);
        ApplicationGIS.addLayersToMap(map, resources, 0);
        UDIGTestUtil.inDisplayThreadWait(3000, new WaitCondition(){

            public boolean isTrue() {
                return 3<renders;
            }
           
View Full Code Here

        }, filter);
       
        String string = "SomeObject"; //$NON-NLS-1$
        assertEquals(LazyOpFilter.DEFAULT_RETURN_VALUE, lazy.accept(string));
       
        UDIGTestUtil.inDisplayThreadWait(2000, new WaitCondition(){

            public boolean isTrue() {
                return value[1];
            }
           
        }, false);
       
        assertFalse(value[0]);
       
        filter.result=true;
       
        value[0]=true;
        value[1]=false;

        assertEquals(false, lazy.accept(string));
       
        UDIGTestUtil.inDisplayThreadWait(2000, new WaitCondition(){

            public boolean isTrue() {
                return value[1];
            }
           
        }, false);
       
        assertTrue(value[0]);

        value[0]=false;
        value[1]=false;
       
        filter.result=true;
       
        filter.notifyListeners(string);

        UDIGTestUtil.inDisplayThreadWait(2000, new WaitCondition(){

            public boolean isTrue() {
                return value[1];
            }
           
View Full Code Here

       
        String string = "SomeObject"; //$NON-NLS-1$       
        assertEquals(LazyOpFilter.DEFAULT_RETURN_VALUE, lazy.accept(string));

       
        UDIGTestUtil.inDisplayThreadWait(2000, new WaitCondition(){

            public boolean isTrue() {
                return value[1];
            }
           
        }, false);
       
        assertFalse(value[0]);
        assertFalse(lazy.accept(string));
       
        filter.result=true;
       
        assertFalse(lazy.accept(string));
       

        value[0]=false;
        value[1]=false;
       
        filter.result=true;
       
        filter.notifyListeners(string);

        UDIGTestUtil.inDisplayThreadWait(2000, new WaitCondition(){

            public boolean isTrue() {
                return value[1];
            }
           
View Full Code Here

TOP

Related Classes of org.locationtech.udig.ui.WaitCondition

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.