MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / scaledFont

Method scaledFont

ij/src/main/java/ij/gui/GUI.java:536–558  ·  view source on GitHub ↗
(Font original)

Source from the content-addressed store, hash-verified

534 }
535
536 private static boolean scaledFont(Font original) {
537 if (scaledMenu) {
538 if (SwingUtilities.isEventDispatchThread()) {
539 return scaleFontInUIManager(original);
540 } else {
541 var result = new AtomicBoolean(false);
542
543 try {
544 SwingUtilities.invokeAndWait(() ->
545 result.set(scaleFontInUIManager(original)));
546 } catch (InterruptedException e) {
547 return false;
548 } catch (InvocationTargetException e) {
549 e.printStackTrace();
550 return false;
551 }
552
553 return result.get();
554 }
555 }
556
557 return false;
558 }
559
560 private static synchronized boolean scaleFontInUIManager(Font original) {
561 var d = UIManager.getLookAndFeelDefaults();

Callers 1

scaleMethod · 0.95

Calls 3

scaleFontInUIManagerMethod · 0.95
setMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected