com.objectwave.viewUtility
Class StretchLayoutConstraints

java.lang.Object
  |
  +--com.objectwave.viewUtility.StretchLayoutConstraints
All Implemented Interfaces:
java.lang.Cloneable

public class StretchLayoutConstraints
extends java.lang.Object
implements java.lang.Cloneable

Constraints for the StretchLayout. Each of the constrained edges of the component (top, left, bottom, right) are defined as a linear equation "S + M*d", where S=scalar, M=multiplier, and d=dimension. This means that the top-left and bottom-right corners of the component are defined to be: (left + width*leftMult, top + height*topMult) (right + width*rightMult, bottom + height*bottomMult) Where (width,height) are the dimensions of the container. Although simple, this layout manager is very powerful.


Field Summary
 int bottom
           
 double bottomMult
           
 int left
           
 double leftMult
           
 int right
           
 double rightMult
           
 int top
           
 double topMult
          These values should be in the range 0..1
 
Constructor Summary
StretchLayoutConstraints()
           
 
Method Summary
 StretchLayoutConstraints duplicate()
          A publicized cloning method.
 void setMultipliers(double top, double left, double bottom, double right)
          Set all multipliers
 void setScalars(int top, int left, int bottom, int right)
          Set all scalar values
 java.lang.String toString()
          Stringify this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

top

public int top

left

public int left

bottom

public int bottom

right

public int right

topMult

public double topMult
These values should be in the range 0..1


leftMult

public double leftMult

bottomMult

public double bottomMult

rightMult

public double rightMult
Constructor Detail

StretchLayoutConstraints

public StretchLayoutConstraints()
Method Detail

duplicate

public StretchLayoutConstraints duplicate()
A publicized cloning method.

Returns:
com.objectwave.viewUtility.StretchLayoutConstraints

setMultipliers

public void setMultipliers(double top,
                           double left,
                           double bottom,
                           double right)
Set all multipliers


setScalars

public void setScalars(int top,
                       int left,
                       int bottom,
                       int right)
Set all scalar values


toString

public java.lang.String toString()
Stringify this object.

Overrides:
toString in class java.lang.Object
Returns:
java.lang.String