public static int TABLE_COUNT = 12;
public static final String EMPTY = CommonConstants.EMPTY;
- public static final String TEXT = "VARCHAR(128)";//$NON-NLS-1$
+ public static final String TEXT = "VARCHAR(256)";//$NON-NLS-1$
public static final String INTEGER = "INTEGER";//$NON-NLS-1$
public static final String LONG = "bigint";//$NON-NLS-1$
public static final String NOT_NULL = "not null";//$NON-NLS-1$
System.out.println("query : " + createTableQuery);
}
stat.executeUpdate(createTableQuery);
+ executeCreateIndexTable(stat, tableName, "time");//$NON-NLS-1$//$NON-NLS-2$
}
} catch (SQLException e) {
e.printStackTrace();
System.out.println("table create failed..."
+ info.getTableName());
}
- executeCreateIndexTable(stat, info.getTableName(), "time");//$NON-NLS-1$//$NON-NLS-2$
}
} catch (SQLException e) {
e.printStackTrace();
}
private void chartFilteringByPId() {
+ if(null == board || null == board.getChartComposite()){
+ return;
+ }
int selectedPid = ToolbarArea.getInstance().getSelectedPid();
boolean isCheck = false;
}
private void chartFilteringByPId() {
+ if (null == board || null == board.getChartComposite()) {
+ return;
+ }
int selectedPid = ToolbarArea.getInstance().getSelectedPid();
boolean isCheck = false;
strPoint = strPoint.replace(ReplayEditLabels.CONTEXT_VALUE_Y,
CommonConstants.EMPTY);
}
- return strPoint;
+ return strPoint.trim();
}
public long getTimeValue(long sec, long nano) {
.get(EVENT_MOUSE_UP_TIME_TABLE_INDEX));
DATime mouseDownTime = getDATimeValue(Long.parseLong(itemMouseDownTime));
DATime mouseUpTime = getDATimeValue(Long.parseLong(itemMouseUpTime));
- String itemValue1 = item.get(EVENT_VALUE1_TABLE_INDEX);
- String itemValue2 = item.get(EVENT_VALUE2_TABLE_INDEX);
+ String itemValue1 = item.get(EVENT_VALUE1_TABLE_INDEX).trim();
+ String itemValue2 = item.get(EVENT_VALUE2_TABLE_INDEX).trim();
List<List<String>> dbKeyDataList = new ArrayList<List<String>>();
for (int i = 0; i < 7; i++) {
package org.tizen.dynamicanalyzer.ui.toolbar.replayEditor;
+import org.eclipse.nebula.widgets.grid.GridItem;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
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.Display;
import org.eclipse.swt.widgets.Shell;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.common.SnapshotConstants;
-import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.nl.ReplayEditLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
import org.tizen.dynamicanalyzer.ui.widgets.DAMessageBox;
private int[] columnSizes = { SnapshotConstants.DEFAULT_IMAGE_WIDTH + 15 };
private boolean[] columnVisibility = { true };
- public ReplayEditSnapshotDialog(Shell parent) {
+ protected GridItem item = null;
+
+ public ReplayEditSnapshotDialog(Shell parent, GridItem item) {
super(parent);
+ this.item = item;
}
protected boolean run() {
@Override
public void mouseUp(MouseEvent e) {
- // TODO Auto-generated method stub
+ Point DisplyPt = Display.getCurrent().getCursorLocation();
+ int tableX = snapShotTable.getTable().getShell().getBounds().x;
+ int tableY = snapShotTable.getTable().getShell().getBounds().y;
+ int imgClickX = DisplyPt.x - tableX - 5;
+ int imgClickY = DisplyPt.y - tableY - 55;
+ int drawImagWidth = SnapshotConstants.DEFAULT_IMAGE_WIDTH;
+ int drawImagHeight = SnapshotConstants.DEFAULT_IMAGE_HEIGHT - 20;
+ int imgWidth = 720;
+ int imgHeight = 1280;
+
+ if ((0 <= imgClickX && imgClickX <= drawImagWidth)
+ && (0 <= imgClickY && imgClickY <= drawImagHeight)) {
+ int x = (imgClickX * imgWidth) / drawImagWidth;
+ int y = ((imgClickY * imgHeight) / drawImagHeight) + 40;
+ // System.out.println("x : " + x + " y : " + y);
+ item.setText(4, "x : " + Integer.toString(x));
+ item.setText(5, "y : " + Integer.toString(y));
+ shell.dispose();
+ }
+
}
@Override
public void mouseDown(MouseEvent e) {
- // TODO Auto-generated method stub
}
@Override
import org.eclipse.nebula.widgets.grid.GridColumn;
import org.eclipse.nebula.widgets.grid.GridItem;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.common.AnalyzerManager;
import org.tizen.dynamicanalyzer.model.ImageInfo;
public ReplayEditSnapshotTable(Composite parent, int style) {
super(parent, style);
-
- table.addListener(SWT.Dispose, tableMouseListener);
- table.addListener(SWT.MouseEnter, tableMouseListener);
- table.addListener(SWT.MouseExit, tableMouseListener);
- table.addListener(SWT.MouseMove, tableMouseListener);
- table.addListener(SWT.MouseHover, tableMouseListener);
- table.addListener(SWT.MouseUp, tableMouseListener);
- table.addListener(SWT.MouseDown, tableMouseListener);
- table.addListener(SWT.MouseDoubleClick, tableMouseListener);
-
- table.getShell().getDisplay().addFilter(SWT.KeyUp, new Listener() {
- @Override
- public void handleEvent(Event event) {
-
- }
- });
}
- private Listener tableMouseListener = new Listener() {
- @Override
- public void handleEvent(Event event) {
- final int MOUSE_LEFT = 1;
- final int MOUSE_RIGHT = 3;
- GridItem item = table.getItem(new Point(event.x, event.y));
-
- if (null == item) {
- return;
- }
- switch (event.type) {
- case SWT.Dispose:
- break;
- case SWT.MouseEnter:
- break;
- case SWT.MouseExit:
- break;
- case SWT.MouseMove:
- break;
- case SWT.MouseDoubleClick:
- break;
- case SWT.MouseHover:
- break;
- case SWT.MouseUp:
- break;
- case SWT.MouseDown:
- switch (event.button) {
- case MOUSE_LEFT: {
- break;
- }
- case MOUSE_RIGHT: {
- break;
- }
- default: {
- break;
- }
- }
- break;
- default:
- break;
- }
- }
- };
-
@Override
public void setColumns(String[] columnNames) {
int size = columnNames.length;
int selectedIndexPosition = table.getSelectionIndex()
- table.getVerticalBar().getSelection();
MousePt.y = tablePt.y + table.getItemHeight()
- * selectedIndexPosition + 140;
+ * selectedIndexPosition + 135;
String selectedText = item
.getText(getMouseSelectedTableColumnIndex());
if (selectedText.contains(ReplayEditLabels.CONTEXT_TOUCH)
} else if (selectedText.contains(ReplayEditLabels.CONTEXT_VALUE_X)
|| selectedText.contains(ReplayEditLabels.CONTEXT_VALUE_Y)) {
ReplayEditSnapshotDialog dialog = new ReplayEditSnapshotDialog(
- table.getShell());
+ table.getShell(), item);
dialog.open();
} else {