[go: up one dir, main page]

Menu

[r81]: / decker / view / UIImage.java  Maximize  Restore  History

Download this file

25 lines (19 with data), 607 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package decker.view;
import decker.model.*;
import java.awt.*;
class UIImage extends DisplayedComponent
{
private Image image;
UIImage (final Value _component, final DisplayedComponent _parent, final DisplayedComponent current_clip_source) {
super(null, _parent, current_clip_source);
image = AbstractView.getImage(_component.toString());
x = _parent.x;
y = _parent.y;
w = (image==null) ? 0 : image.getWidth(null);
h = (image==null) ? 0 : image.getWidth(null);
}
public void draw (final Graphics g) {
if (image != null)
g.drawImage(image, x, y, null);
}
}