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

Method scale

ij/src/main/java/ij/gui/GUI.java:221–230  ·  view source on GitHub ↗

Scales an AWT component according to Prefs#getGuiScale(). @param component the AWT component to be scaled. If a container, scaling is applied to all its child components

(final Component component)

Source from the content-addressed store, hash-verified

219 * @param component the AWT component to be scaled. If a container, scaling is applied to all its child components
220 */
221 @AstroImageJ(reason = "Replace default fonts", modified = true)
222 public static void scale(final Component component) {
223 final float scale = (float)Prefs.getGuiScale();
224 if (scale==1f)
225 return;
226 if (component instanceof Container)
227 scaleComponents((Container)component, scale);
228 else
229 scaleComponent(component, scale);
230 }
231
232 private static void scaleComponents(final Container container, final float scale) {
233 for (final Component child : container.getComponents()) {

Callers 15

FunctionFinderMethod · 0.95
runMethod · 0.95
FitterMethod · 0.95
CommandsMethod · 0.95
LineWidthAdjusterMethod · 0.95
showWindowMethod · 0.95
SyncWindowsMethod · 0.95
updateWindowListMethod · 0.95
RecorderMethod · 0.95
ColorThresholderMethod · 0.95
ColorPickerMethod · 0.95
ThresholdAdjusterMethod · 0.95

Calls 15

getGuiScaleMethod · 0.95
scaleComponentsMethod · 0.95
scaleComponentMethod · 0.95
scaledFontMethod · 0.95
isMacOSXMethod · 0.95
getMethod · 0.95
scaleImageIconMethod · 0.95
getSelectedIndexMethod · 0.80
getTableHeaderMethod · 0.80
getIconMethod · 0.80
getFontMethod · 0.65
getSizeMethod · 0.65

Tested by

no test coverage detected