NextApp Echo3
v3.0.b4

nextapp.echo.app
Class DecimalExtent

java.lang.Object
  extended by nextapp.echo.app.Extent
      extended by nextapp.echo.app.DecimalExtent
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class DecimalExtent
extends Extent

A representation of an integer linear distance with units. DecimalExtent objects are immutable once constructed. This object should only be used when an extent requires a fractional (decimal) part, in all other cases the plain Extent object should be used.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class nextapp.echo.app.Extent
CM, EM, EX, IN, MM, PC, PERCENT, PT, PX
 
Constructor Summary
DecimalExtent(double decimalValue)
          Creates a new DecimalExtent with pixel units.
DecimalExtent(double decimalValue, int units)
          Creates a new DecimalExtent.
 
Method Summary
 double getDecimalValue()
          Returns the decimal value of the extent.
 int toMm()
          Returns the value of the extent in millimeters.
 int toPoint()
          Returns the value of the extent in points.
 java.lang.String toString()
          Returns a string describing the state of the Extent.
 
Methods inherited from class nextapp.echo.app.Extent
add, compareTo, equals, getUnits, getValue, isComparableTo, isEnglish, isPercentage, isPrint, isSI, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DecimalExtent

public DecimalExtent(double decimalValue)
Creates a new DecimalExtent with pixel units.

Parameters:
decimalValue - the value of the extent in pixels

DecimalExtent

public DecimalExtent(double decimalValue,
                     int units)
Creates a new DecimalExtent.

Parameters:
decimalValue - 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
Method Detail

getDecimalValue

public double getDecimalValue()
Returns the decimal value of the extent.

Returns:
the decimal value

toMm

public int toMm()
Description copied from class: Extent
Returns the value of the extent in millimeters.

Overrides:
toMm in class Extent
Returns:
the value of the extent in millimeters
See Also:
Extent.toMm()

toPoint

public int toPoint()
Description copied from class: Extent
Returns the value of the extent in points.

Overrides:
toPoint in class Extent
Returns:
the value of the extent in points
See Also:
Extent.toPoint()

toString

public java.lang.String toString()
Returns a string describing the state of the Extent. For debugging purposes only, do not rely on formatting.

Overrides:
toString in class Extent
See Also:
Object.toString()

NextApp Echo3
v3.0.b4