use of com.twinsoft.convertigo.beans.ngx.components.UISharedComponent in project convertigo by convertigo.
the class DirectoryWatcherService method getCompQName.
private String getCompQName(String compName) {
MobileApplication mobileApplication = project.getMobileApplication();
ApplicationComponent app = (ApplicationComponent) mobileApplication.getApplicationComponent();
for (UISharedComponent uisc : app.getSharedComponentList()) {
if (compName.equals(uisc.getName().toLowerCase())) {
return uisc.getQName();
}
}
return null;
}
use of com.twinsoft.convertigo.beans.ngx.components.UISharedComponent 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.UISharedComponent in project convertigo by convertigo.
the class NgxBuilder method compTsChanged.
@Override
public void compTsChanged(ISharedComponent sharedComponent, boolean forceTemp) throws EngineException {
UISharedComponent comp = (UISharedComponent) sharedComponent;
if (comp != null && initDone) {
synchronized (comp) {
writeCompTs(comp);
moveFiles();
/*File compDir = compDir(comp);
File tempTsFile = new File(compDir, comp.getName().toLowerCase() + ".temp.ts");
if (forceTemp && tempTsFile.exists()) {
writeCompTempTs(comp);
}*/
Engine.logEngine.trace("(MobileBuilder) Handled 'compTsChanged'");
}
}
}
use of com.twinsoft.convertigo.beans.ngx.components.UISharedComponent in project convertigo by convertigo.
the class NgxBuilder method compAdded.
@Override
public void compAdded(final ISharedComponent sharedComponent) throws EngineException {
UISharedComponent comp = (UISharedComponent) sharedComponent;
if (comp != null && comp.bNew && initDone) {
synchronized (comp) {
addComp(comp);
moveFiles();
Engine.logEngine.trace("(MobileBuilder) Handled 'compAdded'");
}
}
}
use of com.twinsoft.convertigo.beans.ngx.components.UISharedComponent 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