org.havi.ui
Class HScreenPoint

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

public class HScreenPoint
extends java.lang.Object

HScreenPoint denotes a screen location 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.

The x coordinate is in terms of the ratio of the particular horizontal screen location to the entire screen width.

The y coordinate is in terms of the ratio of the particular vertical screen location to the entire screen width.

All measurements should be taken from the top, left corner of the screen, measuring positive dimensions down and to the right.

Note that x and y coordinates are not constrained - they may be negative, or have values greater than one - and hence, may denote locations that are not "on- screen".

Hence,

Note that in practice, particularly in the case of television, the precise location may vary slightly due to effects of overscan, 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
x The horizontal position of the point no default constructor exists setLocation ---
y The vertical position of the point no default constructor exists setLocation ---

Default parameter values not exposed in the constructors

DescriptionDefault valueSet method Get method
None.

See Also:
HScreenRectangle

Field Summary
 float x
           
 float y
           
 
Constructor Summary
HScreenPoint(float x, float y)
          Creates an HScreenPoint object.
 
Method Summary
 void setLocation(float x, float y)
          Set the location of the HScreenPoint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

public float x

y

public float y
Constructor Detail

HScreenPoint

public HScreenPoint(float x,
                    float y)
Creates an HScreenPoint object. See the class description for details of constructor parameters and default values.

Method Detail

setLocation

public void setLocation(float x,
                        float y)
Set the location of the HScreenPoint.

Parameters:
x - the horizontal position of the point
y - the vertical position of the point