public class HScreen extends Object
Since an HScreen represents a single video output signal from a device, all the devices which contribute to that signal must have certain properties in common. It is not possible to select conflicting configurations for different devices on the same HScreen - for example having a video device whose logical output has a 4:3 picture aspect ratio and a graphics device whose logical output has a 16:9 picture aspect ratio. This specification intentionally does not define configurations, or which configurations would be conflicting, since these are essentially region or market dependent.
| Parameter | Description | Default value | Set method | Get method |
|---|---|---|---|---|
| None. | ||||
| Description | Default value | Set method | Get method |
|---|---|---|---|
| None. | |||
| Modifier and Type | Method and Description |
|---|---|
HBackgroundConfiguration |
getBestConfiguration(HBackgroundConfigTemplate[] hbcta)
Returns an
HBackgroundConfiguration from an HBackgroundDevice which is present on this HScreen that best matches at least one of
the specified HBackgroundConfigTemplates, or null if this is not possible. |
HGraphicsConfiguration |
getBestConfiguration(HGraphicsConfigTemplate[] hgcta)
Returns an
HGraphicsConfiguration from an HGraphicsDevice which is present on this HScreen that best matches at least one of
the specified HGraphicsConfigTemplates. |
HVideoConfiguration |
getBestConfiguration(HVideoConfigTemplate[] hvcta)
Returns an
HVideoConfiguration from an HVideoDevice which is present on this HScreen that best matches at least one of
the specified HVideoConfigTemplates. |
HScreenConfiguration[] |
getCoherentScreenConfigurations(HScreenConfigTemplate[] hscta)
Return a coherent set of
HScreenConfigurations
matching a set of templates. |
HBackgroundDevice |
getDefaultHBackgroundDevice()
Return the default background device for this screen.
|
HGraphicsDevice |
getDefaultHGraphicsDevice()
Return the default graphics device for this screen.
|
static HScreen |
getDefaultHScreen()
Returns the default
HScreen for
this application. |
HVideoDevice |
getDefaultHVideoDevice()
Return the default video device for this screen.
|
HBackgroundDevice[] |
getHBackgroundDevices()
Returns a list of background devices for this screen.
|
HGraphicsDevice[] |
getHGraphicsDevices()
Returns a list of graphics devices for this screen.
|
static HScreen[] |
getHScreens()
Returns all
HScreens in this
system. |
HVideoDevice[] |
getHVideoDevices()
Returns a list of video device for this screen.
|
boolean |
setCoherentScreenConfigurations(HScreenConfiguration[] hsca)
Modify the settings for a set of
HScreenDevices, based on their HScreenConfigurations supplied. |
public static HScreen getDefaultHScreen()
HScreen for
this application. For systems where an application is
associated with audio or video which is started before the
application starts, this method will return the HScreen where that associated audio /
video is being output.HScreen for
this application.public HVideoDevice[] getHVideoDevices()
HVideoDevice objects or null if none exist.public HVideoDevice getDefaultHVideoDevice()
HVideoDevice is the default
device for rendering video, but it may not be capable of
displaying graphics / mixing it with graphics concurrently.HVideoDevice object
or null if none exist.public HVideoConfiguration getBestConfiguration(HVideoConfigTemplate[] hvcta)
HVideoConfiguration from an HVideoDevice which is present on this HScreen that best matches at least one of
the specified HVideoConfigTemplates.
If this is not possible, null is returned.
Equally best in this sense means that the configurations
satisfy an equal number of preferences with priorities PREFERRED and
PREFERRED_NOT and all preferences with priorities REQUIRED and REQUIRED_NOT.
If there are such equally best configurations, the one which is
returned by this method is an implementation dependent
selection from among those which are equally best.
Configurations are chosen according to the following algorithm,
based on the priority as supplied to setPreference. Configurations must:
REQUIRED
REQUIRED_NOT
PREFERRED.
PREFERRED_NOT.
DONT_CARE are ignored.
This method returns null if no configuration
exists that satisfies all REQUIRED and REQUIRED_NOT
priorities.
hvcta - - the array of HVideoConfigTemplate
objects to choose from.HVideoConfiguration object that is the best matching configuration
possible, or null if no HVideoConfiguration
object passes the criteria.public HGraphicsDevice[] getHGraphicsDevices()
HGraphicsDevices or null if none exist.public HGraphicsDevice getDefaultHGraphicsDevice()
HGraphicsDevice is the
default device for rendering graphics, but it may not be
capable of displaying video / mixing it with graphics
concurrently.public HGraphicsConfiguration getBestConfiguration(HGraphicsConfigTemplate[] hgcta)
HGraphicsConfiguration from an HGraphicsDevice which is present on this HScreen that best matches at least one of
the specified HGraphicsConfigTemplates. If this is not possible this method
will attempt to construct an HEmulatedGraphicsConfiguration where the emulated
configuration best matches one of the specified HGraphicsConfigTemplates.
If this is not possible, null is returned.
Equally best in this sense means that the configurations
satisfy an equal number of preferences with priorities PREFERRED and
PREFERRED_NOT and all preferences with priorities REQUIRED and REQUIRED_NOT.
If there are such equally best configurations, the one which is
returned by this method is an implementation dependent
selection from among those which are equally best.
Configurations are chosen according to the following algorithm,
based on the priority as supplied to setPreference. Configurations must:
REQUIRED
REQUIRED_NOT
PREFERRED.
PREFERRED_NOT.
DONT_CARE are ignored.
This method returns null if no configuration
exists that satisfies all REQUIRED and REQUIRED_NOT
priorities.
hgcta - - the array of HGraphicsConfigTemplate
objects to choose from.HGraphicsConfiguration object that is the best matching configuration
possible, or null if no HGraphicsConfiguration or
HEmulatedGraphicsConfiguration object passes the criteria.public HBackgroundDevice[] getHBackgroundDevices()
HBackgroundDevices or null if none exist.public HBackgroundDevice getDefaultHBackgroundDevice()
public HBackgroundConfiguration getBestConfiguration(HBackgroundConfigTemplate[] hbcta)
HBackgroundConfiguration from an HBackgroundDevice which is present on this HScreen that best matches at least one of
the specified HBackgroundConfigTemplates, or null if this is not possible.
Equally best in this sense means that the configurations
satisfy an equal number of preferences with priorities PREFERRED and
PREFERRED_NOT and all preferences with priorities REQUIRED and REQUIRED_NOT.
If there are such equally best configurations, the one which is
returned by this method is an implementation dependent
selection from among those which are equally best.
Configurations are chosen according to the following algorithm,
based on the priority as supplied to setPreference. Configurations must:
REQUIRED
REQUIRED_NOT
PREFERRED.
PREFERRED_NOT.
DONT_CARE are ignored.
This method returns null if no configuration
exists that satisfies all REQUIRED and REQUIRED_NOT
priorities.
hbcta - the array of HBackgroundConfiguration objects to choose from, represented as an
array of HBackgroundConfiguration objects.HBackgroundConfiguration object that is the best matching
configuration possible, or null if no HBackgroundConfiguration
passes the criteria.public HScreenConfiguration[] getCoherentScreenConfigurations(HScreenConfigTemplate[] hscta)
HScreenConfigurations
matching a set of templates. One HScreenConfiguration will be
returned for each HScreenConfigTemplate provided as input. The class of the
returned objects will correspond to the class of the templates
provided as input - where an HGraphicsConfigTemplate is
provided as input, an HGraphicsConfiguration shall be returned. Where an HVideoConfigTemplate is
provided as input, an HVideoConfiguration shall be returned. If more than one
template of the same type is provided then the configurations
returned must be on different devices but presented on the same
screen. If more templates of one type are provided than there
are devices of that type in the system, this function will
return null.
Coherent means that all the required properties are respected in all of the templates provided and that a configuration can be returned for each template provided.
Conflicts between templates are resolved as discussed in the
description of HScreenConfigTemplate.
hscta - an array of objects describing desired / required
configurations. If a zero-length array is passed this
function will throw a java.lang.IllegalArgumentException.public boolean setCoherentScreenConfigurations(HScreenConfiguration[] hsca) throws SecurityException, HPermissionDeniedException, HConfigurationException
HScreenDevices, based on their HScreenConfigurations supplied. Settings should be modified
atomically (where possible) or should not be modified if the
HScreenConfigurations can be
determined to be conflicting a priori, i.e. are not "coherent",
or would cause an exception to be thrown.hsca - the array of configurations that should be applied
atomically (where possible). If the length of this array is
zero a java.lang.IllegalArgumentException will be thrown.HScreenConfigurations could be applied
successfully. If all of the HScreenConfigurations could not be applied successfully, the
configuration after this method may not match the configuration
of the devices prior to this method being called ---
applications should take steps to determine whether a partial
change of settings has been made on each device.SecurityException - if the application does
not have sufficient rights to set the HScreenConfiguration for any of the
devices.HPermissionDeniedException - if the
application does not currently have the right to set the
configuration for any of the devices.HConfigurationException - if the
specified HScreenConfiguration[]
array is not valid for any of the devices.Copyright © 2012 code4tv.com. All Rights Reserved.