}
-
@Override
public void changeItemList(String profile) {
Profile prop = ProfileList.getProfile(profile);
System.out.println("profile: " + prop);
- if (prop != null) {
+ if (prop != null && prop.getDefaultTemplate() != null) {
propertyValue = new PropertyValue(prop.getDefaultTemplate().getValue());
- for (ModifyDialogItem item : itemList) {
- item.setInitialValue(propertyValue);
- }
+ }
+ for (ModifyDialogItem item : itemList) {
+ item.setInitialValue(propertyValue);
}
DeviceTemplateDialogHandler.changeItemList(itemList, profile);
import org.tizen.emulator.manager.renewal.resources.ImageResources;
import org.tizen.emulator.manager.resources.StringResources;
import org.tizen.emulator.manager.ui.Messages;
+import org.tizen.emulator.manager.ui.renewal.dialog.DIALOG_MODE;
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.PropertyValue;
import org.tizen.emulator.manager.vms.VMProperty;
import org.tizen.emulator.manager.vms.helper.HelperClass;
// }
boolean isValid = true;
- if (getDialog().isModifyMode()) {
+ if (getDialog().getDialogMode() == DIALOG_MODE.MODIFY
+ || getDialog().getDialogMode() == DIALOG_MODE.DETAIL) {
return true;
}
@Override
public void changeItemValue(PropertyValue property) {
- if (!property.isBaseImageValue()) {
- return;
- }
- if (value != null && !value.isEmpty()) {
- return;
- }
+ if (property.isBaseImageValue()) {
+ if (value != null && !value.isEmpty()) {
+ return;
+ }
- String path = property.getImageFilePath();
- if (path != null && !path.isEmpty()) {
- String fileName = path.substring(path
- .lastIndexOf(File.separator) + 1, path.length());
- if (fileName.contains(".")) {
- fileName = fileName.substring(0, fileName.lastIndexOf("."));
+ String path = property.getImageFilePath();
+ if (path != null && !path.isEmpty()) {
+ String fileName = path.substring(path
+ .lastIndexOf(File.separator) + 1, path.length());
+ if (fileName.contains(".")) {
+ fileName = fileName.substring(0, fileName.lastIndexOf("."));
+ }
+ value = fileName;
+ textInputBox.setText(value);
+ textModified();
}
- value = fileName;
- textInputBox.setText(value);
- textModified();
}
}
}