Blame |
Last modification |
View Log
| RSS feed
public class DUBwiseProps
{
public String[] optional_feature_strings=
{"J2MEMaps",
"OpenLAPI"};
// public String[] sound_strings={"en_speedy","en_wav","de_tts","de_wav","de_64kbit_tts","wav","no_voice"};
public int[][] res_vals =
{ {480,
640},
{340,
400},
{240,
320},
{200,
300},
{176,
220},
{128,
128} };
public String[] res_strings
;
public String[] feature_strings=
{"Bluetooth",
"Location API",
"File Connection",
"Device Control",
"cldc11"};
public String[] sound_strings=
{"no sound",
"en mp3@32kbit",
"en mp3@64kbit",
"en wav"};
public String[] sound_clean_strings=
{"no_voice",
"en_mp3_32kbit",
"en_mp3_64kbit",
"en_wav"};
public String[] firmware_strings=
{"No Firmwars",
"All Firmwares",
"FC&MK3MAG Firmwares"};
public String[] firmware_clean_strings=
{"no_firmwares",
"all_firmwares",
"fc_mk3mag_firmwares"};
public String[] installsrc_strings=
{"stable (latest tag)",
"Bleeding Edge (trunk)"};
public String[] installsrc_clean_strings=
{"tags",
"trunk"};
// selecables
public int res_select=-
1;
public int sound_select=
0;
public int firmware_select=
0;
public int installsrc_select=
0;
public boolean cldc11=
false;
public boolean bluetooth=
false;
public boolean fileapi=
false;
public boolean devicecontrol=
false;
public boolean locationprovider=
false;
public boolean j2memaps=
false;
public boolean openlapi=
false;
// setter
public void set_res_by_screensize
(int width,
int height
)
{
try
{
res_strings=
new String[res_vals.
length];
for (int i=
0;i
<res_vals.
length;i++
)
{
if ((width
>=res_vals
[i
][0])&&(res_select==-
1))
res_select=i
;
res_strings
[i
]=res_vals
[i
][0]+
"x"+res_vals
[i
][1];
}
}
catch(Exception e
)
{
res_strings=
new String[0];
}
if (res_select==-
1)
res_select=
0;
}
// getter
public String cldc_str
()
{
if (cldc11
)
return "-CLDC11";
else
return "";
}
public String bt_str
()
{
if (bluetooth
)
return "-BluetoothAPI";
else
return "";
}
public String fileapi_str
()
{
if (fileapi
)
return "-FileAPI";
else
return "";
}
public String firmware_str
()
{
return firmware_clean_strings
[firmware_select
];
}
public String devicecontrol_str
()
{
if (devicecontrol
)
return "-DeviceControl";
else
return "";
}
public String map_str
()
{
if (j2memaps
)
return "-J2MEMap";
else
return "";
}
public String sound_str
()
{
return sound_clean_strings
[sound_select
];
}
public String getFileName
()
{
return "DUBwise-"+res_str
()+
"-" + sound_str
() +
"-" + firmware_str
() + cldc_str
() + fileapi_str
() + bt_str
() + devicecontrol_str
() + map_str
() +
".jad";
}
public String res_str
()
{
try
{
return res_strings
[res_select
];
}
catch(Exception e
)
{
return res_strings
[0];
}
}
public String installsrc_str
()
{
return installsrc_clean_strings
[installsrc_select
];
}
}