com.compomics.util.gui
Class MonitorDimension

java.lang.Object
  extended by 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.


Constructor Summary
MonitorDimension()
           
 
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
 

Constructor Detail

MonitorDimension

public MonitorDimension()
Method Detail

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 dimension
aPercentage - 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 Dimension
aPercentage - 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.