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.

Author:
Ron B Yeh (ronyeh(AT)cs.stanford.edu)

Definition at line 15 of file Percentage.java.


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.

Parameters:
percentage 
maxValue 

Definition at line 40 of file Percentage.java.

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


Member Function Documentation

Units getActualValue (  ) 

Returns:

Definition at line 50 of file Percentage.java.

Units getMaximumValue (  ) 

Returns:

Definition at line 57 of file Percentage.java.

Override double getNumberOfUnitsInOneInch (  )  [protected, virtual]

See also:
edu.stanford.hci.r3.units.Units.getNumberOfUnitsInOneInch()

Implements Units.

Definition at line 65 of file Percentage.java.

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

String toString (  ) 

See also:
edu.stanford.hci.r3.units.Units.toString()

Reimplemented from Units.

Definition at line 79 of file Percentage.java.

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 Percentage.java.


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