|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jcontrol.graphics.ResourceImage
public class ResourceImage
Image that gets its data from a Resource. The graphics formats supported depend on the XGraphics used for drawing.
Resource
,
jcontrol.ui.XGraphics
Constructor Summary | |
---|---|
ResourceImage(Resource r)
Creates a new ResourceImage with the given Resource as data source. |
|
ResourceImage(String name)
Creates a new ResourceImage. |
Method Summary | |
---|---|
void |
draw(Graphics g,
int x,
int y)
draws current image inside overgiven graphics at coordinates x, y |
void |
draw(Graphics g,
int x,
int y,
int w,
int h,
int xo,
int yo)
draws current image inside overgiven graphics at coordinates x, y with special width, height and x-, y-offset-translation |
void |
draw(XGraphics g,
int x,
int y,
int anchor)
draws current image inside overgiven graphics at coordinates x, y with anchor alignment |
Resource |
getData()
Returns the Resource containing the image data. |
int |
getHeight()
Returns the height of the Image. |
int |
getWidth()
Returns the width of the Image. |
boolean |
isValid()
see parent-method for description |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, notifyAll, toString, wait |
Constructor Detail |
---|
public ResourceImage(Resource r)
r
- data sourcepublic ResourceImage(String name)
name
- Resource nameMethod Detail |
---|
public Resource getData()
public int getWidth()
getWidth
in interface Image
public int getHeight()
getHeight
in interface Image
public boolean isValid()
isValid
in interface Image
public void draw(Graphics g, int x, int y)
draw
in interface Drawable
g
- x
- y
- public void draw(Graphics g, int x, int y, int w, int h, int xo, int yo)
draw
in interface Drawable
g
- x
- y
- w
- h
- xo
- yo
- public void draw(XGraphics g, int x, int y, int anchor)
draw
in interface Image
g
- x
- y
- anchor
- XGraphics
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |