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 dimmensions of a JFrame of JPanel
to a certain percentage of the screen size.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MonitorDimension
public MonitorDimension()
getPercentualScreenDimension
public static Dimension getPercentualScreenDimension(JFrame frame,
double aPercentage)
- 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
public static Dimension getPercentualScreenDimension(JPanel jpan,
double aPercentage)
- 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.
Copyright © 2013. All Rights Reserved.