src/main/java/de/uapcore/sudoku/DocumentHandler.java

changeset 22
06170a0be62a
parent 12
1c62c6009161
equal deleted inserted replaced
21:11cb2d9413d4 22:06170a0be62a
79 field.setAllCellsModified(false); 79 field.setAllCellsModified(false);
80 } 80 }
81 81
82 /** 82 /**
83 * Saves the specified field to a file. 83 * Saves the specified field to a file.
84 * On success, the modified state of all cells is set to false.
84 * 85 *
85 * @param field the field to save 86 * @param field the field to save
86 * @throws IOException if saving fails or the file name has not been set before 87 * @throws IOException if saving fails or the file name has not been set before
87 * @see #setFilename(String) 88 * @see #setFilename(String)
88 */ 89 */
99 out.append(row[j] > 0 ? Character.forDigit(row[j], 10):'_'); 100 out.append(row[j] > 0 ? Character.forDigit(row[j], 10):'_');
100 out.append(j == 8 ? '\n': ' '); 101 out.append(j == 8 ? '\n': ' ');
101 } 102 }
102 } 103 }
103 } 104 }
105 field.setAllCellsModified(false);
104 } 106 }
105 107
106 /** 108 /**
107 * Sets the file name for loading and saving data. 109 * Sets the file name for loading and saving data.
108 * 110 *

mercurial