com.miginfocom.util.gfx.geometry
Class SizeSpec

java.lang.Object
  extended by com.miginfocom.util.gfx.geometry.SizeSpec
All Implemented Interfaces:
java.io.Serializable

public final class SizeSpec
extends java.lang.Object
implements java.io.Serializable

A class that combines a minimum, preferred and maximum size to form a specification for a size of something.

See Also:
Serialized Form

Constructor Summary
SizeSpec()
          Constructor for null-sizes
SizeSpec(AtNumber min, AtRefNumber pref, AtNumber max)
          Constructor.
SizeSpec(AtRefNumber prefSize)
          Constructor for specifying a preferred size and no max/min.
SizeSpec(int staticSize)
          Constructor for specifying an min/preferred/max size with the same size.
SizeSpec(java.lang.Integer min, java.lang.Integer pref, java.lang.Integer max)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 AtNumber getMaximumSize()
          Returns the maximum size.
 AtNumber getMinimumSize()
          Returns the minimum size.
 AtRefNumber getPreferredSize()
          Returns the preferred size.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SizeSpec

public SizeSpec()
Constructor for null-sizes


SizeSpec

public SizeSpec(int staticSize)
Constructor for specifying an min/preferred/max size with the same size. Hence it's forced.

Parameters:
staticSize - The size that is to be the forced size. Wrapped in a AtNumber.

SizeSpec

public SizeSpec(java.lang.Integer min,
                java.lang.Integer pref,
                java.lang.Integer max)
Constructor. Will create AtFixed values.

Parameters:
min - Minimum size. If null there will be no min.
pref - Preferred size. If null there will be no preferred size.
max - Maximum size. If null there will be no max.

SizeSpec

public SizeSpec(AtRefNumber prefSize)
Constructor for specifying a preferred size and no max/min.

Parameters:
prefSize - The preferred size.

SizeSpec

public SizeSpec(AtNumber min,
                AtRefNumber pref,
                AtNumber max)
Constructor.

Parameters:
min - Minimum size. May be null.
pref - Preferred size. May be null.
max - Maximum size. May be null.
Method Detail

getMinimumSize

public AtNumber getMinimumSize()
Returns the minimum size.

Returns:
The minimum size. May be null.

getPreferredSize

public AtRefNumber getPreferredSize()
Returns the preferred size.

Returns:
The preferred size. May be null.

getMaximumSize

public AtNumber getMaximumSize()
Returns the maximum size.

Returns:
The maximum size. May be null.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.