borland Packages Class Hierarchy internetbeans Package
java.lang.Object +----com.borland.internetbeans.Length
Variables Constructors Properties Methods
Implements Serializable, Cloneable
Represents lengths in HTML, which may be absolute (pixels) or percentage. Lengths must be zero or greater. Maximum percentage is 100%.
public static final Length FULL = new Length( 100, true )Convenience constant for 100% length.
public static final Length ZERO = new Length( 0, false )Convenience constant for zero length.
public Length(Length oldLength)Copy constructor.
oldLength
public Length(int amount, boolean percentage)Create a
Length
.
amount
percentage
public Length(String absOrPct)Creates a
Length
object from a string. If the string ends with the percent symbol, it is considered a percentage. If the number is invalid, it is considered zero.
absOrPct
public int getLength()The numeric portion of the length.
public boolean isPercentage()Whether the length represents a percentage.
public Object clone()
public boolean equals(Object obj)
public int hashCode()
public String toString()