Components change highlighting as focus obtained and lost

Title: Components change highlighting as focus obtained and lost

Number: 100

Specification reference: (Section 6.2.3 Focus Switching Behavior page 10)
“Applications that display a UI without the presence of a mouse or other pointing device generally highlight the focused Component by changing the color of the Component. … Applications that display a UI SHALL implement either the FocusListener or the WindowListener interface to determine when it loses focus or is no longer the top HScene on the stack and SHALL remove the highlight from any display elements when either of these conditions occurs.”

Assertions:
1. Focused components are highlighted
2. The application implements either the FocusListener or the WindowListener interface
3. When the application loses focus the focused components are no longer highlighted
4. When the application is no longer the top HScene on the stack the focused components are no longer highlighted

Test Procedure 1:
1. Manually inspect the source code.
2. Use Java reflection API or other tools to inspect the application .class files
Expected result
1. One of the interfaces is found

Test Procedure 2:
1. Execute the application
2. Obtain focus
3. Lose focus
Expected result
1. Each component when it receives focus is highlighted
2. Each component when it loses focus is no longer highlighted
3. When the application loses focus the focused components are no longer highlighted
4. When the application is no longer the top HScene on the stack the focused components are no longer highlighted