MImage

Description

A MImage is Monoi widget to display an image.

A simple example

 1    //Puts the image's path into the context
 2    Context.getMainContext().put("imagePath", "icon/image.jpg");
 3
 4    //Create a MImage      
 5    MImage image = new MImage(container,"imagePath");
 6    image.setCanvasWidth(300);
 7    image.setCanvasHeight(200);
 8
 9    //a field with a button to open a fileDialog      
10    MField field = new MField(container,"","imagePath","button",null);
11    field.setWidth(150);
12    field.setMImage(image);

API

  • Constructors
MImage(MonoiContainer container,String dataPath) Constructs a new instance of this class given its parent container and dataPath.
  • Methods
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

MImage.jpg (23.9 kB) Frédéric ESNAULT, 02/27/2012 12:16 pm