use of teamdash.hist.BlameNodeData in project processdash by dtuma.
the class WBSJTable method prepareRenderer.
@Override
public Component prepareRenderer(TableCellRenderer renderer, int row, int column) {
Component result = super.prepareRenderer(renderer, row, column);
boolean needsBlameAnnotation = false;
BlameNodeData blame = getBlameDataForRow(row);
if (blame != null) {
column = convertColumnIndexToModel(column);
if (column == 0) {
needsBlameAnnotation = blame.hasStructuralChange();
} else if (dataModel != null) {
String columnID = dataModel.getColumn(column).getColumnID();
needsBlameAnnotation = blame.isColumnAffected(columnID);
}
}
if (needsBlameAnnotation)
BlameAnnotationBorder.annotate(result);
return result;
}
use of teamdash.hist.BlameNodeData in project processdash by dtuma.
the class BlameHistoryDialog method setBlameComments.
private boolean setBlameComments(BlameCaretPos caretPos) {
breadcrumb.clear();
blameChanges.clearRows();
dataProblems.setCurrentNode(null);
rejectAction.setEnabled(false);
if (caretPos == null || blameData == null)
return false;
if (!caretPos.isSingleCell()) {
int numChanges = blameData.countAnnotations(caretPos);
String message = resources.format("Message.Multiple_FMT", numChanges);
blameChanges.showMessage(message);
return numChanges > 0;
}
ModelType modelType = caretPos.getModelType();
BlameModelData modelData = blameData.get(modelType);
if (modelData == null)
return false;
Integer nodeID = caretPos.getSingleNode();
BlameNodeData nodeData = modelData.get(nodeID);
if (nodeData == null)
return false;
WBSNode node = wbsDataModel.getWBSModel().getNodeMap().get(nodeID);
String nodePath = (node == null ? null : node.getFullName());
String columnID = caretPos.getSingleColumn();
if (WBSNodeColumn.COLUMN_ID.equals(columnID)) {
breadcrumb.setPath(nodePath, null);
blameChanges.setBlameNodeStructure(nodeData);
dataProblems.setCurrentNode(nodeID);
rejectAction.setEnabled(true);
return nodeData.hasStructuralChange();
}
if (nodeData.getAttributes() == null)
return false;
for (BlameValueList val : nodeData.getAttributes().values()) {
if (val.columnMatches(columnID)) {
int col = wbsDataModel.findColumn(columnID);
String columnName = wbsDataModel.getColumnName(col);
breadcrumb.setPath(nodePath, columnName);
blameChanges.setBlameValueList(val);
dataProblems.setCurrentNode(nodeID);
rejectAction.setEnabled(true);
return true;
}
}
return false;
}
use of teamdash.hist.BlameNodeData in project processdash by dtuma.
the class DataJTable method prepareRenderer.
@Override
public Component prepareRenderer(TableCellRenderer renderer, int row, int column) {
Component result = super.prepareRenderer(renderer, row, column);
BlameNodeData blame = getBlameDataForRow(row);
if (blame != null) {
DataTableModel dataModel = (DataTableModel) getModel();
column = convertColumnIndexToModel(column);
String columnID = dataModel.getColumn(column).getColumnID();
if (blame.isColumnAffected(columnID))
BlameAnnotationBorder.annotate(result);
}
return result;
}
Aggregations