use of org.entirej.applicationframework.rwt.renderers.form.EJRWTFormRenderer in project rap by entirej.
the class EJRWTApplicationManager method createEmbeddedForm.
public EJInternalForm createEmbeddedForm(String formName, Composite parent) {
try {
EJInternalForm form = getFrameworkManager().createInternalForm(formName, null);
if (form != null) {
EJRWTFormRenderer renderer = (EJRWTFormRenderer) form.getRenderer();
renderer.createControl(parent);
EJRWTEntireJGridPane gridPane = renderer.getGuiComponent();
gridPane.cleanLayout();
embeddedForms.add(form);
return form;
}
} catch (Exception e) {
getApplicationMessenger().handleException(e, true);
}
return null;
}
use of org.entirej.applicationframework.rwt.renderers.form.EJRWTFormRenderer in project rap by entirej.
the class EJRWTTabPaneFormContainer method switchToForm.
@Override
public EJInternalForm switchToForm(EJInternalForm aform) {
for (EJInternalForm form : _tabPages.keySet()) {
if (form.equals(aform)) {
EJRWTFormRenderer renderer = (EJRWTFormRenderer) form.getRenderer();
_folder.setSelection(_tabPages.get(form));
EJ_RWT.setAttribute(_folder, "ej-item-selection", form.getProperties().getName());
renderer.gainInitialFocus();
return form;
}
}
return null;
}
use of org.entirej.applicationframework.rwt.renderers.form.EJRWTFormRenderer in project rap by entirej.
the class EJRWTStackedPaneFormContainer method switchToForm.
@Override
public EJInternalForm switchToForm(EJInternalForm aform) {
for (EJInternalForm form : _stackedPages.keySet()) {
if (form.equals(aform)) {
EJRWTFormRenderer renderer = (EJRWTFormRenderer) form.getRenderer();
_stackPane.showPane(_stackedPages.get(form));
EJ_RWT.setAttribute(_stackPane, "ej-item-selection", form.getProperties().getName());
renderer.gainInitialFocus();
form.focusGained();
for (EJRWTFormSelectedListener listener : _formSelectedListeners) {
listener.fireFormSelected(form);
}
return form;
}
}
return null;
}
use of org.entirej.applicationframework.rwt.renderers.form.EJRWTFormRenderer in project rap by entirej.
the class EJRWTTabPaneFormContainer method addForm.
@Override
public EJInternalForm addForm(EJInternalForm form) {
CTabItem tabItem = new CTabItem(_folder, SWT.NONE);
_tabPages.put(form, tabItem);
tabItem.setData(form);
EJ_RWT.setTestId(tabItem, form.getProperties().getName());
EJRWTFormRenderer renderer = (EJRWTFormRenderer) form.getRenderer();
final ScrolledComposite scrollComposite = new EJRWTScrolledComposite(_folder, SWT.V_SCROLL | SWT.H_SCROLL);
renderer.createControl(scrollComposite);
scrollComposite.setContent(renderer.getGuiComponent());
scrollComposite.setExpandHorizontal(true);
scrollComposite.setExpandVertical(true);
scrollComposite.setMinSize(form.getProperties().getFormWidth(), form.getProperties().getFormHeight());
final EJCoreFormProperties coreFormProperties = form.getProperties();
tabItem.setText(coreFormProperties.getTitle() == null ? coreFormProperties.getName() : coreFormProperties.getTitle());
tabItem.setControl(scrollComposite);
_folder.setSelection(tabItem);
renderer.gainInitialFocus();
return form;
}
use of org.entirej.applicationframework.rwt.renderers.form.EJRWTFormRenderer in project rap by entirej.
the class EJRWTTabPaneFormContainer method switchToForm.
@Override
public EJInternalForm switchToForm(String key) {
for (EJInternalForm form : _tabPages.keySet()) {
if (form.getProperties().getName().equalsIgnoreCase(key)) {
EJRWTFormRenderer renderer = (EJRWTFormRenderer) form.getRenderer();
_folder.setSelection(_tabPages.get(form));
EJ_RWT.setAttribute(_folder, "ej-item-selection", form.getProperties().getName());
renderer.gainInitialFocus();
return form;
}
}
return null;
}
Aggregations