class Rect { float x, y, w, h; String name; int deweyClass; color col; color strokeColor; int count; int level; int orientation = 0; public Rect(int level, int deweyClass, String name, int count, color col, color strokeColor) { this.level = level; this.deweyClass = deweyClass; this.name = name; this.count = count; this.col = col; this.strokeColor = strokeColor; } public Rect() { } public String toString() { return "{Rectangle Name: " + name + ", " + count + ", " + x + "/" + y + "/" + w + "/" + h + "}"; } public void draw() { fill(col); if (level == 1) { strokeWeight(2); } else { strokeWeight(1); } stroke(strokeColor); if(level == 2 && mouseX > x && mouseX < x + w && mouseY > y && mouseY < y + h) { categoryToDraw = name; fill(2, 255); } rect(x,y,w,h); if(showGlow) { if(level == 1 && orientation == 1) { image(horizontal, x, y, w, h); } else if(level == 1) { image(vertical, x, y, w, h); } } } }