- fix selection of android target in UI 

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8202 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 4f149cc90b
commit 8f2c0adefc
  1. 12
      sdk/jme3-android/src/com/jme3/gde/android/MobileCustomizerPanel.java

@ -50,7 +50,7 @@ public class MobileCustomizerPanel extends javax.swing.JPanel implements ActionL
jCheckBox1.setSelected(false); jCheckBox1.setSelected(false);
} }
if (properties.getProperty("mobile.android.target") != null) { 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) { if (properties.getProperty("mobile.android.package") != null) {
jTextField1.setText(properties.getProperty("mobile.android.package")); jTextField1.setText(properties.getProperty("mobile.android.package"));
@ -69,6 +69,16 @@ public class MobileCustomizerPanel extends javax.swing.JPanel implements ActionL
properties.setProperty("mobile.android.target", ((AndroidTarget) jComboBox1.getSelectedItem()).getName()); properties.setProperty("mobile.android.target", ((AndroidTarget) jComboBox1.getSelectedItem()).getName());
properties.setProperty("mobile.android.package", jTextField1.getText()); 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) { public void actionPerformed(ActionEvent e) {
saveProperties(); saveProperties();

Loading…
Cancel
Save