use of org.entirej.framework.core.renderers.EJManagedFormRendererWrapper in project rap by entirej.
the class EJRWTFormPopUp method showForm.
public void showForm() {
final int height = _popupController.getPopupForm().getProperties().getFormHeight();
final int width = _popupController.getPopupForm().getProperties().getFormWidth();
EJManagedFormRendererWrapper wrapper = _popupController.getPopupForm().getManagedRenderer();
final EJRWTAppFormRenderer formRenderer = (EJRWTAppFormRenderer) wrapper.getUnmanagedRenderer();
_popupDialog = new EJRWTAbstractDialog(_mainShell) {
@Override
public void createBody(Composite parent) {
parent.setLayout(new FillLayout());
final ScrolledComposite scrollComposite = new EJRWTScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL);
formRenderer.createControl(scrollComposite);
scrollComposite.setContent(formRenderer.getGuiComponent());
scrollComposite.setExpandHorizontal(true);
scrollComposite.setExpandVertical(true);
scrollComposite.setMinSize(width, height);
}
@Override
public void canceled() {
_popupController.getPopupForm().close();
}
};
_popupDialog.create();
_popupDialog.getShell().setText(_popupController.getPopupForm().getProperties().getTitle());
// add offset
_popupDialog.getShell().setSize(width + 50, height + 70);
_popupDialog.open();
_popupDialog.activateDialog();
}
Aggregations