HBackgroundConfigTemplate

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 HBackgroundConfigTemplate

    java.lang.Object
      org.havi.ui.HScreenConfigTemplate
          org.havi.ui.HBackgroundConfigTemplate

    public class HBackgroundConfigTemplate

extends HScreenConfigTemplate

The `HBackgroundConfigTemplate` class is used to obtain a valid `HBackgroundConfiguration`. An application instantiates one of these objects and then sets all non-default attributes as desired. The `HBackgroundDevice.getBestConfiguration(org.havi.ui.HBackgroundConfigTemplate)` method found in the `HBackgroundDevice` class is then called with this `HBackgroundConfigTemplate` . A valid `HBackgroundConfiguration` is returned that meets or exceeds what was requested in the `HBackgroundConfigTemplate`.

This class may be subclassed to support additional properties of background configurations which may be requested by applications.

The `HScreenConfigTemplate.ZERO_VIDEO_IMPACT` property may be used in instances of this class to discover whether displaying background stills will have any impact on already running video. Implementations supporting the `STILL_IMAGE` preference shall return an `HStillImageBackgroundConfiguration` when requested except as described below.

- If displaying an `STILL_IMAGE` interrupts video transiently while the image is decoded then a configuration shall not be returned if the `HScreenConfigTemplate.ZERO_VIDEO_IMPACT` property is present with the priority `HScreenConfigTemplate.REQUIRED`.
- If displaying an `STILL_IMAGE` interrupts video while the image is decoded and for the entire period while the image is displayed then a configuration shall not be returned if the `HScreenConfigTemplate.ZERO_VIDEO_IMPACT` property is present with either the priorities `HScreenConfigTemplate.REQUIRED` or `HScreenConfigTemplate.PREFERRED`.

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:
  `HScreenConfigTemplate`, `HGraphicsConfigTemplate`, `HVideoConfigTemplate`

Field Summary
`static int` | `CHANGEABLE_SINGLE_COLOR` A value for use in the preference field of the `setPreference` and `getPreferencePriority` methods in the `HBackgroundConfigTemplate` that indicates that a single color background is requested where that single color can be changed by applications.
`static int` | `STILL_IMAGE` A value for use in the preference field of the `setPreference` and `getPreferencePriority` methods in the `HBackgroundConfigTemplate` that indicates that a background which can support still images is requested.

Fields inherited from class org.havi.ui.HScreenConfigTemplate
`DONT_CARE, FLICKER_FILTERING, INTERLACED_DISPLAY, PIXEL_ASPECT_RATIO, PIXEL_RESOLUTION, PREFERRED, PREFERRED_NOT, REQUIRED, REQUIRED_NOT, SCREEN_RECTANGLE, VIDEO_GRAPHICS_PIXEL_ALIGNED, ZERO_BACKGROUND_IMPACT, ZERO_GRAPHICS_IMPACT, ZERO_VIDEO_IMPACT`

Constructor Summary
`HBackgroundConfigTemplate()` Creates an `HBackgroundConfigTemplate` object.

Method Summary
`int` | `getPreferencePriority(int preference)` Return the priority for the specified preference.
`boolean` | `isConfigSupported(HBackgroundConfiguration hbc)` Returns a boolean indicating whether or not the specified `HBackgroundConfiguration` can be used to create a background plane that supports the features set in this template.
`void` | `setPreference(int preference, int priority)` Set the indicated preference to have the specified priority.

Methods inherited from class org.havi.ui.HScreenConfigTemplate
`getPreferenceObject, setPreference`

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

Field Detail

### CHANGEABLE_SINGLE_COLOR

    public static final int CHANGEABLE_SINGLE_COLOR

  A value for use in the preference field of the `setPreference` and `getPreferencePriority` methods in the `HBackgroundConfigTemplate` that indicates that a single color background is requested where that single color can be changed by applications.

  See Also:
    Constant Field Values

### STILL_IMAGE

    public static final int STILL_IMAGE

  A value for use in the preference field of the `setPreference` and `getPreferencePriority` methods in the `HBackgroundConfigTemplate` that indicates that a background which can support still images is requested. Where backgrounds supporting this feature are returned, they are returned as objects of the `HStillImageBackgroundConfiguration` class.

  See Also:
    Constant Field Values

Constructor Detail

### HBackgroundConfigTemplate

    public HBackgroundConfigTemplate()

  Creates an `HBackgroundConfigTemplate` object. See the class description for details of constructor parameters and default values.

Method Detail

### isConfigSupported

    public boolean isConfigSupported(HBackgroundConfiguration hbc)

  Returns a boolean indicating whether or not the specified `HBackgroundConfiguration` can be used to create a background plane that supports the features set in this template.

  Parameters:
    `hbc` - - the `HBackgroundConfiguration` object to test against this template.
  Returns:
    true if this `HBackgroundConfiguration` object can be used to create a background plane that supports the features set in this template, false otherwise.

### setPreference

    public void setPreference(int preference,
                              int priority)

  Set the indicated preference to have the specified priority. If the preference has been previously set, then the previous priority for the preference shall be overwritten.

  Attributes that are not filled in in a template (through `HScreenConfigTemplate.setPreference(int, int)`), shall have the priority `HScreenConfigTemplate.DONT_CARE`. Any configuration always satisfies these attributes.

  Overrides:
    `setPreference` in class `HScreenConfigTemplate`
  Parameters:
    `preference` - the preference to be indicated. Valid values for an `HBackgroundConfigTemplate` are: `HScreenConfigTemplate.ZERO_BACKGROUND_IMPACT`, `HScreenConfigTemplate.ZERO_GRAPHICS_IMPACT`, `HScreenConfigTemplate.ZERO_VIDEO_IMPACT`, `HScreenConfigTemplate.INTERLACED_DISPLAY`, `HScreenConfigTemplate.FLICKER_FILTERING`, `HScreenConfigTemplate.VIDEO_GRAPHICS_PIXEL_ALIGNED`, `CHANGEABLE_SINGLE_COLOR` and `STILL_IMAGE`.

    Subclasses may add further valid values. An IllegalArgumentException shall be thrown if the preference is not a valid value for this instance of `HBackgroundConfigTemplate`

    `priority` - the priority of the preference. Valid values are: `HScreenConfigTemplate.REQUIRED`, `HScreenConfigTemplate.PREFERRED`, `HScreenConfigTemplate.DONT_CARE`, `HScreenConfigTemplate.PREFERRED_NOT` and `HScreenConfigTemplate.REQUIRED_NOT`.

    If `priority` is not a valid priority as defined here a java.lang.IllegalArgumentException will be thrown.

### getPreferencePriority

    public int getPreferencePriority(int preference)

  Return the priority for the specified preference.

  By default the preferences in a template returned from the system will have a `HScreenConfigTemplate.DONT_CARE` priority unless specified otherwise. Any configuration always satisfies these attributes.

  Overrides:
    `getPreferencePriority` in class `HScreenConfigTemplate`
  Parameters:
    `preference` - the preference to be indicated. Valid values for an `HBackgroundConfigTemplate` are: `HScreenConfigTemplate.ZERO_BACKGROUND_IMPACT`, `HScreenConfigTemplate.ZERO_GRAPHICS_IMPACT`, `HScreenConfigTemplate.ZERO_VIDEO_IMPACT`, `HScreenConfigTemplate.INTERLACED_DISPLAY`, `HScreenConfigTemplate.FLICKER_FILTERING`, `HScreenConfigTemplate.VIDEO_GRAPHICS_PIXEL_ALIGNED`, `HScreenConfigTemplate.PIXEL_ASPECT_RATIO`, `HScreenConfigTemplate.PIXEL_RESOLUTION`, `HScreenConfigTemplate.SCREEN_RECTANGLE`, `CHANGEABLE_SINGLE_COLOR` and `STILL_IMAGE`.

    Subclasses may add further valid values. An IllegalArgumentException shall be thrown if the preference is not a valid value for this instance of `HBackgroundConfigTemplate`

  Returns:
    the priority for the specified preference.

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

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