Project
week no. |
week 10 |
week 11 |
week 12 |
week 13 |
main activity |
refining research conclusions coming up with concept directions |
working out concepts |
working out concepts / preparing for interim presentation |
interim presentation |
side activities / detailled planning |
coming up |
coming up |
coming up |
coming up |
week no. |
week 14 |
week 15 |
week 16 |
week 17 |
main activity |
working out one idea to a final concept |
coming up |
coming up |
coming up |
side activities / detailled planning |
coming up |
coming up |
coming up |
coming up |
planning week 14
monday |
tuesday |
wednesday |
thursday |
friday |
filter out and combine the best parts of each idea. Add extra components when needed |
Work out the concept and show it in scenario's. deadline Final concept clear and worked out. |
Finalize scenario's and possibly make some other visualisations |
make everythink presentable for coach meeting deadline Final concept totally finished. Show to coaches |
JAVA workshop |
planning week 11
monday |
tuesday |
wednesday |
thursday |
friday |
|
linking research pointing out most important relations |
working thowards concepts / (preparation for) workshop with Jun Hu |
meeting with Philip Ross / Coaches meeting |
Workshops
Java D workshop
Schedule
- April 08, Friday, 9:30am-11:30am HG4.95
- Topics
- Distributed Media
- ITML examples
itml example
<itml> <head> <layout> <actor id="rutger" top="0" left="0" width="1024" height="768" fit="fill" address="localhost:7086"/> </layout> </head> <body> <par> <action id="coldid" src="file:/cold.tmp" actor="rutger" dur="5000s"> <anchor onevent="coldid.warmest" href="#showgoogle" /> </action> </par> <action id="showgoogle" src="http://www.google.com/intl/zh-CN/about.html" actor="rutger" /> </body> </itml>
BallListener
1 package nl.tue.id.dps.swing;
2
3 /**
4 * <p>Title: ITML</p>
5 *
6 * <p>Description: Distributed Media Extension to X-Smiles</p>
7 *
8 * <p>Copyright: Copyright (c) 2004</p>
9 *
10 * <p>Company: ID, TU/e</p>
11 *
12 * @author HU, Jun
13 * @version 1.0
14 */
15 public interface BallListener {
16 public void becomeWarm();
17 public void becomeCold();
18 public void becomeWarmer();
19 public void becomeWarmest();
20 }
BallFrame
1 package nl.tue.id.dps.swing;
2
3 import java.awt.*;
4 import javax.swing.*;
5 import java.awt.event.MouseEvent;
6 import java.awt.event.MouseAdapter;
7 import java.util.Vector;
8 import java.util.Iterator;
9
10 /**
11 * <p>Title: ITML</p>
12 *
13 * <p>Description: Distributed Media Extension to X-Smiles</p>
14 *
15 * <p>Copyright: Copyright (c) 2004</p>
16 *
17 * <p>Company: ID, TU/e</p>
18 *
19 * @author HU, Jun
20 * @version 1.0
21 */
22 public class BallFrame
23 extends JFrame {
24 TimeCounter counter = new TimeCounter();
25 BorderLayout borderLayout1 = new BorderLayout();
26 JPanel ballPanel = new JPanel();
27 Vector listeners = new Vector();
28
29 public void addBallListener(BallListener listener){
30 listeners.add(listener);
31 }
32
33 public void removeBallListener(BallListener listener){
34 listeners.remove(listener);
35 }
36
37 public static void main(String arg[]){
38 BallFrame ball = new BallFrame();
39 ball.pack();
40 ball.show();
41 ball.cold();
42 }
43
44 public BallFrame() {
45 try {
46 jbInit();
47 }
48 catch (Exception exception) {
49 exception.printStackTrace();
50 }
51 counter.start();
52 }
53
54 private void jbInit() throws Exception {
55 getContentPane().setLayout(borderLayout1);
56 ballPanel.addMouseListener(new BallFrame_ballPanel_mouseAdapter(this));
57 this.getContentPane().add(ballPanel, java.awt.BorderLayout.CENTER);
58 ballPanel.setMinimumSize(new Dimension(640, 480));
59 ballPanel.setPreferredSize(new Dimension(640, 480));
60 }
61
62 public void setBallColor(Color c){
63 ballPanel.setBackground(c);
64 }
65
66 public void ballPanel_mousePressed(MouseEvent e) {
67 counter.startCounting();
68
69 }
70
71 public void ballPanel_mouseReleased(MouseEvent e) {
72 counter.stopCounting();
73 }
74
75 public void cold(){
76 setBallColor(Color.blue);
77 Iterator i = listeners.iterator();
78 while(i.hasNext()){
79 BallListener ballListener = (BallListener)i.next();
80 ballListener.becomeCold();
81 }
82 }
83
84 public void warm(){
85 setBallColor(Color.yellow);
86 Iterator i = listeners.iterator();
87 while(i.hasNext()){
88 BallListener ballListener = (BallListener)i.next();
89 ballListener.becomeWarm();
90 }
91 }
92
93 public void warmer(){
94 setBallColor(Color.orange);
95 Iterator i = listeners.iterator();
96 while(i.hasNext()){
97 BallListener ballListener = (BallListener)i.next();
98 ballListener.becomeWarmer();
99 }
100 }
101
102 public void warmest(){
103 setBallColor(Color.red);
104 Iterator i = listeners.iterator();
105 while(i.hasNext()){
106 BallListener ballListener = (BallListener)i.next();
107 ballListener.becomeWarmest();
108 }
109 }
110
111 class TimeCounter extends Thread {
112 boolean counting = false;
113 int n = 0;
114 public void run(){
115 while(true){
116 if(counting){
117 try {
118 sleep(2000);
119 }
120 catch (InterruptedException ex1) {
121 }
122 n = n+1;
123 if (n == 1){
124 warm();
125 }
126 else if (n== 2){
127 warmer();
128 }
129 else if (n==3){
130 warmest();
131 }
132 else{
133 n = 4;
134 }
135
136 }
137 else{
138 try {
139 sleep(2000);
140 }
141 catch (InterruptedException ex1) {
142 }
143 n = n-1;
144 if (n == 3){
145 warmest();
146 }
147 else if (n== 2){
148 warmer();
149 }
150 else if (n==1){
151 warm();
152 }
153 else{
154 n = 0;
155 cold();
156 }
157
158 }
159 }
160
161 }
162 public void startCounting(){
163 counting = true;
164 }
165 public void stopCounting(){
166 counting = false;
167 }
168 }
169
170
171 }
172
173
174 class BallFrame_ballPanel_mouseAdapter
175 extends MouseAdapter {
176 private BallFrame adaptee;
177 BallFrame_ballPanel_mouseAdapter(BallFrame adaptee) {
178 this.adaptee = adaptee;
179 }
180
181 public void mousePressed(MouseEvent e) {
182 adaptee.ballPanel_mousePressed(e);
183 }
184
185 public void mouseReleased(MouseEvent e){
186 adaptee.ballPanel_mouseReleased(e);
187 }
188 }
TemperatureTimedPresentation
1 package nl.tue.id.dps.swing;
2
3 import nl.tue.id.dps.TimedPresentation;
4 import java.util.Date;
5 import java.net.URL;
6 import nl.tue.id.dps.PresentationEvent;
7
8 /**
9 * <p>Title: ITML</p>
10 *
11 * <p>Description: Distributed Media Extension to X-Smiles</p>
12 *
13 * <p>Copyright: Copyright (c) 2004</p>
14 *
15 * <p>Company: ID, TU/e</p>
16 *
17 * @author HU, Jun
18 * @version 1.0
19 */
20 public class TemperatureTimedPresentation
21 extends TimedPresentation implements BallListener {
22
23 static BallFrame ball = new BallFrame();
24 String temperature = "cold";
25
26 public TemperatureTimedPresentation() {
27
28 }
29
30 protected void create(URL src) {
31 temperature = removeExtension(getFileName(src));
32 if(!ball.isVisible()){
33 ball.pack();
34 ball.cold();
35 ball.show();
36 }
37 }
38
39 protected void destroy() {
40 }
41
42 protected void pause() {
43 }
44
45 protected void start() {
46 ball.addBallListener(this);
47
48 if(temperature.equals("cold")){
49 ball.cold();
50 }
51 else if(temperature.equals("warm")){
52 ball.warm();
53 }
54 else if(temperature.equals("warmer")){
55 ball.warmer();
56 }
57 else if(temperature.equals("warmest")){
58 ball.warmest();
59 }
60 }
61
62 protected void stop() {
63 ball.removeBallListener(this);
64 }
65
66 protected boolean couldBePaused() {
67 return false;
68 }
69
70 private String getFileName(final URL url) {
71 final String file = url.getFile();
72 final int last = file.lastIndexOf("/");
73 if (last < 0) {
74 return file;
75 }
76 return file.substring(last + 1);
77 }
78
79 private String removeExtension(final String filename) {
80 final int index = filename.lastIndexOf('.');
81
82 if ( -1 == index) {
83 return filename;
84 }
85 else {
86 return filename.substring(0, index);
87 }
88 }
89
90 public void becomeWarm() {
91 this.fireEvent(new PresentationEvent("temperature","warm"));
92 }
93
94 public void becomeCold() {
95 this.fireEvent(new PresentationEvent("temperature","cold"));
96 }
97
98 public void becomeWarmer() {
99 this.fireEvent(new PresentationEvent("temperature","warmer"));
100 }
101
102 public void becomeWarmest() {
103 this.fireEvent(new PresentationEvent("temperature","warmest"));
104 }
105
106 }
TPFactoryImpl
1 package nl.tue.id.dps.swing;
2
3 import nl.tue.id.dps.*;
4
5 /**
6 * <p>Title: </p>
7 * <p>Description: </p>
8 * <p>Copyright: Copyright (c) 2003</p>
9 * <p>Company: </p>
10 *
11 * @author not attributable
12 * @created March 14, 2003
13 * @version 1.0
14 */
15 public class TPFactoryImpl
16 extends TPFactoryBasicImpl {
17
18 protected void setTPManifest() {
19 addPresentation(new String[] {"temperature"},
20 TemperatureTimedPresentation.class,
21 new String[] {
22 "tmp"
23 });
24 addPresentation(new String[] {"image", "img"},
25 ImageTimedPresentation.class,
26 new String[] {
27 "jpg","gif","png"
28 });
29 addPresentation(new String[]{"jmfvideo", "video"},
30 VideoTimedPresentation.class,
31 new String[] {
32 "avi", "mvr","mpg","mov","swf", "spl"
33 });
34 addPresentation(new String[]{"jmpaudio", "audio"},
35 AudioTimedPresentation.class,
36 new String[] {
37 "aif", "aiff","avi","gsm","mid","mp2","mp3","mov","au","wav"
38 });
39 addPresentation(new String[]{"smil", "itml"},
40 ITMLTimedPresentation.class,
41 new String[] {
42 "smi","smil","itm","itml"
43 });
44 addPresentation(new String[] {"html", "htm"},
45 HTMLTimedPresentation.class,
46 new String[] {
47 "htm","html"
48 });
49 addPresentation(new String[] {"xul"},
50 ThinletTimedPresentation.class,
51 new String[] {
52 "xul"
53 });
54 addPresentation(new String[] {"lirc"},
55 LIRCTimedPresentation.class,
56 new String[] {
57 "lirc"
58 });
59 addPresentation(new String[] {"behavior"},
60 TonyTimedPresentation.class,
61 new String[] {
62 "bhv"
63 });
64
65 }
66
67 }
Java C workshop
Schedule
- March 24, Thursday, 10:30am - 12:30pm, HG4.95
- Topics
- Distributed Media
- ITML
- An example: distributed presentations.
- attachment:TOONS.zip
- Distributed Media
Java Workshop
Schedule
- March 17, Thursday, 13:30pm - 16:00pm, HG4.95
- There will be no powerpoint slide shows, but a projector is necessary.
- Everybody brings her/his computer to the workshop, with a network cable. We are going to do some hands-on programming.
- Topics:
- Object-oriented programming
- Working with JBuilder - an IDE (integrated development environment)
- Projects
- packages
- uml/refactory
- help/documentation
- debug
- Distributed Media
- ITML
- An example: distributed presentations.
Preparation
Please install Borland JBuilder 2005. It is available as [http://w3.tue.nl/en/services/dienst_ict/organisatie/groepen/wins/campus_software/borland_jbuilder/ campus sofware].
- Make sure your Java Media Framework properly installed.
- [attachment:itml.zip ITML player source code + libraries]. Please download it, unzip it to anywhere on your harddisk.
- It is indeed pretty big (80+M), becuase it includes all kinds of libraries, and some MPG movies. Don't worry, you may always remove it from your computer easily by removing entire itml0.91 directory with no harm.
SMIL Workshop
A introduction on SMIL (JunHu)
- Hands-on practice: Let's make an interactive movie.
[http://www.helio.org/products/smil/tutorial/ SMIL tutorial] by Helio. Download a copy to your hard disk. try to play the smil documents (in chapter8/sources) with X-smiles.
[http://ttt.forno.us/en/tutorial/learning_to_smil/ Learning to SMIL]: a SMIL 2.0 tutorial into 10 lessons and provides (minimal) exercises with answers
[http://www.geocities.com/ramirez_j2001/smil_intro/smil_intro_direct.smil Intro to SMIL version 1.0], Tutorial on SMIL written in SMIL - pretty cool ! requires RealNetworks G2, 80KB SMIL 1.0 with RealText.
The example I failed to show you in the workshop is fixed here. It demostrates the user interaction event based synchronization:
<smil> <head> <layout> <root-layout width="300" height="200" background-color="white" /> <region id="vim_icon" left="75" top="50" width="32" height="32" /> <region id="soja_icon" left="150" top="50" width="100" height="30" /> </layout> </head> <body> <par begin="2s" dur="6s"> <img id="vim" src="vim32x32.gif" alt="The vim icon" region="vim_icon" dur="6s" /> <img src="madewithsoja.gif" alt="Made with SOJA" region="soja_icon" dur="4s" begin="vim.activateEvent" /> </par> </body> </smil>
After 2 seconds, it shows you a Vim icon. You have 4 seconds chance to click on the icon. If it is clicked (vim.activateEvent), it will show "madewithsoja.gif". To see this SMIL example in action, you should have vim32x32.gif and madewithsoja.gif in the same directory. Try it out. then smile.
Preparation
- Everybody should bring her/his laptop to the workshop, with following software installed:
[http://java.sun.com/j2se/1.4.2/download.html Java 2 Platform, Standard Edition, v 1.4.2 (J2SE)]
[http://java.sun.com/products/java-media/jmf/2.1.1/download.html Java Media Framework]
[http://www.xsmiles.org/download.html The complete X-Smiles XML-browser], not only the standalone SMIL player.
- Prepare some nice JPG pictures, MP3 music and AVI movies.
- You are going to click a lot, so bring your computer mouse with you - the touch pad will kill you with RSI.