- fix selection of android target in UI 

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8202 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
nor..67 2011-09-06 10:15:45 +00:00
parent 4f149cc90b
commit 8f2c0adefc

View File

@ -50,7 +50,7 @@ public class MobileCustomizerPanel extends javax.swing.JPanel implements ActionL
jCheckBox1.setSelected(false);
}
if (properties.getProperty("mobile.android.target") != null) {
jComboBox1.setSelectedItem(properties.getProperty("mobile.android.target"));
setSelected(properties.getProperty("mobile.android.target"));
}
if (properties.getProperty("mobile.android.package") != null) {
jTextField1.setText(properties.getProperty("mobile.android.package"));
@ -70,6 +70,16 @@ public class MobileCustomizerPanel extends javax.swing.JPanel implements ActionL
properties.setProperty("mobile.android.package", jTextField1.getText());
}
private void setSelected(String name){
for (int i = 0; i < jComboBox1.getItemCount(); i++) {
AndroidTarget target = (AndroidTarget)jComboBox1.getItemAt(i);
if(target.equals(name)){
jComboBox1.setSelectedIndex(i);
return;
}
}
}
public void actionPerformed(ActionEvent e) {
saveProperties();
}