}
}
private void loadDeviceDetails() {
DeviceInfo info = webOS.getDeviceInfo();
URL imgURL;
if(info.model().equals(DeviceInfo.Model.Emulator.toString())) {
imgURL = getClass().getResource("resources/Emulator 64x64.png");
} else if(info.model().equals(DeviceInfo.Model.Palm_Pixi.toString()) ||
info.model().equals(DeviceInfo.Model.Palm_Pixi_Plus.toString())) {
imgURL = getClass().getResource("resources/Palm Pixi 64x64.png");
} else if(info.model().equals(DeviceInfo.Model.Palm_Pre.toString()) ||
info.model().equals(DeviceInfo.Model.Palm_Pre_Plus.toString())) {
imgURL = getClass().getResource("resources/Palm Pre 64x64.png");
} else if(info.model().equals(DeviceInfo.Model.Palm_Pre_2.toString())) {
imgURL = getClass().getResource("resources/Palm Pre 2 64x64.png");
} else if(info.model().equals(DeviceInfo.Model.HP_Veer.toString())) {
imgURL = getClass().getResource("resources/HP Veer 64x64.png");
} else if(info.model().equals(DeviceInfo.Model.HP_TouchPad.toString())) {
imgURL = getClass().getResource("resources/HP TouchPad 64x64.png");
} else if(info.model().equals(DeviceInfo.Model.HP_Pre_3.toString())) {
imgURL = getClass().getResource("resources/HP Pre 3 64x64.png");
} else { //unknown
imgURL = getClass().getResource("resources/Palm Pre 2 64x64.png");
}
jLabel7.setIcon(new ImageIcon(imgURL));
jLabel2.setText(bundle.getString("DEVICE:") + " " + info.name());
jLabel1.setText(bundle.getString("OS:") + " webOS " + info.version());
jLabel5.setText(bundle.getString("ARCHITECTURE:") + " " + info.arch());
jLabel10.setText(bundle.getString("BUILD_NAME:") + " " + info.buildName());
jLabel4.setText(bundle.getString("BUILD_TIME:") + " " + info.buildTime());
if(!info.model().equals(DeviceInfo.Model.Emulator.toString())) {
try {
String out = webOS.runProgram("/bin/grep", new String[] {"-e", "Processor",
"-e", "BogoMIPS", "-e", "Hardware", "/proc/cpuinfo"});
String[] tokens = out.split("\n");
for(int i=0; i<tokens.length; i++) {