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   31   2   1
0   16   1   2
2     1  
1    
20% of code in this file is excluded from these metrics.
 
  JMenuPopupMenuQuery       Line # 19 2 20% 2 0 100% 1.0
 
No Tests
 
1    package org.fest.swing.driver;
2   
3    import static org.fest.swing.edt.GuiActionRunner.execute;
4   
5    import javax.swing.JMenu;
6    import javax.swing.JPopupMenu;
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 pop-up menu associated with a
13    * <code>{@link JMenu}</code>.
14    * @see JMenu#getPopupMenu()
15    *
16    * @author Alex Ruiz
17    * @author Yvonne Wang
18    */
 
19    final class JMenuPopupMenuQuery {
20   
 
21  8 toggle @RunsInEDT
22    static JPopupMenu popupMenuOf(final JMenu menu) {
23  8 return execute(new GuiQuery<JPopupMenu>() {
 
24  8 toggle protected JPopupMenu executeInEDT() {
25  8 return menu.getPopupMenu();
26    }
27    });
28    }
29   
 
30    toggle private JMenuPopupMenuQuery() {}
31    }