}
private static ArrayList<CustomPlatform> customList = new ArrayList<CustomPlatform>();
- private static TotalPlatform total = new TotalPlatform();
private static ArrayList<String> profileList = new ArrayList<String>();
return customList;
}
- public static TotalPlatform getTotalPlatform() {
- return total;
- }
-
private static void makeCustomPlatformList() {
int profileCount = profileList.size();
if (profileCount == 0) {
// init vm worker
prop.initVMWorker();
}
-
- total.settingVMProperty();
}
private static void checkingBaseImageBinaryVersion() {
public class ProfileList {
private static ArrayList<Profile> profileList = null;
// TODO
- private static Profile totalProfile = new Profile("all");
+ private static Profile totalProfile = new Profile(StringResources.TOTAL_PROFILE);
public static ArrayList<Profile> getProfileList() {
if (profileList == null) {
+++ /dev/null
-/*
- * Emulator Manager
- *
- * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * JiHye Kim <jihye1128.kim@samsung.com>
- * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
- * SeokYeon Hwang <syeon.hwang@samsung.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-
-package org.tizen.emulator.manager.platform;
-
-import java.io.IOException;
-
-import org.tizen.emulator.manager.logging.EMLogger;
-import org.tizen.emulator.manager.vms.VMProperty;
-
-public class TotalPlatform extends Platform {
- private CustomBaseImage image = null;
- public TotalPlatform() {
- this.platformName = "all";
- this.platformPath = "";
- try {
- image = new CustomBaseImage(this, "allImage", "x86", PlatformStringResources.MobileProfile);
- } catch (IOException e) {
- // TODO
- EMLogger.getLogger().warning("Error: " + e.getMessage());
- }
- }
-
- public void settingVMProperty() {
- if (image == null) {
- return;
- }
- image.getVmsList().clear();
- for (Platform p : PlatformList.getPlatformList()) {
- for (BaseImage base : p.getImageList()) {
- for (VMProperty prop : base.getVmsList()) {
- image.addVMsProperty(prop);
- }
- }
- }
-
- for (CustomPlatform p : PlatformList.getCustomPlatform()) {
- for (BaseImage base : p.getImageList()) {
- for (VMProperty prop : base.getVmsList()) {
- image.addVMsProperty(prop);
- }
- }
- }
- this.getImageList().add(image);
- }
-}
public static final String SKIN_PRIORITY = "manager.priority";
public static final String SKIN_GENERAL = "all";
public static final String SKIN_PHONE_SHAPE = "shape";
- public static final String SKIN_PROFILE="skin.profile";
+ public static final String SKIN_PROFILE = "skin.profile";
+ public static final String SKIN_SHAPE = "skin.shape";
// SD card
public static final String SD_CARD_DIR = "sdcard";
public static final String[] SD_CARD = {"sdcard_ext4_4G.img", "sdcard_ext4_8G.img", "sdcard_ext4_16G.img","sdcard_ext4_32G.img"};
public static final String NEW_LINE = System.getProperty("line.separator");
public static final String EMULATOR_LOG = "emulator.log";
+
+ public static final String TOTAL_PROFILE = "all";
}
import org.tizen.emulator.manager.platform.BaseImage;
import org.tizen.emulator.manager.platform.Platform;
import org.tizen.emulator.manager.platform.Profile;
-import org.tizen.emulator.manager.platform.TotalPlatform;
import org.tizen.emulator.manager.resources.ColorResources;
import org.tizen.emulator.manager.resources.FontResources;
+import org.tizen.emulator.manager.resources.StringResources;
import org.tizen.emulator.manager.ui.list.AbstractListView;
import org.tizen.emulator.manager.ui.list.ExtendTreeListView;
import org.tizen.emulator.manager.ui.list.ItemListVew;
treeButton.setSelection(true);
itemButton.setSelection(false);
// TODO
- if (VMsMainView.getInstance().getProfile().getName().equals("all")) {
+ if (VMsMainView.getInstance().getProfile().getName().equals(StringResources.TOTAL_PROFILE)) {
itemButton.setEnabled(false);
TopListView = extendTreeListView;
} else {
}
public void drawPlatform(Platform platform, int imageIndex, boolean isRefresh) {
- if (platform instanceof TotalPlatform) {
- if (!isRefresh) {
- itemButton.setEnabled(false);
- selectRadioButton(true);
- }
+ if (!isRefresh) {
+ itemButton.setEnabled(true);
+ selectRadioButton(false);
+ }
+
+ if (!platform.getImageList().isEmpty()) {
imageCombo.removeAll();
- imageCombo.setEnabled(false);
- imageCombo.layout();
- } else {
- if (!isRefresh) {
- itemButton.setEnabled(true);
- selectRadioButton(false);
+ imageCombo.setEnabled(true);
+ for (BaseImage image : platform.getImageList()) {
+ imageCombo.add(image.getName());
}
-
- if (!platform.getImageList().isEmpty()) {
- imageCombo.removeAll();
- imageCombo.setEnabled(true);
- for (BaseImage image : platform.getImageList()) {
- imageCombo.add(image.getName());
- }
- if (imageIndex >= imageCombo.getItemCount()) {
- imageIndex = 0;
- }
- imageCombo.select(imageIndex);
- } else {
- // TODO
- return;
+ if (imageIndex >= imageCombo.getItemCount()) {
+ imageIndex = 0;
}
+ imageCombo.select(imageIndex);
+ } else {
+ // TODO
+ return;
}
TopListView.drawPlatform(platform, imageIndex);
}
public void drawProfile(Profile profile, boolean isRefresh) {
- if (profile.getName().equals("all")) { // TODO
+ if (profile.getName().equals(StringResources.TOTAL_PROFILE)) { // TODO
if (!isRefresh) {
itemButton.setEnabled(false);
selectRadioButton(true);
import org.tizen.emulator.manager.resources.ColorResources;
import org.tizen.emulator.manager.resources.FontResources;
import org.tizen.emulator.manager.resources.PatchImageResources;
+import org.tizen.emulator.manager.resources.StringResources;
import org.tizen.emulator.manager.tool.SettingInfoFile;
import org.tizen.emulator.manager.ui.VMsMainView;
import org.tizen.emulator.manager.ui.widgets.ImageButton;
// draw main view using selected platform
items.get(i).draw();
// this is temp code..please fix me
- if (items.get(i).getPlatform().getName().equals("all")) {
+ if (items.get(i).getPlatform().getName().equals(StringResources.TOTAL_PROFILE)) {
items.get(i).draw();
}
contentsComposite.layout(true, false);
import org.tizen.emulator.manager.resources.ColorResources;
import org.tizen.emulator.manager.resources.FontResources;
import org.tizen.emulator.manager.resources.PatchImageResources;
+import org.tizen.emulator.manager.resources.StringResources;
import org.tizen.emulator.manager.tool.SettingInfoFile;
import org.tizen.emulator.manager.ui.VMsMainView;
import org.tizen.emulator.manager.ui.widgets.ImageButton;
items.get(i).draw();
// this is temp code..please fix me
- if (items.get(i).getProfile().getName().equals("all")) {
+ if (items.get(i).getProfile().getName().equals(StringResources.TOTAL_PROFILE)) {
items.get(i).draw();
}