import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
import org.tizen.dynamicanalyzer.ui.widgets.table.DATreeComposite;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DAWindowingTableComposite;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
import org.tizen.dynamicanalyzer.widgets.chart.DAChartPlotIntervalMarker;
return;
} else if (control instanceof DATableComposite) {
table = ((DATableComposite) control).getTable();
+ } else if (control instanceof DAWindowingTableComposite) {
+ table = ((DAWindowingTableComposite) control).getTable();
} else if (control instanceof DATreeComposite) {
table = ((DATreeComposite) control).getTable();
} else {
//
//public class CallTraceTable extends DAWindowingTableComposite {
// private String dbOptionQuery = "messageid = 8";//$NON-NLS-1$
-// //private DAChartBoard chartBoard = null;
//
// public CallTraceTable(Composite parent, int compStyle, int tableStyle) {
// super(parent, compStyle, tableStyle);
// text.add(Integer.toString(data.getPid()));
// text.add(data.getApiName());
// text.add(data.getArgs());
-// text.add(data.getHexReturn());
+// // text.add(data.getHexReturn());
// text.add(data.getLibName());
// } else if (logData instanceof ProfileData) {
// ProfileData data = (ProfileData) logData;
// protected String getSelectQueryOption(){
// return dbOptionQuery;
// }
-//}
+//}
\ No newline at end of file
}
}
-
-
-
-
-
+//
+//
//import org.eclipse.swt.SWT;
//import org.eclipse.swt.layout.FillLayout;
//import org.eclipse.swt.widgets.Composite;
// AnalyzerLabels.TABLE_COLUMN_PARAMETERS,
// AnalyzerLabels.TABLE_COLUMN_RETURN,
// AnalyzerLabels.TABLE_COLUMN_LIBNAME };
-// private int[] columnSizes = { 60, 35, 35, 350, 150, 80, 200 };
+// private int[] columnSizes = { 65, 45, 45, 400, 150, 80, 200 };
// private boolean[] columnVisibility = { true, true, true, true, true, true,
// true };
// int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NUM,
// public void updateLog(LogPackage logPack) {
//
// }
-//
-//}
\ No newline at end of file
+//}
public abstract class DAWindowingTableComposite extends Composite {
+ final private boolean choiceDumyDBLog = false;
final private int additionalSelectCount = 100;
- final private boolean choiceDumyDBLog = true;
protected Composite scrollComp;
protected ScrollBar scrollbar;
private int scrollStartSelection = 0;
private int scrollEndSelection = 0;
private int preDBTableItemsCount = 0;
- private List<TableInput> savedDBList = null;
+ private List<TableInput> savedTableInputList = null;
private int preLogCount = -1;
private int preSelectionScrollIndex = -1;
- List<LogData> preDBList = null;
+ List<LogData> savedLogDataList = null;
protected Color rangeColor = ColorResources.TABLE_RANGE_COLOR_RANGE;
protected Color secondSelectionColor = ColorResources.TABLE_RANGE_COLOR_SECOND_SELECTION;
protected Point mousePoint = new Point(0, 0);
- private int failedAPITableColumIndex = -1;
-
protected RangeDataManager rangeDataManager = RangeDataManager
.getInstance();
protected abstract List<TableInput> makeTableInput(
List<LogData> userLog);
-
protected abstract int getItemCount();
-
protected abstract int getTableLogId();
-
+ protected abstract String getSelectQueryOption();
public void clean() {
getTable().removeAll();
scrollStartSelection = 0;
scrollEndSelection = 0;
preDBTableItemsCount = 0;
- savedDBList = null;
+ savedTableInputList = null;
+ savedLogDataList = null;
}
private List<TableInput> makeTableInput() {
return outputList;
}
+
private List<TableInput> makeTableInputFromDB() {
int scrollSelection = scrollbar.getSelection();
- List<LogData> userLog = null;
-
boolean isQueryDB = false;
if (preSelectionScrollIndex != scrollSelection) {
isQueryDB = true;
preLogCount = getItemCount();
if (isQueryDB) {
- userLog = getItemListFromDB();
- } else {
- userLog = preDBList;
+ savedLogDataList = getItemListFromDB();
}
- if (null == userLog) {
+
+ if (null == savedLogDataList) {
return null;
}
- return makeTableInput(userLog);
+
+ return makeTableInput(savedLogDataList);
}
private List<LogData> getItemListFromDB() {
}
List<LogData> outputList = SqlManager.getInstance()
.selectTableData(getTableLogId(), scrollSelection,
- selectedEndIndex + 1, "messageid = 8");
+ selectedEndIndex + 1, getSelectQueryOption());
return outputList;
}
int focusIndex = -1;
int size = output.size();
-
for (int i = 0; i < size; i++) {
GridItem gridItem = new GridItem(table, SWT.NONE);
DATableDataFormat gridData = (DATableDataFormat) output.get(i)
return autoColumnPack;
}
- public int getFailedAPITableIndex() {
- return failedAPITableColumIndex;
- }
-
- public void setFailedAPITableIndex(int failedTableIndex) {
- this.failedAPITableColumIndex = failedTableIndex;
- }
-
- public List<TableInput> getSavedDBList() {
- return savedDBList;
+ private List<TableInput> getSavedDBList() {
+ return savedTableInputList;
}
- public void setSavedDBList(List<TableInput> savedDBList) {
- this.savedDBList = savedDBList;
+ private void setSavedDBList(List<TableInput> savedDBList) {
+ this.savedTableInputList = savedDBList;
}
}