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
2   38   2   1
0   16   1   2
2     1  
1    
20% of code in this file is excluded from these metrics.
 
  ComponentFontQuery       Line # 19 2 20% 2 0 100% 1.0
 
No Tests
 
1    package org.fest.swing.query;
2   
3    import static org.fest.swing.edt.GuiActionRunner.execute;
4   
5    import java.awt.Component;
6    import java.awt.Font;
7   
8    import org.fest.swing.annotation.RunsInEDT;
9    import org.fest.swing.edt.GuiQuery;
10   
11    /**
12    * Understands an action, executed in the event dispatch thread, that returns the font of a
13    * <code>{@link Component}</code>.
14    * @see Component#getFont()
15    *
16    * @author Alex Ruiz
17    * @author Yvonne Wang
18    */
 
19    final public class ComponentFontQuery {
20   
21    /**
22    * Returns the font of the given <code>{@link Component}</code>. This action is executed in the event dispatch
23    * thread.
24    * @param component the given <code>Component</code>.
25    * @return the font of the given <code>Component</code>.
26    * @see Component#getFont()
27    */
 
28  3 toggle @RunsInEDT
29    public static Font fontOf(final Component component) {
30  3 return execute(new GuiQuery<Font>() {
 
31  3 toggle protected Font executeInEDT() {
32  3 return component.getFont();
33    }
34    });
35    }
36   
 
37    toggle private ComponentFontQuery() {}
38    }