HBackgroundConfiguration

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 HBackgroundConfiguration

    java.lang.Object
      org.havi.ui.HScreenConfiguration
          org.havi.ui.HBackgroundConfiguration

Direct Known Subclasses:
  HStillImageBackgroundConfiguration

    public class HBackgroundConfiguration

extends HScreenConfiguration

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

The basic background configuration supports backgrounds of a single color. More sophisticated backgrounds can be supported by defining new classes inheriting from this class. Where a device has a single non- changeable background color, this class will provide applications the ability to read that color however all attempts to reserve control of the background will fail.

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
--- | --- | --- | --- | ---
None.

### Default parameter values not exposed in the constructors

Description | Default value | Set method | Get method
--- | --- | --- | ---
None.

See Also:
  `HBackgroundDevice`

Method Summary
`Color` | `getColor()` Obtain the current color of this background.
`HBackgroundConfigTemplate` | `getConfigTemplate()` Returns an `HBackgroundConfigTemplate` object that describes and uniquely identifies this `HBackgroundConfiguration`.
`HBackgroundDevice` | `getDevice()` Returns the `HBackgroundDevice` associated with this `HBackgroundConfiguration`.
`void` | `setColor(Color color)` Set the current color of this background.

Methods inherited from class org.havi.ui.HScreenConfiguration
`convertTo, getFlickerFilter, getInterlaced, getOffset, getPixelAspectRatio, getPixelResolution, getScreenArea`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getDevice

    public HBackgroundDevice getDevice()

  Returns the `HBackgroundDevice` associated with this `HBackgroundConfiguration`.

  Returns:
    the `HBackgroundDevice` object that is associated with this `HBackgroundConfiguration`.

### getConfigTemplate

    public HBackgroundConfigTemplate getConfigTemplate()

  Returns an `HBackgroundConfigTemplate` object that describes and uniquely identifies this `HBackgroundConfiguration`. Hence, the following sequence should return the original `HBackgroundConfiguration`

       HBackgroundDevice.getBestMatch(HBackgroundConfiguration.getConfigTemplate())

  Features that are implemented in the `HBackgroundConfiguration` will return `HScreenConfigTemplate.REQUIRED` priority. Features that are not implemented in the `HBackgroundConfiguration` will return `HScreenConfigTemplate.REQUIRED_NOT` priority. Preferences that are not filled in by the platform will return `HScreenConfigTemplate.DONT_CARE` priority.

  Returns:
    an `HBackgroundConfigTemplate` object which both describes and uniquely identifies this `HBackgroundConfiguration`.

### getColor

    public Color getColor()

  Obtain the current color of this background. This method may be called without ownership of the resource. The value returned is not guaranteed to be the value set in the last call to `setColor(java.awt.Color)` since platforms may offer a reduced color space for backgrounds and the actual value used will be returned.

  Returns:
    the current Color

### setColor

    public void setColor(Color color)
                  throws HPermissionDeniedException,
                         HConfigurationException

  Set the current color of this background. On platforms where there is a sub-class of java.awt.Color supporting transparency of any kind, passing an object representing a non-opaque color is illegal. Platforms with a limited color resolution for backgrounds may approximate this value to the nearest available. The `getColor()` method will return the actual value used.

  Parameters:
    `color` - the color to be used for the background
  Throws:
    `HPermissionDeniedException` - if the application has not currently reserved the HBackgroundDevice associated with this configuration or this configuration is not the current configuration of that HBackgroundDevice.
    `HConfigurationException` - if the color specified is illegal for this platform.

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

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