ui.getPageOperator().openPage( "foo" );
}
private UIImpl createUI( Class<? extends AbstractPage> pageType) {
UIConfiguration configuration = new UIConfiguration();
Shell shell = new Shell( new Display() );
shell.setLayout( new ZIndexStackLayout() );
ActionConfiguration actionConfiguration = new ActionConfiguration( "bar", TestAction.class );
configuration.addPageConfiguration( new PageConfiguration( "fooRoot", TestPage.class ).setTopLevel( true ) );
configuration.addPageConfiguration( new PageConfiguration( "foo", pageType )
.addActionConfiguration( actionConfiguration ) );
RemoteUI remoteUI = new RemoteUI( shell );
Controller controller = new Controller( remoteUI, configuration.getAdapter( UIDescriptor.class ) );
UIImpl ui = new UIImpl( shell.getDisplay(), controller, configuration );
remoteUI.setController( controller );
remoteUI.setUi( ui );
ui.markInitialized();
controller.createGlobalActions( ui );