Revert "Merge pull request 'release/facade.v2.0.0' (#2) from release/facade.v2.0.0 into main"
This reverts commit2e50dacee7, reversing changes made to7c9e61ce0f. Desfazendo o merge para testar os plugins
This commit is contained in:
1 parent
2e50dacee7
commit
9b45d515ba
31 files changed
+133
-715
No files matched your search
@@ -0,0 +1,6 @@
|
||||
#Fri, 02 Oct 2026 20:11:21 -0300
|
||||
|
||||
|
||||
C\:\\Users\\extre\\OneDrive\\Documentos\\Faculdade\\2026_02\\Monitoria\\Pitiupi\\pitiupi.chat=
|
||||
|
||||
C\:\\Users\\extre\\OneDrive\\Documentos\\Faculdade\\2026_02\\Monitoria\\Pitiupi\\pitiupi=
|
||||
@@ -0,0 +1 @@
|
||||
pitiupi.chat.plugin.ChatPlugin
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -47,8 +47,8 @@ javac.modulepath=
|
||||
javac.processormodulepath=
|
||||
javac.processorpath=\
|
||||
${javac.classpath}
|
||||
javac.source=17
|
||||
javac.target=17
|
||||
javac.source=25
|
||||
javac.target=25
|
||||
javac.test.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}
|
||||
|
||||
@@ -8,13 +8,13 @@ package pitiupi.chat.GUI;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import pitiupi.chat.net.ChatMessage;
|
||||
import pitiupi.plugin.Pitiupi;
|
||||
import pitiupi.control.ConnectionManager;
|
||||
import pitiupi.models.Messages.Message;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* @author tony
|
||||
*
|
||||
* @author flavio
|
||||
*/
|
||||
public class ChatWindow extends JDialog {
|
||||
@@ -28,12 +28,13 @@ public class ChatWindow extends JDialog {
|
||||
private JSplitPane jSplitPane1;
|
||||
private JTextArea jTextArea1;
|
||||
|
||||
private final Pitiupi pitiupi;
|
||||
private final ConnectionManager connectionManager;
|
||||
|
||||
public ChatWindow(ConnectionManager connectionManager) {
|
||||
this.connectionManager = connectionManager;
|
||||
initComponents();
|
||||
}
|
||||
|
||||
public ChatWindow(Pitiupi pitiupi) {
|
||||
this.pitiupi = pitiupi;
|
||||
initComponents();
|
||||
}
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
@@ -92,13 +93,13 @@ public class ChatWindow extends JDialog {
|
||||
if (jTextArea1.getText().trim().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
ChatMessage message = new ChatMessage(pitiupi.getUserName(), jTextArea1.getText());
|
||||
ChatMessage message = new ChatMessage(connectionManager.getUserName(), jTextArea1.getText());
|
||||
this.sendChatMessage(message);
|
||||
jTextArea1.setText("");
|
||||
}
|
||||
|
||||
public void sendChatMessage(Message message) {
|
||||
pitiupi.sendUdpMulticast(message);
|
||||
connectionManager.sendUdpMulticast(message);
|
||||
}
|
||||
|
||||
public void receiveChatMessage(ChatMessage message) {
|
||||
|
||||
@@ -8,29 +8,29 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import pitiupi.plugin.Pitiupi;
|
||||
import pitiupi.chat.GUI.ChatMenu;
|
||||
import pitiupi.chat.GUI.ChatWindow;
|
||||
import pitiupi.chat.net.ChatMessage;
|
||||
import pitiupi.control.ConnectionManager;
|
||||
import pitiupi.control.GuiManager;
|
||||
import pitiupi.models.Menus.MenuCategory;
|
||||
import pitiupi.models.Messages.Message;
|
||||
import pitiupi.models.Plugin;
|
||||
|
||||
/**
|
||||
*@author tony
|
||||
*
|
||||
* @author flavio
|
||||
*/
|
||||
public class ChatPlugin extends Plugin {
|
||||
|
||||
private ChatWindow chatWindow;
|
||||
|
||||
@Override
|
||||
public void createPlugin(Pitiupi pitiupi) {
|
||||
this.chatWindow = new ChatWindow(pitiupi);
|
||||
pitiupi.createMenu(MenuCategory.Social, new ChatMenu(chatWindow));
|
||||
@Override
|
||||
public void createPlugin(ConnectionManager connectionManager, GuiManager guiManager) {
|
||||
this.chatWindow = new ChatWindow(connectionManager);
|
||||
guiManager.createMenu(MenuCategory.Social, new ChatMenu(chatWindow));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<Class<? extends Message>> getMessages() {
|
||||
return List.of(ChatMessage.class);
|
||||
|
||||
Reference in new issue
Block a user