org.havi.ui
Class HScreenConfiguration

java.lang.Object
  extended by org.havi.ui.HScreenConfiguration
Direct Known Subclasses:
HBackgroundConfiguration, HGraphicsConfiguration, HVideoConfiguration

public abstract class HScreenConfiguration
extends java.lang.Object

The HScreenConfiguration class describes the characteristics (settings) of an HScreenDevice. There can be many HScreenConfiguration objects associated with a single HScreenDevice.

See Also:
HScreenDevice

Method Summary
 java.awt.Point convertTo(HScreenConfiguration destination, java.awt.Point source)
          Convert a pixel position from one coordinate system to another without including any rounding errors from passing through normalized coordinates.
 boolean getFlickerFilter()
          Return whether this configuration includes filtering to reduce interlace flicker.
 boolean getInterlaced()
          Return whether this configuration is interlaced
 java.awt.Dimension getOffset(HScreenConfiguration hsc)
          Returns the offset between the origin of the pixel coordinate space of the specified HScreenConfiguration, and the origin of the current pixel coordinate space of this HScreenConfiguration.
 java.awt.Dimension getPixelAspectRatio()
          Return the pixel aspect ratio of this configuration.
 java.awt.Dimension getPixelResolution()
          Return the resolution of this configuration in pixels.
 HScreenRectangle getScreenArea()
          Return the position and size of this configuration on the screen in screen coordinates.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

convertTo

public java.awt.Point convertTo(HScreenConfiguration destination,
                                java.awt.Point source)
Convert a pixel position from one coordinate system to another without including any rounding errors from passing through normalized coordinates. This returns null if this transformation isn't possible for various reasons. These reasons are:

The source position is interpreted in the coordinate system of the HScreenConfiguration object on which this method is called.

Parameters:
destination - the destination HScreenConfiguration.
source - the pixel position in this HScreenConfiguration.
Returns:
the position of the specified pixel position measured in the destination coordinate system, or null if this isn't possible.

getFlickerFilter

public boolean getFlickerFilter()
Return whether this configuration includes filtering to reduce interlace flicker.

Returns:
true if filtering is included, false otherwise.

getInterlaced

public boolean getInterlaced()
Return whether this configuration is interlaced

Returns:
true if this configuration is interlaced, false otherwise.

getPixelAspectRatio

public java.awt.Dimension getPixelAspectRatio()
Return the pixel aspect ratio of this configuration. Some examples are {16:15}, {64:45}, {1:1}.

Returns:
the aspect ratio of the pixels in this configuration.

getPixelResolution

public java.awt.Dimension getPixelResolution()
Return the resolution of this configuration in pixels. The pixel coordinate system used is that of the device concerned.

Returns:
the resolution of this configuration in pixels.

getScreenArea

public HScreenRectangle getScreenArea()
Return the position and size of this configuration on the screen in screen coordinates.

Returns:
the area on the screen of this configuration in screen coordinates.

getOffset

public java.awt.Dimension getOffset(HScreenConfiguration hsc)
Returns the offset between the origin of the pixel coordinate space of the specified HScreenConfiguration, and the origin of the current pixel coordinate space of this HScreenConfiguration. The offset is returned in the pixel coordinate space of this HScreenConfiguration.

Parameters:
hsc - the HScreenConfiguration to which the offset between pixel origins should be recovered.
Returns:
the offset between the pixel coordinate space of the specified HScreenConfiguration and the current pixel coordinate space of this HScreenConfiguration. A null object will be returned if there is insufficient information to recover the pixel offset.