|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--nankin.zheng.gatem.view.AnchoredImage
Anchored Image is an image with an anchor.
If we draw an anchored image with anchor (x,y) at the position (x0,y0) (physical coordonate), that is to say, the pixel (x,y) of the image will be drawn at the position (x0,y0) of the screen. Normally, the anchor is (0,0), indicating that the left-bottom pixel of the image will be drawn at (x0,y0) of the screen.
NOTE that the anchor of the image represents a pixel, therefore is a physical coordonate.
Field Summary | |
private java.awt.Image |
image
|
private int |
x
|
private int |
y
|
Constructor Summary | |
AnchoredImage(java.awt.Image img,
int ax,
int ay)
Constructor. |
Method Summary | |
java.awt.Image |
getImage()
Get image. |
int |
getX()
Get x. |
int |
getY()
Get y. |
java.lang.String |
toString()
Convert to String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.awt.Image image
private int x
private int y
Constructor Detail |
public AnchoredImage(java.awt.Image img, int ax, int ay)
img
- imageax
- x value of its anchoray
- y value of its anchor
java.lang.NullPointerException
- if img is null.Method Detail |
public java.awt.Image getImage()
public int getX()
public int getY()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |