Ignore:
Timestamp:
01/30/12 13:36:37 (13 years ago)
Author:
sherbold
Message:
  • added monitoring of keyboard focus to the JFCMonitor
Location:
trunk/JFCMonitor/src/de/ugoe/cs/eventbench/jfcmonitor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JFCMonitor/src/de/ugoe/cs/eventbench/jfcmonitor/JFCListener.java

    r356 r370  
    44import java.awt.Component; 
    55import java.awt.event.AWTEventListener; 
     6import java.awt.event.FocusEvent; 
    67import java.awt.event.KeyEvent; 
    78import java.awt.event.MouseEvent; 
     
    9091                        } 
    9192                } 
     93                if (event instanceof FocusEvent) { 
     94                        FocusEvent focusEvent = (FocusEvent) event; 
     95                        if( focusEvent.getID() == FocusEvent.FOCUS_GAINED ) { 
     96                                builder.append("<event id=\"" + event.getID() + "\">" + StringTools.ENDLINE); 
     97                                addSourceInfo(builder, event); 
     98                                builder.append("</event>" + StringTools.ENDLINE); 
     99                        } 
     100                } 
    92101                if (builder.length() > 0 && outputWriter != null) { 
    93102                        try { 
  • trunk/JFCMonitor/src/de/ugoe/cs/eventbench/jfcmonitor/Runner.java

    r355 r370  
    44import java.awt.Toolkit; 
    55import java.awt.event.AWTEventListener; 
     6import java.awt.event.FocusEvent; 
    67import java.io.FileOutputStream; 
    78import java.io.IOException; 
     
    6364                Toolkit.getDefaultToolkit().addAWTEventListener(listenerFile, 
    6465                                AWTEvent.MOUSE_EVENT_MASK); 
     66                Toolkit.getDefaultToolkit().addAWTEventListener(listenerFile, 
     67                                FocusEvent.FOCUS_EVENT_MASK); 
    6568                Toolkit.getDefaultToolkit().addAWTEventListener(new WindowMonitor(), 
    6669                                AWTEvent.WINDOW_EVENT_MASK); 
Note: See TracChangeset for help on using the changeset viewer.