te a ViewForm and a ToolBar that are siblings ViewForm viewForm = new ViewForm(parent, SWT.NONE); ToolBar toolBar = new ToolBar(parent, SWT.NONE); // Allow the ViewForm to control the position of the ToolBar by creating // a ProxyControl in the ViewForm that targets the ToolBar. ProxyControl toolBarProxy = new ProxyControl(viewForm); toolBarProxy.setTarget(toolBar); viewForm.setTopRight(toolBarProxy.getControl());
This is intended to simplify management of view toolbars in the presentation API. Presentation objects have no control over where the view toolbars are created in the widget hierarchy, but they may wish to control the position of the view toolbars using traditional SWT layouts and composites.