org.havi.ui
Class HScreenDimension

java.lang.Object
  extended by org.havi.ui.HScreenDimension

public class HScreenDimension
extends java.lang.Object

HScreenDimension denotes a screen dimension expressed as a relative value of the screen dimensions. Note that since these are relative dimensions they are effectively independent of any particular screen's physical dimensions, or aspect ratio.

Note that the extents of the dimension must be positive (including zero), but are otherwise unconstrained - and hence may denote areas greater in size than the entire screen.

Hence,

Note that in practice, particularly in the case of television, the precise dimension may vary slightly due to effects of overscan, etc.

Note that systems using HScreenDimensions directly should consider the effects of rounding errors, etc.


The parameters to the constructors are as follows, in cases where parameters are not used, then the constructor should use the default values.

Default parameter values exposed in the constructors

ParameterDescriptionDefault value Set methodGet method
width The horizontal extent of the dimension no default constructor exists setSize ---
height The vertical extent of the dimension no default constructor exists setSize ---

Default parameter values not exposed in the constructors

DescriptionDefault valueSet method Get method
None.

See Also:
HScreenPoint

Field Summary
 float height
           
 float width
           
 
Constructor Summary
HScreenDimension(float width, float height)
          Creates an HScreenDimension object.
 
Method Summary
 void setSize(float width, float height)
          Set the extents of the HScreenDimension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

width

public float width

height

public float height
Constructor Detail

HScreenDimension

public HScreenDimension(float width,
                        float height)
Creates an HScreenDimension object. See the class description for details of constructor parameters and default values.

Method Detail

setSize

public void setSize(float width,
                    float height)
Set the extents of the HScreenDimension.

Parameters:
width - the horizontal extent of the HScreenDimension
height - the vertical extent of the HScreenDimension