com.compomics.util.gui
Class MonitorDimension
java.lang.Object
com.compomics.util.gui.MonitorDimension
public class MonitorDimension
- extends java.lang.Object
This class makes it possible to set the dimmensions of a JFrame of JPanel
to a certain percentage of the screen size.
Method Summary |
static java.awt.Dimension |
getPercentualScreenDimension(javax.swing.JFrame frame,
double aPercentage)
This method returns a Dimension with a percentual width and height in relation to the JFrame. |
static java.awt.Dimension |
getPercentualScreenDimension(javax.swing.JPanel jpan,
double aPercentage)
This method returns a Dimension with a percentual width and height in realtion to the JPanel. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MonitorDimension
public MonitorDimension()
getPercentualScreenDimension
public static java.awt.Dimension getPercentualScreenDimension(javax.swing.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 java.awt.Dimension getPercentualScreenDimension(javax.swing.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.