use of teamdash.hist.BlameModelData 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.BlameModelData in project processdash by dtuma.
the class WBSJTable method setBlameData.
public void setBlameData(BlameData blame) {
BlameModelData blameData = BlameData.getModel(blame, wbsModel.getModelType());
if (this.blameData != blameData) {
if (this.blameData != null)
this.blameData.removeBlameModelDataListener(BLAME_LISTENER);
if (this.blameSelectionListener != null) {
this.blameSelectionListener.dispose();
this.blameSelectionListener = null;
}
this.blameData = blameData;
FILTER_ACTION.setBlameData(blameData);
if (this.blameData != null) {
this.blameData.addBlameModelDataListener(BLAME_LISTENER);
this.blameSelectionListener = new BlameSelectionListener(this, blame);
}
repaint();
}
}
use of teamdash.hist.BlameModelData in project processdash by dtuma.
the class DataJTable method setBlameData.
public void setBlameData(BlameData blame) {
BlameModelData blameData = BlameData.getModel(blame, ((DataTableModel) getModel()).getWBSModel().getModelType());
if (this.blameData != blameData) {
if (this.blameData != null)
this.blameData.removeBlameModelDataListener(BLAME_LISTENER);
if (this.blameSelectionListener != null) {
this.blameSelectionListener.dispose();
this.blameSelectionListener = null;
}
this.blameData = blameData;
if (this.blameData != null) {
this.blameData.addBlameModelDataListener(BLAME_LISTENER);
this.blameSelectionListener = new BlameSelectionListener(this, blame);
}
repaint();
}
}
Aggregations