Icon (Component component) { Class<?> aClass = component.getClass(); Icon icon = null; while (icon == null && aClass != null) { icon = COMPONENT_MAPPING.get(aClass); aClass = aClass.getSuperclass(); } if (icon == null) icon = Unknown; if (ComponentUtil.findParentByCondition(component, (c) -> c.getClass() == DialogPanel.class) != null) { Icon kotlinIcon = ((ScalableIcon)Kotlin).scale(0.5f); return new RowIcon(icon, IconUtil.toSize(kotlinIcon, icon.getIconWidth(), icon.getIconHeight())); } return icon; }