use of com.servoy.j2db.ui.IStandardLabel in project servoy-client by Servoy.
the class ComponentFactory method createComponentEx.
protected static IComponent createComponentEx(IApplication application, Form form, IPersist meta, IDataProviderLookup dataProviderLookup, IScriptExecuter el, boolean printing) {
IComponent comp = null;
switch(meta.getTypeID()) {
case IRepository.FIELDS:
comp = createField(application, form, (Field) meta, dataProviderLookup, el, printing);
break;
case IRepository.GRAPHICALCOMPONENTS:
comp = createGraphicalComponent(application, form, (GraphicalComponent) meta, el, dataProviderLookup);
break;
case IRepository.RECTSHAPES:
comp = createRectangle(application, form, (RectShape) meta);
break;
case IRepository.PORTALS:
comp = createPortal(application, form, (Portal) meta, dataProviderLookup, el, printing);
break;
case IRepository.PARTS:
comp = createPart(application, (Part) meta);
break;
case IRepository.TABPANELS:
TabPanel tabPanelMeta = (TabPanel) meta;
int orient = tabPanelMeta.getTabOrientation();
if (orient == TabPanel.SPLIT_HORIZONTAL || orient == TabPanel.SPLIT_VERTICAL)
comp = createSplitPane(application, form, tabPanelMeta, el);
else
comp = createTabPanel(application, form, tabPanelMeta, el);
break;
case IRepository.BEANS:
comp = createBean(application, form, (Bean) meta, null);
break;
case IRepository.WEBCOMPONENTS:
comp = createWebComponentPlaceholder(application, form, (WebComponent) meta);
break;
default:
Debug.error("ComponentFactory:unkown type " + meta.getTypeID() + ", uuid: " + meta.getUUID() + ", parent:" + meta.getParent());
IStandardLabel label = application.getItemFactory().createLabel(getWebID(form, meta), "ComponentFactory:unkown type " + meta.getTypeID());
label.setSize(new Dimension(200, 20));
comp = label;
}
if (comp instanceof JComponent) {
((JComponent) comp).putClientProperty("Id", ComponentFactory.getWebID(form, meta));
}
return comp;
}
Aggregations