From 700de485fe755dff24fb13e157f5eca3a652249f Mon Sep 17 00:00:00 2001 From: "Hyunjong,park" Date: Wed, 18 Dec 2013 10:43:41 +0900 Subject: [PATCH] [Title] change welcome dlg. [Desc.] add apply button in welcome dlg. [Issue] - --- .../swap/logparser/SWAPLogParser.java | 1 + .../swap/model/data/NetworkData.java | 6 +- .../ui/network/NetworkDataMaker.java | 2 +- .../toolbar/configuration/ConfigurationDialog.java | 17 +-- .../ConfigurationDialogDataManager.java | 35 ++++- .../ConfigurationDialogFeaturesPage.java | 46 +----- .../ConfigurationDialogFeaturesTable.java | 10 -- ...nfigurationDialogFeaturesTableCellRenderer.java | 169 --------------------- .../ConfigurationDialogSettingPage.java | 3 +- .../ui/toolbar/configuration/WelcomeDialog.java | 49 ++++-- .../replayEditor/ReplayEditSnapshotDialog.java | 3 +- 11 files changed, 91 insertions(+), 250 deletions(-) delete mode 100644 org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogFeaturesTableCellRenderer.java diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/SWAPLogParser.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/SWAPLogParser.java index 03455cf..7b662c9 100755 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/SWAPLogParser.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/SWAPLogParser.java @@ -164,6 +164,7 @@ public class SWAPLogParser implements Runnable { } } + System.out.println("api name : " + apiName + " time : " + pData.getTime()); if (isDropCallTraceLog()) { apiName = pData.getApiName(); if (apiName.contains(OSP_MAIN)) { diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/NetworkData.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/NetworkData.java index 9c582d2..b8f05ed 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/NetworkData.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/NetworkData.java @@ -91,9 +91,9 @@ public class NetworkData extends ProbeCommonData { public static String intToIp(int integerIP) { return (integerIP & 0xFF) + CommonConstants.DOT - + ((integerIP >> 8) & 0xFF) + CommonConstants.DOT - + ((integerIP >> 16) & 0xFF) + CommonConstants.DOT - +((integerIP >> 24) & 0xFF); + + ((integerIP >> 8) & 0xFF) + CommonConstants.DOT + + ((integerIP >> 16) & 0xFF) + CommonConstants.DOT + + ((integerIP >> 24) & 0xFF); } @Override diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkDataMaker.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkDataMaker.java index 00160b0..846fd70 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkDataMaker.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkDataMaker.java @@ -150,7 +150,7 @@ public class NetworkDataMaker { int apiType = input.getFdApiType(); double time = input.getTime(); long errno = input.getErrno(); - + int connectedType = 5; String parentAddress = addressByFdHashMap.get(apiFD); if (null != parentAddress) { // get Address by FD diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialog.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialog.java index 56bf0a4..555fa95 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialog.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialog.java @@ -71,7 +71,7 @@ public class ConfigurationDialog extends DAMessageBox { doApply(); } }; - + private DACustomButtonClickEventListener okButtonListener = new DACustomButtonClickEventListener() { @Override @@ -81,7 +81,6 @@ public class ConfigurationDialog extends DAMessageBox { } }; - private DACustomButtonClickEventListener cancelButtonListener = new DACustomButtonClickEventListener() { @Override @@ -94,7 +93,8 @@ public class ConfigurationDialog extends DAMessageBox { private void doApply() { Composite selectedComposite = tabView.getTopComposite(); if (!(selectedComposite instanceof BinarySettingsPage)) { - ConfigurationDialogDataManager.getInstance().applySwapValue(featuresTable); + ConfigurationDialogDataManager.getInstance().applySwapValue( + featuresTable); } else { BinarySettingsPage page = (BinarySettingsPage) selectedComposite; page.doApply(); @@ -105,14 +105,13 @@ public class ConfigurationDialog extends DAMessageBox { ConfigurationDialogDataManager.getInstance() .setSettingValueFromConfigureManager(); } - - - public void enableButteon(){ + + public void enableButteon() { applyButton.setButtonEnabled(true); cancelButton.setButtonEnabled(true); } - public void disableButteon(){ + public void disableButteon() { applyButton.setButtonEnabled(false); cancelButton.setButtonEnabled(false); } @@ -178,7 +177,7 @@ public class ConfigurationDialog extends DAMessageBox { tabView.addView(featuresPage, false); featuresTable = featuresPage.getFeatureTable(); - featuresPage.setConfigDlg(this); + ConfigurationDialogDataManager.getInstance().setConfigDlg(this); Composite settingPage = new ConfigurationDialogSettingPage( tabView.getContentComposite(), SWT.NONE); @@ -245,7 +244,7 @@ public class ConfigurationDialog extends DAMessageBox { opened = true; ShortCutManager.getInstance().setEnabled(!opened); - + applyButton.setButtonEnabled(false); cancelButton.setButtonEnabled(false); return true; diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogDataManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogDataManager.java index ea756f3..b33c726 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogDataManager.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogDataManager.java @@ -39,12 +39,14 @@ import org.tizen.dynamicanalyzer.ui.timeline.chart.TimelineChart; import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineChartManager; import org.tizen.dynamicanalyzer.ui.toolbar.ConfigureManager; import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea; +import org.tizen.dynamicanalyzer.ui.widgets.DAMessageBox; import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite; import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; public class ConfigurationDialogDataManager { private static ConfigurationDialogDataManager instance = null; + private DAMessageBox configDlg = null; private static String[] tableFeaturesName = null; private static String[] optionSettingName = null; HashMap featuresStatusHashMap = new HashMap(); @@ -211,10 +213,6 @@ public class ConfigurationDialogDataManager { value = AnalyzerConstants.FEATURE_OPENGL_API; } else if (featureName.equals(ConfigureLabels.FEATURE_NETWORK)) { value = AnalyzerConstants.FEATURE_NETWORK_API; - // } - // else if (featureName.equals(ConfigureLabels.FEATURE_SYSCALL)) - // { - // value = AnalyzerConstants.FEATURE_SYSCALL; } else if (featureName.equals(ConfigureLabels.FEATURE_SYSCALL_FILE)) { value = AnalyzerConstants.FEATURE_SYSCALL_FILE; } else if (featureName.equals(ConfigureLabels.FEATURE_SYSCALL_IPC)) { @@ -376,6 +374,34 @@ public class ConfigurationDialogDataManager { } } + public void checkUpdateValue() { + if (ConfigurationDialogDataManager.getInstance().changedFeatures()) { + if (getConfigDlg() instanceof ConfigurationDialog) { + ConfigurationDialog dlg = (ConfigurationDialog) getConfigDlg(); + dlg.enableButteon(); + } else { + WelcomeDialog dlg = (WelcomeDialog) getConfigDlg(); + dlg.enableButteon(); + } + } else { + if (getConfigDlg() instanceof ConfigurationDialog) { + ConfigurationDialog dlg = (ConfigurationDialog) getConfigDlg(); + dlg.disableButteon(); + } else { + WelcomeDialog dlg = (WelcomeDialog) getConfigDlg(); + dlg.disableButteon(); + } + } + } + + public DAMessageBox getConfigDlg() { + return configDlg; + } + + public void setConfigDlg(DAMessageBox configDlg) { + this.configDlg = configDlg; + } + public boolean changedFeatures() { boolean isChangeValue = false; // Table Feature @@ -433,6 +459,7 @@ public class ConfigurationDialogDataManager { isChangeValue = true; } } + return isChangeValue; } diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogFeaturesPage.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogFeaturesPage.java index 83e3bb6..a359780 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogFeaturesPage.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogFeaturesPage.java @@ -57,7 +57,7 @@ import org.tizen.dynamicanalyzer.widgets.button.checkbox.DACheckboxSelectionList public class ConfigurationDialogFeaturesPage extends DAPageComposite { public static final String ID = ConfigurationDialogFeaturesPage.class .getName(); - private ConfigurationDialog configDlg = null; + // private DAMessageBox configDlg = null; private DATableComposite featuresTable = null; private Composite detailSettingComp = null; @@ -211,7 +211,7 @@ public class ConfigurationDialogFeaturesPage extends DAPageComposite { public void mouseDown(MouseEvent e) { // TODO Auto-generated method stub updateDetails(); - checkUpdateValue(); + ConfigurationDialogDataManager.getInstance().checkUpdateValue(); } @Override @@ -424,22 +424,6 @@ public class ConfigurationDialogFeaturesPage extends DAPageComposite { } } - private void checkUpdateValue() { - if (ConfigurationDialogDataManager.getInstance().changedFeatures()) { - getConfigDlg().enableButteon(); - } else { - getConfigDlg().disableButteon(); - } - } - - public ConfigurationDialog getConfigDlg() { - return configDlg; - } - - public void setConfigDlg(ConfigurationDialog configDlg) { - this.configDlg = configDlg; - } - private DACheckboxSelectionListener snapshotPeriodicAutoCheckBoxListener = new DACheckboxSelectionListener() { @Override public void handleSelectionEvent(DACheckBox checkbox) { @@ -475,25 +459,6 @@ public class ConfigurationDialogFeaturesPage extends DAPageComposite { } String featureName = items[0].getText(0); - - // if (isInteger(textBox.getText())) { - // int textBoxData = Integer.parseInt(textBox.getText()); - // if (textBoxData == AnalyzerConstants.FEATURE_OFF) { - // ConfigurationDialogDataManager.getInstance() - // .setFeaturesSwapValue( - // ConfigurationDialogDataManager - // .getInstance() - // .getOptionFeatureName(featureName), - // false); - // } else { - // ConfigurationDialogDataManager.getInstance() - // .setfeatureSwapValue( - // ConfigurationDialogDataManager - // .getInstance() - // .getOptionFeatureName(featureName), - // textBoxData); - // } - // } if (checkValidInputText(featureName, textBox.getText())) { int textBoxData = Integer.parseInt(textBox.getText()); ConfigurationDialogDataManager.getInstance() @@ -502,7 +467,7 @@ public class ConfigurationDialogFeaturesPage extends DAPageComposite { .getOptionFeatureName(featureName), textBoxData); } - checkUpdateValue(); + ConfigurationDialogDataManager.getInstance().checkUpdateValue(); } @@ -531,7 +496,10 @@ public class ConfigurationDialogFeaturesPage extends DAPageComposite { || featuresName.equals(ConfigureLabels.FEATURE_SYSTEM_DEVICE) || featuresName.equals(ConfigureLabels.FEATURE_SYSTEM_ENERGY) || featuresName - .equals(ConfigureLabels.FEATURE_FUNCTION_PROFILING)) { + .equals(ConfigureLabels.FEATURE_FUNCTION_PROFILING) + || featuresName.equals(ConfigureLabels.FEATURE_SCREENSHOT) + + ) { if (value > 1000) { info.setText("value is greater than 1000"); return false; diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogFeaturesTable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogFeaturesTable.java index 8eaefb3..59cfcf0 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogFeaturesTable.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogFeaturesTable.java @@ -228,16 +228,6 @@ public class ConfigurationDialogFeaturesTable extends DATreeComposite { optionValue.append(CommonConstants.SPACE).append( CommonConstants.OPEN_BRACKET); - // if (featureName.equals(ConfigureLabels.INCLUDE_INSIDE_CALL_MEMORY) - // || featureName - // .equals(ConfigureLabels.INCLUDE_INSIDE_CALL_THREAD) - // || featureName.equals(ConfigureLabels.INCLUDE_INSIDE_CALL_FILE) - // || featureName - // .equals(ConfigureLabels.INCLUDE_INSIDE_CALL_NETWORK) - // || featureName.equals(ConfigureLabels.INCLUDE_INSIDE_CALL_UI) - // || featureName.equals(ConfigureLabels.INCLUDE_INSIDE_OPENGL)) { - // optionValue.append(ConfigureLabels.INCLUDE_INSIDE_CALL); - // } else if (featureName.equals(ConfigureLabels.SNAPSHOT_PERIODIC)) { if (ConfigurationDialogDataManager .getInstance() diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogFeaturesTableCellRenderer.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogFeaturesTableCellRenderer.java deleted file mode 100644 index a8bfc54..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogFeaturesTableCellRenderer.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Hyunjong Park - * Juyoung Kim - * - * 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.ui.toolbar.configuration; - -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.nebula.widgets.grid.internal.DefaultCellRenderer; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Rectangle; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.FontResources; -import org.tizen.dynamicanalyzer.widgets.helper.ImageResources; - -public class ConfigurationDialogFeaturesTableCellRenderer extends - DefaultCellRenderer { - int leftMargin = 4; - int rightMargin = 4; -// int topMargin = 0; -// int bottomMargin = 0; - int textTopMargin = 1; -// int textBottomMargin = 2; - int insideMargin = 3; - - public Image checkImg = null; - - @Override - public void paint(GC gc, Object value) { - GridItem item = (GridItem) value; - gc.setFont(item.getFont(getColumn())); - - boolean drawAsSelected = isSelected(); - boolean drawBackground = true; - - if (isCellSelected()) { - drawAsSelected = true; - } - if (drawAsSelected) { - gc.setForeground(ColorResources.TABLE_CONTENTS_SELECTED_START); - gc.setBackground(ColorResources.TABLE_CONTENTS_SELECTED_END); - } else { - if (item.getParent().isEnabled()) { - Color bg = item.getBackground(); - if (bg != null) { - gc.setBackground(bg); - } else { - drawBackground = false; - } - } else { - gc.setBackground(getDisplay().getSystemColor( - SWT.COLOR_WIDGET_BACKGROUND)); - } - } - - if (drawBackground && drawAsSelected) { - gc.fillGradientRectangle(getBounds().x, getBounds().y, - getBounds().width, getBounds().height, true); - } else if (drawBackground) { - gc.fillRectangle(getBounds().x, getBounds().y + 1, - getBounds().width, getBounds().height); - } - - int x = leftMargin; - if (getColumn() == 0) { - if (item.getChecked(getColumn())) { - checkImg = ImageResources.CHECKBOX_SELECTED; - } else { - checkImg = ImageResources.CHECKBOX_UNSELECTED; - } -// if (item.getText(1).contains(ConfigureLabels.FEATURE_RECORDING)) { // the recording function determined to be always on. -// checkImg = ImageResources.CHECKBOX_SELECTED_DISABLE; -// } - gc.drawImage(checkImg, 6, getBounds().y + 1); - } - - Image image = item.getImage(getColumn()); - if (image != null) { - int y = getBounds().y; - y += (getBounds().height - image.getBounds().height) / 2; - gc.drawImage(image, getBounds().x + x, y); - x += image.getBounds().width + insideMargin; - } - - int width = getBounds().width - x - rightMargin; - String text = item.getText(getColumn()); - - if (getAlignment() == SWT.RIGHT) { - int len = gc.stringExtent(text).x; - if (len < width) { - x += width - len; - } - } else if (getAlignment() == SWT.CENTER) { - int len = gc.stringExtent(text).x; - if (len < width) { - x += (width - len) / 2; - } - } - - if (drawAsSelected) { - gc.setForeground(ColorResources.TABLE_CONTENTS_SELECTED_FONT_COLOR); - } else { - Color fontColor = item.getForeground(); - if (null != fontColor) { - gc.setForeground(item.getForeground()); - } else { - gc.setForeground(ColorResources.TABLE_CONTENTS_FONT_COLOR); - } - } - - gc.setFont(FontResources.TABLE_CELL_FONT); - - if (getColumn() != 0) { - gc.drawText(text, getBounds().x + x, getBounds().y + textTopMargin, - true); - } - if (item.getParent().getLinesVisible()) { - if (isCellSelected()) { - gc.setForeground(ColorResources.TABLE_LINE); - } else { - gc.setForeground(ColorResources.TABLE_LINE); - } - gc.drawLine(getBounds().x, getBounds().y + getBounds().height, - getBounds().x + getBounds().width - 1, getBounds().y - + getBounds().height); - gc.drawLine(getBounds().x + getBounds().width - 1, getBounds().y, - getBounds().x + getBounds().width - 1, getBounds().y - + getBounds().height); - } - if (isCellFocus()) { - Rectangle focusRect = new Rectangle(getBounds().x - 1, - getBounds().y - 1, getBounds().width, - getBounds().height + 1); - gc.setForeground(ColorResources.RED); - gc.drawRectangle(focusRect); - if (isFocus()) { - focusRect.x++; - focusRect.width -= 2; - focusRect.y++; - focusRect.height -= 2; - gc.drawRectangle(focusRect); - } - } - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogSettingPage.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogSettingPage.java index 5af78f9..e45c749 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogSettingPage.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/ConfigurationDialogSettingPage.java @@ -126,7 +126,6 @@ public class ConfigurationDialogSettingPage extends DAPageComposite { private DACheckboxSelectionListener showInitiaRadioButtonListener = new DACheckboxSelectionListener() { @Override public void handleSelectionEvent(DACheckBox checkbox) { - if (ConfigurationDialogDataManager.getInstance() .getfeatureSwapValue(ConfigureLabels.SHOW_INITIAL) > 0) { ConfigurationDialogDataManager.getInstance() @@ -137,6 +136,7 @@ public class ConfigurationDialogSettingPage extends DAPageComposite { .setfeatureSwapValue(ConfigureLabels.SHOW_INITIAL, 1); showInitialCheckBox.setChecked(true); } + ConfigurationDialogDataManager.getInstance().checkUpdateValue(); } }; @@ -153,6 +153,7 @@ public class ConfigurationDialogSettingPage extends DAPageComposite { .setfeatureSwapValue(ConfigureLabels.AUTO_STOP, 1); autoStopCheckBox.setChecked(true); } + ConfigurationDialogDataManager.getInstance().checkUpdateValue(); } }; } \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/WelcomeDialog.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/WelcomeDialog.java index 52b746a..4514ea2 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/WelcomeDialog.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/configuration/WelcomeDialog.java @@ -53,6 +53,7 @@ import org.tizen.dynamicanalyzer.widgets.button.checkbox.DACheckboxSelectionList public class WelcomeDialog extends DAMessageBox { private DACustomButton okButton = null; + private DACustomButton applyButton = null; private DACustomButton cancelButton = null; private DACheckBox useAgainCheckButton = null; private DATableComposite featuresTable; @@ -63,6 +64,14 @@ public class WelcomeDialog extends DAMessageBox { .setSettingValueFromConfigureManager(); } + private DACustomButtonClickEventListener applyButtonListener = new DACustomButtonClickEventListener() { + + @Override + public void handleClickEvent(DACustomButton button) { + doApply(); + } + }; + private DACustomButtonClickEventListener okButtonListener = new DACustomButtonClickEventListener() { @Override @@ -92,9 +101,19 @@ public class WelcomeDialog extends DAMessageBox { notifyAutoRun(); } + public void enableButteon() { + applyButton.setButtonEnabled(true); + cancelButton.setButtonEnabled(true); + } + + public void disableButteon() { + applyButton.setButtonEnabled(false); + cancelButton.setButtonEnabled(false); + } + protected boolean run() { IDECommunicator.setOpenWelcomeDlg(true); - shell.setSize(608, 460); + shell.setSize(680, 460); shell.setLayout(new FormLayout()); shell.setText(AnalyzerLabels.WELCOME); @@ -133,6 +152,7 @@ public class WelcomeDialog extends DAMessageBox { compData.bottom = new FormAttachment(100, 0); featuresPage.setLayoutData(compData); featuresTable = featuresPage.getFeatureTable(); + ConfigurationDialogDataManager.getInstance().setConfigDlg(this); // button Composite buttonContentsComp = new Composite(shell, SWT.NONE); @@ -163,7 +183,7 @@ public class WelcomeDialog extends DAMessageBox { data.top = new FormAttachment(0, 15); data.left = new FormAttachment(0, 10); data.height = 20; - data.width = 20; + data.width = 312; useAgainCheckButton.setLayoutData(data); useAgainCheckButton.setForeground(ColorResources.BLACK); useAgainCheckButton @@ -176,17 +196,6 @@ public class WelcomeDialog extends DAMessageBox { } else { useAgainCheckButton.setChecked(false); } - Label useAgainLabel = new Label(buttonContentsComp, SWT.TRANSPARENT); - useAgainLabel.setText(ConfigureLabels.WELCONE_ASK_USE_AGAIN); - useAgainLabel - .setBackground(ColorResources.CONFIGURATION_BUTTON_COVER_BACKGROUND_COLOR); - useAgainLabel.setForeground(ColorResources.BLACK); - useAgainLabel.setFont(FontResources.CONFIGURATION_TABLE_TITLE_FONT); - data = new FormData(); - data.top = new FormAttachment(0, 17); - data.left = new FormAttachment(0, 30); - useAgainLabel.setLayoutData(data); - cancelButton = new DAButton(buttonContentsComp, SWT.NONE); cancelButton.addClickListener(cancelButtonListener); cancelButton.setText(AnalyzerLabels.CANCEL); @@ -208,6 +217,19 @@ public class WelcomeDialog extends DAMessageBox { buttonData.width = 100; buttonData.height = 28; okButton.setLayoutData(buttonData); + + applyButton = new DAButton(buttonContentsComp, SWT.NONE); + applyButton.addClickListener(applyButtonListener); + applyButton.setText(AnalyzerLabels.APPLY); + applyButton.setButtonFont(FontResources.DIALOG_BUTTON_FONT); + buttonData = new FormData(); + buttonData.right = new FormAttachment(okButton, -8); + buttonData.top = new FormAttachment(0, 11); + buttonData.width = 100; + buttonData.height = 28; + applyButton.setLayoutData(buttonData); + + disableButteon(); shell.addShellListener(shellListener); shell.open(); return true; @@ -226,6 +248,7 @@ public class WelcomeDialog extends DAMessageBox { .setfeatureSwapValue(ConfigureLabels.SHOW_INITIAL, 1); useAgainCheckButton.setChecked(true); } + ConfigurationDialogDataManager.getInstance().checkUpdateValue(); } }; diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/replayEditor/ReplayEditSnapshotDialog.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/replayEditor/ReplayEditSnapshotDialog.java index bbf1876..dd8da60 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/replayEditor/ReplayEditSnapshotDialog.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/replayEditor/ReplayEditSnapshotDialog.java @@ -86,7 +86,7 @@ public class ReplayEditSnapshotDialog extends DAMessageBox { protected boolean run() { shell.setSize(SnapshotConstants.DEFAULT_IMAGE_WIDTH + 15, - SnapshotConstants.DEFAULT_IMAGE_HEIGHT + 64); + SnapshotConstants.DEFAULT_IMAGE_HEIGHT + 42); shell.setLayout(new FormLayout()); shell.setText(ReplayEditLabels.REPLAY_EDIT_SNAPSHOT_TABLE_TITLE); @@ -115,6 +115,7 @@ public class ReplayEditSnapshotDialog extends DAMessageBox { snapShotTable.getTable().addSelectionListener( featureTableSelectionListener); snapShotTable.getTable().addMouseListener(mouseListener); + snapShotTable.getTable().setHeaderVisible(false); data = new FormData(); data.top = new FormAttachment(0, 0); data.left = new FormAttachment(0, 0); -- 2.7.4