From: jihye424.kim Date: Thu, 24 Dec 2015 08:31:57 +0000 (+0900) Subject: base image view item: add image version to tool tip X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=08322fa357b24950b45ceb70e66a9b59a769617d;p=sdk%2Femulator%2Femulator-manager.git base image view item: add image version to tool tip Change-Id: Ie36b1dd17a1256a8ea6c737e31cf7219639703b5 Signed-off-by: jihye424.kim --- diff --git a/src/org/tizen/emulator/manager/ui/detail/item/property/BaseImageViewItem.java b/src/org/tizen/emulator/manager/ui/detail/item/property/BaseImageViewItem.java index c1fe320..8360fc8 100644 --- a/src/org/tizen/emulator/manager/ui/detail/item/property/BaseImageViewItem.java +++ b/src/org/tizen/emulator/manager/ui/detail/item/property/BaseImageViewItem.java @@ -108,9 +108,7 @@ public class BaseImageViewItem extends ComboViewItem { public boolean settingDetailItem(VMPropertyValue value) { if (valueLabel != null) { valueLabel.setText(value.baseImage.getName()); - if (!value.baseImage.isStandard()) { - valueLabel.setToolTipText(value.baseImage.getPath()); - } + valueLabel.setToolTipText(getToolTip(value.baseImage)); } return true; } @@ -284,7 +282,7 @@ public class BaseImageViewItem extends ComboViewItem { combo.setVisible(false); filePathLabel.setText(value.baseImage.getName()); - filePathLabel.setToolTipText(currentBaseImage.getPath()); + filePathLabel.setToolTipText(getToolTip(currentBaseImage)); filePathLabel.setVisible(true); filePathLabel.setEnabled(false); filePathLabel.redraw(); @@ -371,6 +369,7 @@ public class BaseImageViewItem extends ComboViewItem { isSelected = true; } combo.setEnabled(true); + combo.setToolTipText(getToolTip(currentBaseImage)); } @@ -408,7 +407,7 @@ public class BaseImageViewItem extends ComboViewItem { } String fileSplit[] = pathSplit[pathSplit.length - 1].split("\\."); //$NON-NLS-1$ String extension = fileSplit[fileSplit.length - 1]; - if (!Architecture.isSupported(extension)) { //$NON-NLS-1$ + if (!Architecture.isSupported(extension)) { return false; } // Check whether file is exist. @@ -420,4 +419,16 @@ public class BaseImageViewItem extends ComboViewItem { return true; } + private String getToolTip(BaseImage image) { + if (image == null) { + return ""; + } + String toolTip = "Image Version: " + image.getBinaryVersion(); + if (!image.isStandard()) { + toolTip += StringResources.NEW_LINE + +"Image Path: " + image.getPath(); + } + return toolTip; + } + } \ No newline at end of file