com.arch.util.ResolutionMonitorUtils Maven / Gradle / Ivy
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.arch.util;
import java.awt.*;
/**
* @author waraujo
*/
public final class ResolutionMonitorUtils {
private ResolutionMonitorUtils() {
}
public static float heigth(float maxValue) {
if (maxValue > 0 && Toolkit.getDefaultToolkit().getScreenSize().height > maxValue) {
return maxValue;
}
return Toolkit.getDefaultToolkit().getScreenSize().height;
}
public static float width(float maxValue) {
if (maxValue > 0 && Toolkit.getDefaultToolkit().getScreenSize().width > maxValue) {
return maxValue;
}
return Toolkit.getDefaultToolkit().getScreenSize().width;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy