|
||||||||||
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.HGraphicsConfigTemplate
The HGraphicsConfigTemplate class is used to obtain a valid HGraphicsConfiguration
. An
application instantiates one of these objects and then sets all
non-default attributes as desired. The HGraphicsDevice.getBestConfiguration(org.havi.ui.HGraphicsConfigTemplate)
method found in the
HGraphicsDevice
class is then
called with this HGraphicsConfigTemplate
. A valid HGraphicsConfiguration
is
returned that meets or exceeds what was requested in the HGraphicsConfigTemplate
.
This class may be subclassed to support additional properties of graphics 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
,
HVideoConfigTemplate
Field Summary | |
static int |
IMAGE_SCALING_SUPPORT
A value for use in the preference field of the setPreference
and getPreferencePriority methods in the HGraphicsConfigTemplate
that indicates that the graphics configuration should or shall
support rapid (hardware) image scaling. |
static int |
MATTE_SUPPORT
A value for use in the preference field of the setPreference
and getPreferencePriority methods in the HGraphicsConfigTemplate
that indicates that the graphics configuration should or shall
support the HAVi mattes feature. |
static int |
VIDEO_MIXING
A value for use in the preference field of the setPreference
and getPreferencePriority methods in the HGraphicsConfigTemplate
that indicates that the graphics configuration should or shall
support transparency in the graphics system such that the
output of a video decoder is visible. |
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 | |
HGraphicsConfigTemplate()
Creates an HGraphicsConfigTemplate
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(HGraphicsConfiguration hgc)
Returns a boolean indicating whether or not the specified HGraphicsConfiguration can
be used to create a graphics plane that supports the features set
in this template. |
void |
setPreference(int preference,
int priority)
Set the indicated preference to have the specified priority. |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int VIDEO_MIXING
setPreference
and getPreferencePriority
methods in the HGraphicsConfigTemplate
that indicates that the graphics configuration should or shall
support transparency in the graphics system such that the
output of a video decoder is visible. This includes the
following configurations :-
Applications may specify a particular video configuration with
which mixing must be supported. In this case, the video
configuration is specified as an HVideoConfiguration
object. If
no specific video configuration is required then it is not
required to specify such a configuration and null can be used.
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.
public static final int MATTE_SUPPORT
setPreference
and getPreferencePriority
methods in the HGraphicsConfigTemplate
that indicates that the graphics configuration should or shall
support the HAVi mattes feature.
public static final int IMAGE_SCALING_SUPPORT
setPreference
and getPreferencePriority
methods in the HGraphicsConfigTemplate
that indicates that the graphics configuration should or shall
support rapid (hardware) image scaling.
Constructor Detail |
public HGraphicsConfigTemplate()
HGraphicsConfigTemplate
object. See the class description for
details of constructor parameters and default values.
Method Detail |
public boolean isConfigSupported(HGraphicsConfiguration hgc)
HGraphicsConfiguration
can
be used to create a graphics plane that supports the features set
in this template.
hgc
- - the HGraphicsConfiguration
object to test against this template.
HGraphicsConfiguration
object can be used to create a graphics
plane that supports the features set in this template, false
otherwise.public void setPreference(int preference, int priority)
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.
setPreference
in class HScreenConfigTemplate
preference
- the preference to be indicated. Valid values
for an HGraphicsConfigTemplate
are:
HScreenConfigTemplate.ZERO_BACKGROUND_IMPACT
,
HScreenConfigTemplate.ZERO_GRAPHICS_IMPACT
,
HScreenConfigTemplate.ZERO_VIDEO_IMPACT
,
HScreenConfigTemplate.INTERLACED_DISPLAY
,
HScreenConfigTemplate.FLICKER_FILTERING
,
MATTE_SUPPORT
and
IMAGE_SCALING_SUPPORT
.
Subclasses may add further valid values. An
IllegalArgumentException shall be thrown if the preference is
not a valid value for this instance of HGraphicsConfigTemplate
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 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 HGraphicsConfigTemplate
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
,
VIDEO_MIXING
,
MATTE_SUPPORT
and
IMAGE_SCALING_SUPPORT
.
Subclasses may add further valid values. An
IllegalArgumentException shall be thrown if the preference is
not a valid value for this instance of HGraphicsConfigTemplate
public void setPreference(int preference, java.lang.Object object, int priority)
Attributes that are not filled in in a template (through setPreference(int, 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. Calling this method with null
for the
object parameter shall have no effect if
the preference is not currently set 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 VIDEO_MIXING
.
Subclasses may add further valid values. An
IllegalArgumentException shall be thrown if the preference is
not a valid value for this instance of HScreenConfigTemplate
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 HGraphicsConfigTemplate
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 HGraphicsConfigTemplate
are:
HScreenConfigTemplate.VIDEO_GRAPHICS_PIXEL_ALIGNED
,
HScreenConfigTemplate.PIXEL_ASPECT_RATIO
,
HScreenConfigTemplate.PIXEL_RESOLUTION
,
HScreenConfigTemplate.SCREEN_RECTANGLE
,
and
VIDEO_MIXING
.
Subclasses may add further valid values. A
IllegalArgumentException shall be thrown if the preference is
not a valid value for this instance of HGraphicsConfigTemplate
, 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 |