/** * Inserts element into ComboxField. Note that this method is generated for all attributes, * regardless if it is a Combobox. Though if their owner isn't a combobox, it has no effect * * @param theStudent the name of the class */ void comboboxStudentstudentNrAddItem(Student theStudent) { ((JComboBox) cellValueColumn2) .addItem( controller.convertToString( theStudent.getStudentNr(), TypeTool.getAttributeClassNameMethod(theStudent, "studentNr"))); }
/** * Internal use. * * @param column Internal use. * @param defaultInsert Internal use. */ void fromListblockLineToCell(int column, boolean defaultInsert) { // int correctedCol = // ((Integer)controller.view.chooseStudentsListBloack_indexes.elementAt(column)).intValue(); // Column match if (controller.view.chooseStudentsListBloack_indexes.indexOf(new Integer(0)) == column) { if (newStudent == null) { cellValueColumn0 = null; } else { Object convert = TypeTool.toObject(newStudent.getAge()); Object assignValue = null; if (TypeTool.isEnumeratorMethod(newStudent, "age")) { assignValue = controller.convertToString( newStudent.getAge(), TypeTool.getAttributeClassNameMethod(newStudent, "age")); } else { assignValue = convert; } cellValueColumn0 = assignValue; } return; } // Column match if (controller.view.chooseStudentsListBloack_indexes.indexOf(new Integer(1)) == column) { if (newStudent == null) { cellValueColumn1 = null; } else { Object convert = TypeTool.toObject(newStudent.getName()); Object assignValue = null; if (TypeTool.isEnumeratorMethod(newStudent, "name")) { assignValue = controller.convertToString( newStudent.getName(), TypeTool.getAttributeClassNameMethod(newStudent, "name")); } else { assignValue = convert; } cellValueColumn1 = assignValue; } return; } // Column match if (controller.view.chooseStudentsListBloack_indexes.indexOf(new Integer(2)) == column) { if (newStudent == null) { cellValueColumn2 = null; } else { Object convert = TypeTool.toObject(newStudent.getStudentNr()); Object assignValue = null; if (TypeTool.isEnumeratorMethod(newStudent, "studentNr")) { assignValue = controller.convertToString( newStudent.getStudentNr(), TypeTool.getAttributeClassNameMethod(newStudent, "studentNr")); } else { assignValue = convert; } cellValueColumn2 = assignValue; } return; } // Column match if (controller.view.chooseStudentsListBloack_indexes.indexOf(new Integer(3)) == column) { if (newStudent == null) { cellValueColumn3 = null; } else { Object convert = TypeTool.toObject(newStudent.getId()); Object assignValue = null; if (TypeTool.isEnumeratorMethod(newStudent, "id")) { assignValue = controller.convertToString( newStudent.getId(), TypeTool.getAttributeClassNameMethod(newStudent, "id")); } else { assignValue = convert; } cellValueColumn3 = assignValue; } return; } }
/** * Inserts element into ComboxField. Note that this method is generated for all attributes, * regardless if it is a Combobox. Though if their owner isn't a combobox, it has no effect * * @param theStudent the name of the class */ void comboboxStudentnameAddItem(Student theStudent) { ((JComboBox) cellValueColumn1) .addItem( controller.convertToString( theStudent.getName(), TypeTool.getAttributeClassNameMethod(theStudent, "name"))); }