DAText: improved structure and added a new class for checking valid data
authorhyeran74.kim <hyeran74.kim@samsung.com>
Wed, 28 Oct 2015 06:40:37 +0000 (15:40 +0900)
committerhyeran74.kim <hyeran74.kim@samsung.com>
Tue, 17 Nov 2015 06:25:09 +0000 (15:25 +0900)
Change-Id: If81a22769a4cacf5a893bf5af7df19b1b3207fd2
Signed-off-by: hyeran74.kim <hyeran74.kim@samsung.com>
18 files changed:
org.tizen.dynamicanalyzer.appearance/src/org/tizen/dynamicanalyzer/resources/ImageResources.java
org.tizen.dynamicanalyzer.appearance/src/org/tizen/dynamicanalyzer/widgets/da/base/DAAbstractText.java [moved from org.tizen.dynamicanalyzer.appearance/src/org/tizen/dynamicanalyzer/widgets/da/base/DAText.java with 60% similarity]
org.tizen.dynamicanalyzer.appearance/src/org/tizen/dynamicanalyzer/widgets/da/base/DATextBox.java [new file with mode: 0644]
org.tizen.dynamicanalyzer.appearance/src/org/tizen/dynamicanalyzer/widgets/da/base/DAValidTextBox.java [new file with mode: 0644]
org.tizen.dynamicanalyzer.appearance/src/org/tizen/dynamicanalyzer/widgets/da/base/DAValidationChecker.java [new file with mode: 0644]
org.tizen.dynamicanalyzer.appearance/theme/white/img/icon_error_ok.png [new file with mode: 0644]
org.tizen.dynamicanalyzer.appearance/theme/white/img/icon_error_warning.png [new file with mode: 0644]
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/platform/ui/InputRow.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/platform/ui/SaveSettingDialog.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/common/explorer/DAFileExplorer.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/common/explorer/DeviceExplorer.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/ProcessExplorer.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/RemoteDeviceDialog.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/SaveAsDialog.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/replayEditor/ReplayEditTable.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/FeatureDialogFeaturesTreeTableToggleRenderer.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/SettingDialogOptionPage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/FindDialog.java

index 1abbd84..b0dec54 100644 (file)
@@ -461,6 +461,9 @@ public class ImageResources {
        public static final Image STOP_PROGRESS_LOADING_07 = getPngImage("loading_icon_07"); //$NON-NLS-1$
        public static final Image STOP_PROGRESS_LOADING_08 = getPngImage("loading_icon_08"); //$NON-NLS-1$
 
+       /* text box*/
+       public static final Image TEXT_BOX_WARNING = getPngImage("icon_error_warning"); //$NON-NLS-1$
+       public static final Image TEXT_BOX_OK = getPngImage("icon_error_ok"); //$NON-NLS-1$
        
        private static Image getImage(String pluginId, String folderName,
                        String imageName, String extension) {
@@ -4,7 +4,7 @@
  * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact: 
- * Juyoung Kim <j0.kim@samsung.com>
+ * Hyeran Kim <hyeran74.kim@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -27,100 +27,49 @@ package org.tizen.dynamicanalyzer.widgets.da.base;
 
 
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Text;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.widgets.tooltip.DACustomTooltip;
 
-public class DAText {
-       private Text text = null;
-       private Color currentColor = null;
+public abstract class DAAbstractText {
+       protected Text text = null;
+       protected boolean textTooltip = false;
+       protected String textTooltipMessage = null;
+       protected Color boaderColor = ColorResources.TEXT_NORMAL_COLOR;;
 
-       public static final int TEXT_STATE_NORMAL = 0;
-       public static final int TEXT_STATE_PUSH = 1;
-       public static final int TEXT_STATE_HOVER = 2;
+       public DAAbstractText() { }
        
-       public boolean textTooltip = false;
-       public String textTooltipMessage = null;
-       
-       private Image iconImage = null;
-       private int iconImage_x = 0;
-       private int iconImage_y = 0;
-
        public Listener textMouseListener = new Listener() {
                @Override
                public void handleEvent(Event event) {
                        int type = event.type;
                        switch (type) {
                        case SWT.MouseEnter:
-                               currentColor = ColorResources.TEXT_HOVER_COLOR;
+                               boaderColor = ColorResources.TEXT_HOVER_COLOR;
                                break;
                        case SWT.MouseHover:
-                               currentColor = ColorResources.TEXT_HOVER_COLOR;
+                               boaderColor = ColorResources.TEXT_HOVER_COLOR;
                                break;
                        case SWT.MouseDown:
-                               currentColor = ColorResources.TEXT_PUSH_COLOR;
+                               boaderColor = ColorResources.TEXT_PUSH_COLOR;
                                break;
                        case SWT.MouseExit:
-                               currentColor = ColorResources.TEXT_NORMAL_COLOR;
+                               boaderColor = ColorResources.TEXT_NORMAL_COLOR;
                                break;
                        case SWT.MouseUp:
-                               currentColor = ColorResources.TEXT_HOVER_COLOR;
+                               boaderColor = ColorResources.TEXT_HOVER_COLOR;
                                break;
                        }
-                       text.redraw();
+                       redraw();
                }
        };
-
-       public DAText(Composite parent, int style) {
-               text = new Text(parent, style);
-               currentColor = ColorResources.TEXT_NORMAL_COLOR;
-               text.addPaintListener(new PaintListener() {
-                       @Override
-                       public void paintControl(PaintEvent e) {
-                               e.gc.setForeground(currentColor);
-                               Text text = (Text) e.widget;
-                               Rectangle rect = text.getClientArea();
-                               e.gc.drawRectangle(rect.x, rect.y, rect.width - 1,
-                                               rect.height - 1);
-                               if(iconImage != null) {
-                                       // draw a image in text box
-                                       e.gc.drawImage(iconImage, rect.x+iconImage_x, rect.y+iconImage_y);
-                               }
-                       }
-               });
-
-               text.addListener(SWT.MouseEnter, textMouseListener);
-               text.addListener(SWT.MouseExit, textMouseListener);
-               text.addListener(SWT.MouseDown, textMouseListener);
-               text.addListener(SWT.MouseUp, textMouseListener);
-               text.addListener(SWT.MouseHover, textMouseListener);
-
-               text.addFocusListener(new FocusListener() {
-
-                       @Override
-                       public void focusLost(FocusEvent e) {
-                               currentColor = ColorResources.TEXT_NORMAL_COLOR;
-                       }
-
-                       @Override
-                       public void focusGained(FocusEvent e) {
-                               // TODO Auto-generated method stub
-
-                       }
-               });
-       }
+       
+       abstract void redraw();
 
        // tooltip
        private DACustomTooltip tooltip = new DACustomTooltip() {
@@ -217,19 +166,4 @@ public class DAText {
        public void setFont(Font font) {
                this.text.setFont(font);
        }
-       
-       public void setIconImage(Image image){
-               this.iconImage = image;
-       }
-       
-       public void setIconImage(Image image, int x, int y){
-               this.iconImage = image;
-               this.iconImage_x = x;
-               this.iconImage_y = y;
-       }
-       
-       public void deleteIconImage() {
-               this.iconImage = null;
-       }
-       
 }
diff --git a/org.tizen.dynamicanalyzer.appearance/src/org/tizen/dynamicanalyzer/widgets/da/base/DATextBox.java b/org.tizen.dynamicanalyzer.appearance/src/org/tizen/dynamicanalyzer/widgets/da/base/DATextBox.java
new file mode 100644 (file)
index 0000000..8eb5139
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ *  Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Hyeran Kim <hyeran74.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * Contributors:
+ * - S-Core Co., Ltd
+ * 
+ */
+
+package org.tizen.dynamicanalyzer.widgets.da.base;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.tizen.dynamicanalyzer.resources.ColorResources;
+
+public class DATextBox extends DAAbstractText{
+
+       public DATextBox(Composite parent, int style) {
+               super();
+               text = new Text(parent, style);
+               text.addPaintListener(new PaintListener() {
+                       @Override
+                       public void paintControl(PaintEvent e) {
+                               e.gc.setForeground(boaderColor);
+                               Text text = (Text) e.widget;
+                               Rectangle rect = text.getClientArea();
+                               e.gc.drawRectangle(rect.x, rect.y, rect.width - 1,
+                                               rect.height - 1);
+                       }
+               });
+
+               text.addListener(SWT.MouseEnter, textMouseListener);
+               text.addListener(SWT.MouseExit, textMouseListener);
+               text.addListener(SWT.MouseDown, textMouseListener);
+               text.addListener(SWT.MouseUp, textMouseListener);
+               text.addListener(SWT.MouseHover, textMouseListener);
+
+               text.addFocusListener(new FocusListener() {
+
+                       @Override
+                       public void focusLost(FocusEvent e) {
+                               boaderColor = ColorResources.TEXT_NORMAL_COLOR;
+                       }
+
+                       @Override
+                       public void focusGained(FocusEvent e) {
+                               // TODO Auto-generated method stub
+
+                       }
+               });
+       }
+
+       @Override
+       void redraw() {
+               text.redraw();
+       }
+}
diff --git a/org.tizen.dynamicanalyzer.appearance/src/org/tizen/dynamicanalyzer/widgets/da/base/DAValidTextBox.java b/org.tizen.dynamicanalyzer.appearance/src/org/tizen/dynamicanalyzer/widgets/da/base/DAValidTextBox.java
new file mode 100644 (file)
index 0000000..497492d
--- /dev/null
@@ -0,0 +1,150 @@
+/*
+ *  Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Hyeran Kim <hyeran74.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * Contributors:
+ * - S-Core Co., Ltd
+ * 
+ */
+
+package org.tizen.dynamicanalyzer.widgets.da.base;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.tizen.dynamicanalyzer.resources.ColorResources;
+import org.tizen.dynamicanalyzer.resources.ImageResources;
+
+public class DAValidTextBox extends DAAbstractText{
+       private Composite composite = null;
+       private Image iconImage = ImageResources.TEXT_BOX_OK; //16x16
+       private int imageArea = 20;
+       DAValidationChecker validationChecker = null;
+       
+       public DAValidTextBox(Composite parent, int style) {
+               this.validationChecker = (DAValidationChecker) parent;
+               
+               composite  = new Composite(parent, SWT.DOUBLE_BUFFERED);
+               composite.setLayout(new FormLayout());
+               
+               text = new Text(composite, style);
+               
+               composite.addPaintListener(new PaintListener() {
+                       @Override
+                       public void paintControl(PaintEvent e) {
+                               Composite comp = (Composite) e.widget;
+                               Rectangle rect = comp.getClientArea();
+                               e.gc.setForeground(boaderColor);
+                               e.gc.drawRectangle(rect.x, rect.y, rect.width-imageArea, rect.height-1);
+                               if(iconImage != null) {
+                                       ImageData data = iconImage.getImageData();
+                                       // draw a image in text box
+                                       e.gc.drawImage(iconImage, rect.width-data.width -1, 
+                                                       (rect.height-data.height)/2);
+                               }
+                       }
+               });
+               
+               text.addListener(SWT.MouseEnter, textMouseListener);
+               text.addListener(SWT.MouseExit, textMouseListener);
+               text.addListener(SWT.MouseDown, textMouseListener);
+               text.addListener(SWT.MouseUp, textMouseListener);
+               text.addListener(SWT.MouseHover, textMouseListener);
+
+               text.addFocusListener(new FocusListener() {
+
+                       @Override
+                       public void focusLost(FocusEvent e) {
+                               boaderColor = ColorResources.TEXT_NORMAL_COLOR;
+                       }
+
+                       @Override
+                       public void focusGained(FocusEvent e) {
+
+                       }
+               });
+               
+               
+               text.addKeyListener(new KeyListener() {
+                       @Override
+                       public void keyReleased(KeyEvent e) {
+                               // check validation and change icon image
+                               if(validationChecker.validate()){
+                                       iconImage = ImageResources.TEXT_BOX_OK;
+                               }else{
+                                       iconImage = ImageResources.TEXT_BOX_WARNING;
+                               }
+                               composite.redraw();
+                       }
+
+                       @Override
+                       public void keyPressed(KeyEvent e) {
+                       }
+               });
+       }
+
+       // layout text field in composite
+       public void setLayoutData(FormData data) {
+               composite.setLayoutData(data);
+               
+               // text
+               data = new FormData();
+               data.top = new FormAttachment(0, 1);
+               data.bottom = new FormAttachment(100, -1);
+               data.left = new FormAttachment(0, 1);
+               data.right = new FormAttachment(100, -imageArea);
+               text.setLayoutData(data);
+       
+               composite.layout();
+       }
+
+
+       // set composite background color
+       public void setCompositeBackground(Color color) {
+               composite.setBackground(color);
+       }
+
+       // set default icon image(OK or Warning image)
+       public void setDefaultIconImage(boolean defaultImage) {
+               if(defaultImage) {
+                       iconImage = ImageResources.TEXT_BOX_OK;
+               }else{
+                       iconImage = ImageResources.TEXT_BOX_WARNING;
+               }
+       }
+
+       @Override
+       void redraw() {
+               composite.redraw();
+       }
+       
+}
diff --git a/org.tizen.dynamicanalyzer.appearance/src/org/tizen/dynamicanalyzer/widgets/da/base/DAValidationChecker.java b/org.tizen.dynamicanalyzer.appearance/src/org/tizen/dynamicanalyzer/widgets/da/base/DAValidationChecker.java
new file mode 100644 (file)
index 0000000..44c1139
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ *  Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * hyeran Kim <hyeran74.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * Contributors:
+ * - S-Core Co., Ltd
+ * 
+ */
+
+package org.tizen.dynamicanalyzer.widgets.da.base;
+
+/**
+ * Check validation of string in text field
+ */
+public interface DAValidationChecker {
+
+       // validate text in text field
+       public boolean validate();
+}
diff --git a/org.tizen.dynamicanalyzer.appearance/theme/white/img/icon_error_ok.png b/org.tizen.dynamicanalyzer.appearance/theme/white/img/icon_error_ok.png
new file mode 100644 (file)
index 0000000..9f85936
Binary files /dev/null and b/org.tizen.dynamicanalyzer.appearance/theme/white/img/icon_error_ok.png differ
diff --git a/org.tizen.dynamicanalyzer.appearance/theme/white/img/icon_error_warning.png b/org.tizen.dynamicanalyzer.appearance/theme/white/img/icon_error_warning.png
new file mode 100644 (file)
index 0000000..e33056d
Binary files /dev/null and b/org.tizen.dynamicanalyzer.appearance/theme/white/img/icon_error_warning.png differ
index 0d63972..d43f3e1 100644 (file)
@@ -49,12 +49,12 @@ import org.tizen.dynamicanalyzer.ui.common.explorer.FileExplorerDialog;
 import org.tizen.dynamicanalyzer.util.CommonUtil;
 import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
 import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
-import org.tizen.dynamicanalyzer.widgets.da.base.DAText;
+import org.tizen.dynamicanalyzer.widgets.da.base.DATextBox;
 
 public class InputRow extends Composite {
        private Label binaryNameLabel = null;
-       private DAText debugPathText = null;
-       private DAText sourcePathText = null;
+       private DATextBox debugPathText = null;
+       private DATextBox sourcePathText = null;
 
        private DACustomButton findDebugButton = null;
        private DACustomButton findSourceButton = null;
@@ -161,7 +161,7 @@ public class InputRow extends Composite {
                sourceLabel.setFont(FontResources.getDADefaultFont());
                sourceLabel.setText("Source Directory path");
 
-               debugPathText = new DAText(this, SWT.SINGLE);
+               debugPathText = new DATextBox(this, SWT.SINGLE);
 
                findDebugButton = new DACustomButton(this, ImageResources.FIND_BUTTON_NORMAL,
                                ImageResources.FIND_BUTTON_PUSH, ImageResources.FIND_BUTTON_HOVER,
@@ -178,7 +178,7 @@ public class InputRow extends Composite {
                                ImageResources.DELETE_BUTTON_DISABLE);
                removeButton.addClickListener(removeListener);
 
-               sourcePathText = new DAText(this, SWT.SINGLE);
+               sourcePathText = new DATextBox(this, SWT.SINGLE);
                sourcePathText.setBackground(ColorResources.WHITE);
 
                data = new FormData();
index ec7800e..a426711 100644 (file)
@@ -62,13 +62,13 @@ import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
 import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
 import org.tizen.dynamicanalyzer.widgets.da.base.DAButton;
 import org.tizen.dynamicanalyzer.widgets.da.base.DAMessageBox;
-import org.tizen.dynamicanalyzer.widgets.da.base.DAText;
+import org.tizen.dynamicanalyzer.widgets.da.base.DATextBox;
 
 public class SaveSettingDialog extends DAMessageBox {
        private int MAX_SAVE_FILE_NAME_LENGTH = 35;
        private final String DEFAULT_TIME_FORMAT = "_yyyy-MM-dd-HH-mm-ss";//$NON-NLS-1$
 
-       private DAText textBox = null;
+       private DATextBox textBox = null;
        private String saveFileName = null;
        private DAButton okButton = null;
        private DAButton cancelButton = null;
@@ -186,7 +186,7 @@ public class SaveSettingDialog extends DAMessageBox {
                label.setText(AnalyzerLabels.SAVE_TRACE_DLG_SAVE_FILE_NAME);
                label.setBackground(ColorResources.DIALOG_BG_UPPER);
 
-               textBox = new DAText(shell, SWT.SINGLE);
+               textBox = new DATextBox(shell, SWT.SINGLE);
                data = new FormData();
                data.top = new FormAttachment(label, 10);
                data.left = new FormAttachment(0, 9);
index 764cf60..238cd99 100644 (file)
@@ -55,7 +55,7 @@ import org.tizen.dynamicanalyzer.util.Logger;
 import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
 import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
 import org.tizen.dynamicanalyzer.widgets.da.base.DAButton;
-import org.tizen.dynamicanalyzer.widgets.da.base.DAText;
+import org.tizen.dynamicanalyzer.widgets.da.base.DATextBox;
 
 public class DAFileExplorer extends Composite {
        private static int FAIL = -1;
@@ -63,7 +63,7 @@ public class DAFileExplorer extends Composite {
        private static int DIRECTORY = 2;
 
        protected Grid table = null;
-       protected DAText inputText = null;
+       protected DATextBox inputText = null;
        protected DACustomButton goButton = null;
 
        private File root = null;
@@ -168,7 +168,7 @@ public class DAFileExplorer extends Composite {
                this.setLayout(new FormLayout());
                this.setBackground(ColorResources.DIALOG_BG_UPPER);
 
-               inputText = new DAText(this, SWT.SINGLE);
+               inputText = new DATextBox(this, SWT.SINGLE);
                FormData data = new FormData();
                data.top = new FormAttachment(0, 5);
                data.left = new FormAttachment(0, 5);
index af91231..ac19743 100644 (file)
@@ -58,7 +58,7 @@ import org.tizen.dynamicanalyzer.util.Logger;
 import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
 import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
 import org.tizen.dynamicanalyzer.widgets.da.base.DAButton;
-import org.tizen.dynamicanalyzer.widgets.da.base.DAText;
+import org.tizen.dynamicanalyzer.widgets.da.base.DATextBox;
 import org.tizen.dynamicanalyzer.widgets.tooltip.DACustomTooltip;
 import org.tizen.sdblib.IDevice;
 import org.tizen.sdblib.service.FileEntry;
@@ -73,7 +73,7 @@ public class DeviceExplorer extends Composite {
        private static int PERMISSION_FILTER_LENGTH = 3;
 
        protected Grid table = null;
-       protected DAText inputText = null;
+       protected DATextBox inputText = null;
        protected DACustomButton goButton = null;
 
        protected IDevice device = null;
@@ -222,7 +222,7 @@ public class DeviceExplorer extends Composite {
                this.setLayout(new FormLayout());
                this.setBackground(ColorResources.DIALOG_BG_UPPER);
 
-               inputText = new DAText(this, SWT.SINGLE);
+               inputText = new DATextBox(this, SWT.SINGLE);
                FormData data = new FormData();
                data.top = new FormAttachment(0, 5);
                data.left = new FormAttachment(0, 5);
index bf3df91..5d6d658 100644 (file)
@@ -51,11 +51,11 @@ import org.tizen.dynamicanalyzer.util.Logger;
 import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
 import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
 import org.tizen.dynamicanalyzer.widgets.da.base.DAButton;
-import org.tizen.dynamicanalyzer.widgets.da.base.DAText;
+import org.tizen.dynamicanalyzer.widgets.da.base.DATextBox;
 
 public class ProcessExplorer extends Composite {
        protected Grid table = null;
-       protected DAText findText = null;
+       protected DATextBox findText = null;
        protected DACustomButton findButton = null;
        protected DACustomButton refreshButton = null;
 
@@ -143,7 +143,7 @@ public class ProcessExplorer extends Composite {
                data.bottom = new FormAttachment(100, -36);
                table.setLayoutData(data);
 
-               findText = new DAText(this, SWT.SINGLE);
+               findText = new DATextBox(this, SWT.SINGLE);
                data = new FormData();
                data.top = new FormAttachment(table, 10);
                data.left = new FormAttachment(0, 10);
index 9b7eabc..e992a7e 100644 (file)
@@ -54,7 +54,7 @@ import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
 import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
 import org.tizen.dynamicanalyzer.widgets.da.base.DAButton;
 import org.tizen.dynamicanalyzer.widgets.da.base.DAMessageBox;
-import org.tizen.dynamicanalyzer.widgets.da.base.DAText;
+import org.tizen.dynamicanalyzer.widgets.da.base.DATextBox;
 import org.tizen.dynamicanalyzer.widgets.helper.ImageResources;
 
 public class RemoteDeviceDialog extends DAMessageBox {
@@ -62,8 +62,8 @@ public class RemoteDeviceDialog extends DAMessageBox {
 
        private RemoteDeviceDialog self = null;
 
-       private DAText ipTextbox = null;
-       private DAText portTextbox = null;
+       private DATextBox ipTextbox = null;
+       private DATextBox portTextbox = null;
 
        private List<Image> progressImage = new ArrayList<Image>();
        private DAAnimationIcon progressIcon = null;
@@ -98,7 +98,7 @@ public class RemoteDeviceDialog extends DAMessageBox {
                ipText.setForeground(ColorResources.BLACK);
                ipText.setText(AnalyzerLabels.IP);
 
-               ipTextbox = new DAText(shell, SWT.SINGLE);
+               ipTextbox = new DATextBox(shell, SWT.SINGLE);
                data = new FormData();
                data.top = new FormAttachment(0, 12);
                data.left = new FormAttachment(ipText, 12);
@@ -121,7 +121,7 @@ public class RemoteDeviceDialog extends DAMessageBox {
                portText.setForeground(ColorResources.BLACK);
                portText.setText(AnalyzerLabels.PORT);
 
-               portTextbox = new DAText(shell, SWT.SINGLE);
+               portTextbox = new DATextBox(shell, SWT.SINGLE);
                data = new FormData();
                data.top = new FormAttachment(ipText, 12);
                data.left = new FormAttachment(portText, 12);
index 9bce282..ae9f3bf 100755 (executable)
@@ -56,10 +56,10 @@ import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
 import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
 import org.tizen.dynamicanalyzer.widgets.da.base.DAButton;
 import org.tizen.dynamicanalyzer.widgets.da.base.DAMessageBox;
-import org.tizen.dynamicanalyzer.widgets.da.base.DAText;
+import org.tizen.dynamicanalyzer.widgets.da.base.DATextBox;
 
 public class SaveAsDialog extends DAMessageBox {
-       private DAText textBox = null;
+       private DATextBox textBox = null;
        private String saveFileName = null;
        private DAButton okButton = null;
        private DAButton cancelButton = null;
@@ -86,7 +86,7 @@ public class SaveAsDialog extends DAMessageBox {
                label.setText(AnalyzerLabels.SAVE_TRACE_DLG_SAVE_FILE_NAME);
                label.setBackground(ColorResources.DIALOG_BG_UPPER);
 
-               textBox = new DAText(shell, SWT.SINGLE);
+               textBox = new DATextBox(shell, SWT.SINGLE);
                data = new FormData();
                data.top = new FormAttachment(label, 10);
                data.left = new FormAttachment(0, 9);
index 25344d0..ac21870 100644 (file)
@@ -49,7 +49,7 @@ import org.tizen.dynamicanalyzer.ui.toolbar.replayEditor.data.ReplayEditTableDat
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableHeaderRenderer;
 import org.tizen.dynamicanalyzer.util.Logger;
-import org.tizen.dynamicanalyzer.widgets.da.base.DAText;
+import org.tizen.dynamicanalyzer.widgets.da.base.DATextBox;
 import org.tizen.dynamicanalyzer.widgets.popupMenu.DAPopupMenu;
 import org.tizen.dynamicanalyzer.widgets.popupMenu.DAPopupMenuItem;
 import org.tizen.dynamicanalyzer.widgets.popupMenu.DAPopupMenuListener;
@@ -81,7 +81,7 @@ public class ReplayEditTable extends DATableComposite {
        DAPopupMenuItem pasteItem = null;
        DAPopupMenuItem deleteItem = null;
 
-       private DAText inputValueText = null;
+       private DATextBox inputValueText = null;
 
        private boolean enableCoordinateIcon = true;
 
@@ -623,7 +623,7 @@ public class ReplayEditTable extends DATableComposite {
                editor.horizontalAlignment = SWT.CENTER;
                editor.grabHorizontal = true;
 
-               inputValueText = new DAText(table, SWT.CENTER);
+               inputValueText = new DATextBox(table, SWT.CENTER);
                inputValueText.getControl().setText(getMouseSelectedTableItemText());
                inputValueText.getControl().selectAll();
                inputValueText.getControl().setFocus();
index c8ed63b..5137992 100644 (file)
@@ -55,7 +55,7 @@ import org.tizen.dynamicanalyzer.resources.ImageResources;
 import org.tizen.dynamicanalyzer.setting.Feature;
 import org.tizen.dynamicanalyzer.setting.FeatureData;
 import org.tizen.dynamicanalyzer.setting.SettingConstants;
-import org.tizen.dynamicanalyzer.widgets.da.base.DAText;
+import org.tizen.dynamicanalyzer.widgets.da.base.DATextBox;
 
 public class FeatureDialogFeaturesTreeTableToggleRenderer extends AbstractRenderer {
        static final int intevalSize = 15;
@@ -64,7 +64,7 @@ public class FeatureDialogFeaturesTreeTableToggleRenderer extends AbstractRender
        // System detail widget
        private Composite detailSystemComposit = null;
        private Label systemTitle = null;
-       private DAText systemTextBox = null;
+       private DATextBox systemTextBox = null;
        private Label systemTextBoxLabel = null;
        private Label systemInfo = null;
        private GridEditor systemEditor = null;
@@ -72,7 +72,7 @@ public class FeatureDialogFeaturesTreeTableToggleRenderer extends AbstractRender
        // Sampling detail widget
        private Composite detailSamplingComposit = null;
        private Label samplingTitle = null;
-       private DAText samplingTextBox = null;
+       private DATextBox samplingTextBox = null;
        private Label samplingTextBoxLabel = null;
        private Label samplingInfo = null;
        private GridEditor samplingEditor = null;
@@ -201,7 +201,7 @@ public class FeatureDialogFeaturesTreeTableToggleRenderer extends AbstractRender
                systemTitle.setBackground(ColorResources.SETTING_TABLE_CONTENTS_CHILD);
 
                // text box
-               systemTextBox = new DAText(detailSystemComposit, SWT.SINGLE);
+               systemTextBox = new DATextBox(detailSystemComposit, SWT.SINGLE);
                data = new FormData();
                data.top = new FormAttachment(0, 4);
                data.left = new FormAttachment(systemTitle, 5);
@@ -265,7 +265,7 @@ public class FeatureDialogFeaturesTreeTableToggleRenderer extends AbstractRender
                samplingTitle.setBackground(ColorResources.SETTING_TABLE_CONTENTS_CHILD);
 
                // text box
-               samplingTextBox = new DAText(detailSamplingComposit, SWT.SINGLE);
+               samplingTextBox = new DATextBox(detailSamplingComposit, SWT.SINGLE);
                data = new FormData();
                data.top = new FormAttachment(0, 4);
                data.left = new FormAttachment(samplingTitle, 5);
@@ -399,7 +399,7 @@ public class FeatureDialogFeaturesTreeTableToggleRenderer extends AbstractRender
                return null;
        }
 
-       private boolean checkValidInputText(String featuresName, DAText textBox, Label info) {
+       private boolean checkValidInputText(String featuresName, DATextBox textBox, Label info) {
                FeatureData feature = Feature.getFeature(featuresName).getData();
                String errormsg = feature.validateInputValue(textBox.getText());
                info.setText(errormsg);
index 64cdc9b..5a2f065 100644 (file)
@@ -51,7 +51,7 @@ import org.tizen.dynamicanalyzer.setting.FeatureData;
 import org.tizen.dynamicanalyzer.setting.SettingDataManager;
 import org.tizen.dynamicanalyzer.widgets.button.checkbox.DACheckBox;
 import org.tizen.dynamicanalyzer.widgets.button.checkbox.DACheckboxSelectionListener;
-import org.tizen.dynamicanalyzer.widgets.da.base.DAText;
+import org.tizen.dynamicanalyzer.widgets.da.base.DATextBox;
 import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
 
 public class SettingDialogOptionPage extends DAPageComposite {
@@ -62,7 +62,7 @@ public class SettingDialogOptionPage extends DAPageComposite {
 
        private DACheckBox onSceneTransitionCheckBox = null;
        private DACheckBox periodicallyCheckBox = null;
-       private DAText periodicallyTextBox = null;
+       private DATextBox periodicallyTextBox = null;
        private Label periodicallyTextBoxLabel = null;
        private Label periodicallyInfo = null;
 
@@ -263,7 +263,7 @@ public class SettingDialogOptionPage extends DAPageComposite {
                periodicallyLabel.setLayoutData(data);
 
                // text box
-               periodicallyTextBox = new DAText(this, SWT.SINGLE);
+               periodicallyTextBox = new DATextBox(this, SWT.SINGLE);
                data = new FormData();
                data.top = new FormAttachment(onSceneTransitionCheckBox, 3);
                data.left = new FormAttachment(periodicallyLabel, 0);
@@ -415,7 +415,7 @@ public class SettingDialogOptionPage extends DAPageComposite {
                }
        };
 
-       private boolean checkValidInputText(Feature feature, DAText textBox, Label info) {
+       private boolean checkValidInputText(Feature feature, DATextBox textBox, Label info) {
                FeatureData featureData = feature.getData();
                String errormsg = featureData.validateInputValue(textBox.getText());
                info.setText(errormsg);
index 4a3c29f..0a772fd 100644 (file)
@@ -53,13 +53,13 @@ import org.tizen.dynamicanalyzer.widgets.button.radio.DARadioGroup;
 import org.tizen.dynamicanalyzer.widgets.button.radio.DARadioSelectionListener;
 import org.tizen.dynamicanalyzer.widgets.da.base.DAButton;
 import org.tizen.dynamicanalyzer.widgets.da.base.DAMessageBox;
-import org.tizen.dynamicanalyzer.widgets.da.base.DAText;
+import org.tizen.dynamicanalyzer.widgets.da.base.DATextBox;
 
 public class FindDialog extends DAMessageBox {
 
        private static final int ENTER_KEY_CODE = 13;
 
-       private DAText textBox = null;
+       private DATextBox textBox = null;
        private DAButton findButton = null;
        private DARadioButton forwardButton = null;
        private DARadioButton backwardButton = null;
@@ -100,7 +100,7 @@ public class FindDialog extends DAMessageBox {
                                + CommonConstants.SPACE + viewName + CommonConstants.SPACE
                                + AnalyzerLabels.FIND_DLG_TITLE_POSTFIX);
 
-               textBox = new DAText(shell, SWT.SINGLE);
+               textBox = new DATextBox(shell, SWT.SINGLE);
                FormData data = new FormData();
                data.top = new FormAttachment(0, 11);
                data.left = new FormAttachment(0, 9);