libInst = ByteUtils.getByte(libInst, functionInstList.get(i)
.getByteValue());
}
- System.out.println("debug");
}
count = count - failedCount;
libInst = ByteUtils.getByte(count, libInst);
drawBoundLine(e.gc, LINE_COLOR, boundLineWidth, boundValue);
// draw bound value
- if (pointSize == POINT_MAX_SIZE) {
+ if (pointSize == POINT_MAX_SIZE
+ && boundLineWidth == LINE_MAX_WIDTH) {
int chartHeight = chart.getBounds().height;
- if (boundLineWidth == LINE_MAX_WIDTH) {
- String boundText = String.valueOf(boundValue)
- + plot.getAxisUnit();
- chart.redrawForce();
- int boundTextHeight = e.gc.textExtent(boundText).y;
- int boundTextPosition;
-
- double linePosition = 1.0 - (boundValue / max);
- if (chartHeight * linePosition > chartHeight
- - boundTextHeight) {
- boundTextPosition = (int) Math
- .round(chartHeight * linePosition
- - boundTextHeight);
- } else {
- boundTextPosition = (int) Math
- .round(chartHeight * linePosition);
- }
+ String boundText = String.valueOf(boundValue)
+ + plot.getAxisUnit();
+// chart.redrawForce();
+ int boundTextHeight = e.gc.textExtent(boundText).y;
+ int boundTextPosition;
+
+ double linePosition = 1.0 - (boundValue / max);
+ if (chartHeight * linePosition > chartHeight
+ - boundTextHeight) {
+ boundTextPosition = (int) Math.round(chartHeight
+ * linePosition - boundTextHeight);
+ } else {
+ boundTextPosition = (int) Math.round(chartHeight
+ * linePosition);
+ }
- e.gc.setForeground(LINE_COLOR);
- if (boundTextPosition > 0) {
- e.gc.drawString(boundText, 0,
- boundTextPosition, true);
- } else {
- e.gc.drawString("^" + boundText, 0, 0, true);
- }
+ e.gc.setForeground(LINE_COLOR);
+ if (boundTextPosition > 0) {
+ e.gc.drawString(boundText, 0, boundTextPosition,
+ true);
+ } else {
+ e.gc.drawString("^" + boundText, 0, 0, true);
}
}
} // end of !isExpanded
import org.tizen.dynamicanalyzer.ui.widgets.table.DAApiListTableComposite;
import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
import org.tizen.dynamicanalyzer.utils.Formatter;
-import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
public class GLAPIListTable extends DAApiListTableComposite {
- private static String EMPTY = "";
+ public static final String ID = GLAPIListTable.class.getName();
+ private static final String EMPTY = "";
private String[] columnNames = { GLPageLabels.GL_API_LIST_VIEW_SEQ, EMPTY,
GLPageLabels.GL_API_LIST_VIEW_TIME,
GLPageLabels.GL_API_LIST_VIEW_NAME,
DATableDataFormat dataFormat = (DATableDataFormat) items[0].getData();
long time = dataFormat.getLogData().getTime();
- GLSelectionData selData = new GLSelectionData(GLAPIListView.ID, time,
+ GLSelectionData selData = new GLSelectionData(GLAPIListTable.ID, time,
time, items, table, startFrameIndex, -1);
AnalyzerManager.getCurrentPage().updatePage(selData);
AnalyzerManager.getCurrentPage().controlSelection(GLAPIListView.ID);
DATableDataFormat dataFormat = (DATableDataFormat) items[0].getData();
long time = dataFormat.getLogData().getTime();
- GLSelectionData selData = new GLSelectionData(GLAPIListView.ID, time,
+ GLSelectionData selData = new GLSelectionData(GLAPIListTable.ID, time,
time, items, table, startFrameIndex, -1);
AnalyzerManager.getCurrentPage().updatePage(selData);
AnalyzerManager.getCurrentPage().controlSelection(GLAPIListView.ID);
@Override
public void updateView() {
- frameChartBoard.setTotalEndTime(GLDataMaker.getInstance().getFrameSize()
+ frameChartBoard.setTotalEndTime(glDataMaker.getFrameSize()
* TimelineConstants.MEGA_LONG);
timeChartBoard.setTotalEndTime(ToolbarArea.getInstance().getTime());
if (id.equals(GLAPIListView.ID)) {
int frameIndex = ((GLSelectionData) data).getFrameIndex();
+ frameChartBoard.setVisibleMiddleTime(frameIndex);
DAChartPlotIntervalMarker intervalMarker = (DAChartPlotIntervalMarker) frameChartBoard
.getMarkers().get(UICommonConstants.SELECTION_MARKER_INDEX);
intervalMarker.setInterval(frameIndex, frameIndex);
+ long start = data.getStartTime();
+ long end = data.getEndTime();
+ Double startTime = start / TimelineConstants.MEGA_DOUBLE;
+ Double endTime = end / TimelineConstants.MEGA_DOUBLE;
+ double middleTime = (startTime + endTime) / 2.0;
+ if (startTime.equals(endTime)) {
+ middleTime = startTime;
+ }
+
+ timeChartBoard.setVisibleMiddleTime(middleTime);
intervalMarker = (DAChartPlotIntervalMarker) timeChartBoard
.getMarkers().get(UICommonConstants.SELECTION_MARKER_INDEX);
- intervalMarker.setInterval(
- glDataMaker.getFrameCountListIndex(frameIndex),
- glDataMaker.getFrameCountListIndex(frameIndex));
+ intervalMarker.setInterval(startTime, endTime);
}
}
import org.tizen.dynamicanalyzer.resources.ColorResources;
import org.tizen.dynamicanalyzer.swap.model.data.LogData;
import org.tizen.dynamicanalyzer.ui.opengl.data.GLSelectionData;
+import org.tizen.dynamicanalyzer.ui.opengl.ui.apiList.GLAPIListTable;
import org.tizen.dynamicanalyzer.ui.opengl.ui.apiList.GLAPIListView;
import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer;
import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
private int[] innerMaxWeight = { 0, 100 };
private int[] outerMaxWeight = { 100, 0 };
private int[] bottomMaxWeight = { 0, 100 };
-
+
private int[] oldBottomLayout = null;
-
+
public GLContextView(Composite parent, int style) {
super(parent, style);
setLayout(new FillLayout());
@Override
public void updateView(DASelectionData data) {
String id = data.getViewId();
- if (id.equals(GLAPIListView.ID) && data instanceof GLSelectionData) {
+ if ((id.equals(GLAPIListView.ID) && data instanceof GLSelectionData)
+ || id.equals(GLAPIListTable.ID)) {
GridItem[] gridItems = (GridItem[]) data.getData();
DATableDataFormat tableDataFormat = (DATableDataFormat) gridItems[0]
.getData();
LogData logData = tableDataFormat.getLogData();
- int frameIndex = ((GLSelectionData)data).getFrameIndex();
+ int frameIndex = ((GLSelectionData) data).getFrameIndex();
String seq = Integer.toString(logData.getSeq());
glContextTreeTable.updateTree(seq);
-
+
viewContainer.setTitleText(GLPageLabels.GL_CONTEXT_VIEW_TITLE + "("
+ frameIndex + "frame #" + seq + ")");
}
}
-
+
@Override
public void clear() {
glContextTreeTable.clear();
viewContainer.setTitleText(GLPageLabels.GL_CONTEXT_VIEW_TITLE);
}
-
+
@Override
public void otherViewSelectionOccured() {
glContextTreeTable.deselectAll();
}
-
+
@Override
public void setMaxSize(boolean maximized) {