本文整理汇总了Java中org.javarosa.form.api.FormEntryModel.REPEAT_STRUCTURE_NON_LINEAR属性的典型用法代码示例。如果您正苦于以下问题:Java FormEntryModel.REPEAT_STRUCTURE_NON_LINEAR属性的具体用法?Java FormEntryModel.REPEAT_STRUCTURE_NON_LINEAR怎么用?Java FormEntryModel.REPEAT_STRUCTURE_NON_LINEAR使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.javarosa.form.api.FormEntryModel
的用法示例。
在下文中一共展示了FormEntryModel.REPEAT_STRUCTURE_NON_LINEAR属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: putQuestion
private void putQuestion (FormIndex questionIndex, boolean expanded, int qType) {
ChatterboxWidget cw = null;
if (!questionIndex.isInForm())
return;
if (expanded && qType != Q_NORMAL) {
if (FormEntryModel.REPEAT_STRUCTURE_NON_LINEAR == model.getRepeatStructure()) {
if (qType == Q_REPEAT_JUNCTURE) {
//TODO: make rollback work
// if (!forward && uncommittedRepeats.contains(questionIndex)) {
// controller.deleteRepeat(model.getForm().descendIntoRepeat(questionIndex, model.getRepetitions().size() - 1));
// }
uncommittedRepeats.removeElement(questionIndex);
cw = widgetFactory.getRepeatJunctureWidget(questionIndex, model, this);
} else if (qType == Q_REPEAT_DELETE) {
cw = widgetFactory.getRepeatDeleteWidget(questionIndex, model, this);
}
} else {
cw = widgetFactory.getNewRepeatWidget(questionIndex, model, this);
}
activeIsInterstitial = true;
} else if (model.getForm().explodeIndex(questionIndex).lastElement() instanceof GroupDef) {
//do nothing
} else if (model.isIndexRelevant(questionIndex)) { //FIXME relevancy check
cw = widgetFactory.getWidget(questionIndex, model,
expanded ? ChatterboxWidget.VIEW_EXPANDED
: ChatterboxWidget.VIEW_COLLAPSED);
}
if (cw != null) {
putFrame(cw, questionIndex);
}
}
示例2: getController
protected JrFormEntryController getController() {
int formID = 1;
Vector<IPreloadHandler> preloaders = JRFormTestUtil.getPreloaders();
FormDefFetcher fetcher = new FormDefFetcher(new RMSRetreivalMethod(formID), preloaders, null, new InstanceInitializationFactory());
FormDef form = fetcher.getFormDef();
JrFormEntryController controller = new JrFormEntryController(new JrFormEntryModel(form, false, FormEntryModel.REPEAT_STRUCTURE_NON_LINEAR));
//controller.setView(new SingleQuestionView(controller));
controller.setView(new Chatterbox("Chatterbox", controller));
return controller;
}
示例3: JrFormEntryModel
public JrFormEntryModel(FormDef f, boolean readOnlyMode) {
this(f, readOnlyMode, FormEntryModel.REPEAT_STRUCTURE_NON_LINEAR);
}