[Title] DACustomButton applied
authorjy.exe.lee <jy.exe.lee@samsung.com>
Thu, 5 Jul 2012 05:55:54 +0000 (14:55 +0900)
committerjy.exe.lee <jy.exe.lee@samsung.com>
Thu, 5 Jul 2012 05:55:54 +0000 (14:55 +0900)
[Type] -
[Module] DynamicAnalyzer
[Priority]normal
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/timeline/TimelineTick.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/AboutDialog.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/ConfigurationDialog.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/DAContextMenu.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/LicenseDialog.java

index ef3e86c..75c74e5 100644 (file)
@@ -7,18 +7,16 @@ import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Canvas;
 import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Scale;
 import org.eclipse.swt.widgets.Shell;
 import org.tizen.dynamicanalyzer.FontResources;
 import org.tizen.dynamicanalyzer.ImageResources;
 import org.tizen.dynamicanalyzer.constants.TimelineConstants;
-import org.tizen.dynamicanalyzer.listeners.DAButtonClickEventListener;
 import org.tizen.dynamicanalyzer.nl.TimelineChartLables;
-import org.tizen.dynamicanalyzer.ui.widgets.button.DAButton;
 import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
-
+import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
+import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
 
 public class TimelineTick {
        private Composite timeAndMenuComp;
@@ -26,8 +24,8 @@ public class TimelineTick {
        private TimeTickComposite timeTickComp;
        private Canvas rangeCanvas;
        private Scale rangeScale;
-       private DAButton addItems;
-       private DAButton minimizeItems;
+       private DACustomButton addItems;
+       private DACustomButton minimizeItems;
 
        private final int MARGIN_HORIZONTAL = 3;
 
@@ -53,20 +51,24 @@ public class TimelineTick {
                protected int downLeftMarginP;
        }
 
-       private DAButtonClickEventListener addItemListButtonListener = new DAButtonClickEventListener(addItems) {
+       private DACustomButtonClickEventListener addItemListButtonListener = new DACustomButtonClickEventListener() {
+
                @Override
-               public void handleClickEvent(Event event) {
+               public void handleClickEvent(DACustomButton button) {
                        Shell shell = AnalyzerUtil.getWorkbenchWindow().getShell();
-                       TimelineEditItemsDialog dialog = new TimelineEditItemsDialog(shell, SWT.None);
+                       TimelineEditItemsDialog dialog = new TimelineEditItemsDialog(shell,
+                                       SWT.None);
 
                        dialog.open();
                }
        };
 
-       private DAButtonClickEventListener minItemListButtonListener = new DAButtonClickEventListener(minimizeItems) {
+       private DACustomButtonClickEventListener minItemListButtonListener = new DACustomButtonClickEventListener() {
+
                @Override
-               public void handleClickEvent(Event event) {
-                       TimelineComposite timelineComposite = AnalyzerUtil.getTimelineComposite();
+               public void handleClickEvent(DACustomButton button) {
+                       TimelineComposite timelineComposite = AnalyzerUtil
+                                       .getTimelineComposite();
                        if (null != timelineComposite) {
                                TimelineItemSettingProvider.setItemSettingMinimizeAll();
                                timelineComposite.resizeItemArea();
@@ -127,7 +129,9 @@ public class TimelineTick {
                gLayout.verticalSpacing = 0;
                addItemComp.setLayout(gLayout);
 
-               addItems = new DAButton(addItemComp, ImageResources.ADD_ITEMS_NORMAL, ImageResources.ADD_ITEMS_PUSH, ImageResources.ADD_ITEMS_HOVER, null);
+               addItems = new DACustomButton(addItemComp, ImageResources.ADD_ITEMS_NORMAL,
+                               ImageResources.ADD_ITEMS_PUSH, ImageResources.ADD_ITEMS_HOVER,
+                               null);
                addItems.setTitle(TimelineChartLables.TIMELINE_TICK_ADD);
                addItems.setFontPoint(new Point(45, 3));
                addItems.setFont(FontResources.ADDITEM_BUTTON_FONT);
@@ -142,7 +146,9 @@ public class TimelineTick {
                addItems.addClickListener(addItemListButtonListener);
                // addItems.addMouseListener(addItemListListener);
 
-               DAButton minimizeItems = new DAButton(addItemComp, ImageResources.TIMLINE_SIZE_MIN_NORMAL, ImageResources.TIMLINE_SIZE_MIN_PUSH,
+               minimizeItems = new DACustomButton(addItemComp,
+                               ImageResources.TIMLINE_SIZE_MIN_NORMAL,
+                               ImageResources.TIMLINE_SIZE_MIN_PUSH,
                                ImageResources.TIMLINE_SIZE_MIN_HOVER, null);
                GridData gDataMinBtn = new GridData();
                gDataMinBtn.widthHint = TimelineConstants.TIMELINE_ITEM_MINIMIZE_WIDTH;
@@ -200,7 +206,8 @@ public class TimelineTick {
        private void setRangeRect(Double startTime) {
                /* Calculate start X */
                Rectangle canvasRect = rangeCanvas.getBounds();
-               int baseLineWidth = canvasRect.width - MARGIN_HORIZONTAL - MARGIN_HORIZONTAL;
+               int baseLineWidth = canvasRect.width - MARGIN_HORIZONTAL
+                               - MARGIN_HORIZONTAL;
 
                Double pixPerSec = (baseLineWidth / chartRunningSec);
                Double rectStartXD = pixPerSec * startTime + MARGIN_HORIZONTAL;
@@ -209,7 +216,8 @@ public class TimelineTick {
                Double rangeScaleRatio = rangeScaleSec / chartRunningSec;
                Double rangeScaleWidthD = baseLineWidth * rangeScaleRatio;
 
-               Rectangle rect = new Rectangle(rectStartXD.intValue(), 0, rangeScaleWidthD.intValue(), canvasRect.height);
+               Rectangle rect = new Rectangle(rectStartXD.intValue(), 0,
+                               rangeScaleWidthD.intValue(), canvasRect.height);
 
                rangeRectInfo.rangeRect = null;
                rangeRectInfo.rangeRect = rect;
index 9496219..9bc1f34 100644 (file)
@@ -18,12 +18,14 @@ import org.tizen.dynamicanalyzer.listeners.DAButtonClickEventListener;
 import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.ui.widgets.button.DAButton;
 import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
+import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
+import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
 
 public class AboutDialog extends Window {
        private Shell parent = null;
        private DAWindow shell = null;
-       private DAButton licenseButton = null;
-       private DAButton okButton = null;
+       private DACustomButton licenseButton = null;
+       private DACustomButton okButton = null;
 
        // (open,close)button image
        private final Image buttonImage = ImageResources.DIALOG_NORMAL;
@@ -36,19 +38,18 @@ public class AboutDialog extends Window {
                this.parent = parent;
        }
 
-       private DAButtonClickEventListener okButtonListener = new DAButtonClickEventListener(
-                       okButton) {
-               @Override
-               public void handleClickEvent(Event event) {
+       private DACustomButtonClickEventListener okButtonListener = new DACustomButtonClickEventListener() {
 
+               @Override
+               public void handleClickEvent(DACustomButton button) {
                        shell.dispose();
                }
        };
 
-       private DAButtonClickEventListener licenseButtonListener = new DAButtonClickEventListener(
-                       licenseButton) {
+       private DACustomButtonClickEventListener licenseButtonListener = new DACustomButtonClickEventListener() {
+
                @Override
-               public void handleClickEvent(Event event) {
+               public void handleClickEvent(DACustomButton button) {
                        Shell shell = AnalyzerUtil.getWorkbenchWindow().getShell();
                        LicenseDialog dialog = new LicenseDialog(shell, SWT.NONE); // FIXME
                        dialog.open();
@@ -136,7 +137,7 @@ public class AboutDialog extends Window {
                compData.bottom = new FormAttachment(100, 0);
                buttonComp.setLayoutData(compData);
 
-               okButton = new DAButton(buttonComp, buttonImage, buttonPushImage,
+               okButton = new DACustomButton(buttonComp, buttonImage, buttonPushImage,
                                buttonHoverImage, null);
                okButton.addClickListener(okButtonListener);
                okButton.setText(AnalyzerLabels.ABOUT_DIALOG_OK); //$NON-NLS-1$
@@ -149,8 +150,8 @@ public class AboutDialog extends Window {
                okData.height = 34;
                okButton.setLayoutData(okData);
 
-               licenseButton = new DAButton(buttonComp, buttonImage, buttonPushImage,
-                               buttonHoverImage, null);
+               licenseButton = new DACustomButton(buttonComp, buttonImage,
+                               buttonPushImage, buttonHoverImage, null);
                licenseButton.addClickListener(licenseButtonListener);
                licenseButton.setText(AnalyzerLabels.ABOUT_DIALOG_LICENSE); //$NON-NLS-1$    
                licenseButton.setFont(FontResources.DIALOG_BUTTON_FONT);
index 14851d4..ade5ce1 100644 (file)
@@ -6,22 +6,21 @@ import org.eclipse.swt.layout.FormAttachment;
 import org.eclipse.swt.layout.FormData;\r
 import org.eclipse.swt.layout.FormLayout;\r
 import org.eclipse.swt.widgets.Composite;\r
-import org.eclipse.swt.widgets.Event;\r
 import org.eclipse.swt.widgets.Label;\r
 import org.eclipse.swt.widgets.Shell;\r
 import org.tizen.dynamicanalyzer.ColorResources;\r
 import org.tizen.dynamicanalyzer.ConfigureManager;\r
 import org.tizen.dynamicanalyzer.FontResources;\r
 import org.tizen.dynamicanalyzer.ImageResources;\r
-import org.tizen.dynamicanalyzer.listeners.DAButtonClickEventListener;\r
 import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;\r
-import org.tizen.dynamicanalyzer.ui.widgets.button.DAButton;\r
+import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;\r
+import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;\r
 \r
 public class ConfigurationDialog/* extends Window */{\r
        private Shell parent = null;\r
        private DAWindow window = null;\r
-       private DAButton okButton = null;\r
-       private DAButton cancelButton = null;\r
+       private DACustomButton okButton = null;\r
+       private DACustomButton cancelButton = null;\r
        // private DAButton applyButton = null;\r
        // private ConfigureData configData = null;\r
 \r
@@ -54,12 +53,12 @@ public class ConfigurationDialog/* extends Window */{
        // private String sProcessSize;\r
        // private String sTempProcessSize;\r
 \r
-       private DAButton internalOn = null;\r
-       private DAButton internalOff = null;\r
-       private DAButton rangeOn = null;\r
-       private DAButton rangeOff = null;\r
-       private DAButton snapshotOn = null;\r
-       private DAButton snapshotOff = null;\r
+       private DACustomButton internalOn = null;\r
+       private DACustomButton internalOff = null;\r
+       private DACustomButton rangeOn = null;\r
+       private DACustomButton rangeOff = null;\r
+       private DACustomButton snapshotOn = null;\r
+       private DACustomButton snapshotOff = null;\r
 \r
        private ConfigureManager mConfig;\r
 \r
@@ -69,26 +68,25 @@ public class ConfigurationDialog/* extends Window */{
                mConfig = ConfigureManager.getInstance();\r
        }\r
 \r
-       private DAButtonClickEventListener okButtonListener = new DAButtonClickEventListener(\r
-                       okButton) {\r
+       private DACustomButtonClickEventListener okButtonListener = new DACustomButtonClickEventListener() {\r
+\r
                @Override\r
-               public void handleClickEvent(Event event) {\r
+               public void handleClickEvent(DACustomButton button) {\r
                        doApply();\r
                        window.dispose();\r
                }\r
        };\r
-       private DAButtonClickEventListener cancelButtonListener = new DAButtonClickEventListener(\r
-                       cancelButton) {\r
-               @Override\r
-               public void handleClickEvent(Event event) {\r
+       private DACustomButtonClickEventListener cancelButtonListener = new DACustomButtonClickEventListener() {\r
 \r
+               @Override\r
+               public void handleClickEvent(DACustomButton button) {\r
                        window.dispose();\r
                }\r
        };\r
-       private DAButtonClickEventListener internalOnListener = new DAButtonClickEventListener(\r
-                       internalOn) {\r
+       private DACustomButtonClickEventListener internalOnListener = new DACustomButtonClickEventListener() {\r
+\r
                @Override\r
-               public void handleClickEvent(Event event) {\r
+               public void handleClickEvent(DACustomButton button) {\r
                        if (null != internalOn)\r
                                internalOn.setEnabled(false);\r
                        if (null != internalOff)\r
@@ -96,10 +94,10 @@ public class ConfigurationDialog/* extends Window */{
                        bInternalCall = true;\r
                }\r
        };\r
-       private DAButtonClickEventListener internalOffListener = new DAButtonClickEventListener(\r
-                       internalOff) {\r
+       private DACustomButtonClickEventListener internalOffListener = new DACustomButtonClickEventListener() {\r
+\r
                @Override\r
-               public void handleClickEvent(Event event) {\r
+               public void handleClickEvent(DACustomButton button) {\r
                        if (null != internalOff)\r
                                internalOff.setEnabled(false);\r
                        if (null != internalOn)\r
@@ -107,10 +105,10 @@ public class ConfigurationDialog/* extends Window */{
                        bInternalCall = false;\r
                }\r
        };\r
-       private DAButtonClickEventListener rangeOnListener = new DAButtonClickEventListener(\r
-                       rangeOn) {\r
+       private DACustomButtonClickEventListener rangeOnListener = new DACustomButtonClickEventListener() {\r
+\r
                @Override\r
-               public void handleClickEvent(Event event) {\r
+               public void handleClickEvent(DACustomButton button) {\r
                        if (null != rangeOn)\r
                                rangeOn.setEnabled(false);\r
                        if (null != rangeOff)\r
@@ -118,10 +116,10 @@ public class ConfigurationDialog/* extends Window */{
                        bRangeAutoSelect = true;\r
                }\r
        };\r
-       private DAButtonClickEventListener rangeOffListener = new DAButtonClickEventListener(\r
-                       rangeOff) {\r
+       private DACustomButtonClickEventListener rangeOffListener = new DACustomButtonClickEventListener() {\r
+\r
                @Override\r
-               public void handleClickEvent(Event event) {\r
+               public void handleClickEvent(DACustomButton button) {\r
                        if (null != rangeOff)\r
                                rangeOff.setEnabled(false);\r
                        if (null != rangeOn)\r
@@ -129,10 +127,10 @@ public class ConfigurationDialog/* extends Window */{
                        bRangeAutoSelect = false;\r
                }\r
        };\r
-       private DAButtonClickEventListener snapshotOnListener = new DAButtonClickEventListener(\r
-                       snapshotOn) {\r
+       private DACustomButtonClickEventListener snapshotOnListener = new DACustomButtonClickEventListener() {\r
+\r
                @Override\r
-               public void handleClickEvent(Event event) {\r
+               public void handleClickEvent(DACustomButton button) {\r
                        if (null != snapshotOn)\r
                                snapshotOn.setEnabled(false);\r
                        if (null != snapshotOff)\r
@@ -140,10 +138,10 @@ public class ConfigurationDialog/* extends Window */{
                        bSnapshot = true;\r
                }\r
        };\r
-       private DAButtonClickEventListener snapshotOffListener = new DAButtonClickEventListener(\r
-                       snapshotOff) {\r
+       private DACustomButtonClickEventListener snapshotOffListener = new DACustomButtonClickEventListener() {\r
+\r
                @Override\r
-               public void handleClickEvent(Event event) {\r
+               public void handleClickEvent(DACustomButton button) {\r
                        if (null != snapshotOff)\r
                                snapshotOff.setEnabled(false);\r
                        if (null != snapshotOn)\r
@@ -215,8 +213,8 @@ public class ConfigurationDialog/* extends Window */{
                compData.bottom = new FormAttachment(100, 0);\r
                buttonComp.setLayoutData(compData);\r
 \r
-               cancelButton = new DAButton(buttonComp, buttonImage, buttonPushImage,\r
-                               buttonHoverImage, null);\r
+               cancelButton = new DACustomButton(buttonComp, buttonImage,\r
+                               buttonPushImage, buttonHoverImage, null);\r
                cancelButton.addClickListener(cancelButtonListener);\r
                cancelButton.setText("CANCEL"); //$NON-NLS-1$\r
                cancelButton.setFont(FontResources.DIALOG_BUTTON_FONT);\r
@@ -228,7 +226,7 @@ public class ConfigurationDialog/* extends Window */{
                buttonData.height = 31;\r
                cancelButton.setLayoutData(buttonData);\r
 \r
-               okButton = new DAButton(buttonComp, buttonImage, buttonPushImage,\r
+               okButton = new DACustomButton(buttonComp, buttonImage, buttonPushImage,\r
                                buttonHoverImage, null);\r
                okButton.addClickListener(okButtonListener);\r
                okButton.setText("OK"); //$NON-NLS-1$\r
@@ -253,14 +251,12 @@ public class ConfigurationDialog/* extends Window */{
                compData.height = 45;\r
                internalCallComp.setLayoutData(compData);\r
 \r
-               internalOn = new DAButton(internalCallComp, onImage, onPushImage,\r
+               internalOn = new DACustomButton(internalCallComp, onImage, onPushImage,\r
                                onHoverImage, onDisableImage);\r
-               internalOff = new DAButton(internalCallComp, offImage, offPushImage,\r
-                               offHoverImage, offDisableImage);\r
-               internalOn.getControl().setBackground(\r
-                               ColorResources.NORMAL_VIEW_LAYOUT_INNER);\r
-               internalOff.getControl().setBackground(\r
-                               ColorResources.NORMAL_VIEW_LAYOUT_INNER);\r
+               internalOff = new DACustomButton(internalCallComp, offImage,\r
+                               offPushImage, offHoverImage, offDisableImage);\r
+               internalOn.setBackground(ColorResources.NORMAL_VIEW_LAYOUT_INNER);\r
+               internalOff.setBackground(ColorResources.NORMAL_VIEW_LAYOUT_INNER);\r
 \r
                internalOn.addClickListener(internalOnListener);\r
                internalOff.addClickListener(internalOffListener);\r
@@ -316,14 +312,12 @@ public class ConfigurationDialog/* extends Window */{
                compData.height = 45;\r
                rangeAutoSelectComp.setLayoutData(compData);\r
 \r
-               rangeOn = new DAButton(rangeAutoSelectComp, onImage, onPushImage,\r
+               rangeOn = new DACustomButton(rangeAutoSelectComp, onImage, onPushImage,\r
                                onHoverImage, onDisableImage);\r
-               rangeOff = new DAButton(rangeAutoSelectComp, offImage, offPushImage,\r
-                               offHoverImage, offDisableImage);\r
-               rangeOn.getControl().setBackground(\r
-                               ColorResources.NORMAL_VIEW_LAYOUT_INNER);\r
-               rangeOff.getControl().setBackground(\r
-                               ColorResources.NORMAL_VIEW_LAYOUT_INNER);\r
+               rangeOff = new DACustomButton(rangeAutoSelectComp, offImage,\r
+                               offPushImage, offHoverImage, offDisableImage);\r
+               rangeOn.setBackground(ColorResources.NORMAL_VIEW_LAYOUT_INNER);\r
+               rangeOff.setBackground(ColorResources.NORMAL_VIEW_LAYOUT_INNER);\r
 \r
                rangeOn.addClickListener(rangeOnListener);\r
                rangeOff.addClickListener(rangeOffListener);\r
@@ -379,14 +373,12 @@ public class ConfigurationDialog/* extends Window */{
                compData.height = 45;\r
                snapshotComp.setLayoutData(compData);\r
 \r
-               snapshotOn = new DAButton(snapshotComp, onImage, onPushImage,\r
+               snapshotOn = new DACustomButton(snapshotComp, onImage, onPushImage,\r
                                onHoverImage, onDisableImage);\r
-               snapshotOff = new DAButton(snapshotComp, offImage, offPushImage,\r
+               snapshotOff = new DACustomButton(snapshotComp, offImage, offPushImage,\r
                                offHoverImage, offDisableImage);\r
-               snapshotOn.getControl().setBackground(\r
-                               ColorResources.NORMAL_VIEW_LAYOUT_INNER);\r
-               snapshotOff.getControl().setBackground(\r
-                               ColorResources.NORMAL_VIEW_LAYOUT_INNER);\r
+               snapshotOn.setBackground(ColorResources.NORMAL_VIEW_LAYOUT_INNER);\r
+               snapshotOff.setBackground(ColorResources.NORMAL_VIEW_LAYOUT_INNER);\r
 \r
                snapshotOn.addClickListener(snapshotOnListener);\r
                snapshotOff.addClickListener(snapshotOffListener);\r
index 4c531c1..890fb04 100644 (file)
@@ -13,9 +13,9 @@ import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Listener;\r
 import org.eclipse.swt.widgets.Monitor;\r
 import org.eclipse.swt.widgets.Shell;\r
-import org.tizen.dynamicanalyzer.listeners.DAButtonClickEventListener;\r
 import org.tizen.dynamicanalyzer.listeners.DAContextMenuListener;\r
-import org.tizen.dynamicanalyzer.ui.widgets.button.DAButton;\r
+import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;\r
+import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;\r
 \r
 public class DAContextMenu {\r
 \r
@@ -23,7 +23,7 @@ public class DAContextMenu {
        public static final int DEFAULT_HEIGHT = 30;\r
        private static Shell menuShell = null;\r
        private Composite menuComp;\r
-       private List<DAButton> menu = null;\r
+       private List<DACustomButton> menu = null;\r
        private int menuWidth = DEFAULT_WIDTH;\r
        private int menuHeight = DEFAULT_HEIGHT;\r
 \r
@@ -128,19 +128,19 @@ public class DAContextMenu {
                        createMenuSell();\r
 \r
                if (null == menu) {\r
-                       menu = new ArrayList<DAButton>();\r
+                       menu = new ArrayList<DACustomButton>();\r
                }\r
 \r
-               DAButton button = new DAButton(menuComp, SWT.NONE);\r
+               DACustomButton button = new DACustomButton(menuComp, SWT.NONE);\r
                menu.add(button);\r
                button.setText(title);\r
-               button.addClickListener(new DAButtonClickEventListener(button) {\r
+               button.addClickListener(new DACustomButtonClickEventListener() {\r
 \r
                        @Override\r
-                       public void handleClickEvent(Event event) {\r
-                               // TODO Auto-generated method stub\r
+                       public void handleClickEvent(DACustomButton button) {\r
                                dispose();\r
-                               listener.handleClickEvent(event);\r
+                               // FIXME: implement contex box\r
+                               // listener.handleClickEvent(button);\r
                        }\r
                });\r
                button.addListener(SWT.MouseExit, contextMenuListener);\r
index 3b7d31b..ed71614 100644 (file)
@@ -20,14 +20,15 @@ import org.tizen.dynamicanalyzer.ColorResources;
 import org.tizen.dynamicanalyzer.FontResources;
 import org.tizen.dynamicanalyzer.ImageResources;
 import org.tizen.dynamicanalyzer.constants.AnalyzerConstants;
-import org.tizen.dynamicanalyzer.listeners.DAButtonClickEventListener;
 import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.ui.widgets.button.DAButton;
+import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
+import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
 
 public class LicenseDialog extends Window {
        private Shell parent = null;
        private DAWindow shell = null;
-       private DAButton okButton = null;
+       private DACustomButton okButton = null;
 
        // (ok)button image
        private final Image buttonImage = ImageResources.DIALOG_NORMAL;
@@ -41,11 +42,10 @@ public class LicenseDialog extends Window {
                this.parent = parent;
        }
 
-       private DAButtonClickEventListener okButtonListener = new DAButtonClickEventListener(
-                       okButton) {
-               @Override
-               public void handleClickEvent(Event event) {
+       private DACustomButtonClickEventListener okButtonListener = new DACustomButtonClickEventListener() {
 
+               @Override
+               public void handleClickEvent(DACustomButton button) {
                        shell.dispose();
                }
        };
@@ -124,7 +124,7 @@ public class LicenseDialog extends Window {
                compData.bottom = new FormAttachment(100, 0);
                buttonComp.setLayoutData(compData);
 
-               okButton = new DAButton(buttonComp, buttonImage, buttonPushImage,
+               okButton = new DACustomButton(buttonComp, buttonImage, buttonPushImage,
                                buttonHoverImage, null);
                okButton.addClickListener(okButtonListener);
                okButton.setText("OK"); //$NON-NLS-1$