MCPcopy Index your code
hub / github.com/benfry/processing4 / update

Method update

app/src/processing/app/tools/CreateFont.java:242–262  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

240
241
242 public void update() {
243 int fontSize = 0;
244 try {
245 fontSize = Integer.parseInt(sizeSelector.getText().trim());
246 //System.out.println("'" + sizeSelector.getText() + "'");
247 } catch (NumberFormatException ignored) { }
248
249 // if a deselect occurred, selection will be -1
250 if ((fontSize > 0) && (fontSize < 256) && (selection != -1)) {
251 //font = new Font(list[selection], Font.PLAIN, fontSize);
252 Font instance = nameToFont.get(fontNames[selection]);
253// font = instance.deriveFont(Font.PLAIN, fontSize);
254 font = instance.deriveFont((float) fontSize);
255 //System.out.println("setting font to " + font);
256 sample.setFont(font);
257
258 String filenameSuggestion = fontNames[selection].replace(' ', '_');
259 filenameSuggestion += "-" + fontSize;
260 filenameField.setText(filenameSuggestion);
261 }
262 }
263
264
265 public void build() {

Callers 3

initMethod · 0.95
insertUpdateMethod · 0.95
removeUpdateMethod · 0.95

Calls 6

parseIntMethod · 0.80
getMethod · 0.65
trimMethod · 0.45
getTextMethod · 0.45
replaceMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected