Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.HashMap;
- import java.util.ArrayList;
- import processing.core.*;
- import fontastic.*;
- public class FaceBooklet extends PApplet {
- Fontastic f;
- float fontSize;
- public static ArrayList<FaceBookletProfile> friends;
- public static HashMap <FaceBookletProfile, ArrayList<FaceBookletProfile>> profiles;
- public static void main(String[]args){
- FaceBookletDatabase database = new FaceBookletDatabase();
- FaceBookletProfile Sam = new FaceBookletProfile("Sam", "running");
- FaceBookletProfile Bob = new FaceBookletProfile("Bob", "walking");
- FaceBookletProfile Jack = new FaceBookletProfile("Jack", "swimming");
- Sam.addFriends(Bob);
- Sam.addFriends(Jack);
- //String inputString = Sam.getStatus();
- //database.addProfile(Sam, friends);
- //database.addProfile(Bob, friends);
- //database.addProfile(Jack, friends);
- //database.deleteProfile(Sam);
- //Sam.addFriends(Bob);
- //Sam.addFriends(Jack);
- //Bob.addFriends(Jack);
- PApplet.main(new String[] {"FaceBooklet"});
- FaceBooklet booklet = new FaceBooklet();
- booklet.draw(Sam);
- }
- /**
- * Load and Display
- *
- * Images can be loaded and displayed to the screen at their actual size
- * or any other size.
- */
- PImage img; // Declare variable "a" of type PImage
- public void setup() {
- // The image file must be in the data folder of the current sketch
- // to load successfully
- img = loadImage("moonwalk.jpg"); // Load the image into the program
- }
- public void draw(FaceBookletProfile profile) {
- // Displays the image at its actual size at point (0,0)
- image(img, 0, 0);
- // Displays the image at point (0, height/2) at half of its size
- //image(img, 0, height/2, img.width/2, img.height/2);
- // display the text in readable font
- fill(0);
- textSize(14);
- text(profile.toString(), width/2, height-20);
- }
- public void settings() {
- size(640, 640);
- }
- }
- /**
- * ControlP5 ControlWindow
- * by andreas schlegel, 2012
- */
Add Comment
Please, Sign In to add comment