use of org.entirej.framework.core.properties.interfaces.EJFormProperties in project rap by entirej.
the class EJRWTFormRenderer method setupGui.
private void setupGui(final Composite parent) {
EJFormProperties formProperties = _form.getProperties();
EJCanvasController canvasController = _form.getCanvasController();
// Now loop through all the forms blocks and create controllers for them
for (EJInternalBlock block : _form.getAllBlocks()) {
String canvasName = block.getProperties().getCanvasName();
// displayed.
if (canvasName == null || canvasName.trim().length() == 0) {
continue;
}
_blocks.put(canvasName, block);
}
_mainPane = new EJRWTEntireJGridPane(parent, formProperties.getNumCols());
_mainPane.setData(EJ_RWT.CUSTOM_VARIANT, EJ_RWT.CSS_CV_FORM);
for (EJCanvasProperties canvasProperties : formProperties.getCanvasContainer().getAllCanvasProperties()) {
createCanvas(_mainPane, canvasProperties, canvasController);
}
_mainPane.addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent event) {
Collection<CanvasHandler> values = _canvases.values();
for (CanvasHandler canvasHandler : values) {
if (canvasHandler instanceof PopupCanvasHandler) {
PopupCanvasHandler handler = (PopupCanvasHandler) canvasHandler;
if (handler._popupDialog != null && handler._popupDialog.getShell() != null) {
handler._popupDialog.getShell().dispose();
}
}
}
}
});
}
Aggregations