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

Method scaleFontInUIManager

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

Source from the content-addressed store, hash-verified

558 }
559
560 private static synchronized boolean scaleFontInUIManager(Font original) {
561 var d = UIManager.getLookAndFeelDefaults();
562 for (var key : d.keySet()) {
563 if (key != null && key.toString().endsWith(".font")) {
564 if (Objects.equals(d.get(key), original)) {
565 return true;
566 }
567 }
568 }
569
570 var ud = UIManager.getDefaults();
571 for (var key : ud.keySet()) {
572 if (key != null && key.toString().endsWith(".font")) {
573 if (Objects.equals(d.get(key), original)) {
574 return true;
575 }
576 }
577 }
578
579 return false;
580 }
581
582 @AstroImageJ(reason = "Scale frames")
583 private static ImageIcon scaleImageIcon(ImageIcon in, double factor) {

Callers 1

scaledFontMethod · 0.95

Calls 4

keySetMethod · 0.80
toStringMethod · 0.45
equalsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected