use of cbit.xml.merge.NodeInfo in project vcell by virtualcell.
the class TMLPanel method setnodeInfo1.
/**
* Set the nodeInfo1 to a new value.
* @param newValue cbit.xml.merge.NodeInfo
*
*/* WARNING: THIS METHOD WILL BE REGENERATED.
*/
private void setnodeInfo1(NodeInfo newValue) {
if (ivjnodeInfo1 != newValue) {
try {
cbit.xml.merge.NodeInfo oldValue = getnodeInfo1();
ivjnodeInfo1 = newValue;
connEtoC5(ivjnodeInfo1);
firePropertyChange("nodeInfo", oldValue, newValue);
// user code begin {1}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {2}
// user code end
handleException(ivjExc);
}
}
;
// user code begin {3}
// user code end
}
use of cbit.xml.merge.NodeInfo in project vcell by virtualcell.
the class TMLPanel method keepBaseLine.
/**
* This method processes the subnodes of the given Node so that it keeps the baseline remaining nodes.
* Creation date: (9/11/2001 4:55:11 PM)
* @param object java.lang.Object
*/
private void keepBaseLine(Object object) {
if (object != null & object instanceof NodeInfo) {
NodeInfo currentNode = (NodeInfo) object;
DefaultTreeModel defaultTreeModel = (DefaultTreeModel) (getTree().getModel());
if (currentNode.getStatus() != NodeInfo.STATUS_NEW) {
// process himself
currentNode.setStatus(NodeInfo.STATUS_NORMAL);
defaultTreeModel.nodeChanged(currentNode);
// process its subnodes
LinkedList subNodes = new LinkedList();
for (Enumeration enumNodes = currentNode.children(); enumNodes.hasMoreElements(); ) {
subNodes.add(enumNodes.nextElement());
}
Iterator iterator = subNodes.iterator();
while (iterator.hasNext()) {
NodeInfo tempNode = (NodeInfo) iterator.next();
keepBaseLine(tempNode);
}
// update parents of the change
updateParents(currentNode.getParent(), currentNode);
} else {
NodeInfo parentNode = currentNode;
// track the farest parent who has as a status of NEW
while ((parentNode.getParent() != null) && (((NodeInfo) parentNode.getParent()).getStatus() == NodeInfo.STATUS_NEW)) {
parentNode = (NodeInfo) parentNode.getParent();
}
// update parents of the change
updateParents(parentNode, currentNode);
// eliminate that node and its subtree (remove the node of interest, not the parent one).
defaultTreeModel.removeNodeFromParent(currentNode);
}
} else {
throw new IllegalArgumentException("Keep Baseline found an unknown type of node:" + object.getClass().getName());
}
}
use of cbit.xml.merge.NodeInfo in project vcell by virtualcell.
the class TMLPanel method getCurrentModifiedText.
private String getCurrentModifiedText() {
Object object = getTree().getLastSelectedPathComponent();
String modifiedText = "";
if (object instanceof NodeInfo) {
NodeInfo node = (NodeInfo) object;
if (node.getStatus() == NodeInfo.STATUS_CHANGED) {
modifiedText = ((ChangedNodeInfo) node).getModified() != null ? ((ChangedNodeInfo) node).getModified() : "";
} else {
if (node.getStatus() == NodeInfo.STATUS_NEW) {
modifiedText = node.getValue() != null ? node.getValue() : "";
}
}
}
return modifiedText;
}
Aggregations