Skip to content

Commit 3154459

Browse files
author
magiclu550
committed
finish client
1 parent 905d695 commit 3154459

File tree

12 files changed

+145
-9
lines changed

12 files changed

+145
-9
lines changed

.idea/JSmod2-Panel.iml

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/compiler.xml

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/Maven__com_alibaba_fastjson_1_2_47.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/Maven__io_netty_netty_all_5_0_0_Alpha1.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pom.xml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,41 @@
2020
<version>1.2.47</version>
2121
</dependency>
2222
</dependencies>
23+
<build>
24+
<plugins>
25+
<plugin>
26+
<groupId>net.alchim31.maven</groupId>
27+
<artifactId>scala-maven-plugin</artifactId>
28+
<version>3.2.2</version>
29+
<executions>
30+
<execution>
31+
<id>scala-compile-first</id>
32+
<phase>process-resources</phase>
33+
<goals>
34+
<goal>add-source</goal>
35+
<goal>compile</goal>
36+
</goals>
37+
</execution>
38+
<execution>
39+
<id>scala-test-compile</id>
40+
<phase>process-test-resources</phase>
41+
<goals>
42+
<goal>testCompile</goal>
43+
</goals>
44+
</execution>
45+
</executions>
46+
</plugin>
47+
<plugin>
48+
<groupId>org.apache.maven.plugins</groupId>
49+
<artifactId>maven-compiler-plugin</artifactId>
50+
<version>3.2</version>
51+
<configuration>
52+
<source>1.8</source>
53+
<target>1.8</target>
54+
<encoding>UTF-8</encoding>
55+
</configuration>
56+
</plugin>
2357

58+
</plugins>
59+
</build>
2460
</project>

src/main/java/cn/jsmod2/client/ConsoleOutputStream.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
* @Version: 1.0
1515
*/
1616
public class ConsoleOutputStream extends OutputStream {
17+
18+
static {
19+
stream = new ConsoleOutputStream();
20+
}
21+
22+
private static ConsoleOutputStream stream;
23+
1724
private TextArea textArea;
1825
private int lineHeight = 100;
1926
private volatile boolean scroll = true;
@@ -42,7 +49,7 @@ public void write(byte[] b) throws IOException {
4249
}
4350
}
4451

45-
public void write(String string) throws IOException {
52+
public void write(String string){
4653
if (textArea == null) {
4754
return;
4855
}
@@ -79,4 +86,8 @@ public void setScroll(boolean scroll) {
7986
public void setTextArea(TextArea textArea) {
8087
this.textArea = textArea;
8188
}
89+
90+
public static ConsoleOutputStream getStream() {
91+
return stream;
92+
}
8293
}

src/main/java/cn/jsmod2/client/Main.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static void main(String[] args) {
1414

1515
@Override
1616
public void start(Stage primaryStage) throws Exception {
17-
Parent root = FXMLLoader.load(getClass().getResource("/ui/start.fxml"));
17+
Parent root = FXMLLoader.load(getClass().getClassLoader().getResource("start.fxml"));
1818
primaryStage.setTitle("Jsmod2-Control-Panel");
1919
primaryStage.setResizable(false);
2020
primaryStage.setScene(new Scene(root, 650, 450));

0 commit comments

Comments
 (0)