Guest User

Untitled

a guest
Mar 19th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. import java.util.HashMap;
  2. import java.util.ArrayList;
  3. import processing.core.*;
  4. import fontastic.*;
  5.  
  6. public class FaceBooklet extends PApplet {
  7.  
  8. Fontastic f;
  9. float fontSize;
  10.  
  11.  
  12. public static ArrayList<FaceBookletProfile> friends;
  13. public static HashMap <FaceBookletProfile, ArrayList<FaceBookletProfile>> profiles;
  14.  
  15.  
  16.  
  17. public static void main(String[]args){
  18. FaceBookletDatabase database = new FaceBookletDatabase();
  19.  
  20. FaceBookletProfile Sam = new FaceBookletProfile("Sam", "running");
  21.  
  22. FaceBookletProfile Bob = new FaceBookletProfile("Bob", "walking");
  23. FaceBookletProfile Jack = new FaceBookletProfile("Jack", "swimming");
  24. Sam.addFriends(Bob);
  25. Sam.addFriends(Jack);
  26. //String inputString = Sam.getStatus();
  27. //database.addProfile(Sam, friends);
  28. //database.addProfile(Bob, friends);
  29. //database.addProfile(Jack, friends);
  30. //database.deleteProfile(Sam);
  31.  
  32. //Sam.addFriends(Bob);
  33. //Sam.addFriends(Jack);
  34. //Bob.addFriends(Jack);
  35.  
  36.  
  37.  
  38. PApplet.main(new String[] {"FaceBooklet"});
  39. FaceBooklet booklet = new FaceBooklet();
  40. booklet.draw(Sam);
  41. }
  42. /**
  43. * Load and Display
  44. *
  45. * Images can be loaded and displayed to the screen at their actual size
  46. * or any other size.
  47. */
  48.  
  49. PImage img; // Declare variable "a" of type PImage
  50.  
  51. public void setup() {
  52.  
  53. // The image file must be in the data folder of the current sketch
  54. // to load successfully
  55. img = loadImage("moonwalk.jpg"); // Load the image into the program
  56. }
  57.  
  58. public void draw(FaceBookletProfile profile) {
  59. // Displays the image at its actual size at point (0,0)
  60. image(img, 0, 0);
  61. // Displays the image at point (0, height/2) at half of its size
  62. //image(img, 0, height/2, img.width/2, img.height/2);
  63.  
  64. // display the text in readable font
  65. fill(0);
  66. textSize(14);
  67.  
  68.  
  69. text(profile.toString(), width/2, height-20);
  70. }
  71.  
  72.  
  73. public void settings() {
  74. size(640, 640);
  75. }
  76. }
  77.  
  78.  
  79.  
  80. /**
  81. * ControlP5 ControlWindow
  82. * by andreas schlegel, 2012
  83. */
Add Comment
Please, Sign In to add comment