MImage¶
Description¶
A MImage is Monoi widget to display an image.
A simple example¶
1
2 Context.getMainContext().put("imagePath", "icon/image.jpg");
3
4
5 MImage image = new MImage(container,"imagePath");
6 image.setCanvasWidth(300);
7 image.setCanvasHeight(200);
8
9
10 MField field = new MField(container,"","imagePath","button",null);
11 field.setWidth(150);
12 field.setMImage(image);

API¶
| MImage(MonoiContainer container,String dataPath) |
Constructs a new instance of this class given its parent container and dataPath. |
| Object getValue() |
Gets a value who is an image's path |
| String getDatapath() |
Gets a value's path |
| Image getImage() |
Gets an image |
| String getImagePath() |
Gets an image's path |
| void setCanvasHeight(int canvasHeight) |
Sets the image's canvas' height |
| void setCanvasWidth(int canvasWidth) |
Sets the image's canvas' width |
| void setDatapath(String datapath) |
Sets a value's path |
| void setImage(Image image) |
Sets an image |
| void setImagePath(String imagePath) |
Sets an image's path |
- See also superclasses
- MonoiComponent and MonoiDataComponent