mirror of
https://github.com/Akomry/sae302_applicom.git
synced 2025-12-06 08:43:54 +00:00
Merge branch '1-nettoyage-des-lignes-inutiles' into 'dev'
chore: retrait des lignes d'import inutiles Closes #1 See merge request iut_rt/but2/sae302-applicom/bouclyma!17
This commit is contained in:
commit
be7c75eaa9
9 changed files with 1 additions and 56 deletions
|
|
@ -3,7 +3,6 @@ package rtgre;
|
|||
import rtgre.chat.ChatApplication;
|
||||
import rtgre.server.ChatServer;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Application pour lancer soit ChatServer, soit ChatApplication
|
||||
|
|
|
|||
|
|
@ -2,14 +2,12 @@ package rtgre.chat;
|
|||
|
||||
import javafx.application.Platform;
|
||||
import javafx.beans.Observable;
|
||||
import javafx.beans.binding.Bindings;
|
||||
import javafx.beans.value.ObservableValue;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.embed.swing.SwingFXUtils;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.event.Event;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.Scene;
|
||||
|
|
@ -17,15 +15,10 @@ import javafx.scene.control.*;
|
|||
import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.input.ContextMenuEvent;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.scene.layout.HBox;
|
||||
import javafx.scene.layout.VBox;
|
||||
import javafx.stage.FileChooser;
|
||||
import javafx.stage.Modality;
|
||||
import javafx.stage.Stage;
|
||||
import net.synedra.validatorfx.Check;
|
||||
import net.synedra.validatorfx.TooltipWrapper;
|
||||
import net.synedra.validatorfx.Validator;
|
||||
import org.json.JSONObject;
|
||||
import rtgre.chat.graphisme.ContactListViewCell;
|
||||
|
|
@ -35,15 +28,12 @@ import rtgre.chat.net.ChatClient;
|
|||
import rtgre.modeles.*;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.util.*;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import net.synedra.validatorfx.Validator;
|
|||
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,25 +1,18 @@
|
|||
package rtgre.chat.graphisme;
|
||||
|
||||
import javafx.embed.swing.SwingFXUtils;
|
||||
import javafx.geometry.Pos;
|
||||
import javafx.scene.control.ListCell;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.layout.HBox;
|
||||
import javafx.scene.layout.Priority;
|
||||
import javafx.scene.layout.StackPane;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.scene.shape.Circle;
|
||||
import javafx.scene.shape.Rectangle;
|
||||
import javafx.scene.text.Font;
|
||||
import javafx.scene.text.Text;
|
||||
import javafx.scene.text.TextAlignment;
|
||||
import rtgre.chat.ChatController;
|
||||
import rtgre.modeles.Contact;
|
||||
import rtgre.modeles.Room;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
|
||||
import static rtgre.chat.ChatApplication.LOGGER;
|
||||
|
||||
/**
|
||||
|
|
@ -91,11 +84,7 @@ public class RoomListViewCell extends ListCell<Room> {
|
|||
|
||||
StackPane stack = new StackPane();
|
||||
stack.getChildren().addAll(rectangle, new Text(room.abbreviation()));
|
||||
/*
|
||||
if (contact.getAvatar() != null) {
|
||||
avatar = SwingFXUtils.toFXImage((BufferedImage) contact.getAvatar(), null);
|
||||
view = new ImageView(avatar);
|
||||
}*/
|
||||
|
||||
HBox temp = new HBox(stack);
|
||||
temp.setAlignment(Pos.CENTER_LEFT);
|
||||
HBox.setHgrow(roomText, Priority.ALWAYS);
|
||||
|
|
|
|||
|
|
@ -8,9 +8,7 @@ import rtgre.modeles.Event;
|
|||
import rtgre.modeles.Message;
|
||||
import rtgre.modeles.Post;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import static rtgre.chat.ChatApplication.LOGGER;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,9 @@
|
|||
package rtgre.chat.net;
|
||||
|
||||
import rtgre.chat.ChatController;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.Socket;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.LogManager;
|
||||
import static rtgre.chat.ChatApplication.LOGGER;
|
||||
|
||||
/**
|
||||
|
|
@ -47,16 +44,6 @@ public class ClientTCP {
|
|||
*/
|
||||
protected boolean connected;
|
||||
|
||||
/*
|
||||
static {
|
||||
try {
|
||||
InputStream is = ClientTCP.class.getClassLoader()
|
||||
.getResource("rtgre/chat/logging.properties").openStream();
|
||||
LogManager.getLogManager().readConfiguration(is);
|
||||
} catch (Exception e) {
|
||||
LOGGER.log(Level.INFO, "Cannot read configuration file", e);
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* Programme principal [Déprécié]
|
||||
|
|
@ -64,18 +51,6 @@ public class ClientTCP {
|
|||
* @throws Exception Si la connexion échoue
|
||||
*/
|
||||
public static void main(String[] args) throws Exception {
|
||||
/*
|
||||
ClientTCP client = new ClientTCP("localhost", 2024);
|
||||
|
||||
// Essai simple d'émission / réception d'une chaine de caractères
|
||||
String message = "Hello World!";
|
||||
System.out.println(BLUE + "Envoi :" + message + RST);
|
||||
client.send(message);
|
||||
message = client.receive();
|
||||
System.out.println(RED + "Réception: " + message + RST);
|
||||
|
||||
client.close();
|
||||
*/
|
||||
|
||||
ClientTCP client = new ClientTCP("localhost", 2024);
|
||||
Thread envoi = new Thread(client::sendLoop);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ package rtgre.modeles;
|
|||
import org.json.JSONObject;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
package rtgre.modeles;
|
||||
|
||||
import javax.xml.transform.Result;
|
||||
import java.io.File;
|
||||
import java.sql.*;
|
||||
import java.util.UUID;
|
||||
import org.sqlite.JDBC;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package rtgre.server;
|
||||
|
||||
import javafx.scene.chart.PieChart;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import rtgre.chat.ChatController;
|
||||
|
|
@ -14,7 +13,6 @@ import java.nio.charset.StandardCharsets;
|
|||
import java.util.Vector;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.LogManager;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import static rtgre.chat.ChatApplication.LOGGER;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue