* Add an additional instance of {@link ExperimentVariables} to the
* {@link BaseExperiment}.
*/
void addAdditionalExpLevel() {
ExperimentVariables parentLevel = getExperiment().getExperimentVariables();
if (parentLevel == null) {
ExperimentVariables expVars = new ExperimentVariables();
getExperiment().setExperimentVariables(expVars);
DefaultMutableTreeNode root = treeNodeMap.get(getExperiment());
DefaultMutableTreeNode newChild = new DefaultMutableTreeNode(expVars);
treeNodeMap.put(expVars, newChild);
((DefaultTreeModel) experimentTree.getModel()).insertNodeInto(newChild,
root, getNextFreePos(root));
return;
}
while (parentLevel.getSubLevel() != null) {
parentLevel = parentLevel.getSubLevel();
}
ExperimentVariables expVars = new ExperimentVariables();
parentLevel.setSubLevel(expVars);
DefaultMutableTreeNode parentNode = treeNodeMap.get(parentLevel);
DefaultMutableTreeNode newChild = new DefaultMutableTreeNode(expVars);
treeNodeMap.put(expVars, newChild);
((DefaultTreeModel) experimentTree.getModel()).insertNodeInto(newChild,