Skip to content

Commit

Permalink
adjusted 'before' project of demo video
Browse files Browse the repository at this point in the history
  • Loading branch information
chisandrei committed Mar 5, 2013
1 parent 36baa7d commit b875483
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 139 deletions.
Binary file removed DemoVideo/~$Script.rtf
Binary file not shown.
89 changes: 0 additions & 89 deletions DemoVideo/~WRL0005.tmp

This file was deleted.

1 change: 0 additions & 1 deletion DemoVideo_before/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="ch.unibe.scg.doodle.buildpath.DD_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>
5 changes: 1 addition & 4 deletions DemoVideo_before/src/demo/DemoMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import java.io.IOException;

import ch.unibe.scg.doodle.Doo;

import demo.model.Directory;
import demo.util.DemoUtil;

Expand All @@ -22,7 +20,6 @@ public static void main(String[] args) throws IOException {
directory.addContact(DemoUtil.randomContact());
}

Doo.dle(directory);
// System.out.println(directory);
System.out.println(directory);
}
}
18 changes: 16 additions & 2 deletions DemoVideo_before/src/demo/model/Address.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package demo.model;


public class Address {
private String street;
private int zipCode;
private String city;
private String country;

public Address(String street, int zipCode, String city, String country) {
super();
this.street = street;
Expand All @@ -30,4 +29,19 @@ public String getCity() {
public String getCountry() {
return country;
}

// @Override
// public void doodleOn(DoodleCanvas c) {
// c.draw(street);
// c.newLine();
// c.draw(zipCode);
// c.draw(city);
// c.newColumn();
// c.draw(country);
// }
//
// @Override
// public void summarizeOn(DoodleCanvas c) {
// c.draw(city);
// }
}
21 changes: 1 addition & 20 deletions DemoVideo_before/src/demo/model/Contact.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

import java.awt.Image;

import ch.unibe.scg.doodle.api.DoodleCanvas;
import ch.unibe.scg.doodle.api.Doodleable;

public class Contact implements Doodleable {
public class Contact {
private String name;
private Address address;
private PhoneNumber phoneNumber;
Expand Down Expand Up @@ -40,20 +37,4 @@ public String toString() {
return "\n(" + name + ", " + address + ", " + phoneNumber + ")";
}

@Override
public void doodleOn(DoodleCanvas c) {
c.draw(picture);
c.newColumn();
c.draw(name);
c.newLine();
c.draw(phoneNumber);
c.newColumn();
c.draw(address);
}

@Override
public void summarizeOn(DoodleCanvas c) {
c.draw(name);
}

}
24 changes: 1 addition & 23 deletions DemoVideo_before/src/demo/model/Directory.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
import java.util.ArrayList;
import java.util.Collection;

import ch.unibe.scg.doodle.api.DoodleCanvas;
import ch.unibe.scg.doodle.api.Doodleable;

public class Directory implements Doodleable {
public class Directory {
private Collection<Contact> contacts;

public Directory() {
Expand All @@ -23,25 +20,6 @@ public int numberOfContacts() {

public String toString() {
return contacts.toString();
// String result = "";
// result += "Directory: (";
// for (Contact contact : contacts) {
// result += contact+", ";
// }
// result += ")";
}

@Override
public void doodleOn(DoodleCanvas c) {
for (Contact contact : contacts) {
c.draw(contact);
c.newLine();
}
}

@Override
public void summarizeOn(DoodleCanvas c) {
c.draw("Directory with " + numberOfContacts() + " contacts");
}

}
11 changes: 11 additions & 0 deletions DemoVideo_before/src/demo/model/PhoneNumber.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,15 @@ public String getRest() {
return rest;
}

// @Override
// public void doodleOn(DoodleCanvas c) {
// c.draw(areaCode);
// c.draw(rest);
// }
//
// @Override
// public void summarizeOn(DoodleCanvas c) {
// doodleOn(c);
// }

}

0 comments on commit b875483

Please sign in to comment.