Clover Coverage Report - FEST Swing 1.2
Coverage timestamp: Tue Jun 1 2010 15:19:25 PDT
../../../../img/srcFileCovDistChart10.png 0% of files have more coverage
11   58   8   1.57
2   28   0.73   7
7     1.14  
1    
 
  GuiAction       Line # 24 11 0% 8 0 100% 1.0
 
No Tests
 
1    /*
2    * Created on Aug 14, 2008
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5    * the License. You may obtain a copy of the License at
6    *
7    * http://www.apache.org/licenses/LICENSE-2.0
8    *
9    * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10    * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11    * specific language governing permissions and limitations under the License.
12    *
13    * Copyright @2008-2010 the original author or authors.
14    */
15    package org.fest.swing.edt;
16   
17    import java.util.concurrent.CountDownLatch;
18   
19    /**
20    * Understands the base class for actions that are executed in the event dispatch thread.
21    *
22    * @author Alex Ruiz
23    */
 
24    abstract class GuiAction implements Runnable {
25   
26    private boolean executedInEDT;
27    private Throwable catchedException;
28    private CountDownLatch executionNotification;
29   
 
30  160086 toggle final Throwable catchedException() { return catchedException; }
31   
 
32  403 toggle final void catchedException(Throwable catched) {
33  403 catchedException = catched;
34    }
35   
 
36  3 toggle final boolean wasExecutedInEDT() {
37  3 return executedInEDT;
38    }
39   
 
40  160086 toggle final void clearCatchedException() {
41  160086 catchedException = null;
42    }
43   
 
44  151398 toggle final void executionNotification(CountDownLatch c) {
45  151398 executionNotification = c;
46    }
47   
 
48  160086 toggle final void notifyExecutionCompleted() {
49  160086 executedInEDT();
50  8688 if (executionNotification == null) return;
51  151398 executionNotification.countDown();
52  151398 executionNotification = null;
53    }
54   
 
55  160086 toggle private void executedInEDT() {
56  160086 executedInEDT = true;
57    }
58    }