本文整理汇总了Java中org.javarosa.core.model.QuestionDef.setID方法的典型用法代码示例。如果您正苦于以下问题:Java QuestionDef.setID方法的具体用法?Java QuestionDef.setID怎么用?Java QuestionDef.setID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.javarosa.core.model.QuestionDef
的用法示例。
在下文中一共展示了QuestionDef.setID方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
import org.javarosa.core.model.QuestionDef; //导入方法依赖的package包/类
@BeforeClass
public static void setUp() {
question = new QuestionDef();
question.setID(57);
OrderedHashtable oh = new OrderedHashtable();
Vector v = new Vector();
for (int i = 0; i < 3; i++) {
question.addSelectChoice(new SelectChoice("", "Selection" + i, "Selection" + i, false));
}
one = new Selection("Selection1");
one.attachChoice(question);
two = new Selection("Selection2");
two.attachChoice(question);
}
示例2: setUp
import org.javarosa.core.model.QuestionDef; //导入方法依赖的package包/类
public void setUp() throws Exception {
super.setUp();
question = new QuestionDef();
question.setID(57);
for (int i = 0; i < 3; i++) {
question.addSelectChoice(new SelectChoice("","Selection" + i, "Selection" + i, false));
}
one = new Selection("Selection1");
one.attachChoice(question);
two = new Selection("Selection2");
two.attachChoice(question);
}
示例3: testAccessorsModifiers
import org.javarosa.core.model.QuestionDef; //导入方法依赖的package包/类
public void testAccessorsModifiers () {
QuestionDef q = new QuestionDef();
q.setID(45);
if (q.getID() != 45) {
fail("ID getter/setter broken");
}
testSerialize(q, "c");
IDataReference ref = newRef("/data");
q.setBind(ref);
if (q.getBind() != ref) {
fail("Ref getter/setter broken");
}
testSerialize(q, "e");
q.setControlType(Constants.CONTROL_SELECT_ONE);
if (q.getControlType() != Constants.CONTROL_SELECT_ONE) {
fail("Control type getter/setter broken");
}
testSerialize(q, "g");
q.setAppearanceAttr("minimal");
if (!"minimal".equals(q.getAppearanceAttr())) {
fail("Appearance getter/setter broken");
}
testSerialize(q, "h");
}
示例4: testAccessorsModifiers
import org.javarosa.core.model.QuestionDef; //导入方法依赖的package包/类
@Test
public void testAccessorsModifiers() {
QuestionDef q = new QuestionDef();
q.setID(45);
if (q.getID() != 45) {
fail("ID getter/setter broken");
}
testSerialize(q, "c");
XPathReference ref = newRef("/data");
q.setBind(ref);
if (q.getBind() != ref) {
fail("Ref getter/setter broken");
}
testSerialize(q, "e");
q.setControlType(Constants.CONTROL_SELECT_ONE);
if (q.getControlType() != Constants.CONTROL_SELECT_ONE) {
fail("Control type getter/setter broken");
}
testSerialize(q, "g");
q.setAppearanceAttr("minimal");
if (!"minimal".equals(q.getAppearanceAttr())) {
fail("Appearance getter/setter broken");
}
testSerialize(q, "h");
}