All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.havi.ui.HScreenRectangle Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version
package org.havi.ui;

/*
 * Copyright 2000-2003 by HAVi, Inc. Java is a trademark of Sun
 * Microsystems, Inc. All rights reserved.  
 */

/**
   {@link org.havi.ui.HScreenRectangle HScreenRectangle} denotes a
   screen area 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 x and y offset coordinates of the top, left corner of the area are not constrained - they may be negative, or have values greater than one - and hence, may denote an offset location that is not "on-screen". The width and height of the area should be positive (including zero), but are otherwise unconstrained - and hence may denote areas greater in size than the entire screen.

Hence,

  • (0.0, 0.0, 1.0, 1.0) denotes the whole of the screen.
  • (0.0, 0.0, 0.5, 0.5) denotes the top, left hand quarter of the screen.
  • (0.5, 0.0, 0.5, 0.5) denotes the top, right hand quarter of the screen.
  • (0.25, 0.25, 0.5, 0.5) denotes a centered quarter-screen area of the screen.
  • (0.0, 0.5, 0.5, 0.5) denotes the bottom, left hand quarter of the screen.
  • (0.5, 0.5, 0.5, 0.5) denotes the bottom, right hand quarter 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.

Note that systems using {@link org.havi.ui.HScreenRectangle HScreenRectangles} 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
x The horizontal position of the top left corner no default constructor exists {@link org.havi.ui.HScreenRectangle#setLocation setLocation} ---
y The vertical position of the top left corner no default constructor exists {@link org.havi.ui.HScreenRectangle#setLocation setLocation} ---
width The width of the rectangle no default constructor exists {@link org.havi.ui.HScreenRectangle#setSize setSize} ---
height The height of the rectangle no default constructor exists {@link org.havi.ui.HScreenRectangle#setSize setSize} ---

Default parameter values not exposed in the constructors

DescriptionDefault valueSet method Get method
None.
@see HScreenPoint */ public class HScreenRectangle extends Object { public float x; public float y; public float width; public float height; /** * Creates an {@link org.havi.ui.HScreenRectangle * HScreenRectangle} object. See the class description for * details of constructor parameters and default values. */ public HScreenRectangle(float x, float y, float width, float height) { } /** * Set the location of the top left corner of the * HScreenRectangle. * * @param x the horizontal position of the top left corner * @param y the vertical position of the top left corner */ public void setLocation(float x, float y) { } /** * Set the size of the HScreenRectangle. * * @param width the width of the HScreenRectangle * @param height the height of the HScreenRectangle */ public void setSize(float width, float height) { } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy