|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.havi.ui.HScreenConfigTemplate
org.havi.ui.HVideoConfigTemplate
public class HVideoConfigTemplate
The HVideoConfigTemplate
class is used to obtain a valid HVideoConfiguration
. An
application instantiates one of these objects and then sets all
non-default attributes as desired. The object is then passed to the
HVideoDevice.getBestConfiguration(org.havi.ui.HVideoConfigTemplate)
method found in the
HVideoDevice
class. If possible,
a valid HVideoConfiguration
is returned which meets or exceeds the requirements set in
the HVideoConfigTemplate
.
This class may be subclassed to support additional properties of video configurations which may be requested by applications.
Parameter | Description | Default value | Set method | Get method |
---|---|---|---|---|
None. |
Description | Default value | Set method | Get method |
---|---|---|---|
None. |
HScreenConfigTemplate
,
HBackgroundConfigTemplate
,
HGraphicsConfigTemplate
Field Summary | |
---|---|
static int |
GRAPHICS_MIXING
A value for use in the preference field of the setPreference
and getPreferencePriority methods in the HVideoConfigTemplate that
indicates that the device configuration supports the display of
graphics in addition to video streams. |
Fields inherited from class org.havi.ui.HScreenConfigTemplate |
---|
DISABLED, DONT_CARE, FLICKER_FILTERING, INTERLACED_DISPLAY, PIXEL_ASPECT_RATIO, PIXEL_RESOLUTION, PREFERRED, PREFERRED_NOT, REQUIRED, REQUIRED_NOT, SCREEN_ASPECT_RATIO, SCREEN_RECTANGLE, VIDEO_GRAPHICS_PIXEL_ALIGNED, ZERO_BACKGROUND_IMPACT, ZERO_GRAPHICS_IMPACT, ZERO_VIDEO_IMPACT |
Constructor Summary | |
---|---|
HVideoConfigTemplate()
Creates an HVideoConfigTemplate
object. |
Method Summary | |
---|---|
java.lang.Object |
getPreferenceObject(int preference)
Return the preference object for the specified preference. |
int |
getPreferencePriority(int preference)
Return the priority for the specified preference. |
boolean |
isConfigSupported(HVideoConfiguration hvc)
Returns a boolean indicating whether or not the specified HVideoConfiguration can
be used to create a video plane that supports the features set
in this template. |
void |
setPreference(int preference,
java.lang.Object object,
int priority)
Set the indicated preference (and associated value object) to have the specified priority. |
Methods inherited from class org.havi.ui.HScreenConfigTemplate |
---|
setPreference |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int GRAPHICS_MIXING
setPreference
and getPreferencePriority
methods in the HVideoConfigTemplate
that
indicates that the device configuration supports the display of
graphics in addition to video streams. This display includes
both configurations where the video pixels and graphics pixels
are fully aligned (same size) as well as configurations where
they are displayed together but where a more complex
relationship exists between the two pixel coordinate
spaces. The graphics configuration for mixing is specified as an
HGraphicsConfiguration
.
This preference is used by the platform as a constraint in
selecting configurations. Templates generated by the platform
and then returned to applications (e.g. from a
getConfigTemplate
method) shall not have this
preference filled in by the platform.
Constructor Detail |
---|
public HVideoConfigTemplate()
HVideoConfigTemplate
object. See the class description for
details of constructor parameters and default values.
Method Detail |
---|
public boolean isConfigSupported(HVideoConfiguration hvc)
HVideoConfiguration
can
be used to create a video plane that supports the features set
in this template.
hvc
- - the HVideoConfiguration
object to test against this template.
HVideoConfiguration
object can be used to create a video plane
that supports the features set in this template, false
otherwise.public int getPreferencePriority(int 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.
getPreferencePriority
in class HScreenConfigTemplate
preference
- the preference to be indicated. Valid values
for an HVideoConfigTemplate
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
and
GRAPHICS_MIXING
.
Subclasses may add further valid values. An
IllegalArgumentException shall be thrown if the preference is
not a valid value for this instance of HVideoConfigTemplate
public void setPreference(int preference, java.lang.Object object, int priority)
Attributes that are not filled in in a template (through setPreference(int, java.lang.Object, int)
),
shall have the priority HScreenConfigTemplate.DONT_CARE
. Any
configuration always satisfies these attributes.
An application which wishes to remove a preference from an existing template (e.g. one generated by the platform) may call this method with null for the object parameter. Specifying null as the object parameter shall have no effect if the preference is not in the template.
setPreference
in class HScreenConfigTemplate
preference
- the preference to be indicated. Valid values
for an HScreenConfigTemplate
are:
HScreenConfigTemplate.PIXEL_ASPECT_RATIO
,
HScreenConfigTemplate.PIXEL_RESOLUTION
,
HScreenConfigTemplate.SCREEN_RECTANGLE
,
HScreenConfigTemplate.VIDEO_GRAPHICS_PIXEL_ALIGNED
and GRAPHICS_MIXING
.
Subclasses may add further valid values. An
IllegalArgumentException shall be thrown if the preference is
not a valid value for this instance of HVideoConfigTemplate
object
- the Object associated with the given preference,
or null
.priority
- the priority of the preference. Valid values include:
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.
public java.lang.Object getPreferenceObject(int preference)
Instances of HVideoConfigTemplate
which have not had this preference set
shall return null for this object. Note that instances
constructed by the platform and returned to applications are
required to have all preferences (except where explicitly
identified) set by the platform before it is returned.
getPreferenceObject
in class HScreenConfigTemplate
preference
- the preference to be indicated. Valid values
for an HVideoConfigTemplate are:
HScreenConfigTemplate.VIDEO_GRAPHICS_PIXEL_ALIGNED
,
HScreenConfigTemplate.PIXEL_ASPECT_RATIO
,
HScreenConfigTemplate.PIXEL_RESOLUTION
,
HScreenConfigTemplate.SCREEN_RECTANGLE
,
and
GRAPHICS_MIXING
.
Subclasses may add further valid values. A
IllegalArgumentException shall be thrown if the preference is
not a valid value for this instance of HVideoConfigTemplate
, or
if preference
does not have an associated value object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |