()
| 303 | |
| 304 | |
| 305 | public void update() { |
| 306 | int fontsize = 0; |
| 307 | try { |
| 308 | fontsize = Integer.parseInt(sizeSelector.getText().trim()); |
| 309 | //System.out.println("'" + sizeSelector.getText() + "'"); |
| 310 | } catch (NumberFormatException e2) { } |
| 311 | |
| 312 | // if a deselect occurred, selection will be -1 |
| 313 | if ((fontsize > 0) && (fontsize < 256) && (selection != -1)) { |
| 314 | //font = new Font(list[selection], Font.PLAIN, fontsize); |
| 315 | Font instance = table.get(list[selection]); |
| 316 | // font = instance.deriveFont(Font.PLAIN, fontsize); |
| 317 | font = instance.deriveFont((float) fontsize); |
| 318 | //System.out.println("setting font to " + font); |
| 319 | sample.setFont(font); |
| 320 | |
| 321 | String filenameSuggestion = list[selection].replace(' ', '_'); |
| 322 | filenameSuggestion += "-" + fontsize; |
| 323 | filenameField.setText(filenameSuggestion); |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | |
| 328 | public void build() { |
no test coverage detected