Skip to content

Commit 149f544

Browse files
committed
Cleanup. Rename.
1 parent de29917 commit 149f544

File tree

5 files changed

+15
-11
lines changed

5 files changed

+15
-11
lines changed

.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>treeviewer</name>
3+
<name>parsetreeviewer</name>
44
<comment></comment>
55
<projects>
66
</projects>

parsetree.PNG

71.4 KB
Loading

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>project.umami</groupId>
5-
<artifactId>treeviewer</artifactId>
5+
<artifactId>parsetreeviewer</artifactId>
66
<version>1.0-SNAPSHOT</version>
77
<properties>
88
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -42,9 +42,9 @@
4242
<version>0.0.3</version>
4343
<configuration>
4444
<release>12</release>
45-
<jlinkImageName>treeviewer</jlinkImageName>
46-
<launcher>treeviewer</launcher>
47-
<mainClass>treeviewer/project.umami.App</mainClass>
45+
<jlinkImageName>parsetreeviewer</jlinkImageName>
46+
<launcher>parsetreeviewer</launcher>
47+
<mainClass>parsetreeviewer/project.umami.App</mainClass>
4848
</configuration>
4949
</plugin>
5050
</plugins>

src/main/java/module-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module treeviewer {
1+
module parsetreeviewer {
22
requires javafx.controls;
33
requires javafx.fxml;
44
requires com.fasterxml.jackson.databind;

src/main/java/project/umami/App.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@
4242
import javafx.stage.Stage;
4343

4444
/**
45-
* JavaFX App
45+
* Parse Tree visualization
46+
*
47+
* To compile and run:
48+
* mvn clean compile javafx:run
4649
*/
4750
public class App extends Application
4851
{
@@ -103,7 +106,7 @@ public void start(Stage primaryStage)
103106
Group textDataGroup = null;
104107
Rectangle r = null;
105108

106-
109+
// Internal nodes
107110
Color nodeColor = Color.rgb(0, 0, 200, 0.90);
108111

109112

@@ -126,9 +129,8 @@ public void start(Stage primaryStage)
126129

127130
if (childsChildren == null)
128131
{
129-
{
130-
nodeColor = Color.rgb(0, 200, 0, 1.0);
131-
}
132+
// Node immediately above a leaf.
133+
nodeColor = Color.rgb(0, 200, 0, 1.0);
132134
}
133135
}
134136
}
@@ -187,10 +189,12 @@ public void start(Stage primaryStage)
187189
{
188190
if (node.getData().compareTo("<epsilon>") == 0)
189191
{
192+
// Epsilon node
190193
r.setFill(Color.rgb(25, 25, 25, 1.0));
191194
}
192195
else
193196
{
197+
// Leaf node
194198
r.setFill(Color.rgb(255, 0, 0, 1.0));
195199
}
196200
}

0 commit comments

Comments
 (0)