Skip to content

Commit 7e99235

Browse files
Making it so that the nodes are different colors depending on whether or not they're a basic/case/contradiction/ rule
1 parent 88d6a8f commit 7e99235

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/main/java/edu/rpi/legup/history/AutoCaseRuleCommand.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public void executeCommand() {
6363
final TreeViewSelection newSelection = new TreeViewSelection();
6464

6565
TreeNode node = (TreeNode) selection.getFirstSelection().getTreeElement();
66+
node.markAsCaseRule();//See TreeNode.java:17
6667
if (caseTrans.isEmpty()) {
6768
List<Board> cases =
6869
caseRule.getCases(caseBoard.getBaseBoard(), elementView.getPuzzleElement());

src/main/java/edu/rpi/legup/model/tree/TreeNode.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,19 @@ public class TreeNode extends TreeElement {
1414
private List<TreeTransition> children;
1515
private boolean isRoot;
1616

17+
/**
18+
* This group of member variables and functions is here so that the nodes on the tree will have different
19+
* colors depending on what flavor or rule they are supposed to represent, or some other mark on them.
20+
*
21+
* This is intended as a minor UI improvement.
22+
*
23+
* This is a work in progress, the implementation of this functionality is NOT complete.
24+
* */
25+
private boolean isBasicRule;
26+
private boolean isCaseRule;
27+
private boolean isContrRule;
28+
public void markAsCaseRule(){this.isCaseRule=true;}
29+
1730
/**
1831
* TreeNode Constructor creates a tree node whenever a rule has been made
1932
*

0 commit comments

Comments
 (0)