Skip to content

Commit 3014698

Browse files
committed
frist commit
0 parents  commit 3014698

File tree

99 files changed

+4982
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+4982
-0
lines changed

.gitignore

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
# ---> Eclipse
2+
3+
.metadata
4+
bin/
5+
tmp/
6+
*.tmp
7+
*.bak
8+
*.swp
9+
*~.nib
10+
local.properties
11+
.settings/
12+
.loadpath
13+
.recommenders
14+
*application-local.properties
15+
16+
# External tool builders
17+
.externalToolBuilders/
18+
19+
# Locally stored "Eclipse launch configurations"
20+
*.launch
21+
22+
# PyDev specific (Python IDE for Eclipse)
23+
*.pydevproject
24+
25+
# CDT-specific (C/C++ Development Tooling)
26+
.cproject
27+
28+
# CDT- autotools
29+
.autotools
30+
31+
# Java annotation processor (APT)
32+
.factorypath
33+
34+
# PDT-specific (PHP Development Tools)
35+
.buildpath
36+
37+
# sbteclipse plugin
38+
.target
39+
40+
# Tern plugin
41+
.tern-project
42+
43+
# TeXlipse plugin
44+
.texlipse
45+
46+
# STS (Spring Tool Suite)
47+
.springBeans
48+
49+
# Code Recommenders
50+
.recommenders/
51+
52+
# Annotation Processing
53+
.apt_generated/
54+
55+
# Scala IDE specific (Scala & Java development for Eclipse)
56+
.cache-main
57+
.scala_dependencies
58+
.worksheet
59+
60+
# ---> Maven
61+
target/
62+
pom.xml.tag
63+
pom.xml.releaseBackup
64+
pom.xml.versionsBackup
65+
pom.xml.next
66+
release.properties
67+
dependency-reduced-pom.xml
68+
buildNumber.properties
69+
.mvn/timing.properties
70+
.mvn/wrapper/maven-wrapper.jar
71+
72+
# ---> Java
73+
# Compiled class file
74+
*.class
75+
76+
# Log file
77+
*.log
78+
79+
# BlueJ files
80+
*.ctxt
81+
82+
# Mobile Tools for Java (J2ME)
83+
.mtj.tmp/
84+
85+
# Package Files #
86+
*.jar
87+
*.war
88+
*.nar
89+
*.ear
90+
*.zip
91+
*.tar.gz
92+
*.rar
93+
94+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
95+
hs_err_pid*
96+
97+
# ---> JetBrains
98+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
99+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
100+
101+
# User-specific stuff
102+
.idea/**/workspace.xml
103+
.idea/**/tasks.xml
104+
.idea/**/usage.statistics.xml
105+
.idea/**/dictionaries
106+
.idea/**/shelf
107+
108+
# Generated files
109+
.idea/**/contentModel.xml
110+
111+
# Sensitive or high-churn files
112+
.idea/**/dataSources/
113+
.idea/**/dataSources.ids
114+
.idea/**/dataSources.local.xml
115+
.idea/**/sqlDataSources.xml
116+
.idea/**/dynamic.xml
117+
.idea/**/uiDesigner.xml
118+
.idea/**/dbnavigator.xml
119+
120+
# Gradle
121+
.idea/**/gradle.xml
122+
.idea/**/libraries
123+
124+
# Gradle and Maven with auto-import
125+
# When using Gradle or Maven with auto-import, you should exclude module files,
126+
# since they will be recreated, and may cause churn. Uncomment if using
127+
# auto-import.
128+
# .idea/modules.xml
129+
# .idea/*.iml
130+
# .idea/modules
131+
132+
# CMake
133+
cmake-build-*/
134+
135+
# Mongo Explorer plugin
136+
.idea/**/mongoSettings.xml
137+
138+
# File-based project format
139+
*.iws
140+
141+
# IntelliJ
142+
out/
143+
144+
# mpeltonen/sbt-idea plugin
145+
.idea_modules/
146+
147+
# JIRA plugin
148+
atlassian-ide-plugin.xml
149+
150+
# Cursive Clojure plugin
151+
.idea/replstate.xml
152+
153+
# Crashlytics plugin (for Android Studio and IntelliJ)
154+
com_crashlytics_export_strings.xml
155+
crashlytics.properties
156+
crashlytics-build.properties
157+
fabric.properties
158+
159+
# Editor-based Rest Client
160+
.idea/httpRequests
161+
162+
# Android studio 3.1+ serialized cache file
163+
.idea/caches/build_file_checksums.ser
164+
165+
# other idea settings
166+
167+
*.iml
168+
.idea/*
169+
.svn
170+
APP_HOME_IS_UNDEFINED/

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# EasyChat JavaFx Client
2+
3+
* 该应用采用JavaFx netty框架实现,JavaFx实现了简单显示界面,netty实现了跟后台的tcp通信
4+
5+
## 使用说明
6+
1. 需要结合EasyChat Server后端一起使用
7+
2. 按照后端的要求先将后端启动起来
8+
3. 然后配置ServerConf类里面的后端服务器ip
9+
4. 具体流程参考后端提供的接口文档,有较为详细的说明

pom.xml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<groupId>com.easychat</groupId>
6+
<artifactId>fx-client</artifactId>
7+
<version>0.0.1-SNAPSHOT</version>
8+
<name>fx-client</name>
9+
<description>fx-client</description>
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<properties>
13+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
14+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
15+
<java.version>1.8</java.version>
16+
<maven.compiler.source>1.8</maven.compiler.source>
17+
<maven.compiler.target>1.8</maven.compiler.target>
18+
</properties>
19+
20+
21+
<dependencies>
22+
<dependency>
23+
<groupId>io.netty</groupId>
24+
<artifactId>netty-all</artifactId>
25+
<version>4.1.38.Final</version>
26+
</dependency>
27+
28+
<dependency>
29+
<groupId>org.projectlombok</groupId>
30+
<artifactId>lombok</artifactId>
31+
<version>1.18.8</version>
32+
</dependency>
33+
34+
<dependency>
35+
<groupId>com.alibaba</groupId>
36+
<artifactId>fastjson</artifactId>
37+
<version>1.2.59</version>
38+
</dependency>
39+
<dependency>
40+
<groupId>com.squareup.okhttp3</groupId>
41+
<artifactId>okhttp</artifactId>
42+
<version>4.0.1</version>
43+
</dependency>
44+
45+
</dependencies>
46+
47+
</project>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.easychat.fx.bean;
2+
3+
import lombok.Data;
4+
5+
/**
6+
* @author: Zed
7+
* date: 2019/08/28.
8+
* description:
9+
*/
10+
@Data
11+
public class AcceptCache {
12+
private String senderId;
13+
private String groupId;
14+
private String dateTime;
15+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package com.easychat.fx.bean;
2+
3+
/**
4+
* @author: Zed
5+
* date: 2019/08/26.
6+
* description:
7+
*/
8+
public interface Constants {
9+
String message_type_user = "message_type_user";
10+
String message_type_group = "message_type_group";
11+
int MAX_LINE = 2000;
12+
int PAGESIZE = 10;
13+
int CACHE_PAGESIZE = 20;
14+
String PATH = "messageCache";
15+
String IMAGE_PATH = "imagePath";
16+
String PATH_USER = "user";
17+
String PATH_GROUP = "group";
18+
19+
int STRING_TYPE = 0;
20+
int IMAGE_TYPE = 1;
21+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package com.easychat.fx.bean;
2+
3+
import com.easychat.fx.controller.Cache;
4+
import lombok.Data;
5+
6+
/**
7+
* @author: Zed
8+
* date: 2019/08/22.
9+
* description:
10+
*/
11+
@Data
12+
public class Group {
13+
private String groupId;
14+
private String groupName;
15+
private String mainUserId;
16+
17+
18+
@Override
19+
public String toString() {
20+
Integer num = Cache.groupMessageNumMap.get(groupId);
21+
if (num == null || num == 0) {
22+
return groupName;
23+
} else {
24+
return groupName + " " + num + "未读";
25+
}
26+
}
27+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.easychat.fx.bean;
2+
3+
import lombok.Data;
4+
5+
/**
6+
* @author: Zed
7+
* date: 2019/08/26.
8+
* description:
9+
*/
10+
@Data
11+
public class MessageCache {
12+
private String messageType;
13+
private User messageUser;
14+
private Group messageGroup;
15+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package com.easychat.fx.bean;
2+
3+
import lombok.*;
4+
5+
import java.io.Serializable;
6+
import java.util.List;
7+
8+
/**
9+
* @author Zed
10+
* date: 2019/08/22.
11+
* description: 分页返回model
12+
*/
13+
@Data
14+
@Builder
15+
@AllArgsConstructor
16+
@NoArgsConstructor
17+
public class PageResult<T> implements Serializable {
18+
19+
/**
20+
*
21+
*/
22+
private static final long serialVersionUID = 1L;
23+
/**
24+
* 总记录数
25+
*/
26+
private int totalRecord;
27+
/**
28+
* 记录
29+
*/
30+
private List<T> records;
31+
/**
32+
* 是否有下一页
33+
*/
34+
private boolean hasNext;
35+
36+
/**
37+
* 总页数
38+
*/
39+
private int pages;
40+
41+
private int currentPage;
42+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.easychat.fx.bean;
2+
3+
import lombok.AllArgsConstructor;
4+
import lombok.Builder;
5+
import lombok.Data;
6+
import lombok.NoArgsConstructor;
7+
8+
/**
9+
* Description: 结果
10+
* Created by Zed on 2019/01/02.
11+
*/
12+
@Data
13+
@Builder
14+
@NoArgsConstructor
15+
@AllArgsConstructor
16+
public class Result<T> {
17+
18+
// 结果状态
19+
private String code;
20+
// 结果消息
21+
private String desc;
22+
private T data;
23+
}

0 commit comments

Comments
 (0)