itemList.setSize(itemListScrollComp.getClientArea().width, listHeight);
}
- public DAChartBoardItemList getChartComposite() {
+ public DAChartBoardItemList getItemList() {
return itemList;
}
protected double heightRatio;
protected boolean childFolded = true;
- private boolean isHide = false;
+ private boolean isHidden = false;
private final static int DEFAULT_ITEM_HEIGHT = 80;
public final static int DEFAULT_NAME_CELL_WIDTH = 99;
}
public DAChartBoardItem(DAChartBoard parent, String itemName) {
- super(parent.getChartComposite(), SWT.NONE);
+ super(parent.getItemList(), SWT.NONE);
parentBoard = parent;
initWidget(itemName, null, DAChart.CHART_STYLE_NORMAL);
parentBoard.registerItem(this);
public DAChartBoardItem(DAChartBoard parent, String itemName, Image icon,
int chartStyle) {
- super(parent.getChartComposite(), SWT.NONE);
+ super(parent.getItemList(), SWT.NONE);
parentBoard = parent;
initWidget(itemName, icon, chartStyle);
parentBoard.registerItem(this);
itemCell.contentsClear();
}
- boolean setHide(boolean isHide) {
- if (this.isHide == isHide) {
- return false;
- } else {
- this.isHide = isHide;
- if (false == isHide) {
- FormData data = (FormData) itemCell.getLayoutData();
- data.height = getItemHeight();
- itemCell.setLayoutData(data);
- this.layout();
- }
- return true;
- }
+ boolean isHidden() {
+ return isHidden;
+ }
+
+ void hide() {
+ isHidden = true;
+ }
+
+ void show() {
+ isHidden = false;
+ FormData data = (FormData) itemCell.getLayoutData();
+ data.height = getItemHeight();
+ itemCell.setLayoutData(data);
+ this.layout();
+
+ refreshItemCellHeight();
+ callNotifyResizeChild();
}
int getItemHeight() {
- if (isHide) {
+ if (isHidden) {
return 0;
} else if (childFolded) {
return (int) (heightRatio * DEFAULT_ITEM_HEIGHT);
public void hideItem(int index) {
DAChartBoardItem child = childItems.get(index);
- if (true == child.setHide(true)) {
+ if(!child.isHidden()) {
+ child.hide();
FormData data = (FormData) child.getLayoutData();
data.height = 0;
child.setLayoutData(data);
}
public void showItem(int index) {
- DAChartBoardItem child = childItems.get(index);
+ DAChartBoardItem childItem = childItems.get(index);
- if (true == child.setHide(false)) {
- int height = child.getItemHeight();
- FormData data = (FormData) child.getLayoutData();
+ if (childItem.isHidden()) {
+ childItem.show();
+ int height = childItem.getItemHeight();
+ FormData data = (FormData) childItem.getLayoutData();
data.height = height;
- child.setLayoutData(data);
+ childItem.setLayoutData(data);
}
this.layout();
}
options[i] = EMPTY;
if (i == GLContextDBEnum.FRAME_INDEX.ordinal()) {
types[i] = INTEGER;
+ } else if (i == GLContextDBEnum.SHADER_SRC.ordinal()) {
+ types[i] = "VARCHAR(20000)";
+ } else if (i == GLContextDBEnum.SHADER_TYPE.ordinal()) {
+ types[i] = "VARCHAR(20000)";
+ } else if (i == GLContextDBEnum.PROGRAM_ATTRIB_NAME.ordinal()) {
+ types[i] = "VARCHAR(20000)";
+ } else if (i == GLContextDBEnum.PROGRAM_ATTRIB_TYPE.ordinal()) {
+ types[i] = "VARCHAR(20000)";
+ } else if (i == GLContextDBEnum.PROGRAM_UNIFORM_NAME.ordinal()) {
+ types[i] = "VARCHAR(20000)";
+ } else if (i == GLContextDBEnum.PROGRAM_UNIFORM_TYPE.ordinal()) {
+ types[i] = "VARCHAR(20000)";
+ } else if (i == GLContextDBEnum.TEXTURE_OBJ_MIN_FUNC.ordinal()) {
+ types[i] = "VARCHAR(20000)";
} else {
types[i] = TEXT;
}
}
private void chartFilteringByPId() {
- if(null == board || null == board.getChartComposite()){
+ if(null == board || null == board.getItemList()){
return;
}
int selectedPid = ToolbarArea.getInstance().getSelectedPid();
}
if (isCheck) {
- int parentSize = board.getChartComposite().getItemSize();
+ int parentSize = board.getItemList().getItemSize();
for (int i = 0; i < parentSize; i++) {
- DAChartBoardItem parentItem = board.getChartComposite().get(i);
+ DAChartBoardItem parentItem = board.getItemList().get(i);
int childSize = parentItem.getChildItemList().getItemSize();
int hidedCount = 0;
for (int j = 0; j < childSize; j++) {
}
private void rearrangeChart() {
- DAChartBoardItemList itemList = contextChart.getChartComposite();
+ DAChartBoardItemList itemList = contextChart.getItemList();
int listsize = itemList.getItemSize();
TreeMap<KernelDataPerThread, Integer> sortedmap = new TreeMap<KernelDataPerThread, Integer>(
}
private void chartFilteringByPId() {
- if(null == board || null == board.getChartComposite()){
+ if(null == board || null == board.getItemList()){
return;
}
int selectedPid = ToolbarArea.getInstance().getSelectedPid();
}
if (isCheck) {
- int parentSize = board.getChartComposite().getItemSize();
+ int parentSize = board.getItemList().getItemSize();
for (int i = 0; i < parentSize; i++) {
- DAChartBoardItem parentItem = board.getChartComposite().get(i);
+ DAChartBoardItem parentItem = board.getItemList().get(i);
int childSize = parentItem.getChildItemList().getItemSize();
int hidedCount = 0;
for (int j = 0; j < childSize; j++) {
private void hideUnConnectedItem() {
if (isUnknownChart == true && isAddressChart == true) {
- int parentSize = board.getChartComposite().getItemSize();
+ int parentSize = board.getItemList().getItemSize();
for (int i = 0; i < parentSize; i++) {
- DAChartBoardItem parentItem = board.getChartComposite().get(i);
+ DAChartBoardItem parentItem = board.getItemList().get(i);
NetworkChartData itme = (NetworkChartData) parentItem.getData();
if (itme.getChartKeyName().equals(
NetworkPageLabels.NETWORK_CHART_NOTCONNECT)) {
updateTree();
table.setSelection(selectionIndex);
- if (!naviButtonLeftComposite.isDisposed()) {
+ if (naviButtonLeftComposite != null
+ && !naviButtonLeftComposite.isDisposed()) {
naviButtonLeftComposite
.setBackground(ColorResources.TABLE_CONTENTS_SELECTED_END);
}
- if (!naviButtonRightComposite.isDisposed()) {
+ if (naviButtonRightComposite != null
+ && !naviButtonRightComposite.isDisposed()) {
naviButtonRightComposite
.setBackground(ColorResources.TABLE_CONTENTS_SELECTED_END);
}
}
private void chartFilteringByPid() {
- if(null == board || null == board.getChartComposite()){
+ if(null == board || null == board.getItemList()){
return;
}
int selectedPid = ToolbarArea.getInstance().getSelectedPid();
}
if (isCheck) {
- int parentSize = board.getChartComposite().getItemSize();
+ int parentSize = board.getItemList().getItemSize();
for (int i = 0; i < parentSize; i++) {
- DAChartBoardItem parentItem = board.getChartComposite().get(i);
+ DAChartBoardItem parentItem = board.getItemList().get(i);
/*
int childSize = parentItem.getChildItemList().getItemSize();
int hidedCount = 0;
int itemPid = getItemPid(parentItem);
if (itemPid == selectedPid) {
board.showItem(i);
+// for(int j = 0; j < parentItem.getChildItemList().getItemSize(); j++) {
+// parentItem.getChildItemList().showItem(j);
+// }
} else if (selectedPid == 0) {
board.showItem(i);
} else if (itemPid == -1) {
}
private void chartFilteringByPid() {
- if(null == board || null == board.getChartComposite()){
+ if(null == board || null == board.getItemList()){
return;
}
int selectedPid = ToolbarArea.getInstance().getSelectedPid();
}
if (isCheck) {
- int parentSize = board.getChartComposite().getItemSize();
+ int parentSize = board.getItemList().getItemSize();
for (int i = 0; i < parentSize; i++) {
- DAChartBoardItem parentItem = board.getChartComposite().get(i);
+ DAChartBoardItem parentItem = board.getItemList().get(i);
/*
int childSize = parentItem.getChildItemList().getItemSize();
int hidedCount = 0;
import java.util.Map;
import org.eclipse.swt.widgets.Display;
+import org.tizen.dynamicanalyzer.common.CommonConstants;
import org.tizen.dynamicanalyzer.nl.TimelineChartLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
import org.tizen.dynamicanalyzer.resources.FontResources;
@Override
public DAChartBoardItem createBoardItem(DAChartBoard board) {
chartBoard = board;
-
+
item = super.createBoardItem(board);
chart.addSeries(totalLoadSeries);
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
- processItem = new DAChartBoardHeightChangeableItem(item, "Processes");
+ processItem = new DAChartBoardHeightChangeableItem(item,
+ "Processes");
processItem.useExpand(false);
DAChart processesChart = processItem.getChart();
- processesChart.setChartRenderer(new ProcessesChartRenderer());
+ processesChart
+ .setChartRenderer(new ProcessesChartRenderer());
DAChartPlot processChartPlot = processesChart.getPlot();
DAChartPlotTooltip tooltip = new DAChartPlotTooltip(-1);
- processChartPlot.setBackgroundImage(ImageResources.BG_GRADIENT);
+ processChartPlot
+ .setBackgroundImage(ImageResources.BG_GRADIENT);
tooltip.setFont(FontResources.CHART_TOOLTIP_FONT);
processChartPlot.setTooltip(tooltip);
processChartPlot.setAxisFont(FontResources.CHART_AXIS_FONT);
});
}
- int max = 20;
- String[] processLoadDatas = new String[max * 2];
- for(int i = 1; i <= max * 2; i++) {
- processLoadDatas[i - 1] = Integer.toString(i);
- processLoadDatas[++i - 1] = Integer.toString(1);
- }
+ String[] processLoadDatas = logData.getProcessLoad().split(
+ CommonConstants.COMMA);
int prevChildSize = childSeriesMap.size();
for (int i = 0; i < processLoadDatas.length; i++) {
String processLoad = processLoadDatas[i];
- if (null == processLoad || processLoad.isEmpty()) {
+ if (processLoad == null || processLoad.isEmpty()) {
continue;
}
int pid = Integer.parseInt(processLoad);
ColorResources.SERIES_COLOR_CPU_SYSTEM);
newSeries.addSeriesItem(new DAChartSeriesItem(time, load,
Formatter.toPercentageFormat(load)));
- //FIXME debug
try {
processItem.getChart().addSeries(newSeries);
} catch (NullPointerException e) {
@Override
public void run() {
int size = childSeriesMap.size();
- if(size > 1) {
+ if (size > 1) {
processItem.getChart().getPlot().setShowAxis(false);
}
-
+
if (size > 3) {
processItem.setHeightRatio(size / 3.0);
}
/** for debug */
BinaryInfo binInfo1 = processInfo.getTargetBinary(input.getPcAddr());
if (binInfo1 == null) {
- System.out.println("msg id : " + toHexdecimal(input.getId())
- + " pid : " + processInfo.getPid() + " low : "
- + toHexdecimal(processInfo.getLowestAddress())
- + " input addr : " + toHexdecimal(input.getPcAddr())
- + " high : "
- + toHexdecimal(processInfo.getHighestAddress()));
+// System.out.println("msg id : " + toHexdecimal(input.getId())
+// + " pid : " + processInfo.getPid() + " low : "
+// + toHexdecimal(processInfo.getLowestAddress())
+// + " input addr : " + toHexdecimal(input.getPcAddr())
+// + " high : "
+// + toHexdecimal(processInfo.getHighestAddress()));
return null;
}
// String binPath1 = binInfo1.getTargetBinaryPath();