MCPcopy Index your code
hub / github.com/arduino/Arduino / handleFontSizeChange

Method handleFontSizeChange

app/src/processing/app/Base.java:1930–1943  ·  view source on GitHub ↗

Adjust font size

(int change)

Source from the content-addressed store, hash-verified

1928 * Adjust font size
1929 */
1930 public void handleFontSizeChange(int change) {
1931 String pieces[] = PreferencesData.get("editor.font").split(",");
1932 try {
1933 int newSize = Integer.parseInt(pieces[2]) + change;
1934 if (newSize < 4)
1935 newSize = 4;
1936 pieces[2] = String.valueOf(newSize);
1937 } catch (NumberFormatException e) {
1938 // ignore
1939 return;
1940 }
1941 PreferencesData.set("editor.font", StringUtils.join(pieces, ','));
1942 getEditors().forEach(Editor::applyPreferences);
1943 }
1944
1945 /**
1946 * Adds a {@link MouseWheelListener} and {@link KeyListener} to the given

Callers 4

buildEditMenuMethod · 0.80
actionPerformedMethod · 0.80
keyPressedMethod · 0.80

Calls 7

getMethod · 0.95
setMethod · 0.95
getEditorsMethod · 0.95
splitMethod · 0.80
parseIntMethod · 0.80
valueOfMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected