author | viric@mandarina |
Sun, 14 Jan 2007 20:05:40 +0100 | |
changeset 10 | 757b42639637 |
parent 7 | 19f4a2b1a4b9 |
permissions | -rw-r--r-- |
0 | 1 |
package horaris; |
2 |
||
3 |
import javax.microedition.lcdui.*; |
|
4 |
import java.util.Vector; |
|
7
19f4a2b1a4b9
Added option for showing comments for each Convoy.
viric@mandarina
parents:
5
diff
changeset
|
5 |
import java.util.Hashtable; |
0 | 6 |
|
7 |
import ogdl.*; |
|
8 |
||
5 | 9 |
public class TimeList implements CommandListener, Ekrano |
0 | 10 |
{ |
11 |
private Graph list; |
|
12 |
private List mylist; |
|
13 |
private Command cmd_malantauxen; |
|
14 |
private Vector vtempoj; |
|
7
19f4a2b1a4b9
Added option for showing comments for each Convoy.
viric@mandarina
parents:
5
diff
changeset
|
15 |
private Hashtable hinfo; |
5 | 16 |
private Ekrano last; |
0 | 17 |
|
7
19f4a2b1a4b9
Added option for showing comments for each Convoy.
viric@mandarina
parents:
5
diff
changeset
|
18 |
public TimeList(Vector t, Hashtable info, Ekrano _last) |
0 | 19 |
{ |
20 |
vtempoj = t; |
|
7
19f4a2b1a4b9
Added option for showing comments for each Convoy.
viric@mandarina
parents:
5
diff
changeset
|
21 |
hinfo = info; |
5 | 22 |
last = _last; |
4
f92e04d4bfe5
Default Tagoj. Implicit Main List. Less println.
viric@llimona
parents:
2
diff
changeset
|
23 |
mylist = new List("Sortida-Arribada", List.IMPLICIT); |
0 | 24 |
|
25 |
for (int i=0; i < vtempoj.size(); i++) |
|
26 |
mylist.append((String) vtempoj.elementAt(i), null); |
|
27 |
||
28 |
cmd_malantauxen = new Command("Enrera", Command.BACK, 0); |
|
29 |
||
30 |
mylist.addCommand(cmd_malantauxen); |
|
31 |
mylist.setCommandListener(this); |
|
10 | 32 |
} |
33 |
||
34 |
public void show() |
|
35 |
{ |
|
5 | 36 |
Main.display.setCurrent(mylist); |
0 | 37 |
} |
38 |
||
39 |
public void commandAction(Command c, Displayable d) |
|
40 |
{ |
|
41 |
if (c == cmd_malantauxen) |
|
42 |
{ |
|
5 | 43 |
last.show(); |
44 |
} else if (c == List.SELECT_COMMAND) |
|
45 |
{ |
|
7
19f4a2b1a4b9
Added option for showing comments for each Convoy.
viric@mandarina
parents:
5
diff
changeset
|
46 |
String str = mylist.getString(mylist.getSelectedIndex()); |
19f4a2b1a4b9
Added option for showing comments for each Convoy.
viric@mandarina
parents:
5
diff
changeset
|
47 |
ShowText st = new ShowText((Vector) hinfo.get(str), this); |
0 | 48 |
} |
49 |
} |
|
50 |
} |