Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
531 | ligi | 1 | public class DUBwiseProps |
2 | |||
3 | { |
||
4 | |||
5 | |||
6 | public String[] optional_feature_strings={"J2MEMaps","OpenLAPI"}; |
||
7 | |||
8 | |||
9 | // public String[] sound_strings={"en_speedy","en_wav","de_tts","de_wav","de_64kbit_tts","wav","no_voice"}; |
||
10 | |||
11 | public int[][] res_vals = { {480,640},{340,400},{240,320},{200,300},{176,220},{128,128} }; |
||
12 | public String[] res_strings; |
||
13 | |||
14 | public String[] feature_strings={"Bluetooth","Location API","File Connection","Device Control","cldc11"}; |
||
15 | |||
16 | |||
17 | public String[] sound_strings={"no sound","en mp3@32kbit","en mp3@64kbit","en wav"}; |
||
18 | public String[] sound_clean_strings={"no_voice","en_mp3_32kbit","en_mp3_64kbit","en_wav"}; |
||
19 | |||
20 | public String[] firmware_strings={"No Firmwars","All Firmwares","FC&MK3MAG Firmwares"}; |
||
21 | public String[] firmware_clean_strings={"no_firmwares","all_firmwares","fc_mk3mag_firmwares"}; |
||
22 | |||
23 | |||
24 | public String[] installsrc_strings={"stable (latest tag)","Bleeding Edge (trunk)"}; |
||
25 | public String[] installsrc_clean_strings={"tags","trunk"}; |
||
26 | |||
27 | |||
28 | |||
29 | // selecables |
||
30 | |||
31 | public int res_select=-1; |
||
32 | public int sound_select=0; |
||
33 | public int firmware_select=0; |
||
34 | public int installsrc_select=0; |
||
35 | |||
36 | |||
37 | public boolean cldc11=false; |
||
38 | public boolean bluetooth=false; |
||
39 | public boolean fileapi=false; |
||
40 | public boolean devicecontrol=false; |
||
41 | public boolean locationprovider=false; |
||
42 | |||
43 | public boolean j2memaps=false; |
||
44 | public boolean openlapi=false; |
||
45 | |||
46 | |||
47 | // setter |
||
48 | |||
49 | public void set_res_by_screensize(int width,int height) |
||
50 | { |
||
51 | |||
52 | try |
||
53 | { |
||
54 | res_strings=new String[res_vals.length]; |
||
55 | for (int i=0;i<res_vals.length;i++) |
||
56 | { |
||
57 | if ((width>=res_vals[i][0])&&(res_select==-1)) |
||
58 | res_select=i; |
||
59 | res_strings[i]=res_vals[i][0]+"x"+res_vals[i][1]; |
||
60 | } |
||
61 | } |
||
62 | catch(Exception e) |
||
63 | { |
||
64 | res_strings=new String[0]; |
||
65 | } |
||
66 | |||
67 | if (res_select==-1) |
||
68 | res_select=0; |
||
69 | |||
70 | |||
71 | } |
||
72 | |||
73 | // getter |
||
74 | |||
75 | |||
76 | public String cldc_str() |
||
77 | { |
||
78 | if (cldc11) |
||
79 | return "-CLDC11"; |
||
80 | else |
||
81 | return ""; |
||
82 | } |
||
83 | |||
84 | public String bt_str() |
||
85 | { |
||
86 | if (bluetooth) |
||
87 | return "-BluetoothAPI"; |
||
88 | else |
||
89 | return ""; |
||
90 | } |
||
91 | |||
92 | public String fileapi_str() |
||
93 | { |
||
94 | if (fileapi) |
||
95 | return "-FileAPI"; |
||
96 | else |
||
97 | return ""; |
||
98 | } |
||
99 | |||
100 | |||
101 | public String firmware_str() |
||
102 | { |
||
103 | return firmware_clean_strings[firmware_select]; |
||
104 | } |
||
105 | |||
106 | public String devicecontrol_str() |
||
107 | { |
||
108 | if (devicecontrol) |
||
109 | return "-DeviceControl"; |
||
110 | else |
||
111 | return ""; |
||
112 | } |
||
113 | |||
114 | |||
115 | public String map_str() |
||
116 | { |
||
117 | if (j2memaps) |
||
118 | return "-J2MEMap"; |
||
119 | else |
||
120 | return ""; |
||
121 | } |
||
122 | |||
123 | public String sound_str() |
||
124 | { |
||
125 | return sound_clean_strings[sound_select]; |
||
126 | } |
||
127 | |||
128 | |||
129 | |||
130 | public String getFileName() |
||
131 | { |
||
132 | return "DUBwise-"+res_str()+"-" + sound_str() + "-" + firmware_str() + cldc_str() + fileapi_str() + bt_str() + devicecontrol_str() + map_str() +".jad"; |
||
133 | } |
||
134 | |||
135 | |||
136 | |||
137 | public String res_str() |
||
138 | { |
||
139 | try |
||
140 | { |
||
141 | return res_strings[res_select]; |
||
142 | } |
||
143 | catch(Exception e) |
||
144 | { |
||
145 | return res_strings[0]; |
||
146 | } |
||
147 | } |
||
148 | |||
149 | |||
150 | |||
151 | public String installsrc_str() |
||
152 | { |
||
153 | return installsrc_clean_strings[installsrc_select]; |
||
154 | } |
||
155 | |||
156 | |||
157 | |||
158 | } |