private static int COMBO_FIRST_INDEX = 0;
- public static boolean bThreadPageWork = false; // FIXME
+ public static boolean bThreadPageWork = true; // FIXME
private ShellListener shellListener = new ShellListener() {
import org.eclipse.swt.graphics.Color;
-public class PageChartGraphItem {
+public class PageChartGraphSeries {
public static final int PAGECHART_GRAPHITEM_STATUS_NONE = 0;
public static final int PAGECHART_GRAPHITEM_STATUS_EVENT = 1 << 1;
public static final int PAGECHART_GRAPHITEM_STATUS_BAR = 1 << 2;
public static final int PAGECHART_GRAPHITEM_STATUS_LINE = 1 << 3;
public static final int PAGECHART_GRAPHITEM_STATUS_AREA = 1 << 4;
+ //evnet added option
public static final int PAGECHART_GRAPHITEM_STATUS_EVENT_PERIOD_START = 1 << 5;
public static final int PAGECHART_GRAPHITEM_STATUS_EVENT_PERIOD_END = 1 << 6;
private String name;
private long x; // time
- private long y;
+ private long y; // value
private Color eventColor;
private int style;
- public PageChartGraphItem(long x, long y, Color eventColor, int chartStyle) {
+ public PageChartGraphSeries(long x, long y, Color eventColor, int chartStyle) {
this.x = x;
this.y = y;
this.eventColor = eventColor;
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.views.pageInfo;
+
+import org.eclipse.swt.graphics.Color;
+
+public class PageChartGraphSeriesItem {
+ private long x;
+ private long y;
+ private Color eventColor;
+
+ public PageChartGraphSeriesItem(long x, long y, Color eventColor){
+ this.setX(x);
+ this.setY(y);
+ this.setEventColor(eventColor);
+ }
+
+ public long getX() {
+ return x;
+ }
+
+ public void setX(long x) {
+ this.x = x;
+ }
+
+ public long getY() {
+ return y;
+ }
+
+ public void setY(long y) {
+ this.y = y;
+ }
+
+ public Color getEventColor() {
+ return eventColor;
+ }
+
+ public void setEventColor(Color eventColor) {
+ this.eventColor = eventColor;
+ }
+
+
+}
private GridItem gridItem = null;
private List<PageChartItem> children = new ArrayList<PageChartItem>();
- private List<PageChartGraphItem> graphItems = new ArrayList<PageChartGraphItem>();
+ private List<PageChartGraphSeries> graphItems = new ArrayList<PageChartGraphSeries>();
public PageChartItem(final DAPageChart chart, final String text) {
// super(chart, SWT.NONE);
}
public PageChartItem(DAPageChart chart, String text,
- PageChartGraphItem graphItem) {
+ PageChartGraphSeries graphItem) {
this(chart, text);
// TODO Auto-generated constructor stub
graphItems.add(graphItem);
}
public PageChartItem(PageChartItem parent, String text,
- PageChartGraphItem graphItem) {
+ PageChartGraphSeries graphItem) {
this(parent, text);
// TODO Auto-generated constructor stub
return children;
}
- public List<PageChartGraphItem> GetGraphItem() {
+ public List<PageChartGraphSeries> GetGraphItem() {
return graphItems;
}
- public void AddGraphItem(PageChartGraphItem item) {
+ public void AddGraphItem(PageChartGraphSeries item) {
int i;
for (i = graphItems.size(); i > 0; i--) {
if (graphItems.get(i - 1).getX() <= item.getX())
chart.redraw();
}
- public void AddGraphItems(List<PageChartGraphItem> items) {
+ public void AddGraphItems(List<PageChartGraphSeries> items) {
for (int i = 0; i < items.size(); i++) {
AddGraphItem(items.get(i));
}
public void AddPageChartItem(PageDataItem dataItem, int itemIndex) {
List<PageChartItem> items = pageChart.GetItems();
int itemSize = items.size();
- int graphItemStyle = PageChartGraphItem.PAGECHART_GRAPHITEM_STATUS_EVENT;
+ int graphItemStyle = PageChartGraphSeries.PAGECHART_GRAPHITEM_STATUS_EVENT;
if(dataItem.GetText(PAGE_COLUMN_APITYPE).matches(LogCenterConstants.FD_API_TYPE_OPEN)){
- graphItemStyle |= PageChartGraphItem.PAGECHART_GRAPHITEM_STATUS_EVENT_PERIOD_START;
+ graphItemStyle |= PageChartGraphSeries.PAGECHART_GRAPHITEM_STATUS_EVENT_PERIOD_START;
}
else if(dataItem.GetText(PAGE_COLUMN_APITYPE).matches(LogCenterConstants.FD_API_TYPE_CLOSE)){
- graphItemStyle |= PageChartGraphItem.PAGECHART_GRAPHITEM_STATUS_EVENT_PERIOD_END;
+ graphItemStyle |= PageChartGraphSeries.PAGECHART_GRAPHITEM_STATUS_EVENT_PERIOD_END;
}
- PageChartGraphItem graphItem = new PageChartGraphItem(
+ PageChartGraphSeries graphItem = new PageChartGraphSeries(
Long.parseLong(dataItem.GetText(PAGE_COLUMN_TIME)),itemIndex,
ColorResources.BLUE,graphItemStyle);
PageChartItem newItem = null;
import org.tizen.dynamicanalyzer.nl.FilePageLabels;
import org.tizen.dynamicanalyzer.nl.ThreadPageLabels;
import org.tizen.dynamicanalyzer.ui.views.filePage.FileApiListView;
-import org.tizen.dynamicanalyzer.ui.views.pageInfo.PageChartGraphItem;
+import org.tizen.dynamicanalyzer.ui.views.pageInfo.PageChartGraphSeries;
import org.tizen.dynamicanalyzer.ui.views.pageInfo.PageChartItem;
import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer;
import org.tizen.dynamicanalyzer.ui.widgets.DAPageAPIListTable.DAPageAPIListTable;
if (null == item || !(item instanceof PageChartItem)) {
return;
}
- List<PageChartGraphItem> graphItems = item.GetGraphItem();
+ List<PageChartGraphSeries> graphItems = item.GetGraphItem();
if (null == graphItems) {
return;
tableComp.clear();
for (int i = 0; i < graphItems.size(); i++) {
- PageChartGraphItem graphItem = graphItems.get(i);
+ PageChartGraphSeries graphItem = graphItems.get(i);
int dataItemIndex = (int) graphItem.getY();
tableComp.addItem(ThreadPageDataManager.getInstance()
import org.tizen.dynamicanalyzer.ColorResources;
import org.tizen.dynamicanalyzer.FontResources;
import org.tizen.dynamicanalyzer.nl.DAPageChartLabels;
-import org.tizen.dynamicanalyzer.ui.views.pageInfo.PageChartGraphItem;
+import org.tizen.dynamicanalyzer.ui.views.pageInfo.PageChartGraphSeries;
import org.tizen.dynamicanalyzer.ui.views.pageInfo.PageChartItem;
import org.tizen.dynamicanalyzer.ui.widgets.DATable.DATableEmptyColumnHeaderRenderer;
import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
public void printItem(List<PageChartItem> items, int depth) {
PageChartItem item;
- PageChartGraphItem graphItem;
- List<PageChartGraphItem> graphItems;
+ PageChartGraphSeries graphItem;
+ List<PageChartGraphSeries> graphItems;
if (items != null && items.size() != 0) {
for (int i = 0; i < items.size(); i++) {
for (int j = 0; j < depth; j++) {
import org.tizen.dynamicanalyzer.ColorResources;
import org.tizen.dynamicanalyzer.nl.DAPageChartLabels;
import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider;
-import org.tizen.dynamicanalyzer.ui.views.pageInfo.PageChartGraphItem;
+import org.tizen.dynamicanalyzer.ui.views.pageInfo.PageChartGraphSeries;
import org.tizen.dynamicanalyzer.ui.views.pageInfo.PageChartItem;
import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
List<PageChartItem> children = (List<PageChartItem>) item
.getData("children"); //$NON-NLS-1$
- List<PageChartGraphItem> graphItems = (List<PageChartGraphItem>) item
+ List<PageChartGraphSeries> graphItems = (List<PageChartGraphSeries>) item
.getData("graphItems"); //$NON-NLS-1$
- PageChartGraphItem graphItem;
+ PageChartGraphSeries graphItem;
int graphItemSize;
long startPeriodTime = 0;
if (null != graphItems) {
boolean bPeriodStart = false;
for (int i = 0; i < graphItemSize; i++) {
graphItem = graphItems.get(i);
- if((graphItem.getStyle() & PageChartGraphItem.PAGECHART_GRAPHITEM_STATUS_EVENT_PERIOD_START) != 0){
+ if((graphItem.getStyle() & PageChartGraphSeries.PAGECHART_GRAPHITEM_STATUS_EVENT_PERIOD_START) != 0){
bPeriodStart = true;
startPeriodTime = graphItem.getX();
for(; i < graphItemSize; i++){
graphItem = graphItems.get(i);
- if((graphItem.getStyle() & PageChartGraphItem.PAGECHART_GRAPHITEM_STATUS_EVENT_PERIOD_END) != 0){
+ if((graphItem.getStyle() & PageChartGraphSeries.PAGECHART_GRAPHITEM_STATUS_EVENT_PERIOD_END) != 0){
long endPeriodTime = graphItem.getX();
if(endPeriodTime > startTime){
drawPeriod(gc, startPeriodTime, endPeriodTime, true);
}
}
- public void drawEvent(GC gc, PageChartGraphItem graphItem) {
+ public void drawEvent(GC gc, PageChartGraphSeries graphItem) {
if (null == r)
r = getBounds();
int pixcelX = DAPageChartTimelineRendererHelper.getPixcelXFromTime(