HScreenPoint

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.havi.ui
Class HScreenPoint

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

    public class HScreenPoint

extends 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,

- (0.0, 0.0) denotes the top, left hand corner of the screen.
- (1.0, 0.0) denotes the top, right hand corner of the screen.
- (0.5, 0.5) denotes the center (middle) of the screen.
- (0.0, 1.0) denotes the bottom, left hand corner of the screen.
- (1.0, 1.0) denotes the bottom, right hand corner of the screen.

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

Parameter | Description | Default value | Set method | Get 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

Description | Default value | Set 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
`equals, 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD