1. Thejesh GN
  2. processing101

Commits

Thejesh GN  committed 5e94831

changed visualization

  • Participants
  • Parent commits 8fbff6d
  • Branches default

Comments (0)

Files changed (52)

File project/appTest/appTest.pde

View file
+String textDisp = "";
+void setup(){
+ textDisp = "";
+ background(255);
+ frameRate(10); 
+ loop();
+}
+
+void draw(){
+  fill(0);
+  text(textDisp, 10,10);
+  println(textDisp);
+}
+
+
+public void setMyText(String t){
+  textDisp = t;
+}
+
+void mouseClicked() {
+  println("----------CLICKED--------------");
+  setMyText("clicked on applet");
+}

File project/appTest/applet/appTest.jar

Binary file added.

File project/appTest/applet/appTest.pde

View file
+String textDisp = "";
+void setup(){
+ textDisp = "";
+ background(255);
+ frameRate(10); 
+ loop();
+}
+
+void draw(){
+  fill(0);
+  text(textDisp, 10,10);
+  println(textDisp);
+}
+
+
+public void setMyText(String t){
+  textDisp = t;
+}
+
+void mouseClicked() {
+  println("----------CLICKED--------------");
+  setMyText("clicked on applet");
+}

File project/appTest/applet/index.html

View file
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <!-- charset must remain utf-8 to be handled properly by Processing -->
+    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+
+    <title>appTest : Built with Processing</title>
+
+    <style type="text/css">
+      /* <![CDATA[ */
+	
+	body {
+  	  margin: 60px 0px 0px 55px;
+	  font-family: verdana, geneva, arial, helvetica, sans-serif; 
+	  font-size: 11px; 
+	  background-color: #ddddcc; 
+	  text-decoration: none; 
+	  font-weight: normal; 
+	  line-height: normal; 
+	}
+		 
+	a          { color: #3399cc; }
+	a:link     { color: #3399cc; text-decoration: underline; }
+	a:visited  { color: #3399cc; text-decoration: underline; }
+	a:active   { color: #3399cc; text-decoration: underline; }
+	a:hover    { color: #3399cc; text-decoration: underline; }
+
+      /* ]]> */
+    </style>    
+  </head>
+
+  <body>
+    <div id="content">
+      <div id="appTest_container">
+
+	<!-- This version plays nicer with older browsers, 
+	     but requires JavaScript to be enabled. 
+	     http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html
+	     http://download.oracle.com/javase/tutorial/deployment/deploymentInDepth/ -->
+	<script type="text/javascript"
+		src="http://www.java.com/js/deployJava.js"></script>
+	<script type="text/javascript">
+	  /* <![CDATA[ */
+
+	  var attributes = { 
+            code: 'appTest.class',
+            archive: 'appTest.jar',
+            width: 100, 
+            height: 100,
+          };
+          var parameters = { 
+            image: 'loading.gif',
+            centerimage: 'true',
+          };
+          var version = '1.5';
+          deployJava.runApplet(attributes, parameters, version);
+
+          /* ]]> */
+        </script>
+        
+	<noscript> <div>
+		<form name="testForm"> 
+	  <!--[if !IE]> -->
+	  <object classid="java:appTest.class" 
+            	  type="application/x-java-applet"
+            	  archive="appTest.jar"
+            	  width="100" height="100"
+            	  standby="Loading Processing software..."  id="appTestID">
+            
+	    <param name="archive" value="appTest.jar" />
+	    
+	    <param name="mayscript" value="true" />
+	    <param name="scriptable" value="true" />
+	    
+	    <param name="image" value="loading.gif" />
+	    <param name="boxmessage" value="Loading Processing software..." />
+	    <param name="boxbgcolor" value="#FFFFFF" />
+	  <!--<![endif]-->
+
+	    <!-- For more instructions on deployment, 
+		 or to update the CAB file listed here, see:
+		 http://java.sun.com/javase/6/webnotes/family-clsid.html
+		 http://java.sun.com/javase/6/webnotes/install/jre/autodownload.html -->
+	    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+		    codebase="http://java.sun.com/update/1.6.0/jinstall-6u20-windows-i586.cab"
+		    width="100" height="100"
+		    standby="Loading Processing software..."  id="appTestID">
+	      
+	      <param name="code" value="appTest" />
+	      <param name="archive" value="appTest.jar" />
+	      
+	      <param name="mayscript" value="true" />
+	      <param name="scriptable" value="true" />
+	      
+	      <param name="image" value="loading.gif" />
+	      <param name="boxmessage" value="Loading Processing software..." />
+	      <param name="boxbgcolor" value="#FFFFFF" />
+	      
+	      <p>
+		<strong>
+		  This browser does not have a Java Plug-in.
+		  <br />
+		  <a href="http://www.java.com/getjava" title="Download Java Plug-in">
+		    Get the latest Java Plug-in here.
+		  </a>
+		</strong>
+	      </p>
+	      
+	    </object>
+	    
+	  <!--[if !IE]> -->
+	  </object>
+	  <!--<![endif]-->
+	</form>
+	</div> </noscript>
+
+      </div>
+      
+      <p>
+	
+      </p>
+      
+      <p>
+	Source code: <a href="appTest.pde">appTest</a> 
+      </p>
+      
+      <p>
+	Built with <a href="http://processing.org" title="Processing.org">Processing</a>
+      </p>
+	<script>
+	function sendToApplet(){
+		var applet = document.testForm.appTestID;
+         	applet.setMyText("Hello to JS from JAVA");
+	         return true
+	}
+	</script>
+	<input type="button" value="Set the text as" onclick="sendToApplet()" /> 
+    </div>
+  </body>
+</html>

File project/appTest/applet/loading.gif

Added
New image

File project/ipab/applet/BoundsIntegrator.java

View file
+// Code from Visualizing Data, First Edition, Copyright 2008 Ben Fry.
+
+
+public class BoundsIntegrator {
+
+  static final float ATTRACTION = 0.2f;
+  static final float DAMPING = 0.5f;
+
+  float valueX, velocityX, accelerationX;
+  float valueY, velocityY, accelerationY;
+  float valueW, velocityW, accelerationW;
+  float valueH, velocityH, accelerationH;
+
+  float damping;
+  float attraction;
+  
+  boolean targeting;
+  float targetX, targetY, targetW, targetH;
+
+
+  public BoundsIntegrator() {
+    this.valueX = 0;
+    this.valueY = 0;
+    this.valueW = 1;
+    this.valueH = 1;
+
+    this.damping = DAMPING;
+    this.attraction = ATTRACTION;
+  }
+
+
+  public BoundsIntegrator(float x, float y, float w, float h) {
+    this.valueX = x;
+    this.valueY = y;
+    this.valueW = w;
+    this.valueH = h;
+    
+    this.damping = DAMPING;
+    this.attraction = ATTRACTION;
+  }
+
+
+  public void set(float x, float y, float w, float h) {
+    this.valueX = x;
+    this.valueY = y;
+    this.valueW = w;
+    this.valueH = h;
+  }
+  
+  
+  public float getX() {
+    return valueX;
+  }
+  
+  
+  public float getY() {
+    return valueY;
+  }
+  
+  
+  public float getW() {
+    return valueW;
+  }
+  
+  
+  public float getH() {
+    return valueH;
+  }
+  
+  
+  public float spanX(float pointX, float start, float span) {
+    if (valueW != 0) {
+      //return (pointX - valueX) / valueW;
+      float n = (pointX - valueX) / valueW;
+      return start + n*span;
+    } else {
+      return Float.NaN;
+    }
+  }
+    
+  
+  public float spanY(float pointY, float start, float span) {
+    if (valueH != 0) {
+      //return (pointY - valueY) / valueH;
+      float n = (pointY - valueY) / valueH;
+      return start + n*span;
+    } else {
+      return Float.NaN;
+    }
+  }
+  
+  
+  public void setAttraction(float a) {
+    attraction = a;
+  }
+  
+  
+  public void setDamping(float d) {
+    damping = d;
+  }
+
+
+  public boolean update() {
+    if (targeting) {
+      accelerationX += attraction * (targetX - valueX);
+      velocityX = (velocityX + accelerationX) * damping;
+      valueX += velocityX;
+      accelerationX = 0;
+      boolean updated = (Math.abs(velocityX) > 0.0001f);
+      
+      accelerationY += attraction * (targetY - valueY);
+      velocityY = (velocityY + accelerationY) * damping;
+      valueY += velocityY;
+      accelerationY = 0;
+      updated |= (Math.abs(velocityY) > 0.0001f);
+
+      accelerationW += attraction * (targetW - valueW);
+      velocityW = (velocityW + accelerationW) * damping;
+      valueW += velocityW;
+      accelerationW = 0;
+      updated |= (Math.abs(velocityW) > 0.0001f);
+      
+      accelerationH += attraction * (targetH - valueH);
+      velocityH = (velocityH + accelerationH) * damping;
+      valueH += velocityH;
+      accelerationH = 0;
+      updated |= (Math.abs(velocityH) > 0.0001f);
+    }
+    return false;
+  }
+
+
+  public void target(float tx, float ty, float tw, float th) {
+    targeting = true;
+    targetX = tx;
+    targetY = ty; 
+    targetW = tw;
+    targetH = th;
+  }
+
+
+  public void targetLocation(float tx, float ty) {
+    targeting = true;
+    targetX = tx;
+    targetY = ty;
+  }
+  
+  
+  public void targetSize(float tw, float th) {
+    targeting = true;
+    targetW = tw;
+    targetH = th;
+  }
+  
+  
+  public void targetX(float tx) {
+    targeting = true;
+    targetX = tx;
+  }
+  
+  
+  public void targetY(float ty) {
+    targeting = true;
+    targetY = ty;
+  }
+
+  
+  public void targetW(float tw) {
+    targeting = true;
+    targetW = tw;
+  }
+
+  
+  public void targetH(float th) {
+    targeting = true;
+    targetH = th;
+  }
+}

File project/ipab/applet/Node.pde

View file
+/* Code heavily inspired/borrowed from Ben Fry's original code example */ 
+/* By Thejesh GN  */
+
+
+class Node extends NodeElement implements MapModel {
+  MapLayout algorithm = new PivotBySplitSize();
+  Mappable[] items;
+  boolean contentsVisible;
+  boolean layoutValid;
+  float darkness;
+
+
+  public Node(Node parent, String folder, int level, int order) {
+    super(parent, folder, level, order);
+    String[] contents = new String[5];
+    ArrayList cities = new ArrayList();
+    cities.add("Bangalore");
+    cities.add("Mysore");
+    cities.add("Delhi");
+    cities.add("Bombay");
+    cities.add("Kolkatta");
+    
+    ArrayList dept = new ArrayList();
+    dept.add("Police");
+    dept.add("Registration");
+    dept.add("Revenue");
+    dept.add("Income Tax");
+    dept.add("Health");
+    
+    if(level == 0){
+      dept.toArray(contents);
+    }else{
+       cities.toArray(contents);
+    }  
+
+    
+    if (contents != null) {
+      contents = sort(contents);
+      items = new Mappable[contents.length];
+      int count = 0;
+      for (int i = 0; i < contents.length; i++) {
+        String NodeElement = contents[i];
+        NodeElement newItem = null;
+       if (dept.contains(NodeElement)) {
+          newItem = new Node(this, NodeElement, level+1, count);
+        } else {
+          newItem = new NodeElement(this, NodeElement, level+1, count);
+        }
+        items[count++] = newItem;
+        size += newItem.getSize();
+      }
+      if (count != items.length) {
+        items = (Mappable[]) subset(items, 0, count);
+      }
+    } else {
+      // If no items found in this folder, create a dummy array so that 
+      // items will not be null, which will ensure that items.length will
+      // return 0 rather than causing a NullPointerException.
+      items = new Mappable[0];
+    }
+  }
+
+  void updateColors() {
+    super.updateColors();
+
+    for (int i = 0; i < items.length; i++) {
+      NodeElement fi = (NodeElement) items[i];
+      fi.updateColors();
+    }
+  }
+
+  void checkLayout() {
+    if (!layoutValid) {
+      if (getItemCount() != 0) {
+        algorithm.layout(this, bounds);
+      }
+      layoutValid = true;
+    }
+  }
+
+
+  boolean mousePressed() {
+    if (mouseInside()) {
+      if (contentsVisible) {
+        // Pass the mouse press to the child items
+        for (int i = 0; i < items.length; i++) {
+          NodeElement fi = (NodeElement) items[i];
+          if (fi.mousePressed()) {
+            return true;
+          }
+        }
+      } else {  // not opened
+        if (mouseButton == LEFT) {
+          if (parent == zoomItem) {
+            showContents();
+          } else {
+            parent.zoomIn();
+          }            
+        } else if (mouseButton == RIGHT) {
+          if (parent == zoomItem) {
+            parent.zoomOut();
+          } else {
+            parent.hideContents();
+          }
+        }
+        return true;
+      }
+    }
+    return false;
+  }
+
+
+  // Zoom to the parent's boundary, zooming out from this item
+  void zoomOut() {
+    if (parent != null) {
+      // Close contents of any opened children
+      for (int i = 0; i < items.length; i++) {
+        if (items[i] instanceof Node) {
+          ((Node)items[i]).hideContents();
+        }
+      }
+      parent.zoomIn();
+    }
+  }
+
+
+  void zoomIn() {
+    zoomItem = this;
+    zoomBounds.target(x, y, w, h); ///width, h/height);
+  }
+
+
+  void showContents() {
+    contentsVisible = true;
+  }
+
+
+  void hideContents() {
+    // Prevent the user from closing the root level
+    if (parent != null) {
+      contentsVisible = false;
+    }
+  }
+
+  
+  void draw() {
+    checkLayout();
+    calcBox();
+    
+    if (contentsVisible) {
+      for (int i = 0; i < items.length; i++) {
+        items[i].draw();
+      }
+    } else {
+      super.draw();
+    }
+
+    if (contentsVisible) {
+      if (mouseInside()) {
+        if (parent == zoomItem) {
+          taggedItem = this;
+        }
+      }
+    }
+    if (mouseInside()) {
+      darkness *= 0.05;
+    } else {
+      darkness += (150 - darkness) * 0.05;
+    }
+    if (parent == zoomItem) {
+      colorMode(RGB, 255);
+      fill(0, darkness);
+      rect(boxLeft, boxTop, boxRight, boxBottom);
+    }
+  }
+
+
+  void drawTitle() {
+    if (!contentsVisible) {
+      super.drawTitle();
+    }
+  }
+
+
+  void drawTag() {
+    float boxHeight = textAscent() + textPadding*2;
+
+    if (boxBottom - boxTop > boxHeight*2) {
+      // if the height of the box is at least twice the height of the tag,
+      // draw the tag inside the box itself
+      fill(0, 128);
+      rect(boxLeft, boxTop, boxRight, boxTop+boxHeight);
+      fill(255);
+      textAlign(LEFT, TOP);
+      text(name, boxLeft+textPadding, boxTop+textPadding);
+
+    } else if (boxTop > boxHeight) {
+      // if there's enough room to draw above, draw it there
+      fill(0, 128);
+      rect(boxLeft, boxTop-boxHeight, boxRight, boxTop);
+      fill(255);
+      text(name, boxLeft+textPadding, boxTop-textPadding);
+
+    } else if (boxBottom + boxHeight < height) {
+      // otherwise draw the tag below
+      fill(0, 128);
+      rect(boxLeft, boxBottom, boxRight, boxBottom+boxHeight);
+      fill(255);
+      textAlign(LEFT, TOP);
+      text(name, boxLeft+textPadding, boxBottom+textPadding);
+    }
+  }
+
+
+  Mappable[] getItems() {
+    return items;
+  }
+
+
+  int getItemCount() {
+    return items.length;
+  }
+}

File project/ipab/applet/NodeElement.pde

View file
+/* Code heavily inspired/borrowed from Ben Fry's original code example */ 
+/* By Thejesh GN  */
+
+class NodeElement extends SimpleMapItem {
+  Node parent;    
+  //File file;
+    String file;
+  String name;
+  int level;
+  
+  color c;
+  float hue;
+  float brightness;
+    
+  float textPadding = 8;
+    
+  float boxLeft, boxTop;
+  float boxRight, boxBottom;
+
+
+  NodeElement(Node parent, String file, int level, int order) {
+    this.parent = parent;
+    this.file = file;
+    this.order = order;
+    this.level = level;
+      
+    name = file.toString();
+    size =  random(1, 150);
+
+   // modTimes.add(file.lastModified());
+   long a = int(random(10000,200000));
+    modTimes.add(a);
+  }
+
+  
+  void updateColors() {
+    if (parent != null) {
+      hue = map(order, 0, parent.getItemCount(), 0, 360);
+    }
+    //brightness = modTimes.percentile(file.lastModified()) * 100;
+     long a = int(random(100,200));
+    brightness = modTimes.percentile(a) * 100;
+
+    colorMode(HSB, 360, 100, 100);
+    if (parent == zoomItem) {
+      //c = color(hue, 80, 80);
+        c = color(int(random(0,255)),int(random(0,255)),int(random(0,255)));
+    } else if (parent != null) {
+        c = color(int(random(0,255)),int(random(0,255)),int(random(0,255)));
+      //c = color(parent.hue, 80, brightness);
+    }
+    colorMode(RGB, 255);
+  }
+  
+  
+  void calcBox() {
+    boxLeft = zoomBounds.spanX(x, 0, width);
+    boxRight = zoomBounds.spanX(x+w, 0, width);
+    boxTop = zoomBounds.spanY(y, 0, height);
+    boxBottom = zoomBounds.spanY(y+h, 0, height);
+  }
+
+
+  void draw() {
+    calcBox();
+
+    fill(c);
+    rect(boxLeft, boxTop, boxRight, boxBottom);
+
+    if (textFits()) {
+      drawTitle();
+    } else if (mouseInside()) {
+      rolloverItem = this;
+    }
+   }
+    
+    
+  void drawTitle() {
+    fill(255, 200);
+    
+    float middleX = (boxLeft + boxRight) / 2;
+    float middleY = (boxTop + boxBottom) / 2;
+    if (middleX > 0 && middleX < width && middleY > 0 && middleY < height) {
+      if (boxLeft + textWidth(name) + textPadding*2 > width) {
+        textAlign(RIGHT);
+        text(name, width - textPadding, boxBottom - textPadding);
+      } else {
+        textAlign(LEFT);
+        text(name, boxLeft + textPadding, boxBottom - textPadding);
+      }
+    }
+  }
+
+
+  boolean textFits() {
+    float wide = textWidth(name) + textPadding*2;
+    float high = textAscent() + textDescent() + textPadding*2;
+    return (boxRight - boxLeft > wide) && (boxBottom - boxTop > high); 
+  }
+    
+ 
+  boolean mouseInside() {
+    return (mouseX > boxLeft && mouseX < boxRight && 
+            mouseY > boxTop && mouseY < boxBottom);    
+  }
+
+
+  boolean mousePressed() {
+    if (mouseInside()) {
+      if (mouseButton == LEFT) {
+        parent.zoomIn();
+        return true;
+
+      } else if (mouseButton == RIGHT) {
+        if (parent == zoomItem) {
+          parent.zoomOut();
+        } else {
+          parent.hideContents();
+        }
+        return true;
+      }
+    }
+    return false;
+  }
+}

File project/ipab/applet/RankedLongArray.pde

View file
+// Code from Visualizing Data, First Edition, Copyright 2008 Ben Fry.
+
+
+class RankedLongArray {
+  long[] values = new long[100];
+  int count;
+  boolean dirty;
+
+  public void add(long what) {
+    if (count == values.length) {
+      values = (long[]) expand(values);
+    }
+    values[count++] = what;
+    dirty = true;
+  }
+
+  public void remove(long what) {
+    int index = find(what, 0, count-1);
+    arraycopy(values, index+1, values, index, count-index-1);
+    count--;
+  }
+
+  private void update() {
+    Arrays.sort(values, 0, count);
+    dirty = false;
+  }
+
+  public float percentile(long what) {
+    int index = find(what);
+    return index / (float)count;
+  }
+
+  public int find(long what) {
+    return find(what, 0, count-1);
+  }
+
+  private int find(long num, int start, int stop) {
+    if (dirty) update();
+      
+    int middle = (start + stop) / 2;
+
+    // if this is the char, then return it
+    if (num == values[middle]) return middle;
+
+    // doesn't exist, otherwise would have been the middle
+    if (start >= stop) return -1;
+
+    // if it's in the lower half, continue searching that
+    if (num < values[middle]) {
+      return find(num, start, middle-1);
+    }
+    // otherwise continue in the upper half
+    return find(num, middle+1, stop);
+  }
+}

File project/ipab/applet/core.jar

Binary file added.

File project/ipab/applet/index.html

View file
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <!-- charset must remain utf-8 to be handled properly by Processing -->
+    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+
+    <title>ipab : Built with Processing</title>
+
+    <style type="text/css">
+      /* <![CDATA[ */
+	
+	body {
+  	  margin: 60px 0px 0px 55px;
+	  font-family: verdana, geneva, arial, helvetica, sans-serif; 
+	  font-size: 11px; 
+	  background-color: #ddddcc; 
+	  text-decoration: none; 
+	  font-weight: normal; 
+	  line-height: normal; 
+	}
+		 
+	a          { color: #3399cc; }
+	a:link     { color: #3399cc; text-decoration: underline; }
+	a:visited  { color: #3399cc; text-decoration: underline; }
+	a:active   { color: #3399cc; text-decoration: underline; }
+	a:hover    { color: #3399cc; text-decoration: underline; }
+
+      /* ]]> */
+    </style>    
+  </head>
+
+  <body>
+    <div id="content">
+      <div id="ipab_container">
+
+	<!-- This version plays nicer with older browsers, 
+	     but requires JavaScript to be enabled. 
+	     http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html
+	     http://download.oracle.com/javase/tutorial/deployment/deploymentInDepth/ -->
+	<script type="text/javascript"
+		src="http://www.java.com/js/deployJava.js"></script>
+	<script type="text/javascript">
+	  /* <![CDATA[ */
+
+	  var attributes = { 
+            code: 'ipab.class',
+            archive: 'ipab.jar,treemap.jar,core.jar',
+            width: 500, 
+            height: 500,
+          };
+          var parameters = { 
+            image: 'loading.gif',
+            centerimage: 'true',
+          };
+          var version = '1.5';
+          deployJava.runApplet(attributes, parameters, version);
+
+          /* ]]> */
+        </script>
+        
+	<noscript> <div>
+	  <!--[if !IE]> -->
+	  <object classid="java:ipab.class" 
+            	  type="application/x-java-applet"
+            	  archive="ipab.jar,treemap.jar,core.jar"
+            	  width="500" height="500"
+            	  standby="Loading Processing software..." >
+            
+	    <param name="archive" value="ipab.jar,treemap.jar,core.jar" />
+	    
+	    <param name="mayscript" value="true" />
+	    <param name="scriptable" value="true" />
+	    
+	    <param name="image" value="loading.gif" />
+	    <param name="boxmessage" value="Loading Processing software..." />
+	    <param name="boxbgcolor" value="#FFFFFF" />
+	  <!--<![endif]-->
+
+	    <!-- For more instructions on deployment, 
+		 or to update the CAB file listed here, see:
+		 http://java.sun.com/javase/6/webnotes/family-clsid.html
+		 http://java.sun.com/javase/6/webnotes/install/jre/autodownload.html -->
+	    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+		    codebase="http://java.sun.com/update/1.6.0/jinstall-6u20-windows-i586.cab"
+		    width="500" height="500"
+		    standby="Loading Processing software..."  >
+	      
+	      <param name="code" value="ipab" />
+	      <param name="archive" value="ipab.jar,treemap.jar,core.jar" />
+	      
+	      <param name="mayscript" value="true" />
+	      <param name="scriptable" value="true" />
+	      
+	      <param name="image" value="loading.gif" />
+	      <param name="boxmessage" value="Loading Processing software..." />
+	      <param name="boxbgcolor" value="#FFFFFF" />
+	      
+	      <p>
+		<strong>
+		  This browser does not have a Java Plug-in.
+		  <br />
+		  <a href="http://www.java.com/getjava" title="Download Java Plug-in">
+		    Get the latest Java Plug-in here.
+		  </a>
+		</strong>
+	      </p>
+	      
+	    </object>
+	    
+	  <!--[if !IE]> -->
+	  </object>
+	  <!--<![endif]-->
+
+	</div> </noscript>
+
+      </div>
+      
+      <p>
+	
+      </p>
+      
+      <p>
+	Source code: <a href="ipab.pde">ipab</a> <a href="BoundsIntegrator.java">BoundsIntegrator</a> <a href="Node.pde">Node</a> <a href="NodeElement.pde">NodeElement</a> <a href="RankedLongArray.pde">RankedLongArray</a> 
+      </p>
+      
+      <p>
+	Built with <a href="http://processing.org" title="Processing.org">Processing</a>
+      </p>
+    </div>
+  </body>
+</html>

File project/ipab/applet/ipab.jar

Binary file added.

File project/ipab/applet/ipab.pde

View file
+/* Code heavily inspired/borrowed from Ben Fry's original code example */ 
+/* By Thejesh GN  */
+
+import treemap.*;
+
+Node rootItem;
+NodeElement rolloverItem;
+Node taggedItem;
+
+BoundsIntegrator zoomBounds;
+Node zoomItem;
+
+RankedLongArray modTimes = new RankedLongArray();
+
+PFont font;
+
+
+void setup() {
+    size(500, 500);
+    zoomBounds = new BoundsIntegrator(0, 0, width, height);
+    
+    cursor(CROSS);
+    rectMode(CORNERS);
+    smooth();
+    noStroke();
+  
+   font = createFont("SansSerif", 13);
+   setRoot("Locations");
+}
+
+  
+void setRoot(String folder) {
+  Node tm = new Node(null, folder, 0, 0);
+  tm.setBounds(0, 0, width, height);
+  tm.contentsVisible = true;
+    
+  rootItem = tm;
+  rootItem.zoomIn();
+  rootItem.updateColors();
+}
+
+
+void draw() {
+      background(0);
+      textFont(font);
+      
+      frameRate(30);
+      zoomBounds.update();
+    
+      rolloverItem = null;
+      taggedItem = null;
+    
+      if (rootItem != null) {
+        rootItem.draw();
+      }
+      if (rolloverItem != null) {
+        rolloverItem.drawTitle();
+      }
+      if (taggedItem != null) {
+        taggedItem.drawTag();
+      }
+}
+
+
+void mousePressed() {
+    if (zoomItem != null) {
+      zoomItem.mousePressed();
+    }
+}
+

File project/ipab/applet/loading.gif

Added
New image

File project/ipab/applet/treemap.jar

Binary file added.

File project/ipab/ipab.pde

View file
 
 
 void setup() {
-    size(900, 500);
+    size(500, 500);
     zoomBounds = new BoundsIntegrator(0, 0, width, height);
     
     cursor(CROSS);

File project/ipab3/applet/core.jar

Binary file added.

File project/ipab3/applet/index.html

View file
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <!-- charset must remain utf-8 to be handled properly by Processing -->
+    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+
+    <title>ipab3 : Built with Processing</title>
+
+    <style type="text/css">
+      /* <![CDATA[ */
+	
+	body {
+  	  margin: 60px 0px 0px 55px;
+	  font-family: verdana, geneva, arial, helvetica, sans-serif; 
+	  font-size: 11px; 
+	  background-color: #ddddcc; 
+	  text-decoration: none; 
+	  font-weight: normal; 
+	  line-height: normal; 
+	}
+		 
+	a          { color: #3399cc; }
+	a:link     { color: #3399cc; text-decoration: underline; }
+	a:visited  { color: #3399cc; text-decoration: underline; }
+	a:active   { color: #3399cc; text-decoration: underline; }
+	a:hover    { color: #3399cc; text-decoration: underline; }
+
+      /* ]]> */
+    </style>    
+  </head>
+
+  <body>
+    <div id="content">
+      <div id="ipab3_container">
+
+	<!-- This version plays nicer with older browsers, 
+	     but requires JavaScript to be enabled. 
+	     http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html
+	     http://download.oracle.com/javase/tutorial/deployment/deploymentInDepth/ -->
+	<script type="text/javascript"
+		src="http://www.java.com/js/deployJava.js"></script>
+	<script type="text/javascript">
+	  /* <![CDATA[ */
+
+	  var attributes = { 
+            code: 'ipab3.class',
+            archive: 'ipab3.jar,nexttext.jar,core.jar',
+            width: 500, 
+            height: 500,
+          };
+          var parameters = { 
+            image: 'loading.gif',
+            centerimage: 'true',
+          };
+          var version = '1.5';
+          deployJava.runApplet(attributes, parameters, version);
+
+          /* ]]> */
+        </script>
+        
+	<noscript> <div>
+	  <!--[if !IE]> -->
+	  <object classid="java:ipab3.class" 
+            	  type="application/x-java-applet"
+            	  archive="ipab3.jar,nexttext.jar,core.jar"
+            	  width="500" height="500"
+            	  standby="Loading Processing software..." >
+            
+	    <param name="archive" value="ipab3.jar,nexttext.jar,core.jar" />
+	    
+	    <param name="mayscript" value="true" />
+	    <param name="scriptable" value="true" />
+	    
+	    <param name="image" value="loading.gif" />
+	    <param name="boxmessage" value="Loading Processing software..." />
+	    <param name="boxbgcolor" value="#FFFFFF" />
+	  <!--<![endif]-->
+
+	    <!-- For more instructions on deployment, 
+		 or to update the CAB file listed here, see:
+		 http://java.sun.com/javase/6/webnotes/family-clsid.html
+		 http://java.sun.com/javase/6/webnotes/install/jre/autodownload.html -->
+	    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+		    codebase="http://java.sun.com/update/1.6.0/jinstall-6u20-windows-i586.cab"
+		    width="500" height="500"
+		    standby="Loading Processing software..."  >
+	      
+	      <param name="code" value="ipab3" />
+	      <param name="archive" value="ipab3.jar,nexttext.jar,core.jar" />
+	      
+	      <param name="mayscript" value="true" />
+	      <param name="scriptable" value="true" />
+	      
+	      <param name="image" value="loading.gif" />
+	      <param name="boxmessage" value="Loading Processing software..." />
+	      <param name="boxbgcolor" value="#FFFFFF" />
+	      
+	      <p>
+		<strong>
+		  This browser does not have a Java Plug-in.
+		  <br />
+		  <a href="http://www.java.com/getjava" title="Download Java Plug-in">
+		    Get the latest Java Plug-in here.
+		  </a>
+		</strong>
+	      </p>
+	      
+	    </object>
+	    
+	  <!--[if !IE]> -->
+	  </object>
+	  <!--<![endif]-->
+
+	</div> </noscript>
+
+      </div>
+      
+      <p>
+	
+      </p>
+      
+      <p>
+	Source code: <a href="ipab3.pde">ipab3</a> 
+      </p>
+      
+      <p>
+	Built with <a href="http://processing.org" title="Processing.org">Processing</a>
+      </p>
+    </div>
+  </body>
+</html>

File project/ipab3/applet/ipab3.jar

Binary file added.

File project/ipab3/applet/ipab3.pde

View file
+
+import net.nexttext.*;
+import net.nexttext.behaviour.*;
+import net.nexttext.behaviour.control.*;
+import net.nexttext.behaviour.physics.*;
+import net.nexttext.behaviour.standard.*;
+import net.nexttext.behaviour.dform.*;
+
+
+// attributes
+Book book;
+PFont steelfish;
+
+int SPEED = 0;
+float FRAMERATES= 60;
+String PAGES = "Second";
+int BAR_SIZE = 80;
+int LABEL_HEIGHT= 100;
+int LABEL_WIDTH= 200;
+String cities[] = {
+  "Bangalore",
+  "Delhi",
+  "Kolkatta",
+  "Mumbai",
+  "Chennai"
+};
+
+int no_of_cities = cities.length;
+int no_of_cites_added = 0;
+
+String depts[] = {
+  "Revenue Department",
+  "Police Department",
+  "Electricity Department",
+  "Income Tax",
+  "Indian Railways"
+};
+
+int bribe_value[] = {
+  10,
+  5,
+  3,
+  2,
+  15
+};
+
+int destination[] = {
+  1,
+  3,
+  2,
+  0,
+  4
+};
+
+
+Behaviour behaviourTree;
+IsInside isInside;
+MoveBy moveBy;
+MoveTo moveTo;
+
+Behaviour behaviourTree1;
+IsInside isInside1;
+MoveBy moveBy1;
+MoveTo moveTo1;
+
+boolean stop = false;
+
+void setup() {
+  // init the applet
+  size(500, 500);
+  smooth();
+  frameRate(FRAMERATES);
+  rectMode(CORNER);
+  strokeWeight(2);
+  
+  // create the book
+  book = new Book(this);
+  for(int i=0; i < cities.length; i++){
+    book.addPage(cities[i]);
+    //book.addPage(depts[i]); 
+  }
+  
+  
+  // init and set the font
+  steelfish = createFont("Steelfish.ttf", 48, true);
+  textFont(steelfish);
+  
+  // add the starting stats
+ addStat(0);
+ addDept(0);
+ no_of_cites_added =  no_of_cites_added +1;
+  
+}
+
+void addStat(int type) {
+  fill(0);
+  noStroke();
+  
+  // create the Behaviour tree
+  moveBy = new MoveBy(0, (height-(type*LABEL_HEIGHT)));
+  moveTo = new MoveTo(0, height-(type*LABEL_HEIGHT));
+  isInside = new IsInside(this.getBounds(), moveBy, moveTo);
+  behaviourTree = isInside.makeBehaviour();
+    
+  book.addGroupBehaviour(behaviourTree);
+  
+  // add the text to the appropriate page
+  book.addText(cities[type], 2, 40, cities[type]);
+
+  // clean up
+  book.removeGroupBehaviour(behaviourTree);
+}
+
+void addDept(int type) {
+  fill(0);
+  noStroke();
+  
+  // create the Behaviour tree
+  moveBy1 = new MoveBy(width-LABEL_WIDTH, (height-(type*LABEL_HEIGHT)));
+  moveTo1 = new MoveTo(width-LABEL_WIDTH, (height-(type*LABEL_HEIGHT)));
+  isInside1 = new IsInside(this.getBounds(), moveBy1, moveTo1);
+  behaviourTree1 = isInside1.makeBehaviour();
+    
+  book.addGroupBehaviour(behaviourTree1);
+  // add the text to the appropriate page
+  book.addText(depts[type], 2, 40, cities[type]);  
+
+  // clean up
+  book.removeGroupBehaviour(behaviourTree1);
+}
+
+void drawBar(int type) {
+  // draw a line from the bottom-right of the applet to the top-left of the bar
+  if(!stop){
+          println("lining="+type);
+          //int destination=1;
+          stroke(255, 100, 0);
+          strokeWeight(type);
+          line((width/FRAMERATES)*(frameCount%FRAMERATES),(height-(LABEL_HEIGHT*destination[type-1])), 100, (height-(LABEL_HEIGHT*(type-1))));
+          // draw a bar representing the appropriate time frame
+          noStroke();
+          //fill(255, 243-26*type, 0);
+          fill(255, 100, 0);
+
+          rect((width/FRAMERATES)*(frameCount%FRAMERATES), 0, BAR_SIZE, height);
+          for(int i=0; i < type-1; i++){
+                stroke(0, 0, 0);
+                strokeWeight(bribe_value[i]);
+                smooth();
+                //line(100,(height-(LABEL_HEIGHT*destination[i])),100,(height-(LABEL_HEIGHT*(destination[i]))));
+                 line(100,(height-(LABEL_HEIGHT*i)), 400, (height-(LABEL_HEIGHT*(destination[i]))));
+          }
+  }
+}
+
+void draw() {
+  fill(255, 183, 0, 200);
+  rect(0, 0, width, height);
+  
+ 
+  // apply the behaviours to the text
+  book.step();
+  
+  // draw the layers in order
+  for(int i=0; i < cities.length; i++){
+      book.drawPage(cities[i]);
+      //book.drawPage(depts[i]);
+  }
+  
+  if(no_of_cites_added < no_of_cities+1){
+    drawBar(no_of_cites_added);
+  }
+  
+  // add new stats if necessary
+  if (frameCount%FRAMERATES == 0) {
+        if(no_of_cites_added < no_of_cities){
+          addStat(no_of_cites_added);
+          addDept(no_of_cites_added);
+        }
+        if( no_of_cites_added > no_of_cities){
+              stop = true;  
+        }
+       no_of_cites_added = no_of_cites_added + 1;
+  }
+
+  if(stop){
+      noLoop(); 
+      for(int i=0; i <  no_of_cities; i++){
+                stroke(0, 0, 0);
+                smooth();
+                strokeWeight(bribe_value[i]);
+                //line(100,(height-LABEL_HEIGHT-LABEL_HEIGHT*i)+50,width-LABEL_WIDTH,height);
+                 //line(100,(height-(LABEL_HEIGHT*destination[i])), 100, (height-(LABEL_HEIGHT*(i))));
+                  line(100,(height-(LABEL_HEIGHT*i)), 400, (height-(LABEL_HEIGHT*(destination[i]))));
+
+     }
+  }
+
+  
+}

File project/ipab3/applet/loading.gif

Added
New image

File project/ipab3/applet/nexttext.jar

Binary file added.

File project/ipab3/ipab3.pde

View file
 float FRAMERATES= 60;
 String PAGES = "Second";
 int BAR_SIZE = 80;
-int LABEL_HEIGHT= 80;
+int LABEL_HEIGHT= 100;
 int LABEL_WIDTH= 200;
 String cities[] = {
   "Bangalore",
 
 void setup() {
   // init the applet
-  size(600, 400);
+  size(500, 500);
   smooth();
   frameRate(FRAMERATES);
   rectMode(CORNER);

File project/view/.fuse_hidden0000065d00000001

View file
+all_content{
+
+}
+body{
+	margin: 0;
+	padding: 0;
+}
+
+h1, h2 {
+	font-family:  'BebasRegular',Tahoma, Arial, Geneva, sans-serif;
+}
+
+h1 {
+	font:27px/35px 'BebasRegular',Arial,sans-serif;
+}
+
+h2 {
+	font:18px/27px 'BebasRegular',Arial,sans-serif;
+}
+
+
+p {
+	margin: 10px 0;
+	padding: 0;
+}
+
+blockquote {
+	font-style: italic;	
+}
+
+#header-wrap {
+	position: fixed;
+	top: 0;
+	left: 0;
+	width: 100%;	
+	background-color:white;
+
+}
+
+#header-container {
+	height: 90px;
+}
+
+#header {
+	font: 18px/27px 'BebasRegular', Arial, sans-serif;
+	width: 940px;
+	margin: 0 auto;
+	position: relative;
+
+}
+
+#header h1 {
+	text-align: left;
+	width: 295px;
+	margin: 0;
+	position: absolute;
+	left: 60px;
+	top: 25px;
+	background-color:white;
+}
+
+#header h1 em{
+	font-size: small;
+	display: block;
+}
+
+#header ul {
+	margin: 0;
+	padding: 0;
+	list-style: none;
+	position: absolute;
+	top: 35px;
+	right: 0;
+}
+
+#header ul li {
+	float: left;
+	margin-right: 5px;
+}
+
+#header ul li a{
+	font-weight: bold;
+	font-size: 1.4em;
+	margin-right: 5px;
+	text-decoration: none;
+}
+
+#header ul li a:hover {
+}
+
+#container {
+	width: 940px;
+	margin: 0 auto;
+	font-size: 1.4em;
+	overflow: auto;
+	padding: 90px 0 40px;
+}
+
+#content {
+	float: left;
+	margin: 20px auto;
+	width: 900px;
+	font: 25px/32px 'TitilliumText22LRegular', Arial, sans-serif;letter-spacing: 0;
+}
+
+#sidebar {
+	float: left;
+	width: 400px;
+	margin-top: 10px;
+}
+
+#footer-wrap {
+	position: fixed;
+	bottom: 0;
+	left: 0;
+	width: 100%;	
+	background-color:white;
+}
+
+#footer-container {
+	height: 40px;
+}
+
+#footer {
+	font: 18px/27px 'BebasRegular', Arial, sans-serif;
+	width: 940px;
+	margin: 0 auto;
+	position: relative;
+}
+
+
+#footer ul {
+	margin: 0;
+	padding: 0;
+	list-style: none;
+	position: absolute;
+	right: 0;
+}
+
+#footer ul li {
+	float: left;
+	margin-right: 5px;
+}
+
+#footer ul li a{
+	margin-right: 5px;
+	text-decoration: none;
+}
+a{
+	color:#AC0604;
+	margin-right: 5px;
+	text-decoration: none;
+}
+
+
+#footer ul li a:hover {
+}
+
+#credits{
+float:left;
+font: 10px/14px 'BebasRegular', Arial, sans-serif;
+width: 240px;
+}
+
+

File project/view/.fuse_hidden0000067400000005

Binary file added.

File project/view/.fuse_hidden0000068200000002

View file
+<html>
+<head>
+<title>India Bribe Visualization</title>
+<link rel="stylesheet" href="http://media.thejeshgn.com/teaching/processing101/presentation/media/bebas/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="http://media.thejeshgn.com/teaching/processing101/presentation/media/TitilliumText/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="main.css" /> 
+</head>
+<body>
+<div id="all_content" class="all_content">
+<div id="header-wrap">
+	<div id="header-container">
+		<div id="header">
+			<h1>BRIBE VISUALIZATION</h1>
+			<ul>
+				<li>STATES -</li>
+				<li><a href="depts.html">DEPARTMENTS</a>-</li>
+				<li><a href="mapping.html">MAPPING</a></li>
+			</ul>
+		</div>
+			
+	</div>
+</div>
+
+	<div id="container">
+		<div id="content" class="content">
+		<div id="sidebar" class="sidebar">
+			Map here
+		</div>
+		<div>
+			<!--begin applet -->
+
+
+<!--[if !IE]> -->
+	  <object classid="java:filetreemap_06b.class" 
+            	  type="application/x-java-applet"
+            	  archive="filetreemap_06b.jar,treemap.jar,core.jar"
+            	  width="900" height="500"
+            	  standby="Loading Processing software..." >
+            
+	    <param name="archive" value="filetreemap_06b.jar,treemap.jar,core.jar" />
+	    
+	    <param name="mayscript" value="true" />
+	    <param name="scriptable" value="true" />
+	    
+	    <param name="image" value="loading.gif" />
+	    <param name="boxmessage" value="Loading Processing software..." />
+	    <param name="boxbgcolor" value="#FFFFFF" />
+	  <!--<![endif]-->
+
+	    <!-- For more instructions on deployment, 
+		 or to update the CAB file listed here, see:
+		 http://java.sun.com/javase/6/webnotes/family-clsid.html
+		 http://java.sun.com/javase/6/webnotes/install/jre/autodownload.html -->
+	    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+		    codebase="http://java.sun.com/update/1.6.0/jinstall-6u20-windows-i586.cab"
+		    width="900" height="500"
+		    standby="Loading Processing software..."  >
+	      
+	      <param name="code" value="filetreemap_06b" />
+	      <param name="archive" value="filetreemap_06b.jar,treemap.jar,core.jar" />
+	      
+	      <param name="mayscript" value="true" />
+	      <param name="scriptable" value="true" />
+	      
+	      <param name="image" value="loading.gif" />
+	      <param name="boxmessage" value="Loading Processing software..." />
+	      <param name="boxbgcolor" value="#FFFFFF" />
+	      
+	      <p>
+		<strong>
+		  This browser does not have a Java Plug-in.
+		  <br />
+		  <a href="http://www.java.com/getjava" title="Download Java Plug-in">
+		    Get the latest Java Plug-in here.
+		  </a>
+		</strong>
+	      </p>
+	      
+	    </object>
+	    
+	  <!--[if !IE]> -->
+	  </object>
+	  <!--<![endif]-->
+
+			<!--end applet -->
+		</div>
+		</div>
+	</div>
+
+<div id="footer-wrap">
+	<div id="footer-container">
+		<div id="footer">
+			<div id="credits">
+				<a href="http://thejeshgn.com/"><font color="#000">Thejesh</font>&nbsp;<font color="#83BE32">GN</font></a>
+			</div>
+			<ul>
+				<li><a href="http://thejeshgn.com/teaching/processing-101/">Course</a></li>
+				<li><a href="http://code.thejeshgn.com/processing101/">Code</a></li>	
+				<li><a href="http://www.delicious.com/gnthej/processing101/">Links</a></li>	
+				<li><a href="http://thejeshgn.com/contact/">Contact</a></li>	
+
+			</ul>
+		</div>
+	</div>
+</div>
+</div>
+</body>
+</html>

File project/view/.fuse_hidden0000075800000003

View file
+<html>
+<head>
+<title>India Bribe Visualization</title>
+<link rel="stylesheet" href="http://media.thejeshgn.com/teaching/processing101/presentation/media/bebas/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="http://media.thejeshgn.com/teaching/processing101/presentation/media/TitilliumText/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="main.css" /> 
+</head>
+<body>
+<div id="all_content" class="all_content">
+<div id="header-wrap">
+	<div id="header-container">
+		<div id="header">
+			<h1>BRIBE VISUALIZATION</h1>
+			<ul>
+				<li>STATES -</li>
+				<li><a href="depts.html">DEPARTMENTS</a>-</li>
+				<li><a href="mapping.html">MAPPING</a></li>
+			</ul>
+		</div>
+			
+	</div>
+</div>
+
+	<div id="container">
+		<div id="content" class="content">
+		<div id="sidebar" class="sidebar">
+			Map here
+		</div>
+		<div>
+			<!--begin applet -->
+
+
+<!--[if !IE]> -->
+	  <object classid="java:filetreemap_06b.class" 
+            	  type="application/x-java-applet"
+            	  archive="filetreemap_06b.jar,treemap.jar,core.jar"
+            	  width="900" height="500"
+            	  standby="Loading Processing software..." >
+            
+	    <param name="archive" value="ipab.jar,treemap.jar,core.jar" />
+	    
+	    <param name="mayscript" value="true" />
+	    <param name="scriptable" value="true" />
+	    
+	    <param name="image" value="loading.gif" />
+	    <param name="boxmessage" value="Loading Processing software..." />
+	    <param name="boxbgcolor" value="#FFFFFF" />
+	  <!--<![endif]-->
+
+	    <!-- For more instructions on deployment, 
+		 or to update the CAB file listed here, see:
+		 http://java.sun.com/javase/6/webnotes/family-clsid.html
+		 http://java.sun.com/javase/6/webnotes/install/jre/autodownload.html -->
+	    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+		    codebase="http://java.sun.com/update/1.6.0/jinstall-6u20-windows-i586.cab"
+		    width="900" height="500"
+		    standby="Loading Processing software..."  >
+	      
+	      <param name="code" value="filetreemap_06b" />
+	      <param name="archive" value="filetreemap_06b.jar,treemap.jar,core.jar" />
+	      
+	      <param name="mayscript" value="true" />
+	      <param name="scriptable" value="true" />
+	      
+	      <param name="image" value="loading.gif" />
+	      <param name="boxmessage" value="Loading Processing software..." />
+	      <param name="boxbgcolor" value="#FFFFFF" />
+	      
+	      <p>
+		<strong>
+		  This browser does not have a Java Plug-in.
+		  <br />
+		  <a href="http://www.java.com/getjava" title="Download Java Plug-in">
+		    Get the latest Java Plug-in here.
+		  </a>
+		</strong>
+	      </p>
+	      
+	    </object>
+	    
+	  <!--[if !IE]> -->
+	  </object>
+	  <!--<![endif]-->
+
+			<!--end applet -->
+		</div>
+		</div>
+	</div>
+
+<div id="footer-wrap">
+	<div id="footer-container">
+		<div id="footer">
+			<div id="credits">
+				<a href="http://thejeshgn.com/"><font color="#000">Thejesh</font>&nbsp;<font color="#83BE32">GN</font></a>
+			</div>
+			<ul>
+				<li><a href="http://thejeshgn.com/teaching/processing-101/">Course</a></li>
+				<li><a href="http://code.thejeshgn.com/processing101/">Code</a></li>	
+				<li><a href="http://www.delicious.com/gnthej/processing101/">Links</a></li>	
+				<li><a href="http://thejeshgn.com/contact/">Contact</a></li>	
+
+			</ul>
+		</div>
+	</div>
+</div>
+</div>
+</body>
+</html>

File project/view/.fuse_hidden0000075c00000004

View file
+<html>
+<head>
+<title>India Bribe Visualization</title>
+<link rel="stylesheet" href="http://media.thejeshgn.com/teaching/processing101/presentation/media/bebas/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="http://media.thejeshgn.com/teaching/processing101/presentation/media/TitilliumText/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="main.css" /> 
+</head>
+<body>
+<div id="all_content" class="all_content">
+<div id="header-wrap">
+	<div id="header-container">
+		<div id="header">
+			<h1>BRIBE VISUALIZATION</h1>
+			<ul>
+				<li>STATES -</li>
+				<li><a href="depts.html">DEPARTMENTS</a>-</li>
+				<li><a href="mapping.html">MAPPING</a></li>
+			</ul>
+		</div>
+			
+	</div>
+</div>
+
+	<div id="container">
+		<div id="content" class="content">
+		<div id="sidebar" class="sidebar">
+			Map here
+		</div>
+		<div>
+			<!--begin applet -->
+
+
+<!--[if !IE]> -->
+	  <object classid="java:ipab.class" 
+            	  type="application/x-java-applet"
+            	  archive="ipab.jar,treemap.jar,core.jar"
+            	  width="900" height="500"
+            	  standby="Loading Processing software..." >
+            
+	    <param name="archive" value="ipab.jar,treemap.jar,core.jar" />
+	    
+	    <param name="mayscript" value="true" />
+	    <param name="scriptable" value="true" />
+	    
+	    <param name="image" value="loading.gif" />
+	    <param name="boxmessage" value="Loading Processing software..." />
+	    <param name="boxbgcolor" value="#FFFFFF" />
+	  <!--<![endif]-->
+
+	    <!-- For more instructions on deployment, 
+		 or to update the CAB file listed here, see:
+		 http://java.sun.com/javase/6/webnotes/family-clsid.html
+		 http://java.sun.com/javase/6/webnotes/install/jre/autodownload.html -->
+	    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+		    codebase="http://java.sun.com/update/1.6.0/jinstall-6u20-windows-i586.cab"
+		    width="900" height="500"
+		    standby="Loading Processing software..."  >
+	      
+	      <param name="code" value="ipab" />
+	      <param name="archive" value="ipab.jar,treemap.jar,core.jar" />
+	      
+	      <param name="mayscript" value="true" />
+	      <param name="scriptable" value="true" />
+	      
+	      <param name="image" value="loading.gif" />
+	      <param name="boxmessage" value="Loading Processing software..." />
+	      <param name="boxbgcolor" value="#FFFFFF" />
+	      
+	      <p>
+		<strong>
+		  This browser does not have a Java Plug-in.
+		  <br />
+		  <a href="http://www.java.com/getjava" title="Download Java Plug-in">
+		    Get the latest Java Plug-in here.
+		  </a>
+		</strong>
+	      </p>
+	      
+	    </object>
+	    
+	  <!--[if !IE]> -->
+	  </object>
+	  <!--<![endif]-->
+
+			<!--end applet -->
+		</div>
+		</div>
+	</div>
+
+<div id="footer-wrap">
+	<div id="footer-container">
+		<div id="footer">
+			<div id="credits">
+				<a href="http://thejeshgn.com/"><font color="#000">Thejesh</font>&nbsp;<font color="#83BE32">GN</font></a>
+			</div>
+			<ul>
+				<li><a href="http://thejeshgn.com/teaching/processing-101/">Course</a></li>
+				<li><a href="http://code.thejeshgn.com/processing101/">Code</a></li>	
+				<li><a href="http://www.delicious.com/gnthej/processing101/">Links</a></li>	
+				<li><a href="http://thejeshgn.com/contact/">Contact</a></li>	
+
+			</ul>
+		</div>
+	</div>
+</div>
+</div>
+</body>
+</html>

File project/view/.fuse_hidden0000075e00000009

View file
+<html>
+<head>
+<title>India Bribe Visualization</title>
+<link rel="stylesheet" href="http://media.thejeshgn.com/teaching/processing101/presentation/media/bebas/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="http://media.thejeshgn.com/teaching/processing101/presentation/media/TitilliumText/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="main.css" /> 
+</head>
+<body>
+<div id="all_content" class="all_content">
+<div id="header-wrap">
+	<div id="header-container">
+		<div id="header">
+			<h1>BRIBE VISUALIZATION</h1>
+			<ul>
+				<li>STATES -</li>
+				<li><a href="depts.html">DEPARTMENTS</a>-</li>
+				<li><a href="mapping.html">MAPPING</a></li>
+			</ul>
+		</div>
+			
+	</div>
+</div>
+
+	<div id="container">
+		<div id="content" class="content">
+		<div id="sidebar" class="sidebar">
+			Map here
+		</div>
+		<div>
+			<!--begin applet -->
+
+
+<!--[if !IE]> -->
+	  <object classid="java:ipab.class" 
+            	  type="application/x-java-applet"
+            	  archive="ipab.jar,treemap.jar,core.jar"
+            	  width="500" height="500"
+            	  standby="Loading Processing software..." >
+            
+	    <param name="archive" value="ipab.jar,treemap.jar,core.jar" />
+	    
+	    <param name="mayscript" value="true" />
+	    <param name="scriptable" value="true" />
+	    
+	    <param name="image" value="loading.gif" />
+	    <param name="boxmessage" value="Loading Processing software..." />
+	    <param name="boxbgcolor" value="#FFFFFF" />
+	  <!--<![endif]-->
+
+	    <!-- For more instructions on deployment, 
+		 or to update the CAB file listed here, see:
+		 http://java.sun.com/javase/6/webnotes/family-clsid.html
+		 http://java.sun.com/javase/6/webnotes/install/jre/autodownload.html -->
+	    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+		    codebase="http://java.sun.com/update/1.6.0/jinstall-6u20-windows-i586.cab"
+		    width="500" height="500"
+		    standby="Loading Processing software..."  >
+	      
+	      <param name="code" value="ipab" />
+	      <param name="archive" value="ipab.jar,treemap.jar,core.jar" />
+	      
+	      <param name="mayscript" value="true" />
+	      <param name="scriptable" value="true" />
+	      
+	      <param name="image" value="loading.gif" />
+	      <param name="boxmessage" value="Loading Processing software..." />
+	      <param name="boxbgcolor" value="#FFFFFF" />
+	      
+	      <p>
+		<strong>
+		  This browser does not have a Java Plug-in.
+		  <br />
+		  <a href="http://www.java.com/getjava" title="Download Java Plug-in">
+		    Get the latest Java Plug-in here.
+		  </a>
+		</strong>
+	      </p>
+	      
+	    </object>
+	    
+	  <!--[if !IE]> -->
+	  </object>
+	  <!--<![endif]-->
+
+			<!--end applet -->
+		</div>