From 37af89bd99306e7d9c92fff997b8000f90b01703 Mon Sep 17 00:00:00 2001 From: "jihye424.kim" Date: Tue, 22 Dec 2015 15:53:48 +0900 Subject: [PATCH] viewer layout: adjust layout of top buttons - move 'back' button to right side - move 'create', 'clone', 'confirm' button to left side - move 'modify' 'delete' button to left side of 'back' button Change-Id: I34fb412236af92b3cd776a2ce5ff71d8ca0cf470 Signed-off-by: jihye424.kim --- .../renewal/tableviewer/BaseImageTableViewer.java | 30 +++++++-------- .../renewal/tableviewer/CreateVMTableViewer.java | 20 +++++----- .../tableviewer/DeviceTemplateTableViewer.java | 44 +++++++++++----------- 3 files changed, 47 insertions(+), 47 deletions(-) diff --git a/src/org/tizen/emulator/manager/ui/renewal/tableviewer/BaseImageTableViewer.java b/src/org/tizen/emulator/manager/ui/renewal/tableviewer/BaseImageTableViewer.java index 0e93beb..1be73e4 100644 --- a/src/org/tizen/emulator/manager/ui/renewal/tableviewer/BaseImageTableViewer.java +++ b/src/org/tizen/emulator/manager/ui/renewal/tableviewer/BaseImageTableViewer.java @@ -766,13 +766,12 @@ public class BaseImageTableViewer extends AbstractTableViewer { private void setLayout() { // composite is form layout - FormData backButtonData; - backButtonData = new FormData(); - backButtonData.left = new FormAttachment(0, 10); - backButtonData.top = new FormAttachment(0, 13); - backButtonData.width = backButton.getSize().x; - backButtonData.height = BUTTON_HEIGHT; - backButton.setLayoutData(backButtonData); + FormData createButtonData = new FormData(); + createButtonData.left = new FormAttachment(0, 10); + createButtonData.top = new FormAttachment(0, 13); + createButtonData.width = BUTTON_WIDTH; + createButtonData.height = BUTTON_HEIGHT; + createButton.setLayoutData(createButtonData); FormData profileButtonData; for (int i = 0; i < profileButtonList.size(); i++) { @@ -789,8 +788,16 @@ public class BaseImageTableViewer extends AbstractTableViewer { button.getButton().setLayoutData(profileButtonData); } + FormData backButtonData; + backButtonData = new FormData(); + backButtonData.right = new FormAttachment(100, -10); + backButtonData.top = new FormAttachment(0, 13); + backButtonData.width = backButton.getSize().x; + backButtonData.height = BUTTON_HEIGHT; + backButton.setLayoutData(backButtonData); + FormData workerButtonData = new FormData(); - workerButtonData.right = new FormAttachment(100, -10); + workerButtonData.right = new FormAttachment(backButton, -10); workerButtonData.top = new FormAttachment(0, 13); workerButtonData.width = BUTTON_WIDTH; workerButtonData.height = BUTTON_HEIGHT; @@ -804,13 +811,6 @@ public class BaseImageTableViewer extends AbstractTableViewer { modifyButton.setLayoutData(workerButtonData); workerButtonData = new FormData(); - workerButtonData.right = new FormAttachment(modifyButton, -5); - workerButtonData.top = new FormAttachment(0, 13); - workerButtonData.width = BUTTON_WIDTH; - workerButtonData.height = BUTTON_HEIGHT; - createButton.setLayoutData(workerButtonData); - - workerButtonData = new FormData(); workerButtonData.top = new FormAttachment(0, 45); workerButtonData.left = new FormAttachment(0, 10); workerButtonData.right = new FormAttachment(100, -10); diff --git a/src/org/tizen/emulator/manager/ui/renewal/tableviewer/CreateVMTableViewer.java b/src/org/tizen/emulator/manager/ui/renewal/tableviewer/CreateVMTableViewer.java index dbce391..fd1766e 100644 --- a/src/org/tizen/emulator/manager/ui/renewal/tableviewer/CreateVMTableViewer.java +++ b/src/org/tizen/emulator/manager/ui/renewal/tableviewer/CreateVMTableViewer.java @@ -437,21 +437,21 @@ public class CreateVMTableViewer extends AbstractTableViewer { private void setLayout() { // composite is form layout - FormData backButtonData; - backButtonData = new FormData(); - backButtonData.left = new FormAttachment(0, 10); - backButtonData.top = new FormAttachment(0, 13); - backButtonData.width = backVMListBtn.getSize().x; - backButtonData.height = BUTTON_HEIGHT; - backVMListBtn.setLayoutData(backButtonData); + FormData confirmButtonData; + confirmButtonData = new FormData(); + confirmButtonData.left = new FormAttachment(0, 10); + confirmButtonData.top = new FormAttachment(0, 13); + confirmButtonData.width = 106; + confirmButtonData.height = BUTTON_HEIGHT; + confirmBtn.setLayoutData(confirmButtonData); FormData data; data = new FormData(); data.top = new FormAttachment(0, 13); data.right = new FormAttachment(100, -10); - data.width = 106; - data.height = 26; - confirmBtn.setLayoutData(data); + data.width = backVMListBtn.getSize().x; + data.height = BUTTON_HEIGHT; + backVMListBtn.setLayoutData(data); data = new FormData(); data.top = new FormAttachment(0, 39); diff --git a/src/org/tizen/emulator/manager/ui/renewal/tableviewer/DeviceTemplateTableViewer.java b/src/org/tizen/emulator/manager/ui/renewal/tableviewer/DeviceTemplateTableViewer.java index 5e0a9d9..e7731a1 100644 --- a/src/org/tizen/emulator/manager/ui/renewal/tableviewer/DeviceTemplateTableViewer.java +++ b/src/org/tizen/emulator/manager/ui/renewal/tableviewer/DeviceTemplateTableViewer.java @@ -857,13 +857,19 @@ public class DeviceTemplateTableViewer extends AbstractTableViewer { private void setLayout() { // composite is form layout - FormData backButtonData; - backButtonData = new FormData(); - backButtonData.left = new FormAttachment(0, 10); - backButtonData.top = new FormAttachment(0, 13); - backButtonData.width = backButton.getSize().x; - backButtonData.height = BUTTON_HEIGHT; - backButton.setLayoutData(backButtonData); + FormData createButtonData = new FormData(); + createButtonData.left = new FormAttachment(0, 10); + createButtonData.top = new FormAttachment(0, 13); + createButtonData.width = BUTTON_WIDTH; + createButtonData.height = BUTTON_HEIGHT; + createButton.setLayoutData(createButtonData); + + createButtonData = new FormData(); + createButtonData.left = new FormAttachment(createButton, 5); + createButtonData.top = new FormAttachment(0, 13); + createButtonData.width = BUTTON_WIDTH; + createButtonData.height = BUTTON_HEIGHT; + cloneButton.setLayoutData(createButtonData); FormData profileButtonData; for (int i = 0; i < profileButtonList.size(); i++) { @@ -880,8 +886,16 @@ public class DeviceTemplateTableViewer extends AbstractTableViewer { button.getButton().setLayoutData(profileButtonData); } + FormData backButtonData; + backButtonData = new FormData(); + backButtonData.right = new FormAttachment(100, -10); + backButtonData.top = new FormAttachment(0, 13); + backButtonData.width = backButton.getSize().x; + backButtonData.height = BUTTON_HEIGHT; + backButton.setLayoutData(backButtonData); + FormData workerButtonData = new FormData(); - workerButtonData.right = new FormAttachment(100, -10); + workerButtonData.right = new FormAttachment(backButton, -10); workerButtonData.top = new FormAttachment(0, 13); workerButtonData.width = BUTTON_WIDTH; workerButtonData.height = BUTTON_HEIGHT; @@ -895,20 +909,6 @@ public class DeviceTemplateTableViewer extends AbstractTableViewer { modifyButton.setLayoutData(workerButtonData); workerButtonData = new FormData(); - workerButtonData.right = new FormAttachment(modifyButton, -5); - workerButtonData.top = new FormAttachment(0, 13); - workerButtonData.width = BUTTON_WIDTH; - workerButtonData.height = BUTTON_HEIGHT; - cloneButton.setLayoutData(workerButtonData); - - workerButtonData = new FormData(); - workerButtonData.right = new FormAttachment(cloneButton, -5); - workerButtonData.top = new FormAttachment(0, 13); - workerButtonData.width = BUTTON_WIDTH; - workerButtonData.height = BUTTON_HEIGHT; - createButton.setLayoutData(workerButtonData); - - workerButtonData = new FormData(); workerButtonData.top = new FormAttachment(0, 45); workerButtonData.left = new FormAttachment(0, 10); workerButtonData.right = new FormAttachment(100, -10); -- 2.7.4