&& (null != appName && !appName.isEmpty()
&& !text.isEmpty() && appName.equals(text))) {
replayButton.setButtonEnabled(true);
- replayEditButton.setButtonEnabled(true);
+ replayEditButton.setButtonEnabled(false); //disable button until complete TV SDK
} else {
replayButton.setButtonEnabled(false);
replayEditButton.setButtonEnabled(false);
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Hyunjong Park <phjwithyou.park@samsung.com>
+ * Juyoung Kim <j0.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.ui.toolbar.replay.data;
import java.sql.PreparedStatement;
+import java.sql.SQLException;
import java.util.List;
+import org.tizen.dynamicanalyzer.constant.CommonConstants;
import org.tizen.dynamicanalyzer.database.DBColumn;
import org.tizen.dynamicanalyzer.database.DBConstants;
import org.tizen.dynamicanalyzer.database.DBTable;
public class ReplayDBManager extends DBTable {
- private static final String TABLENAME = "REPLAY";
- public static final String RID = "RID";
- public static final String MESSAGE_ID = "MESSAGE_ID";
- public static final String SEQ = "SEQ";
- public static final String TIME = "TIME";
- public static final String SEC = "SEC";
- public static final String NANO = "NANO";
- public static final String EVENT_ID = "EVENT_ID";
- public static final String EVENT_TYPE = "EVENT_TYPE";
- public static final String EVENT_CODE = "EVENT_CODE";
- public static final String EVENT_VALUE = "EVENT_VALUE";
+ private static final String TABLENAME = "REPLAY";//$NON-NLS-1$
+ public static final String RID = "RID";//$NON-NLS-1$
+ public static final String SEQ = "SEQ";//$NON-NLS-1$
+ public static final String TIME = "TIME";//$NON-NLS-1$
+ public static final String SEC = "SEC";//$NON-NLS-1$
+ public static final String NANO = "NANO";//$NON-NLS-1$
+ public static final String EVENT_ID = "EVENT_ID";//$NON-NLS-1$
+ public static final String EVENT_TYPE = "EVENT_TYPE";//$NON-NLS-1$
+ public static final String EVENT_CODE = "EVENT_CODE";//$NON-NLS-1$
+ public static final String EVENT_VALUE = "EVENT_VALUE";//$NON-NLS-1$
- private static final String SELECT_QUERY = "select * from " + TABLENAME + " order by " + TIME + " , " + RID; //$NON-NLS-1$
+ private final int DB_RID_INDEX = 0;
+ private final int DB_SEQ_INDEX = 1;
+ private final int DB_TIME_INDEX = 2;
+ private final int DB_SEC_INDEX = 3;
+ private final int DB_NANO_INDEX = 4;
+ private final int DB_EVENT_ID_INDEX = 5;
+ private final int DB_EVENT_TYPE_INDEX = 6;
+ private final int DB_EVENT_CODE_INDEX = 7;
+ private final int DB_EVENT_VALUE = 8;
+
+ private static final String SELECT_QUERY = "select "
+ + RID
+ + CommonConstants.COMMA
+ + SEQ
+ + CommonConstants.COMMA
+ + TIME
+ + CommonConstants.COMMA
+ + SEC
+ + CommonConstants.COMMA
+ + NANO
+ + CommonConstants.COMMA
+ + EVENT_ID
+ + CommonConstants.COMMA
+ + EVENT_TYPE
+ + CommonConstants.COMMA
+ + EVENT_CODE
+ + CommonConstants.COMMA
+ + EVENT_VALUE
+ + " from " + TABLENAME + " order by " + TIME + CommonConstants.COMMA + RID; //$NON-NLS-1$
private static final String DELETE_QUERY = "delete from " + TABLENAME;
@Override
public ReplayDBManager() {
addColumn(new DBColumn(RID, DBConstants.PRIMARY_KEY,
DBConstants.INTEGER));
- addColumn(new DBColumn(MESSAGE_ID, DBConstants.NOT_NULL,
- DBConstants.INTEGER));
addColumn(new DBColumn(SEQ, DBConstants.NOT_NULL, DBConstants.INTEGER));
addColumn(new DBColumn(TIME, DBConstants.NOT_NULL, DBConstants.LONG));
addColumn(new DBColumn(SEC, DBConstants.NOT_NULL, DBConstants.INTEGER));
List<RecordEventObject> eventObjs = output.getRecordEvent();
for (List<Object> data : result) {
RecordEventObject reObj = new RecordEventObject();
- reObj.setId((Integer) data.get(0));
- reObj.setSeq((Integer) data.get(2));
- reObj.setTime((Long) data.get(3));
+ reObj.setId((Integer) data.get(DB_RID_INDEX));
+ reObj.setSeq((Integer) data.get(DB_SEQ_INDEX));
+ reObj.setTime((Long) data.get(DB_TIME_INDEX));
DATime eventTime = new DATime();
- eventTime.setSec((Integer) data.get(4));
- eventTime.setNano((Integer) data.get(5));
+ eventTime.setSec((Integer) data.get(DB_SEC_INDEX));
+ eventTime.setNano((Integer) data.get(DB_NANO_INDEX));
reObj.setEventTime(eventTime);
- reObj.setEventId((Integer) data.get(6));
- reObj.setEventType((Integer) data.get(7));
- reObj.setEventCode((Integer) data.get(8));
- reObj.setEventValue((Integer) data.get(9));
+ reObj.setEventId((Integer) data.get(DB_EVENT_ID_INDEX));
+ reObj.setEventType((Integer) data.get(DB_EVENT_TYPE_INDEX));
+ reObj.setEventCode((Integer) data.get(DB_EVENT_CODE_INDEX));
+ reObj.setEventValue((Integer) data.get(DB_EVENT_VALUE));
eventObjs.add(reObj);
}
output.setObjectCount(eventObjs.size());
@Override
public boolean prepare(PreparedStatement prep, List<Object> rowData) {
- // TODO Auto-generated method stub
- return false;
+ boolean isPrepared = true;
+
+ int columnsize = getColumnSize();
+ if (columnsize != rowData.size()) {
+ isPrepared = false;
+ } else {
+ try {
+ prep.setInt(DB_RID_INDEX + 1,
+ (Integer) (rowData.get(DB_RID_INDEX)));
+ prep.setInt(DB_SEQ_INDEX + 1,
+ (Integer) (rowData.get(DB_SEQ_INDEX)));
+ prep.setLong(DB_TIME_INDEX + 1,
+ (Long) (rowData.get(DB_TIME_INDEX)));
+ prep.setInt(DB_SEC_INDEX + 1,
+ (Integer) (rowData.get(DB_SEC_INDEX)));
+ prep.setInt(DB_NANO_INDEX + 1,
+ (Integer) (rowData.get(DB_NANO_INDEX)));
+ prep.setInt(DB_EVENT_ID_INDEX + 1,
+ (Integer) (rowData.get(DB_EVENT_ID_INDEX)));
+ prep.setInt(DB_EVENT_TYPE_INDEX + 1,
+ (Integer) (rowData.get(DB_EVENT_TYPE_INDEX)));
+ prep.setInt(DB_EVENT_CODE_INDEX + 1,
+ (Integer) (rowData.get(DB_EVENT_CODE_INDEX)));
+ prep.setInt(DB_EVENT_VALUE + 1,
+ (Integer) (rowData.get(DB_EVENT_VALUE)));
+ } catch (SQLException e) {
+ e.printStackTrace();
+ isPrepared = false;
+ }
+ }
+
+ return isPrepared;
}
}
RecordEventObject reo = events.get(ii);
List<Object> insertObject = new ArrayList<Object>();
insertObject.add(rid++);
- insertObject.add(7);
insertObject.add(reo.getSeq());
insertObject.add(reo.getTime());
insertObject.add(reo.getEventTime().getSec());
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
*
* Contact:
- * Jooyoul Lee <jy.exe.lee@samsung.com>
+ * Hyunjong Park <phjwithyou.park@samsung.com>
* Juyoung Kim <j0.kim@samsung.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
public String saveFileName = null;
private DAButton okButton = null;
private DAButton cancelButton = null;
-
- private String targetPath = "";
+
+ private String targetPath = CommonConstants.EMPTY;
public RepalyEditSaveDialog(Shell parentShell) {
super(parentShell);
private boolean executeSaveTrace() {
Project project = AnalyzerManager.getProject();
String sourcePath = project.getSavePath();
- targetPath = PathManager.DA_SAVE_PATH
- + File.separator + saveFileName;
+ targetPath = PathManager.DA_SAVE_PATH + File.separator + saveFileName;
- if(AnalyzerManager.getProject().getSavePath().equals(targetPath)){
+ if (AnalyzerManager.getProject().getSavePath().equals(targetPath)) {
return true;
}
}
return true;
}
- public String getSavedPath(){
+
+ public String getSavedPath() {
return this.targetPath;
}
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
-import org.tizen.dynamicanalyzer.common.AnalyzerManager;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.nl.ReplayEditLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
public class ReplayEditDialog extends DAMessageBox {
private static final DALogger DA_LOG = DALogger.getInstance();
-
+
private static boolean opened = false;
private DACustomButton cancelButton = null;
- //private DATabComposite tabView = null;
private DATableComposite replayTable;
public ReplayEditDialog(Shell parent) {
super(parent);
}
- private DACustomButtonClickEventListener saveButtonListener = new DACustomButtonClickEventListener() {
-
- @Override
- public void handleClickEvent(DACustomButton button) {
- ReplayEditDialogDataManager.getInstance().setTableItemsList(replayTable);
- ReplayEditDialogDataManager.getInstance().saveDialog();
- }
- };
-
private DACustomButtonClickEventListener okButtonListener = new DACustomButtonClickEventListener() {
@Override
public void handleClickEvent(DACustomButton button) {
- ReplayEditDialogDataManager.getInstance().setTableItemsList(replayTable);
- ReplayEditDialogDataManager.getInstance().insertDB(false,
- AnalyzerManager.getProject().getSavePath());
+ ReplayEditDialogDataManager.getInstance().setTableItemsList(
+ replayTable);
+ ReplayEditDialogDataManager.getInstance().insertDB();
shell.dispose();
}
};
compData.bottom = new FormAttachment(100, 0);
featuresPage.setLayoutData(compData);
- replayTable =featuresPage.getReplayTable();
-
-
-
+ replayTable = featuresPage.getReplayTable();
+
// button
Composite buttonContentsComp = new Composite(shell, SWT.NONE);
buttonContentsComp.addPaintListener(new PaintListener() {
buttonData.height = 28;
cancelButton.setLayoutData(buttonData);
- ReplayEditDialogDataManager.getInstance().setOkButton(new DAButton(buttonContentsComp, SWT.NONE));
- ReplayEditDialogDataManager.getInstance().getOkButton().addClickListener(okButtonListener);
- ReplayEditDialogDataManager.getInstance().getOkButton().setText(ReplayEditLabels.OK);
- ReplayEditDialogDataManager.getInstance().getOkButton().setFont(FontResources.DIALOG_BUTTON_FONT);
+ ReplayEditDialogDataManager.getInstance().setOkButton(
+ new DAButton(buttonContentsComp, SWT.NONE));
+ ReplayEditDialogDataManager.getInstance().getOkButton()
+ .addClickListener(okButtonListener);
+ ReplayEditDialogDataManager.getInstance().getOkButton()
+ .setText(ReplayEditLabels.OK);
+ ReplayEditDialogDataManager.getInstance().getOkButton()
+ .setFont(FontResources.DIALOG_BUTTON_FONT);
buttonData = new FormData();
buttonData.right = new FormAttachment(cancelButton, -8);
buttonData.top = new FormAttachment(0, 11);
buttonData.width = 100;
buttonData.height = 28;
- ReplayEditDialogDataManager.getInstance().getOkButton().setLayoutData(buttonData);
-
- ReplayEditDialogDataManager.getInstance().setSaveButton(new DAButton(buttonContentsComp, SWT.NONE));
- ReplayEditDialogDataManager.getInstance().getSaveButton().addClickListener(saveButtonListener);
- ReplayEditDialogDataManager.getInstance().getSaveButton().setText(ReplayEditLabels.SAVE);
- ReplayEditDialogDataManager.getInstance().getSaveButton().setFont(FontResources.DIALOG_BUTTON_FONT);
- buttonData = new FormData();
- buttonData.right = new FormAttachment(ReplayEditDialogDataManager.getInstance().getOkButton(), -8);
- buttonData.top = new FormAttachment(0, 11);
- buttonData.width = 100;
- buttonData.height = 28;
- ReplayEditDialogDataManager.getInstance().getSaveButton().setLayoutData(buttonData);
+ ReplayEditDialogDataManager.getInstance().getOkButton()
+ .setLayoutData(buttonData);
opened = true;
ShortCutManager.getInstance().setEnabled(!opened);
public class ReplayEditDialogDataManager {
private DACustomButton saveButton = null;
private DACustomButton okButton = null;
- private final int MESSAGE_ID = 7;
private final int sequenceNaumber = 0000;
public static String MODIFIABILITY_TRUE = "MODIFIABILITY_TRUE ";
public static String SELECTED_ITEM_COPY = "SELECTED_ITEM_COPY ";
replayDBData = new ReplayData();
replayDBData = ReplayDataManager.getInstance().getReplayDBManager()
.getReplayLogs(false);
- // replayDBData = SqlManager.getInstance().getReplayLogs(false);
}
return replayDBData;
}
if (dbPath.equals(AnalyzerManager.getProject().getSavePath())) {
dbPath = AnalyzerManager.getProject().getSavePath();
}
- insertDB(true, dbPath);
+ insertDB();
}
}
- public void insertDB(boolean isSave, String dbPath) {
+ public void insertDB() {
ReplayDataManager.getInstance().getReplayDBManager()
.deleteReplayTableItems();
- insertDBData(isSave, dbPath);
+ insertDBData();
}
private void cleanInsertData() {
insertkeySequence = 1;
}
- private void insertDBData(boolean isSave, String dbPath) {
+ private void insertDBData() {
cleanInsertData();
int size = getTableItemsList().size();
for (int i = 0; i < size; i++) {
.get(EVENT_MOUSE_DOWN_TIME_TABLE_INDEX));
String itemMouseUpTime = getDBTime(item
.get(EVENT_MOUSE_UP_TIME_TABLE_INDEX));
+ if (itemMouseUpTime.equals(CommonConstants.EMPTY)) {
+ itemMouseUpTime = itemMouseDownTime;
+ }
DATime mouseDownTime = getDATimeValue(Long.parseLong(itemMouseDownTime));
DATime mouseUpTime = getDATimeValue(Long.parseLong(itemMouseUpTime));
int itemValue1 = getKeyValue(item);
List<Object> keyData = new ArrayList<Object>();
if (i == 0) {
keyData.add(mouseDownTime.getSec() + insertDBRid++);
- keyData.add(MESSAGE_ID);
keyData.add(sequenceNaumber);
keyData.add(Long.parseLong(itemMouseDownTime));
keyData.add(mouseDownTime.getSec());
keyData.add(1);
} else if (i == 1) {
keyData.add(mouseUpTime.getSec() + insertDBRid++);
- keyData.add(MESSAGE_ID);
keyData.add(sequenceNaumber);
keyData.add(Long.parseLong(itemMouseDownTime));
keyData.add(mouseDownTime.getSec());
keyData.add(0);
} else if (i == 2) {
keyData.add(mouseUpTime.getSec() + insertDBRid++);
- keyData.add(MESSAGE_ID);
keyData.add(sequenceNaumber);
keyData.add(Long.parseLong(itemMouseDownTime));
keyData.add(mouseUpTime.getSec());
keyData.add(0);
} else if (i == 3) {
keyData.add(mouseUpTime.getSec() + insertDBRid++);
- keyData.add(MESSAGE_ID);
keyData.add(sequenceNaumber);
keyData.add(Long.parseLong(itemMouseDownTime));
keyData.add(mouseUpTime.getSec());
List<Object> keyData = new ArrayList<Object>();
if (i == 0) {
keyData.add(mouseDownTime.getSec() + insertDBRid++);
- keyData.add(MESSAGE_ID);
keyData.add(sequenceNaumber);
keyData.add(Long.parseLong(itemMouseDownTime));
keyData.add(mouseDownTime.getSec());
keyData.add(insertkeySequence++);
} else if (i == 1) {
keyData.add(mouseDownTime.getSec() + insertDBRid++);
- keyData.add(MESSAGE_ID);
keyData.add(sequenceNaumber);
keyData.add(Long.parseLong(itemMouseDownTime));
keyData.add(mouseDownTime.getSec());
keyData.add(TOUCH_EVENT_VALUE_SECOND_ITEM);
} else if (i == 2) {
keyData.add(mouseDownTime.getSec() + insertDBRid++);
- keyData.add(MESSAGE_ID);
keyData.add(sequenceNaumber);
keyData.add(Long.parseLong(itemMouseDownTime));
keyData.add(mouseDownTime.getSec());
keyData.add(getDBPoint(itemValue1));
} else if (i == 3) {
keyData.add(mouseDownTime.getSec() + insertDBRid++);
- keyData.add(MESSAGE_ID);
keyData.add(sequenceNaumber);
keyData.add(Long.parseLong(itemMouseDownTime));
keyData.add(mouseDownTime.getSec());
keyData.add(getDBPoint(itemValue2));
} else if (i == 4) {
keyData.add(mouseDownTime.getSec() + insertDBRid++);
- keyData.add(MESSAGE_ID);
keyData.add(sequenceNaumber);
keyData.add(Long.parseLong(itemMouseDownTime));
keyData.add(mouseDownTime.getSec());
keyData.add(0);
} else if (i == 5) {
keyData.add(mouseDownTime.getSec() + insertDBRid++);
- keyData.add(MESSAGE_ID);
keyData.add(sequenceNaumber);
keyData.add(Long.parseLong(itemMouseDownTime));
keyData.add(mouseUpTime.getSec());
keyData.add(-1);
} else if (i == 6) {
keyData.add(mouseDownTime.getSec() + insertDBRid++);
- keyData.add(MESSAGE_ID);
keyData.add(sequenceNaumber);
keyData.add(Long.parseLong(itemMouseDownTime));
keyData.add(mouseUpTime.getSec());
* Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
*
* Contact:
- * yeongtaik byeon <yeongtaik.byeon@samsung.com>
+ * Hyunjong Park <phjwithyou.park@samsung.com>
* Juyoung Kim <j0.kim@samsung.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
*
* Contact:
- * Jooyoul Lee <jy.exe.lee@samsung.com>
+ * Hyunjong Park <phjwithyou.park@samsung.com>
* Juyoung Kim <j0.kim@samsung.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
import org.tizen.dynamicanalyzer.common.GlobalInformation;
import org.tizen.dynamicanalyzer.common.ScreenshotConstants;
import org.tizen.dynamicanalyzer.common.path.PathManager;
-import org.tizen.dynamicanalyzer.communicator.DACommunicator;
import org.tizen.dynamicanalyzer.constant.CommonConstants;
import org.tizen.dynamicanalyzer.nl.ReplayEditLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
int point = 0;
if (value.contains(ReplayEditLabels.CONTEXT_VALUE_X)) {
point = Integer.parseInt(value.replace(
- ReplayEditLabels.CONTEXT_VALUE_X, ""));
- point = (point * ScreenshotConstants.DEFAULT_IMAGE_WIDTH) / Integer.parseInt(resolutionWidth);
+ ReplayEditLabels.CONTEXT_VALUE_X, CommonConstants.EMPTY));
+ point = (point * ScreenshotConstants.DEFAULT_IMAGE_WIDTH)
+ / Integer.parseInt(resolutionWidth);
}
if (value.contains(ReplayEditLabels.CONTEXT_VALUE_Y)) {
point = Integer.parseInt(value.replace(
- ReplayEditLabels.CONTEXT_VALUE_Y, ""));
- point = (point * ScreenshotConstants.DEFAULT_IMAGE_HEIGHT) / Integer.parseInt(resolutionHeight);
+ ReplayEditLabels.CONTEXT_VALUE_Y, CommonConstants.EMPTY));
+ point = (point * ScreenshotConstants.DEFAULT_IMAGE_HEIGHT)
+ / Integer.parseInt(resolutionHeight);
}
return point;
}
private void getDeviceResolution() {
- String selDeviceName = GlobalInformation.getCurrentDeviceInfo().getIDevice()
- .getDeviceName();
+ String selDeviceName = GlobalInformation.getCurrentDeviceInfo()
+ .getIDevice().getDeviceName();
String resolutionInfoXmlPath = PathManager.TIZEN_SDK_DATA_PATH
+ File.separator + "emulator-vms" + File.separator + "vms"//$NON-NLS-1$
+ File.separator + selDeviceName + File.separator
private DAText inputValueText = null;
+ private boolean enableCoordinateIcon = true;
+
@Override
protected List<TableInput> makeTableInput() {
List<TableInput> input = new ArrayList<TableInput>();
break;
}
case MOUSE_RIGHT: {
- openPoppupMenuMouseDownSequenceColumn(item, event);
break;
}
default: {
item.setImage(null);
} else if (selectedText.contains(ReplayEditLabels.CONTEXT_VALUE_X)
|| selectedText.contains(ReplayEditLabels.CONTEXT_VALUE_Y)) {
- item.setImage(ImageResources.REPLAY_EDIT_SNAPSHOT_DOWN);
+ if (enableCoordinateIcon) {
+ item.setImage(ImageResources.REPLAY_EDIT_SNAPSHOT_DOWN);
+ } else {
+ item.setImage(null);
+ }
} else {
item.setImage(ImageResources.REPLAY_EDIT_DROPDOWN_DOWN);
}
MousePt.x, MousePt.y);
} else if (selectedText.contains(ReplayEditLabels.CONTEXT_VALUE_X)
|| selectedText.contains(ReplayEditLabels.CONTEXT_VALUE_Y)) {
- ReplayEditScreenshotDialog dialog = new ReplayEditScreenshotDialog(
- table.getShell(), item);
- dialog.open();
+ if (enableCoordinateIcon) {
+ ReplayEditScreenshotDialog dialog = new ReplayEditScreenshotDialog(
+ table.getShell(), item);
+ dialog.open();
+ }
return false;
+ } else {
+ openPoppupMenuMouseDownSequenceColumn(item, event);
}
}
return true;
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;
public void paint(GC gc, Object value) {
GridItem item = (GridItem) value;
gc.setFont(item.getFont(getColumn()));
- paintBackground(gc, item);
paintImage(gc, item);
paintText(gc, item);
paintTableBoardLine(gc, item);
paintMouseOverColumn(gc, item);
paintSelectedInputKey(gc, item);
- // paintSelectedCopy(gc, item);
paintVaildTime(gc, item);
}
- private void paintBackground(GC gc, GridItem item) {
- boolean drawBackground = true;
- String optionColumn = item.getText(6);
- if (item.getChecked() && getColumn() == 0) {
- gc.setForeground(ColorResources.TABLE_CONTENTS_SELECTED_START);
- gc.setBackground(ColorResources.TABLE_CONTENTS_SELECTED_END);
- } else if (!optionColumn
- .contains(ReplayEditDialogDataManager.MODIFIABILITY_TRUE)) {
- gc.setBackground(ColorResources.YELLOW);
- } else if (item.getText(ReplayEditTable.UP_TIME_TABLE_INDEX).equals("")) {
- gc.setBackground(ColorResources.YELLOW);
- } 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 && item.getChecked() && getColumn() == 0) {
- 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);
- }
- }
-
private void paintImage(GC gc, GridItem item) {
menuImg = item.getImage();
- if (menuImg != null && getColumn() != 0 && item.getChecked(getColumn())) {
+ if (menuImg != null && item.getChecked(getColumn())) {
int y = getBounds().y;
y += (getBounds().height - menuImg.getBounds().height) / 2;
}
private void paintMouseOverColumn(GC gc, GridItem item) {
- if (getColumn() != 0 && item.getChecked(getColumn())) {
+ if (item.getChecked(getColumn())) {
Rectangle focusRect = new Rectangle(getBounds().x - 1,
getBounds().y - 1, getBounds().width,
getBounds().height + 1);
private void paintSelectedInputKey(GC gc, GridItem item) {
String optionColumn = item.getText(6);
- if (getColumn() != 0
- && item.getChecked(getColumn())
+ if (item.getChecked(getColumn())
&& optionColumn
.contains(ReplayEditDialogDataManager.SELECTED_ITEM_KEY_INPUT)) {
Rectangle focusRect = new Rectangle(getBounds().x - 1,
}
}
- // private void paintSelectedCopy(GC gc, GridItem item) {
- // String optionColumn = item.getText(6);
- // if (optionColumn
- // .contains(ReplayEditDialogDataManager.SELECTED_ITEM_COPY)) {
- // gc.setForeground(ColorResources.BLACK);
- // gc.setLineWidth(2);
- // gc.setLineStyle(SWT.LINE_DOT);
- // gc.drawLine(getBounds().x, getBounds().y, getBounds().x
- // + getBounds().width, getBounds().y);
- //
- // gc.drawLine(getBounds().x, getBounds().y + getBounds().height,
- // getBounds().x + getBounds().width, getBounds().y
- // + getBounds().height);
- // if (getColumn() == 0) {
- // gc.drawLine(getBounds().x, getBounds().y, getBounds().x,
- // getBounds().y + getBounds().height);
- // }
- //
- // if (getColumn() == 0) {
- // gc.drawLine(getBounds().x, getBounds().y, getBounds().x,
- // getBounds().y + getBounds().height);
- // }
- //
- // gc.setLineStyle(SWT.LINE_SOLID);
- // gc.setLineWidth(1);
- //
- // }
- // }
-
private void paintVaildTime(GC gc, GridItem item) {
String optionColumn = item.getText(6);
if (optionColumn
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Hyunjong Park <phjwithyou.park@samsung.com>
+ * Juyoung Kim <j0.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.ui.toolbar.replayEditor;
import org.tizen.dynamicanalyzer.constant.CommonConstants;
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
*
* Contact:
- * Jooyoul Lee <jy.exe.lee@samsung.com>
+ * Hyunjong Park <phjwithyou.park@samsung.com>
* Juyoung Kim <j0.kim@samsung.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");