From fceb2529f253183ef63974eeb481c3c1398d50cc Mon Sep 17 00:00:00 2001 From: hyeran74 Date: Tue, 18 Feb 2014 11:53:10 +0900 Subject: [PATCH] [Title] refactoring FindDialog [Desc.] resize the width of buttons and change Text Object to DAText Object in a FindDialog [Issue] - --- .../dynamicanalyzer/ui/widgets/FindDialog.java | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/FindDialog.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/FindDialog.java index 655dd6c..976dd2b 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/FindDialog.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/FindDialog.java @@ -57,7 +57,7 @@ public class FindDialog extends DAMessageBox { private static final int ENTER_KEY_CODE = 13; - private Text textBox = null; + private DAText textBox = null; private DAButton findButton = null; private DARadioButton forwardButton = null; private DARadioButton backwardButton = null; @@ -98,7 +98,7 @@ public class FindDialog extends DAMessageBox { + CommonConstants.SPACE + viewName + CommonConstants.SPACE + AnalyzerLabels.FIND_DLG_TITLE_POSTFIX); - textBox = new Text(shell, SWT.SINGLE); + textBox = new DAText(shell, SWT.SINGLE); FormData data = new FormData(); data.top = new FormAttachment(0, 11); data.left = new FormAttachment(0, 9); @@ -106,14 +106,14 @@ public class FindDialog extends DAMessageBox { data.width = 200; textBox.setLayoutData(data); textBox.setBackground(ColorResources.VIEW_BG_COLOR); - textBox.addKeyListener(keyListener); + textBox.getControl().addKeyListener(keyListener); textBox.setText(findProperty.getLastSearch()); - textBox.setSelection(0, findProperty.getLastSearch().length()); + textBox.getControl().setSelection(0, findProperty.getLastSearch().length()); findButton = new DAButton(shell, SWT.NONE); data = new FormData(); data.top = new FormAttachment(0, 11); - data.left = new FormAttachment(textBox, 9); + data.left = new FormAttachment(textBox.getControl(), 9); data.height = 25; data.width = DesignConstants.DA_BUTTON_WIDTH; findButton.setLayoutData(data); @@ -122,10 +122,10 @@ public class FindDialog extends DAMessageBox { Label directionLabel = new Label(shell, SWT.TRANSPARENT); data = new FormData(); - data.top = new FormAttachment(textBox, 11); + data.top = new FormAttachment(textBox.getControl(), 11); data.left = new FormAttachment(0, 15); data.height = 20; - data.width = DesignConstants.DA_BUTTON_WIDTH - 10; + data.width = DesignConstants.DA_BUTTON_WIDTH - 20; directionLabel.setLayoutData(data); directionLabel.setForeground(ColorResources.BLACK); directionLabel.setText(AnalyzerLabels.FIND_DLG_DIRECTION); @@ -134,10 +134,10 @@ public class FindDialog extends DAMessageBox { DARadioGroup radioGroup = new DARadioGroup(); forwardButton = new DARadioButton(shell, SWT.NONE); data = new FormData(); - data.top = new FormAttachment(textBox, 10); + data.top = new FormAttachment(textBox.getControl(), 10); data.left = new FormAttachment(directionLabel, 0); data.height = 20; - data.width = DesignConstants.DA_BUTTON_WIDTH + 10; + data.width = DesignConstants.DA_BUTTON_WIDTH + 20; forwardButton.setLayoutData(data); forwardButton.setForeground(ColorResources.BLACK); forwardButton.setBackground(ColorResources.DIALOG_BG_UPPER); @@ -147,7 +147,7 @@ public class FindDialog extends DAMessageBox { backwardButton = new DARadioButton(shell, SWT.NONE); data = new FormData(); - data.top = new FormAttachment(textBox, 10); + data.top = new FormAttachment(textBox.getControl(), 10); data.left = new FormAttachment(forwardButton, 1); data.height = 20; data.width = DesignConstants.DA_BUTTON_WIDTH; @@ -163,7 +163,7 @@ public class FindDialog extends DAMessageBox { data.top = new FormAttachment(directionLabel, 5); data.left = new FormAttachment(0, 15); data.height = 20; - data.width = DesignConstants.DA_BUTTON_WIDTH - 10; + data.width = DesignConstants.DA_BUTTON_WIDTH - 20; optionLabel.setLayoutData(data); optionLabel.setForeground(ColorResources.BLACK); optionLabel.setText(AnalyzerLabels.FIND_DLG_OPTION); @@ -174,7 +174,7 @@ public class FindDialog extends DAMessageBox { data.top = new FormAttachment(forwardButton, 5); data.left = new FormAttachment(optionLabel, 0); data.height = 20; - data.width = DesignConstants.DA_BUTTON_WIDTH + 10; + data.width = DesignConstants.DA_BUTTON_WIDTH + 20; caseButton.setLayoutData(data); caseButton.setForeground(ColorResources.BLACK); caseButton.setBackground(ColorResources.DIALOG_BG_UPPER); -- 2.7.4