package org.tizen.emulator.manager.ui.renewal.dialog;
public enum DIALOG_MODE {
- CREATE, MODIFY, CLONE;
+ CREATE, MODIFY, CLONE, DETAIL;
}
import org.eclipse.swt.widgets.Listener;
import org.tizen.emulator.manager.renewal.resources.ColorResources;
import org.tizen.emulator.manager.renewal.resources.FontResources;
+import org.tizen.emulator.manager.ui.renewal.dialog.DIALOG_MODE;
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.ModifyItem;
import org.tizen.emulator.manager.ui.renewal.widgets.CheckBoxButton;
checkBox.setLayoutData(data);
checkBox.setSelection(isChecked);
+ if (parentItem.getDialog().getDialogMode() == DIALOG_MODE.DETAIL) {
+ checkBox.setEnabled(false);
+ }
}
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.tizen.emulator.manager.logging.EMLogger;
+import org.tizen.emulator.manager.platform.Skin;
import org.tizen.emulator.manager.renewal.resources.ImageResources;
+import org.tizen.emulator.manager.ui.renewal.dialog.DIALOG_MODE;
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.ModifyItem;
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.PropertyValue;
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.SubTreeModifyItem;
item.create();
item.setBodyLayoutDefault();
- createResolutionComboItem();
- createResolutionTextItem();
- createSizeItem();
- createSkinItem();
+ if (getDialog().getDialogMode() == DIALOG_MODE.DETAIL) {
+ createDisplayInfomation();
+ } else {
+ createResolutionComboItem();
+ createResolutionTextItem();
+ createSizeItem();
+ createSkinItem();
- initResolutionCombo();
+ initResolutionCombo();
+ }
}
displaySize = String.valueOf(value.getDisplaySize());
displayWidth = String.valueOf(value.getDisplayWidth());
displayHeight = String.valueOf(value.getDisplayHeight());
+
+ // for detail information
+ displayDPI = String.valueOf(value.getDisplayDPI());
+ if (value.getSkin() != null) {
+ skin = value.getSkin();
+ }
}
private String displayWidth = "";
private String displayHeight = "";
private String displaySize = "";
+ private String displayDPI = "";
+ private Skin skin = null;
+ private void createDisplayInfomation() {
+ Composite comp = createSubComp(1, TITLE_RESOLUTION);
+ // resolution label
+ FormData data = new FormData();
+ data.left = new FormAttachment(0, BODY_MARGIN_LEFT);
+ data.top = new FormAttachment(0, WIDGET_TOP);
+ data.width = COMBO_WIDTH;
+ data.height = ModifyItem.WIDGET_HEIGHT;
+ Canvas canvas = new Canvas(comp, SWT.NONE);
+ canvas.setLayoutData(data);
+ WidgetHelper.drawText(canvas, resolution.getStrTypeValue(), SWT.NONE);
+
+ comp = createSubComp(1, TITLE_SIZE);
+ // "inch" label
+ data = new FormData();
+ data.left = new FormAttachment(0, BODY_MARGIN_LEFT);
+ data.top = new FormAttachment(0, WIDGET_TOP);
+ data.width = COMBO_WIDTH;
+ data.height = ModifyItem.WIDGET_HEIGHT;
+ canvas = new Canvas(comp, SWT.NONE);
+ canvas.setLayoutData(data);
+ WidgetHelper.drawText(canvas, displaySize + " inch" + " (DPI: " + displayDPI + ")" , SWT.NONE);
+
+ comp = createSubComp(1, TITLE_SKIN);
+ // "inch" label
+ data = new FormData();
+ data.left = new FormAttachment(0, BODY_MARGIN_LEFT);
+ data.top = new FormAttachment(0, WIDGET_TOP);
+ data.width = COMBO_WIDTH;
+ data.height = ModifyItem.WIDGET_HEIGHT;
+ canvas = new Canvas(comp, SWT.NONE);
+ canvas.setLayoutData(data);
+ WidgetHelper.drawText(canvas, skin == null ? "" : skin.getName(), SWT.NONE);
+
+ comp = createSubComp(1, "Skin Path");
+ // "inch" label
+ data = new FormData();
+ data.left = new FormAttachment(0, BODY_MARGIN_LEFT);
+ data.top = new FormAttachment(0, WIDGET_TOP);
+ data.width = COMBO_WIDTH;
+ data.height = ModifyItem.WIDGET_HEIGHT;
+ canvas = new Canvas(comp, SWT.NONE);
+ canvas.setLayoutData(data);
+ WidgetHelper.drawText(canvas, skin == null ? "" : skin.getPath(), SWT.NONE);
+ }
private void createResolutionComboItem() {
Composite comp = createSubComp(1, TITLE_RESOLUTION);
package org.tizen.emulator.manager.ui.renewal.item.modify.common;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Composite;
import org.tizen.emulator.manager.job.CheckVT;
import org.tizen.emulator.manager.logging.EMLogger;
import org.tizen.emulator.manager.renewal.resources.ImageResources;
+import org.tizen.emulator.manager.ui.renewal.dialog.DIALOG_MODE;
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.ModifyItem;
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.PropertyValue;
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.SubTreeModifyItem;
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.TreeModifyItem;
import org.tizen.emulator.manager.ui.renewal.widgets.ComboBox;
+import org.tizen.emulator.manager.ui.renewal.widgets.WidgetHelper;
import org.tizen.emulator.manager.vms.CPU;
public class ProcessorItem extends ComboItem {
item.setItemTitle(createIconTitle(item, TITLE_ICON_RESOURCE));
item.create();
- createCombo(item, COMBO_WIDTH);
- initProcessorCombo();
+ if (getDialog().getDialogMode() == DIALOG_MODE.DETAIL) {
+ createDisplayInfomation();
+ } else {
+ createCombo(item, COMBO_WIDTH);
+ initProcessorCombo();
+ }
+ }
+ private void createDisplayInfomation() {
+ item.getBody().setLayout(new FormLayout());
+ FormData data = new FormData();
+ data.left = new FormAttachment(0, ModifyItem.BODY_MARGIN_LEFT);
+ data.top = new FormAttachment(0, ModifyItem.WIDGET_TOP);
+ data.width = COMBO_WIDTH;
+ data.height = ModifyItem.WIDGET_HEIGHT;
+ Canvas canvas = new Canvas(item.getBody(), SWT.NONE);
+ canvas.setLayoutData(data);
+ WidgetHelper.drawText(canvas, String.valueOf(cpuNum), SWT.NONE);
}
private void initProcessorCombo() {
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Composite;
import org.tizen.emulator.manager.logging.EMLogger;
import org.tizen.emulator.manager.renewal.resources.ImageResources;
+import org.tizen.emulator.manager.ui.renewal.dialog.DIALOG_MODE;
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.ModifyItem;
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.PropertyValue;
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.SubTreeModifyItem;
item.setItemTitle(createIconTitle(item, TITLE_ICON_RESOURCE));
item.create();
- createCombo(item, COMBO_WIDTH);
- initRamSizeCombo();
+ if (getDialog().getDialogMode() == DIALOG_MODE.DETAIL) {
+ createDisplayInfomation();
+ } else {
+ createCombo(item, COMBO_WIDTH);
+ initRamSizeCombo();
+ addLabel();
+ }
+ }
+
+ private void createDisplayInfomation() {
+ item.getBody().setLayout(new FormLayout());
+ FormData data = new FormData();
+ data.left = new FormAttachment(0, ModifyItem.BODY_MARGIN_LEFT);
+ data.top = new FormAttachment(0, ModifyItem.WIDGET_TOP);
+ data.width = COMBO_WIDTH;
+ data.height = ModifyItem.WIDGET_HEIGHT;
+ Canvas canvas = new Canvas(item.getBody(), SWT.NONE);
+ canvas.setLayoutData(data);
+ WidgetHelper.drawText(canvas, String.valueOf(ramSize), SWT.NONE);
+
addLabel();
}
protected void makeBody(int textBoxWidth) {
item.setBodyLayoutDefault();
- if (getDialog().getDialogMode() == DIALOG_MODE.MODIFY) {
+ if (getDialog().getDialogMode() == DIALOG_MODE.MODIFY
+ || getDialog().getDialogMode() == DIALOG_MODE.DETAIL) {
createTextLabel();
} else {
createTextBox(textBoxWidth);
import org.tizen.emulator.manager.devices.DeviceTemplateValue;
import org.tizen.emulator.manager.devices.SubDevice;
import org.tizen.emulator.manager.devices.SubDeviceItem;
+import org.tizen.emulator.manager.platform.Skin;
import org.tizen.emulator.manager.ui.renewal.item.modify.common.CheckItemData;
import org.tizen.emulator.manager.vms.RESOLUTION;
+import org.tizen.emulator.manager.vms.SKIN_SHAPE;
import org.tizen.emulator.manager.vms.VMPropertyValue;
public class PropertyValue {
return 0;
}
+ public int getDisplayDPI() {
+ if (isVMValue()) {
+
+ } else if (isTemplateValue()) {
+ return templateValue.getDisplayDPI();
+ }
+ return 0;
+ }
+
+ public String getSkinShape() {
+ if (isVMValue()) {
+
+ } else if (isTemplateValue()) {
+ return templateValue.getSkinShape().toString();
+ }
+
+ return SKIN_SHAPE.SQUARE.toString();
+ }
+
+ public Skin getSkin() {
+ if (isVMValue()) {
+
+ } else if (isTemplateValue()) {
+ return templateValue.getSkin();
+ }
+
+ return null;
+ }
public int getRamSize() {
if (isVMValue()) {