public class FlyingImage
extends java.lang.Object
FlyingImage class defines an image to be displayed at the top level in the rendering depth of a
display.FlyingImage contains an Image. This image associates the FlyingImage with a
specific display (since an Image is created for a specific display).FlyingImage objects may be associated with a Display. The flying images of an
application are drawn above all drawings coming from the standard paint() calls. Flying images are drawn
on a display in the order they are shown: The flying image drawn on top of the display is the last shown (it is above
all the other drawings) Pointer.setFlyingImage(FlyingImage)| Constructor and Description |
|---|
FlyingImage(Display display,
Image skin)
Creates a new
FlyingImage. |
FlyingImage(Image skin)
Creates a new
FlyingImage. |
| Modifier and Type | Method and Description |
|---|---|
Display |
getDisplay()
Returns the display associated to the
FlyingImage. |
Image |
getImage()
Returns the image associated to the
FlyingImage. |
int |
getX()
Get the x coordinate of the
FlyingImage position |
int |
getY()
Get the y coordinate of the
FlyingImage position |
void |
hide()
Sets the
FlyingImage as hidden on its display. |
boolean |
isShown()
Checks whether the
FlyingImage is visible on its display. |
void |
repaint()
Requests a repaint of the
FlyingImage. |
void |
setLocation(int x,
int y)
Sets the location of the
FlyingImage. |
void |
show()
Sets the
FlyingImage as visible on its display. |
public FlyingImage(Image skin)
skin - the Image the FlyingImage is associated with.java.lang.NullPointerException - if skin is null.java.lang.OutOfMemoryError - if there is not enough room to add a new flying image.public FlyingImage(Display display, Image skin)
display - the Display where the FlyingImage will appears.skin - the Image the FlyingImage is associated with.java.lang.NullPointerException - if skin is null.java.lang.OutOfMemoryError - if there is not enough room to add a new flying image.public void show()
FlyingImage as visible on its display.public void hide()
FlyingImage as hidden on its display.public boolean isShown()
FlyingImage is visible on its display.true if the FlyingImage is currently visible, false otherwisepublic void repaint()
FlyingImage.public Image getImage()
FlyingImage.FlyingImagepublic void setLocation(int x,
int y)
FlyingImage.x - the x coordinate where to set the FlyingImagey - the y coordinate where to set the FlyingImagepublic int getX()
FlyingImage positionFlyingImage positionpublic int getY()
FlyingImage positionFlyingImage positionpublic Display getDisplay()
FlyingImage.FlyingImage.