Percentage Class Reference

Inheritance diagram for Percentage:

Units List of all members.

Public Member Functions

 Percentage (double percentage, Units maxValue)
 Represents a percentage value of a maximum.
Units getActualValue ()
Units getMaximumValue ()
String toString ()

Static Public Attributes

static final Units ONE = new Percentage(100, new Inches(8.5))
 "Identity Element", representing one hundred percent of 8.5 inches.

Protected Member Functions

Override double getNumberOfUnitsInOneInch ()

Detailed Description

A percentage of a maximum value. If the maximum value is set to 8.5 inches, 50% will give us an equivalent of 4.25 inches.

This software is distributed under the BSD License.

Ron B Yeh (ronyeh(AT)

Definition at line 15 of file

Constructor & Destructor Documentation

Percentage ( double  percentage,
Units  maxValue 

Represents a percentage value of a maximum.

Sometimes, it's easier to express a location of x,y=50%,50% on a sheet, especially if the sheet is later resized.


Definition at line 40 of file

References Units.getUnitsObjectOfSameTypeWithValue(), and Units.getValue().

Member Function Documentation

Units getActualValue (  ) 


Definition at line 50 of file

Units getMaximumValue (  ) 


Definition at line 57 of file

Override double getNumberOfUnitsInOneInch (  )  [protected, virtual]

See also:

Implements Units.

Definition at line 65 of file

References Units.getNumberOfUnitsInOneInch(), and Units.getValue().

String toString (  ) 

See also:

Reimplemented from Units.

Definition at line 79 of file

References Units.getValue().

Member Data Documentation

final Units ONE = new Percentage(100, new Inches(8.5)) [static]

"Identity Element", representing one hundred percent of 8.5 inches.

Width of a US Letter-sized sheet.

Definition at line 21 of file

The documentation for this class was generated from the following file:
Generated on Sat Apr 14 18:21:45 2007 for R3 Paper Toolkit by  doxygen 1.4.7