|
Java DTV API 1.3 18-Nov-2009 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.dtv.ui.PlaneSetup
public class PlaneSetup
The PlaneSetup
class is capable to
describe the characteristics of a Plane
. A Plane
may have many PlaneSetup
objects associated
with it, but there always only one valid for a certain point of time.
Plane
Constructor Summary | |
---|---|
PlaneSetup()
|
Method Summary | |
---|---|
Image |
adaptImage(Image input,
boolean dither)
Adapts a given image if necessary in order to gain compatibility with the currently valid PlaneSetup . |
Point |
convertPoint(PlaneSetup destination,
Point source)
This method has been created to avoid rounding errors appearing during conversion of pixel positions from one coordinate system towards another one when passing through normalized coordinates. |
void |
displayImage(Image image)
Display a (background) image on the associated Plane. |
void |
displayImage(Image image,
Rectangle rectangle)
Display an (background) image to cover a particular area of the associated Plane. |
Color |
getColor()
Provide the currently valid background color of this plane if any. |
Dimension |
getOffset(PlaneSetup setup)
Returns the offset between the origin of the pixel coordinate space of the specified PlaneSetup , and the origin
of the current pixel coordinate space of this PlaneSetup . |
PlaneSetupPattern |
getPattern()
Returns the PlaneSetupPattern
object that describes and identifies this PlaneSetup . |
Dimension |
getPixelAspectRatio()
Return the pixel aspect ratio of this setup. |
Dimension |
getPixelResolution()
Return the resolution of this setup in pixels. |
Plane |
getPlane()
Returns the Plane associated with this
PlaneSetup . |
Dimension |
getPlaneAspectRatio()
Return the aspect ratio of this setup as far as is known. |
Rectangle |
getScreenArea()
Return the position and size of the plane associated with this setup on the Screen in screen coordinates. |
Dimension |
getScreenResolution()
Return the current screen resolution of this setup i.e. 960 x 540, 1920 x 1080, etc. |
Object |
getVideoController()
Deliver the presentation control object for the video currently shown by the plane associated with this setup. |
Object |
getVideoSource()
Deliver the source of the video being presented by the plane associated with this PlaneSetup at this moment. |
boolean |
isDirectColorModelSupported()
Indicate whether Direct Color model is supported by this setup. |
boolean |
isFlickeringFilterAvailable()
Return whether this setup includes filtering to reduce interlace flicker. |
boolean |
isGraphicsMixingSupported()
Indicates whether the plane setup supports the display of graphics in addition to video streams. |
boolean |
isImageScalingSupported()
Indicate whether rapid image scaling is supported by this setup. |
boolean |
isIndexedColorModelSupported()
Indicate whether a Color Lookup Table is supported by this setup. |
boolean |
isInterlaced()
Return whether this setup is interlaced. |
boolean |
isMatteSupported()
Indicate whether the mattes feature is supported by this setup. |
boolean |
isVideoMixingSupported()
Indicate whether the setup supports transparency in the graphics system such that the output of an underlying video decoder is visible. |
void |
setColor(Color color)
Set the valid color for the background of the plane associated with this setup to a new value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PlaneSetup()
Method Detail |
---|
public Point convertPoint(PlaneSetup destination, Point source)
PlaneSetups
is not pixel basedThe source position is interpreted in the coordinate system of the PlaneSetup object on which this method is called.
destination
- the destination PlaneSetup
.source
- the pixel position in this PlaneSetup
.
public boolean isFlickeringFilterAvailable()
public boolean isInterlaced()
public Dimension getOffset(PlaneSetup setup)
PlaneSetup
, and the origin
of the current pixel coordinate space of this PlaneSetup
. The offset is returned in the pixel
coordinate space of the PlaneSetup
this
method is called for.
setup
- the target PlaneSetup
PlaneSetup
and the current pixel
coordinate space of the origin PlaneSetup
.
If the offset cannot be determined, null is returned.public Dimension getScreenResolution()
public Dimension getPlaneAspectRatio()
This Dimension may be used to determine the pixel aspect ratio for given
PlaneSetups
.
public Dimension getPixelAspectRatio()
public Dimension getPixelResolution()
public Rectangle getScreenArea()
Screen
in screen coordinates.
public boolean isVideoMixingSupported()
true
if the return value of
Capabilities.isImageRenderingSupported()
, called
for the instance of Capabilities
associated with
the plane, which is also currently associated with this setup, is also
true
.
The following setups fulfill this requirement:
Applications may specify a particular video / still video setup with which mixing must be supported. In this case, the video / still video setup is specified as a video setup or still video setup, respectively. In cases where no specific video setup is required then it is not required to specify such a setup and null can be used instead.
true
if video mixing is supported,
false
otherwisepublic boolean isGraphicsMixingSupported()
true
if the return value of
Capabilities.isVideoRenderingSupported()
, called
for the instance of Capabilities
associated with
the plane, which is also currently associated with this setup, is also
true
.
true
if graphics mixing is supported,
false
otherwisepublic boolean isMatteSupported()
true
if the return value of
Capabilities.isImageRenderingSupported()
, called
for the instance of Capabilities
associated with
the plane, which is also currently associated with this setup, is also
true
.
true
if mattes are supported,
false
otherwisepublic boolean isImageScalingSupported()
true
if the return value of
Capabilities.isImageRenderingSupported()
, called
for the instance of Capabilities
associated with
the plane, which is also currently associated with this setup, is also
true
.
true
if rapid image scaling is supported,
false
otherwisepublic boolean isIndexedColorModelSupported()
true
if the return value of
at least one of the following methods, called for the instance of Capabilities
associated with the plane, which is also
currently associated with this setup, is also true
:
Capabilities.isImageRenderingSupported()
Capabilities.isWidgetRenderingSupported()
Capabilities.isGraphicsRenderingSupported()
true
if the indexed color model is supported,
false
otherwisepublic boolean isDirectColorModelSupported()
true
if the return value of
at least one of the following methods, called for the instance of Capabilities
associated with the plane, which is also
currently associated with this setup, is also true
:
Capabilities.isImageRenderingSupported()
Capabilities.isWidgetRenderingSupported()
Capabilities.isGraphicsRenderingSupported()
true
if the direct color model is supported,
false
otherwisepublic Object getVideoSource() throws SecurityException, SetupException
Capabilities.isVideoRenderingSupported()
is true
.
Otherwise an exception is thrown.
SecurityException
- if the application currently does not have
sufficient rights to get the VideoSource object
SetupException
- if the associated plane does not support video
renderingpublic Object getVideoController() throws SecurityException, SetupException
Capabilities.isVideoRenderingSupported()
is true
.
Otherwise an exception is thrown.
SecurityException
- if the application does not have
sufficient rights to get the VideoPlayer object.
SetupException
- if the associated plane does not support video
renderingpublic PlaneSetupPattern getPattern()
PlaneSetupPattern
object that describes and identifies this PlaneSetup
. As a consequence, by programming
Plane.getBestSetup(PlaneSetup.getPattern())one should get the original
PlaneSetup
Features implemented in the PlaneSetup
will then be represented in the resulting pattern with PlaneSetupPattern.REQUIRED
priority. Features not implemented there are
represented with PlaneSetupPattern.REQUIRED_NOT
priority.
Preferences unset by the platform will appear with PlaneSetupPattern.DONT_CARE
priority.
PlaneSetupPattern
object which both describes and identifies this PlaneSetup
.public Plane getPlane()
Plane
associated with this
PlaneSetup
.
Plane
object that is associated
with this PlaneSetup
.public Color getColor()
setColor
since platforms may
offer a different color space for backgrounds and the value actually used
will be returned.
If no background color is set for this setup, null is returned.
setColor(java.awt.Color)
public void setColor(Color color) throws SecurityException, SetupException
getColor
method will then
return the value actually in use.
color
- the color to be used for the background
SecurityException
- if the application has not currently reserved
the Plane currently associated with this PlaneSetup or this PlaneSetup is
not the currently valid one of the reserved Plane.
SetupException
- if the specified color is illegal for this
platform.getColor()
public void displayImage(Image image) throws IOException, IllegalArgumentException, SecurityException, NullPointerException, SetupException
setColor
may be visible in the
remaining area of the Plane.
The image will be removed if the setColor
method is called afterwards.
If a call to the Capabilities.isImageRenderingSupported()
returns false
for the plane associated with this setup, a
call to this method causes a SetupException to be thrown.
image
- the image to be displayed.
IOException
- if the data for the
com.sun.dtv.lwuit.Image
cannot be not loaded.
IllegalArgumentException
- if the
com.sun.dtv.lwuit.Image
does not contain an image in a
supported image encoding format
SecurityException
- if the Plane
associated with this PlaneSetup has not been reserved by the calling
application
SetupException
- if the PlaneSetup
is not the current setup for its Plane
, or
if it is not appropriate for rendering images.
NullPointerException
- if the argument image is nullpublic void displayImage(Image image, Rectangle rectangle) throws IOException, IllegalArgumentException, SecurityException, NullPointerException, SetupException
setColor
may
be visible in the remaining area of the Plane.
The image will be removed if the setColor
method is called afterwards.
If a call to the Capabilities.isImageRenderingSupported()
returns false
for the plane associated with this setup, a
call to this method causes a SetupException to be thrown.
image
- the image to be displayedrectangle
- the area of the Plane the image should be shown in
IOException
- if the data for the
com.sun.dtv.lwuit.Image
cannot be not loaded.
IllegalArgumentException
- if the
com.sun.dtv.lwuit.Image
does not contain an image in a
supported image encoding format
SecurityException
- if the Plane
associated with this PlaneSetup has not been reserved by the calling
application
SetupException
- if the PlaneSetup
is not the current setup for its Plane
, or
if it is not appropriate for rendering images..
NullPointerException
- if either or both of the arguments
are nullpublic Image adaptImage(Image input, boolean dither) throws SetupException
PlaneSetup
.
If the type of the input image allows it, this may involve dithering
to a restricted color palette. If no adaptation is necessary, the
original image will be returned
If a call to the Capabilities.isImageRenderingSupported()
returns false
for the plane associated with this setup, a
call to this method causes a SetupException to be thrown.
input
- the image to be modified if necessarydither
- a boolean that indicates whether or not the type of the
input image allows dithering
Plane
associated with this PlaneSetup
, or the original image if no adaptation
has been necessary.
SetupException
- if the PlaneSetup
is not appropriate for rendering images..
|
Java DTV API 1.3 18-Nov-2009 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |