gui.layouts
Class AspectBoundable

java.lang.Object
  extended by gui.layouts.AspectBoundable
All Implemented Interfaces:
BoundableInterface

public class AspectBoundable
extends java.lang.Object
implements BoundableInterface


Constructor Summary
AspectBoundable()
           
 
Method Summary
 java.awt.Dimension scale(java.awt.Dimension imageDimension, java.awt.Dimension availableSize)
          scale returns a new dimension that has the same aspect ratio as the first dimension but has no part larger than the second dimension
 java.awt.Dimension scaleHeight(java.awt.Dimension d1, java.awt.Dimension d2)
           
 java.awt.Dimension scaleWidth(java.awt.Dimension d1, java.awt.Dimension d2)
           
 void setBounds(java.awt.Component c, int x, int y, int w, int h)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AspectBoundable

public AspectBoundable()
Method Detail

setBounds

public void setBounds(java.awt.Component c,
                      int x,
                      int y,
                      int w,
                      int h)
Specified by:
setBounds in interface BoundableInterface

scale

public java.awt.Dimension scale(java.awt.Dimension imageDimension,
                                java.awt.Dimension availableSize)
scale returns a new dimension that has the same aspect ratio as the first dimension but has no part larger than the second dimension


scaleWidth

public java.awt.Dimension scaleWidth(java.awt.Dimension d1,
                                     java.awt.Dimension d2)

scaleHeight

public java.awt.Dimension scaleHeight(java.awt.Dimension d1,
                                      java.awt.Dimension d2)