summaryrefslogtreecommitdiff
path: root/NET/worlds/console/AvatarDialogTest.java
blob: b8867f4cf835b41177174c6793696a46436704e7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*    */ package NET.worlds.console;
/*    */ 
/*    */ import java.util.Vector;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class AvatarDialogTest
/*    */   implements AvatarDialogCallback
/*    */ {
/* 12 */   private static final String[] components = { "Color", "Weather", "Height", 
/* 13 */     "Shape" };
/*    */   
/* 15 */   private static final String[] colors = { "Red", "Orange", "Yellow", 
/* 16 */     "Green", "Blue", "Violet" };
/*    */   
/* 18 */   private static final String[] weather = { "Sunny", "Cloudy", "Raining", 
/* 19 */     "Snowing" };
/*    */   
/* 21 */   private static final String[] heights = { "Short", "Medium", "Tall" };
/*    */   
/* 23 */   private static final String[] shapes = { "Circle", "Rectangle", "Triangle" };
/*    */   
/* 25 */   private static final String[][] items = { colors, weather, heights, shapes };
/*    */   
/* 27 */   private static int[] settings = new int[components.length];
/*    */   
/*    */ 
/*    */ 
/*    */   public Vector<String> getComponents()
/*    */   {
/* 33 */     return stringsToVector(components);
/*    */   }
/*    */   
/*    */   public Vector<String> getChoices(int index) {
/* 37 */     return stringsToVector(items[index]);
/*    */   }
/*    */   
/*    */   public int getCurrentSelection(int index) {
/* 41 */     return settings[index];
/*    */   }
/*    */   
/*    */   public void setCurrentSelection(int index, int choice) {
/* 45 */     settings[index] = choice;
/*    */   }
/*    */   
/*    */   private static Vector<String> stringsToVector(String[] strings) {
/* 49 */     Vector<String> v = new Vector();
/* 50 */     for (int i = 0; i < strings.length; i++)
/* 51 */       v.addElement(strings[i]);
/* 52 */     return v;
/*    */   }
/*    */ }


/* Location:              C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\AvatarDialogTest.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */