@Override\r
public void updateTable() {\r
// TODO Auto-generated method stub\r
+ // Firstly, need to update scroll position to selection.\r
+ setScrolltoSelection(Toolbar.INSTANCE.getChartDragStartTime(), Toolbar.INSTANCE.getChartDragEndTime());\r
super.updateTable();\r
selectTablefromChartDrag(Toolbar.INSTANCE.getChartDragStartTime(), Toolbar.INSTANCE.getChartDragEndTime());\r
}\r
\r
private void selectTablefromChartDrag(long start, long end){\r
\r
- boolean getFocusIndex = false; \r
-\r
if(Toolbar.INSTANCE.getDlogSelection()){\r
return;\r
}\r
long diffTime = Long.parseLong(dlogClone.get(i).getTime());\r
\r
if(diffTime >= start && diffTime <= end){\r
- /// Dlog focus move to selection start\r
- if(!getFocusIndex){\r
- table.getVerticalBar().setSelection(i - 1);\r
- getFocusIndex = true;\r
- }\r
- \r
table.getItem(i).setBackground(ColorResources.TABLE_CONTENTS_SELECTED_START);\r
table.getItem(i).setForeground(ColorResources.WHITE);\r
}\r
}\r
}\r
\r
+ private void setScrolltoSelection(long start, long end){\r
+ \r
+ if(Toolbar.INSTANCE.getDlogSelection()){\r
+ return;\r
+ }\r
+\r
+ for(int i = 0 ; i < table.getItems().length ; i++){\r
+ \r
+ long diffTime = Long.parseLong(dlogClone.get(i).getTime());\r
+ \r
+ if(diffTime >= start && diffTime <= end){\r
+ /// Dlog focus move to selection start\r
+ table.getVerticalBar().setSelection(i - 1);\r
+ return;\r
+ }\r
+ }\r
+ }\r
+ \r
// clear selection made by selectTablefromChartDrag.\r
private void clearAllselection(){\r
\r