echopointng
Class ExtentEx

java.lang.Object
  extended by nextapp.echo2.app.Extent
      extended by echopointng.ExtentEx
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class ExtentEx
extends Extent

ExtentEx is a version of Extent that allows more convinence methods and construction

See Also:
Serialized Form

Field Summary
 
Fields inherited from class nextapp.echo2.app.Extent
CM, EM, EX, IN, MM, PC, PERCENT, PT, PX
 
Constructor Summary
ExtentEx(int value)
          Creates a new ExtentEx with pixel units.
ExtentEx(int value, int units)
          Creates a new ExtentEx.
ExtentEx(java.lang.String extentStr)
          Creates a new ExtentEx using a string parameter that is converted into value and units, in the form : [integer][unit] where [unit] is one of [px | % | pt | cm | mm | in | em | ex | pc] and no spaces are allowed betwwen the integer value and the unit.
 
Method Summary
 
Methods inherited from class nextapp.echo2.app.Extent
add, compareTo, equals, getUnits, getValue, isComparableTo, isEnglish, isPercentage, isPrint, isSI, toMm, toPoint, toString, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExtentEx

public ExtentEx(java.lang.String extentStr)
Creates a new ExtentEx using a string parameter that is converted into value and units, in the form :
  [integer][unit] 
where [unit] is one of
[px | % | pt | cm | mm | in | em | ex | pc]
and no spaces are allowed betwwen the integer value and the unit.

For example '5em', '12pt', '50%' or '22cm'.

The ExtentKit is used under the covers and an IllegalArgumentException is thrown if the string cant be converted.

Parameters:
extentStr - the extent string specifying the extent values and units
Throws:
java.lang.IllegalArgumentException - - if the extent string cannot be converted
See Also:
ExtentKit.makeExtent(String)

ExtentEx

public ExtentEx(int value)
Creates a new ExtentEx with pixel units.

Parameters:
value - the value of the extent in pixels

ExtentEx

public ExtentEx(int value,
                int units)
Creates a new ExtentEx.

Parameters:
value - the value of the extent
units - the units of the value, one of the following constants:
  • PC: Pixels
  • PERCENT: Percent (of size of containing component)
  • PT: Points
  • CM: Centimeters
  • MM: Millimeters
  • IN: Inches
  • EM: Ems (height of 'M' character)
  • EX: Exs (height of 'x' character)
  • PC: Picas