ImageViewerApplet.java
Go to the documentation of this file.
00001 package edu.tum.cs.ias.knowrob.mod_dialog;
00002 
00003 import processing.core.PApplet;
00004 import processing.core.PImage;
00005 
00006 public class ImageViewerApplet extends PApplet {
00007 
00008         private static final long serialVersionUID = 4502618030349542714L;
00009 
00010         PImage img;
00011         public void setup() {
00012 
00013                 size(50, 40, P2D);
00014         }
00015 
00016         public void draw() {
00017                 
00018                 background(20, 20, 20);
00019 
00020                 if(this.img!=null) {
00021                         image(this.img, 0,0,this.img.width,this.img.height);
00022                 }
00023         }
00024 
00025         
00026         public void setImage(String image) {
00027                 this.img=loadImage(image);
00028                 this.height = img.height;
00029                 this.width = img.width;
00030                 
00031                 draw();
00032         }
00033         
00034 }
00035 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


mod_dialog
Author(s): Moritz Tenorth
autogenerated on Tue Apr 16 2013 00:38:25