| Summary: | [ExpandBar] Event cannot be fired programatically | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Benjamin Muskalla <b.muskalla> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 1.3 | ||
| Target Milestone: | 1.3 M3 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Fixed in CVS HEAD |
The event dispatching is missing from the UntypedEventAdapter to delegate the untyped events to the typed listeners of the ExpandBar. public void testExpandListener() { RWTFixture.fakePhase( PhaseId.PROCESS_ACTION ); Display display = new Display(); Shell shell = new Shell( display ); ExpandBar expandBar = new ExpandBar( shell, SWT.NONE ); final StringBuffer log = new StringBuffer(); ExpandListener expandListener = new ExpandListener() { public void itemCollapsed( ExpandEvent e ) { log.append( "collapsed" ); } public void itemExpanded( ExpandEvent e ) { log.append( "expanded|" ); } }; expandBar.addExpandListener( expandListener ); expandBar.notifyListeners( SWT.Expand, new Event() ); assertEquals( "expanded|", log.toString() ); expandBar.notifyListeners( SWT.Collapse, new Event() ); assertEquals( "expanded|collapsed", log.toString() ); }