package org.tizen.emulator.manager.ui.list;
import org.tizen.emulator.manager.vms.VMProperty;
+import org.tizen.emulator.manager.vms.VMPropertyValue;
import org.tizen.emulator.manager.vms.xml.DeviceType;
import org.tizen.emulator.manager.vms.xml.DisplayType;
public abstract class ColumnContentHelper {
static final int numberOfColumns = 4;
- static final String[] columnTitles = new String[] { "Name", "CPU", "Resolution", "Density", "RAM size", }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ static final String[] columnTitles = new String[] { "Name", "Version", "Resolution", "CPU", "RAM size", }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
static final ColumnContentHelper[] helpers = new ColumnContentHelper[] {
new NameContentHelper(0),
- new ArchitectureHelper(1),
+ new VersionContentHelper(1),
new ResolutionContentHelper(2),
- new DensityContentHelper(3),
+ new ArchitectureHelper(3),
new RAMSizeContentHelper(4),
};
-
+
int index;
-
+
protected ColumnContentHelper(int index) {
this.index = index;
}
-
+
public String getTitle() {
return columnTitles[index];
}
-
+
public int getIndex() {
return index;
}
public static int getContentCount() {
return numberOfColumns;
}
-
+
public static ColumnContentHelper[] getContentHelpers() {
return helpers;
}
public NameContentHelper(int index) {
super(index);
}
-
+
@Override
public String getContent(VMProperty property) {
return property.getName();
public ArchitectureHelper(int index) {
super(index);
}
-
+
@Override
public String getContent(VMProperty property) {
return property.getArch().name();
public ResolutionContentHelper(int index) {
super(index);
}
-
+
@Override
public String getContent(VMProperty property) {
DisplayType displayType = property.getConfiguration().getDevice().getDisplay();
-
+
return displayType.getResolution().getWidth()
+ " x " + displayType.getResolution().getHeight(); //$NON-NLS-1$
}
}
-class DensityContentHelper extends ColumnContentHelper {
- public DensityContentHelper(int index) {
+class VersionContentHelper extends ColumnContentHelper {
+ public VersionContentHelper(int index) {
super(index);
}
@Override
public String getContent(VMProperty property) {
- DisplayType displayType = property.getConfiguration().getDevice().getDisplay();
- return displayType.getDensity().getValue() + ""; //$NON-NLS-1$
+ VMPropertyValue value = property.getPropertyValue();
+ return value.baseImage.isStandard() ?
+ property.getImageVersion() : "custom";
}
}