boolean (@NotNull Graphics2D g) { GraphicsConfiguration configuration = g.getDeviceConfiguration(); if (configuration == null) { return false; } GraphicsDevice device = configuration.getDevice(); return isOracleMacRetinaDevice(device); }