use of com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent in project convertigo by convertigo.
the class NgxBuilder method updateConsumers.
private void updateConsumers(Project to) {
MobileApplication mobileApplication = project.getMobileApplication();
ApplicationComponent app = (ApplicationComponent) mobileApplication.getApplicationComponent();
for (UISharedComponent uisc : app.getSharedComponentList()) {
updateConsumers(uisc, to);
}
}
use of com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent in project convertigo by convertigo.
the class NgxBuilder method appModuleTsChanged.
@Override
public void appModuleTsChanged(final IApplicationComponent appComponent) throws EngineException {
ApplicationComponent app = (ApplicationComponent) appComponent;
if (app != null && initDone) {
synchronized (app) {
writeAppModuleTs(app);
moveFiles();
Engine.logEngine.trace("(MobileBuilder) Handled 'appModuleTsChanged'");
}
}
}
use of com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent in project convertigo by convertigo.
the class NgxBuilder method addComp.
private void addComp(UISharedComponent comp) throws EngineException {
MobileApplication mobileApplication = project.getMobileApplication();
if (mobileApplication != null) {
ApplicationComponent application = (ApplicationComponent) mobileApplication.getApplicationComponent();
if (application != null) {
writeCompSourceFiles(comp);
writeAppSourceFiles(application);
}
}
}
use of com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent in project convertigo by convertigo.
the class NgxBuilder method appThemeChanged.
@Override
public void appThemeChanged(final IApplicationComponent appComponent) throws EngineException {
ApplicationComponent app = (ApplicationComponent) appComponent;
if (app != null && initDone) {
synchronized (app) {
writeAppTheme(app);
moveFiles();
Engine.logEngine.trace("(MobileBuilder) Handled 'appThemeChanged'");
}
}
}
use of com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent in project convertigo by convertigo.
the class NgxPickerContentProvider method addSharedComponents.
private void addSharedComponents(TVObject tvi, Object object) {
if (object != null) {
List<? extends UIComponent> list = null;
if (object instanceof ApplicationComponent) {
list = ((ApplicationComponent) object).getSharedComponentList();
} else if (object instanceof UISharedComponent) {
list = new ArrayList<>(Arrays.asList((UISharedComponent) object));
}
if (list != null) {
for (UIComponent uic : list) {
if (uic instanceof UISharedComponent) {
// do not add to prevent selection on itself or children
if (uic.equals(selected)) {
return;
}
// do not add if not parent of selected (popped picker only)
boolean showInPicker = true;
if (selected != null && selected instanceof UIComponent) {
String selectedQName = ((UIComponent) selected).getQName();
String uicQName = uic.getQName() + ".";
if (!selectedQName.startsWith(uicQName)) {
showInPicker = false;
}
}
if (showInPicker) {
SourceData sd = null;
try {
sd = Filter.Shared.toSourceData(new JSONObject().put("priority", uic.priority).put("regular", ((UISharedComponent) uic).isRegular()));
} catch (JSONException e) {
e.printStackTrace();
}
tvi.add(new TVObject(uic.toString(), uic, sd));
}
}
}
}
}
}
Aggregations