Package com.compomics.util.gui
Class MonitorDimension
java.lang.Object
com.compomics.util.gui.MonitorDimension
public class MonitorDimension extends Object
This class makes it possible to set the dimensions of a JFrame of JPanel
to a certain percentage of the screen size.
-
Constructor Summary
Constructors Constructor Description MonitorDimension()
-
Method Summary
Modifier and Type Method Description static Dimension
getPercentualScreenDimension(JFrame frame, double aPercentage)
This method returns a Dimension with a percentual width and height in relation to the JFrame.static Dimension
getPercentualScreenDimension(JPanel jpan, double aPercentage)
This method returns a Dimension with a percentual width and height in realtion to the JPanel.
-
Constructor Details
-
MonitorDimension
public MonitorDimension()
-
-
Method Details
-
getPercentualScreenDimension
This method returns a Dimension with a percentual width and height in relation to the JFrame.- Parameters:
frame
- Source dimensionaPercentage
- Percentual width and height of the returning dimension.- Returns:
- A Dimension instance with a percentual Dimension in relation to the JFrame.
-
getPercentualScreenDimension
This method returns a Dimension with a percentual width and height in realtion to the JPanel.- Parameters:
jpan
- Source DimensionaPercentage
- Percentual width and height of the returning dimension.- Returns:
- A Dimension instance with a percentual Dimension in relation to the JPanel.
-