|
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.StaticMatte
public class StaticMatte
This class represents a non-animated matte, i.e. a matte not changing over time. A static mask can have a single opacity value, being constant for the whole matte, or alternatively an image mask, where the pixel values determine the matte transparency for every pixel.
Matte
Constructor Summary | |
---|---|
StaticMatte()
|
Method Summary | |
---|---|
Image |
getImageOpacity()
Gets the opacity value image for this matte. |
Dimension |
getOffset()
Obtains the offset the image matte has relatively to the top left corner of the component's area. |
float |
getOpacity()
Gets the opacity value for this matte. |
int |
getOpacityAsInt()
Gets the opacity value for this matte as integer. |
boolean |
hasOpacityImage()
Obtains whether an opacity image is assigned to this matte. |
void |
setOffset(Dimension d)
Determines the offset for the opacity image to be assigned with this matte. |
void |
setOpacity(float opacity)
Sets the opacity of the matte to a single value, valid for all pixels. |
void |
setOpacity(Image image)
Sets the opacity of the matte. |
void |
setOpacity(int opacity)
Sets the opacity of the matte to a single value, valid for all pixels. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StaticMatte()
Method Detail |
---|
public void setOpacity(int opacity)
setOpacity(float)
, where a call to
setOpacity(i)
has the same effect as a call to
setOpacity((float)(i/255))
.
opacity
- the value for the opacity, which has to be an integer
value between 0 and 255, where 0 stands for full transparency, and 255
for full opacity. Values below 0 will be interpreted as 0 (fully
transparent), values greater 255 as 255 (fully opaque).getOpacityAsInt()
,
setOpacity(float)
public void setOpacity(float opacity)
setOpacity(int)
, where a call to
setOpacity(f)
has the same effect as a call to
setOpacity((int)(f * 255))
.
opacity
- the value for the opacity, which has to be a floating
point value between 0.0 and 1.0, where 0.0 stands for full
transparency, and 1.0 for full opacity. Values below 0.0 will be
interpreted as 0.0 (fully transparent), values greater 1.0 as 1.0
(fully opaque).getOpacity()
,
setOpacity(int)
public void setOpacity(Image image)
setOffset()
method.
A previously assigned opacity value or opacity image will be overwritten
by the opacity image provided by a call to this method.
image
- the value for the opacity, which has to be an image,
containing pixel values between 0.0 and 1.0. 0.0 stands for full
transparency, and 1.0 for full opacity. Values below 0.0 will be
interpreted as 0.0 (fully transparent), values greater 1.0 as 1.0
(fully opaque).getImageOpacity()
,
getOpacity()
public float getOpacity()
hasOpacityImage()
has
to be called.
setOpacity(float)
public int getOpacityAsInt()
hasOpacityImage()
has to be called.
setOpacity(int)
,
getOpacity()
public Image getImageOpacity()
setOpacity(com.sun.dtv.lwuit.Image)
public void setOffset(Dimension d)
d
- a Dimension object determining the offset toward the top
left corner of the component's area
if the parameter is null, no offset will be determined, and a previously assigned offset will be removed
getOffset()
public Dimension getOffset()
null
is returned.
Dimension
object or null (in this case there is either no offset or it is an
unitary opacity value assigned to the matte rather than an image)setOffset(com.sun.dtv.lwuit.geom.Dimension)
public boolean hasOpacityImage()
|
Java DTV API 1.3 18-Nov-2009 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |