use of com.servoy.j2db.ui.ISplitPane in project servoy-client by Servoy.
the class ComponentFactory method createSplitPane.
private static IComponent createSplitPane(IApplication application, Form form, TabPanel meta, IScriptExecuter el) {
RuntimeSplitPane scriptable = new RuntimeSplitPane(application.getItemFactory().createChangesRecorder(), application);
ISplitPane splitPane = application.getItemFactory().createSplitPane(scriptable, getWebID(form, meta), meta.getTabOrientation());
scriptable.setComponent(splitPane, meta);
applyBasicComponentProperties(application, splitPane, meta, getStyleForBasicComponent(application, meta, form));
try {
int index = 0;
Iterator<IPersist> it = meta.getTabs();
while (it.hasNext() && index < 2) {
Tab tab = (Tab) it.next();
Form f = application.getFlattenedSolution().getForm(tab.getContainsFormID());
if (f != null) {
IFormLookupPanel flp = splitPane.createFormLookupPanel(tab.getName(), tab.getRelationName(), f.getName());
if (index < 1)
splitPane.setLeftForm(flp);
else
splitPane.setRightForm(flp);
index++;
}
}
} catch (Exception ex) {
Debug.error(ex);
}
splitPane.setDividerLocation(meta.getTabOrientation() == TabPanel.SPLIT_HORIZONTAL ? splitPane.getSize().width / 2 : splitPane.getSize().height / 2);
if (el != null && meta.getOnChangeMethodID() > 0) {
splitPane.setOnDividerChangeMethodCmd((Integer.toString(meta.getOnChangeMethodID())));
splitPane.addScriptExecuter(el);
}
return splitPane;
}
use of com.servoy.j2db.ui.ISplitPane in project servoy-client by Servoy.
the class SwingItemFactory method createSplitPane.
public ISplitPane createSplitPane(RuntimeSplitPane scriptable, String name, int orient) {
ISplitPane splitPane = new SpecialSplitPane(application, scriptable, orient, false);
splitPane.setName(name);
return splitPane;
}
Aggregations