static boolean isMacRetina(@NotNull Graphics2D g) {
    GraphicsConfiguration configuration = g.getDeviceConfiguration();
    if (configuration == null) {
      return false;
    }

    GraphicsDevice device = configuration.getDevice();
    return isOracleMacRetinaDevice(device);
  }
static boolean isMacRetina(@NotNull Graphics2D g)