Changeset 822 for trunk/JFCMonitor/src/main/java/de/ugoe/cs/eventbench/jfcmonitor/WindowMonitor.java
- Timestamp:
- 09/19/12 10:46:39 (12 years ago)
- Location:
- trunk/JFCMonitor
- Files:
-
- 2 added
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/JFCMonitor
-
Property
svn:ignore
set to
.settings
-
Property
svn:ignore
set to
-
trunk/JFCMonitor/src/main/java/de/ugoe/cs/eventbench/jfcmonitor/WindowMonitor.java
r365 r822 1 1 2 package de.ugoe.cs.eventbench.jfcmonitor; 2 3 … … 8 9 /** 9 10 * <p> 10 * An AWT event listener responsible to monitor the window creation and 11 * destruction. 11 * An AWT event listener responsible to monitor the window creation and destruction. 12 12 * </p> 13 13 * … … 17 17 public class WindowMonitor implements AWTEventListener { 18 18 19 20 21 * Adds all created windows (and their child components) to the GUI 22 * hierarchy maintained by {@link JFCComponent} and removes them if a window 23 * is destroyed. 24 25 * </p> 26 * 27 * @see java.awt.event.AWTEventListener#eventDispatched(java.awt.AWTEvent) 28 */ 29 @Override 30 public void eventDispatched(AWTEvent event) { 31 Window window; 32 switch (event.getID()){33 34 35 36 37 38 39 40 41 42 43 44 19 /** 20 * <p> 21 * Adds all created windows (and their child components) to the GUI hierarchy maintained by 22 * {@link JFCComponent} and removes them if a window is destroyed. 23 * </p> 24 * </p> 25 * 26 * @see java.awt.event.AWTEventListener#eventDispatched(java.awt.AWTEvent) 27 */ 28 @Override 29 public void eventDispatched(AWTEvent event) { 30 Window window; 31 switch (event.getID()) 32 { 33 case WindowEvent.WINDOW_OPENED: 34 window = ((WindowEvent) event).getWindow(); 35 JFCComponent.add(window); 36 break; 37 case WindowEvent.WINDOW_CLOSED: 38 window = ((WindowEvent) event).getWindow(); 39 JFCComponent.remove(window); 40 break; 41 default: 42 break; 43 } 44 } 45 45 46 46 }
Note: See TracChangeset
for help on using the changeset viewer.