class TheItem extends SimpleMapItem { String name; PImage c; color colorFill; String adjective; int fillValue; int TheSize; int countryNum; TheItem(String name) { this. name = name; } TheItem(String name, PImage c, color color_, String adjective, double TheSize, int countryNum) { this.countryNum = countryNum; this. name = name; this. TheSize = (int) TheSize; this. c = c; this. colorFill = color_; this.adjective = adjective; //fillValue = 200; } void draw( ) { //colorMode(HSB); if(termInUse.equals(name)){ //textFont(font); fillValue = 255; fill(colorFill) ; textFont(font); textAlign(LEFT,TOP) ; text(adjective + " " + name, border, border*2+(countryNum * 34)) ;//+95+82 /border *4 text(TheSize, 300-(border*5), border*2+(countryNum * 34)) ; strokeWeight(1.0f) ;//0.5f stroke(colorFill) ; //line(x,y+5,315, 82+(countryNum * 20)-5); line(x,y+5,200, border*2+(countryNum * 34)+20); rect(200, border*2+(countryNum * 34)+20, ((w+h))/2, 10); } else{fillValue = 60;} strokeWeight(0.25f) ; stroke(0) ; fill(colorFill, fillValue) ; //color cp = get(30, 20); //fill(200); rect(x, y, w, h) ; //c.resize((int)10,(int)h-1); //println("x: " + x + "y: " +y); //c.resize(0,20); //image(c,x,y); } void label( ) { //colorMode(RGB,255,255,255); if (mouseX > x && mouseX < x + w && mouseY > y && mouseY < y + h) { textFont(font2); fill(colorFill) ; textAlign(LEFT,TOP); if(x>width/2){ textAlign(RIGHT,TOP); } int addY = 0; if(y>530){ addY = (-150); } fill(0) ; text(adjective + " " + name + " " + TheSize, x+3 + w/2, y+2 + h/2 + addY) ; fill(colorFill) ; text(adjective + " " + name + " " + TheSize, x + w/2, y + h/2 + addY) ;//text(name, x + w/2, y + h/2 + addY) ; //text(name, x + w/2, y + h/2) ; //fill(200,200,200) ; textAlign(RIGHT,TOP) ; //text(adjective + " " + name, width-(border*2), 290) ; //text(TheSize , width-(border*2), 210) ; //text(TheSize , width-(border*2), 210) ; if(termInUse != name){ realSearchTerm = adjective + "+" + name; googCount = 0; //fetchLinks(); } if(termInUse == name){ googCount++; } if(googCount == 40){ fetchThread=new Thread(fetch); fetch.run(); fetchThread.start(); safety = true; //fetchLinks(); } //println(googCount); termInUse = name; //goog.display(name); //delay(1000); } } }