borland Packages  Class Hierarchy  internetbeans Package 

Length class

java.lang.Object
   +----com.borland.internetbeans.Length

About the Length class

Variables  Constructors  Properties  Methods  

Implements Serializable, Cloneable

Note: This package is a feature of JBuilder Professional and Enterprise.

Represents lengths in HTML, which may be absolute (pixels) or percentage. Lengths must be zero or greater. Maximum percentage is 100%.


Length variables

Variables implemented in this class

Length constructors

Length properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.lang.Object

Length methods

Methods implemented in this class

Methods implemented in java.lang.Object


Length variables

FULL

  public static final Length FULL = new Length( 100, true )
Convenience constant for 100% length.

ZERO

  public static final Length ZERO = new Length( 0, false )
Convenience constant for zero length.

Length constructors

Length(com.borland.internetbeans.Length)

  public Length(Length oldLength)
Copy constructor.

Parameters:

oldLength
Original

Length(int, boolean)

  public Length(int amount, boolean percentage)
Create a Length.

Parameters:

amount
Numeric value
percentage
Whether it is a percentage value or not

Length(java.lang.String)

  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.

Parameters:

absOrPct
String representation of length, with no extra characters or padding.

Length properties

length

 public int getLength()
The numeric portion of the length.

percentage

 public boolean isPercentage()
Whether the length represents a percentage.

Length methods

clone()

  public Object clone()

Overrides: java.lang.Object.clone()

equals(java.lang.Object)

  public boolean equals(Object obj)

Overrides: java.lang.Object.equals(java.lang.Object)

hashCode()

  public int hashCode()

Overrides: java.lang.Object.hashCode()

toString()

  public String toString()

Overrides: java.lang.Object.toString()