diff --git a/.idea/$PRODUCT_WORKSPACE_FILE$ b/.idea/$PRODUCT_WORKSPACE_FILE$
deleted file mode 100644
index 3733e0d369c0331583e53353e77299dc56783aab..0000000000000000000000000000000000000000
--- a/.idea/$PRODUCT_WORKSPACE_FILE$
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="masterDetails">
- <states>
- <state key="ProjectJDKs.UI">
- <settings>
- <last-edited>1.8</last-edited>
- <splitter-proportions>
- <option name="proportions">
- <list>
- <option value="0.2" />
- </list>
- </option>
- </splitter-proportions>
- </settings>
- </state>
- </states>
- </component>
-</project>
\ No newline at end of file
diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index 5c98b428844d9f7d529e2b6fb918d15bf072f3df..0000000000000000000000000000000000000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-# Default ignored files
-/workspace.xml
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index a07277e4e9b5232cdf27c177ecf83aa7901b275c..0000000000000000000000000000000000000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-<<<<<<< HEAD
- <component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="12" project-jdk-type="JavaSDK">
-=======
- <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
->>>>>>> 37a6af2e6d36ab514d01a93dbd5be6538a2572c7
- <output url="file://$PROJECT_DIR$/out" />
- </component>
-</project>
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 1fe4435f739a457406c6c8482d6bbcec0854e0aa..0000000000000000000000000000000000000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="ProjectModuleManager">
- <modules>
- <module fileurl="file://$PROJECT_DIR$/infinitymonkeys.iml" filepath="$PROJECT_DIR$/infinitymonkeys.iml" />
- </modules>
- </component>
-</project>
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index e96534fb27b68192f27f985d3879e173ec77adb8..0000000000000000000000000000000000000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="Palette2">
- <group name="Swing">
- <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
- </item>
- <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
- </item>
- <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
- </item>
- <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
- <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
- </item>
- <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
- <initial-values>
- <property name="text" value="Button" />
- </initial-values>
- </item>
- <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
- <initial-values>
- <property name="text" value="RadioButton" />
- </initial-values>
- </item>
- <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
- <initial-values>
- <property name="text" value="CheckBox" />
- </initial-values>
- </item>
- <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
- <initial-values>
- <property name="text" value="Label" />
- </initial-values>
- </item>
- <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
- <preferred-size width="150" height="-1" />
- </default-constraints>
- </item>
- <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
- <preferred-size width="150" height="-1" />
- </default-constraints>
- </item>
- <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
- <preferred-size width="150" height="-1" />
- </default-constraints>
- </item>
- <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
- <preferred-size width="150" height="50" />
- </default-constraints>
- </item>
- <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
- <preferred-size width="150" height="50" />
- </default-constraints>
- </item>
- <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
- <preferred-size width="150" height="50" />
- </default-constraints>
- </item>
- <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
- </item>
- <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
- <preferred-size width="150" height="50" />
- </default-constraints>
- </item>
- <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
- <preferred-size width="150" height="50" />
- </default-constraints>
- </item>
- <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
- <preferred-size width="150" height="50" />
- </default-constraints>
- </item>
- <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
- <preferred-size width="200" height="200" />
- </default-constraints>
- </item>
- <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
- <preferred-size width="200" height="200" />
- </default-constraints>
- </item>
- <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
- </item>
- <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
- </item>
- <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
- </item>
- <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
- </item>
- <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
- <preferred-size width="-1" height="20" />
- </default-constraints>
- </item>
- <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
- </item>
- <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
- </item>
- </group>
- </component>
-</project>
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 35eb1ddfbbc029bcab630581847471d7f238ec53..0000000000000000000000000000000000000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="VcsDirectoryMappings">
- <mapping directory="" vcs="Git" />
- </component>
-</project>
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
deleted file mode 100644
index d977b687b3c340eccc8cf30a665528eea8e5f65f..0000000000000000000000000000000000000000
--- a/.idea/workspace.xml
+++ /dev/null
@@ -1,483 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="ChangeListManager">
- <list default="true" id="688d774d-cfc7-4b0d-b00c-5ca931aba600" name="Default Changelist" comment="">
- <change beforePath="$PROJECT_DIR$/.idea/modules.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/src/GUI/ChatScreen.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GUI/ChatScreen.java" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/src/server/User.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/server/User.java" afterDir="false" />
- </list>
- <ignored path="$PROJECT_DIR$/out/" />
- <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
- <option name="SHOW_DIALOG" value="false" />
- <option name="HIGHLIGHT_CONFLICTS" value="true" />
- <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
- <option name="LAST_RESOLUTION" value="IGNORE" />
- </component>
- <component name="DefaultGradleProjectSettings">
- <option name="testRunner" value="GRADLE" />
- <option name="delegatedBuild" value="true" />
- </component>
- <component name="FileEditorManager">
- <leaf>
- <file pinned="false" current-in-tab="true">
- <entry file="file://$PROJECT_DIR$/src/GUI/ChatScreen.java">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="323">
- <caret line="81" selection-start-line="81" selection-end-line="81" />
- </state>
- </provider>
- </entry>
- </file>
- </leaf>
- </component>
- <component name="FindInProjectRecents">
- <findStrings>
- <find>RMI</find>
- <find>Black</find>
- <find>colorOptions</find>
- <find>Send</find>
- <find>message</find>
- <find>userSelectComboBox</find>
- <find>updateUserList</find>
- <find>send</find>
- <find>broadcastMessage</find>
- <find>sent</find>
- </findStrings>
- </component>
- <component name="Git.Settings">
- <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
- <option name="RECENT_BRANCH_BY_REPOSITORY">
- <map>
- <entry key="$PROJECT_DIR$" value="master" />
- </map>
- </option>
- </component>
- <component name="IdeDocumentHistory">
- <option name="CHANGED_PATHS">
- <list>
- <option value="$PROJECT_DIR$/src/server/Server.java" />
- <option value="$PROJECT_DIR$/src/client/ChatUpdate.java" />
- <option value="$PROJECT_DIR$/src/client/Client.java" />
- <option value="$PROJECT_DIR$/src/server/ChatController.java" />
- <option value="$PROJECT_DIR$/src/remote/IChatController.java" />
- <option value="$PROJECT_DIR$/src/remote/IChatUpdate.java" />
- <option value="$PROJECT_DIR$/src/server/ClientController.java" />
- <option value="$PROJECT_DIR$/src/remote/IClientController.java" />
- <option value="$PROJECT_DIR$/src/client/ClientUpdate.java" />
- <option value="$PROJECT_DIR$/src/remote/IClientUpdate.java" />
- <option value="$PROJECT_DIR$/src/GUI/ChatScreen.form" />
- <option value="$PROJECT_DIR$/src/server/User.java" />
- <option value="$PROJECT_DIR$/src/GUI/ChatScreen.java" />
- </list>
- </option>
- </component>
- <component name="ProjectConfigurationFiles">
- <option name="files">
- <list>
- <option value="$PROJECT_DIR$/.idea/uiDesigner.xml" />
- </list>
- </option>
- </component>
- <component name="ProjectFrameBounds" extendedState="6">
- <option name="x" value="-3" />
- <option name="width" value="1946" />
- <option name="height" value="876" />
- </component>
- <component name="ProjectView">
- <navigator proportions="" version="1">
- <foldersAlwaysOnTop value="true" />
- </navigator>
- <panes>
- <pane id="ProjectPane">
- <subPane>
- <expand>
- <path>
- <item name="infinitymonkeys" type="b2602c69:ProjectViewProjectNode" />
- <item name="infinitymonkeys" type="462c0819:PsiDirectoryNode" />
- </path>
- <path>
- <item name="infinitymonkeys" type="b2602c69:ProjectViewProjectNode" />
- <item name="infinitymonkeys" type="462c0819:PsiDirectoryNode" />
- <item name="src" type="462c0819:PsiDirectoryNode" />
- </path>
- <path>
- <item name="infinitymonkeys" type="b2602c69:ProjectViewProjectNode" />
- <item name="infinitymonkeys" type="462c0819:PsiDirectoryNode" />
- <item name="src" type="462c0819:PsiDirectoryNode" />
- <item name="client" type="462c0819:PsiDirectoryNode" />
- </path>
- <path>
- <item name="infinitymonkeys" type="b2602c69:ProjectViewProjectNode" />
- <item name="infinitymonkeys" type="462c0819:PsiDirectoryNode" />
- <item name="src" type="462c0819:PsiDirectoryNode" />
- <item name="GUI" type="462c0819:PsiDirectoryNode" />
- </path>
- <path>
- <item name="infinitymonkeys" type="b2602c69:ProjectViewProjectNode" />
- <item name="infinitymonkeys" type="462c0819:PsiDirectoryNode" />
- <item name="src" type="462c0819:PsiDirectoryNode" />
- <item name="GUI" type="462c0819:PsiDirectoryNode" />
- <item name="ChatScreen" type="e9f4de52:FormNode" />
- </path>
- <path>
- <item name="infinitymonkeys" type="b2602c69:ProjectViewProjectNode" />
- <item name="infinitymonkeys" type="462c0819:PsiDirectoryNode" />
- <item name="src" type="462c0819:PsiDirectoryNode" />
- <item name="remote" type="462c0819:PsiDirectoryNode" />
- </path>
- <path>
- <item name="infinitymonkeys" type="b2602c69:ProjectViewProjectNode" />
- <item name="infinitymonkeys" type="462c0819:PsiDirectoryNode" />
- <item name="src" type="462c0819:PsiDirectoryNode" />
- <item name="server" type="462c0819:PsiDirectoryNode" />
- </path>
- </expand>
- <select />
- </subPane>
- </pane>
- <pane id="PackagesPane" />
- <pane id="Scope" />
- </panes>
- </component>
- <component name="PropertiesComponent">
- <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
- <property name="WebServerToolWindowFactoryState" value="false" />
- <property name="aspect.path.notification.shown" value="true" />
- <property name="last_opened_file_path" value="$PROJECT_DIR$/../Git Projects" />
- <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
- <property name="nodejs_npm_path_reset_for_default_project" value="true" />
- <property name="project.structure.last.edited" value="Global Libraries" />
- <property name="project.structure.proportion" value="0.15" />
- <property name="project.structure.side.proportion" value="0.2" />
- </component>
- <component name="RunDashboard">
- <option name="ruleStates">
- <list>
- <RuleState>
- <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
- </RuleState>
- <RuleState>
- <option name="name" value="StatusDashboardGroupingRule" />
- </RuleState>
- </list>
- </option>
- </component>
- <component name="RunManager" selected="Application.Client2">
- <configuration name="Client 3" type="Application" factoryName="Application">
- <option name="MAIN_CLASS_NAME" value="client.Client" />
- <module name="infinitymonkeys" />
- <option name="PROGRAM_PARAMETERS" value="Eldar -Djava.rmi.server.codebase=file:"C:\infinitemonkeys\out\production\infinitemonkeys\"" />
- <method v="2">
- <option name="Make" enabled="true" />
- </method>
- </configuration>
- <configuration name="Client1" type="Application" factoryName="Application">
- <option name="MAIN_CLASS_NAME" value="client.Client" />
- <module name="infinitymonkeys" />
- <option name="PROGRAM_PARAMETERS" value="Max -Djava.rmi.server.codebase=file:"C:\infinitemonkeys\out\production\infinitemonkeys\"" />
- <method v="2">
- <option name="Make" enabled="true" />
- </method>
- </configuration>
- <configuration name="Client2" type="Application" factoryName="Application">
- <option name="MAIN_CLASS_NAME" value="client.Client" />
- <module name="infinitymonkeys" />
- <option name="PROGRAM_PARAMETERS" value="Hai -Djava.rmi.server.codebase=file:"C:\infinitemonkeys\out\production\infinitemonkeys\"" />
- <method v="2">
- <option name="Make" enabled="true" />
- </method>
- </configuration>
- <configuration name="Server" type="Application" factoryName="Application">
- <option name="MAIN_CLASS_NAME" value="server.Server" />
- <module name="infinitymonkeys" />
- <option name="PROGRAM_PARAMETERS" value="-Djava.rmi.server.codebase=file:"C:\infinitemonkeys\out\production\infinitemonkeys\"" />
- <method v="2">
- <option name="Make" enabled="true" />
- </method>
- </configuration>
- <list>
- <item itemvalue="Application.Server" />
- <item itemvalue="Application.Client1" />
- <item itemvalue="Application.Client2" />
- <item itemvalue="Application.Client 3" />
- </list>
- </component>
- <component name="SvnConfiguration">
- <configuration />
- </component>
- <component name="TaskManager">
- <task active="true" id="Default" summary="Default task">
- <changelist id="688d774d-cfc7-4b0d-b00c-5ca931aba600" name="Default Changelist" comment="" />
- <created>1571631720382</created>
- <option name="number" value="Default" />
- <option name="presentableId" value="Default" />
- <updated>1571631720382</updated>
- <workItem from="1571631723795" duration="17601000" />
- </task>
- <task id="LOCAL-00001" summary="Changed the join method to send over a reference of the ClientUpdate Interface">
- <created>1571646862883</created>
- <option name="number" value="00001" />
- <option name="presentableId" value="LOCAL-00001" />
- <option name="project" value="LOCAL" />
- <updated>1571646862883</updated>
- </task>
- <option name="localTasksCounter" value="2" />
- <servers />
- </component>
- <component name="TimeTrackingManager">
- <option name="totallyTimeSpent" value="17601000" />
- </component>
- <component name="ToolWindowManager">
- <frame x="-7" y="-7" width="1295" height="704" extended-state="6" />
- <editor active="true" />
- <layout>
- <window_info id="Designer" />
- <window_info id="Image Layers" />
- <window_info id="Capture Tool" />
- <window_info id="UI Designer" />
- <window_info id="Favorites" side_tool="true" />
- <window_info id="JavaEE:App" side_tool="true" />
- <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24939272" />
- <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
- <window_info anchor="bottom" id="Terminal" visible="true" weight="0.26923078" />
- <window_info anchor="bottom" id="Docker" show_stripe_button="false" />
- <window_info anchor="bottom" id="Event Log" side_tool="true" />
- <window_info anchor="bottom" id="Messages" weight="0.32867134" />
- <window_info anchor="bottom" id="Database Changes" />
- <window_info anchor="bottom" id="Version Control" weight="0.32867134" />
- <window_info anchor="bottom" id="Message" order="0" />
- <window_info anchor="bottom" id="Find" order="1" />
- <window_info anchor="bottom" id="Run" order="2" weight="0.32867134" />
- <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
- <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
- <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
- <window_info anchor="bottom" id="TODO" order="6" />
- <window_info anchor="right" id="Maven" />
- <window_info anchor="right" id="Palette" />
- <window_info anchor="right" id="Capture Analysis" />
- <window_info anchor="right" id="Database" />
- <window_info anchor="right" id="Palette	" />
- <window_info anchor="right" id="Theme Preview" />
- <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
- <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
- <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
- </layout>
- </component>
- <component name="TypeScriptGeneratedFilesManager">
- <option name="version" value="1" />
- </component>
- <component name="Vcs.Log.History.Properties">
- <option name="COLUMN_ORDER">
- <list>
- <option value="0" />
- <option value="2" />
- <option value="3" />
- <option value="1" />
- </list>
- </option>
- </component>
- <component name="VcsManagerConfiguration">
- <MESSAGE value="Changed the join method to send over a reference of the ClientUpdate Interface" />
- <option name="LAST_COMMIT_MESSAGE" value="Changed the join method to send over a reference of the ClientUpdate Interface" />
- </component>
- <component name="editorHistoryManager">
- <entry file="file://$PROJECT_DIR$/src/GUI/StartScreen.form">
- <provider selected="true" editor-type-id="ui-designer" />
- </entry>
- <entry file="file://$PROJECT_DIR$/src/client/DrawingUpdate.java">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="170">
- <caret line="15" column="28" selection-start-line="15" selection-start-column="28" selection-end-line="15" selection-end-column="28" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/GUI/PaintGUI.java">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="186">
- <caret line="218" lean-forward="true" selection-start-line="218" selection-end-line="218" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/server/DrawingController.java">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="187">
- <caret line="16" lean-forward="true" selection-start-line="16" selection-end-line="16" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/server/Server.java">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="-650">
- <caret line="10" lean-forward="true" selection-start-line="10" selection-end-line="10" />
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/remote/IChatController.java">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="187">
- <caret line="12" lean-forward="true" selection-start-line="12" selection-end-line="12" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/remote/IChatUpdate.java">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="170">
- <caret line="12" lean-forward="true" selection-start-line="12" selection-end-line="12" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/GUI/ChatScreen.form">
- <provider selected="true" editor-type-id="ui-designer" />
- </entry>
- <entry file="file://$PROJECT_DIR$/src/needsDebugging/client/ChatUpdate.java">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="68">
- <caret line="8" column="13" selection-start-line="8" selection-start-column="13" selection-end-line="8" selection-end-column="13" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/client/ClientUpdate.java">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="663">
- <caret line="39" column="31" lean-forward="true" selection-start-line="39" selection-start-column="31" selection-end-line="39" selection-end-column="31" />
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/server/ChatController.java">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="-939">
- <caret line="9" column="45" selection-start-line="9" selection-start-column="45" selection-end-line="9" selection-end-column="45" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/remote/IClientController.java">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="187">
- <caret line="12" selection-start-line="12" selection-end-line="12" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/remote/IClientUpdate.java">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="170">
- <caret line="12" selection-start-line="12" selection-end-line="12" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/client/Client.java">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="119">
- <caret line="133" column="104" selection-start-line="133" selection-start-column="104" selection-end-line="133" selection-end-column="104" />
- <folding>
- <element signature="e#892#893#0" expanded="true" />
- <element signature="e#923#924#0" expanded="true" />
- <element signature="e#969#970#0" expanded="true" />
- <element signature="e#1002#1003#0" expanded="true" />
- <element signature="e#1059#1060#0" expanded="true" />
- <element signature="e#1102#1103#0" expanded="true" />
- <element signature="e#1157#1158#0" expanded="true" />
- <element signature="e#1194#1195#0" expanded="true" />
- <element signature="e#1252#1253#0" expanded="true" />
- <element signature="e#1291#1292#0" expanded="true" />
- <element signature="e#1427#1428#0" expanded="true" />
- <element signature="e#1467#1468#0" expanded="true" />
- <element signature="e#1506#1507#0" expanded="true" />
- <element signature="e#1542#1543#0" expanded="true" />
- <element signature="e#1604#1605#0" expanded="true" />
- <element signature="e#1654#1655#0" expanded="true" />
- <element signature="e#3373#3374#0" expanded="true" />
- <element signature="e#3411#3412#0" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/client/ChatUpdate.java">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="114">
- <caret line="25" column="65" selection-start-line="25" selection-start-column="65" selection-end-line="25" selection-end-column="65" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/server/User.java">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="186">
- <caret line="47" lean-forward="true" selection-start-line="47" selection-end-line="47" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/server/ClientController.java">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="-1602">
- <caret line="12" column="13" selection-start-line="12" selection-start-column="13" selection-end-line="12" selection-end-column="13" />
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/GUI/ChatScreen.java">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="323">
- <caret line="81" selection-start-line="81" selection-end-line="81" />
- </state>
- </provider>
- </entry>
- </component>
- <component name="masterDetails">
- <states>
- <state key="GlobalLibrariesConfigurable.UI">
- <settings>
- <last-edited>JavaFX-11</last-edited>
- <splitter-proportions>
- <option name="proportions">
- <list>
- <option value="0.2" />
- </list>
- </option>
- </splitter-proportions>
- </settings>
- </state>
- <state key="JdkListConfigurable.UI">
- <settings>
- <last-edited>12</last-edited>
- <splitter-proportions>
- <option name="proportions">
- <list>
- <option value="0.2" />
- </list>
- </option>
- </splitter-proportions>
- </settings>
- </state>
- <state key="ProjectJDKs.UI">
- <settings>
- <last-edited>12</last-edited>
- <splitter-proportions>
- <option name="proportions">
- <list>
- <option value="0.2" />
- </list>
- </option>
- </splitter-proportions>
- </settings>
- </state>
- <state key="ProjectLibrariesConfigurable.UI">
- <settings>
- <splitter-proportions>
- <option name="proportions">
- <list>
- <option value="0.2" />
- </list>
- </option>
- </splitter-proportions>
- </settings>
- </state>
- </states>
- </component>
-</project>
\ No newline at end of file
diff --git a/META-INF/application.xml b/META-INF/application.xml
deleted file mode 100644
index 6d17810e0e6f2851d90e76d845805c963ab7773e..0000000000000000000000000000000000000000
--- a/META-INF/application.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<application xmlns="http://xmlns.jcp.org/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/application_8.xsd"
- version="8">
-
-</application>
diff --git a/comp90015-dsass2-infinitymonkeys-remaster.iml b/comp90015-dsass2-infinitymonkeys-remaster.iml
deleted file mode 100644
index 7152d058eeaf78185b07d439256d64bb8f90cd22..0000000000000000000000000000000000000000
--- a/comp90015-dsass2-infinitymonkeys-remaster.iml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="FacetManager">
- <facet type="javaeeApplication" name="javaEEApplication">
- <configuration>
- <descriptors>
- <deploymentDescriptor name="application.xml" url="file://$MODULE_DIR$/META-INF/application.xml" />
- </descriptors>
- </configuration>
- </facet>
- </component>
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$">
- <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- </component>
-</module>
\ No newline at end of file
diff --git a/comp90015_assignment2.iml b/comp90015_assignment2.iml
deleted file mode 100644
index c90834f2d607afe55e6104d8aa2cdfffb713f688..0000000000000000000000000000000000000000
--- a/comp90015_assignment2.iml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$">
- <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- </component>
-</module>
\ No newline at end of file
diff --git a/infinitymonkeys.iml b/infinitymonkeys.iml
deleted file mode 100644
index 7152d058eeaf78185b07d439256d64bb8f90cd22..0000000000000000000000000000000000000000
--- a/infinitymonkeys.iml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="FacetManager">
- <facet type="javaeeApplication" name="javaEEApplication">
- <configuration>
- <descriptors>
- <deploymentDescriptor name="application.xml" url="file://$MODULE_DIR$/META-INF/application.xml" />
- </descriptors>
- </configuration>
- </facet>
- </component>
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$">
- <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- </component>
-</module>
\ No newline at end of file
diff --git a/out/production/infinitymonkeys/GUI/ChatScreen$1.class b/out/production/infinitymonkeys/GUI/ChatScreen$1.class
index ad070b4025d27146d6f511cc46e339e0c5c90c9d..acf30932dde719643c34b7da3333d1af154ec654 100644
Binary files a/out/production/infinitymonkeys/GUI/ChatScreen$1.class and b/out/production/infinitymonkeys/GUI/ChatScreen$1.class differ
diff --git a/out/production/infinitymonkeys/GUI/ChatScreen.class b/out/production/infinitymonkeys/GUI/ChatScreen.class
index d4722fd42983973ce3fd9102362ac5251df9d15d..dec99df6e06ff5da450d5861e04d1190bf4605fa 100644
Binary files a/out/production/infinitymonkeys/GUI/ChatScreen.class and b/out/production/infinitymonkeys/GUI/ChatScreen.class differ
diff --git a/out/production/infinitymonkeys/GUI/PaintGUI$1.class b/out/production/infinitymonkeys/GUI/PaintGUI$1.class
index 05dffb8fa1c36748b9542754e26f8c8e15359c41..9bdce2faacc2b1b843993ebf167bbe9585e5d476 100644
Binary files a/out/production/infinitymonkeys/GUI/PaintGUI$1.class and b/out/production/infinitymonkeys/GUI/PaintGUI$1.class differ
diff --git a/out/production/infinitymonkeys/GUI/PaintGUI.class b/out/production/infinitymonkeys/GUI/PaintGUI.class
index 165d1af870b042236228c40f2dae99862c758f71..74a96160f6d4828a63f1c0cb03a68e5b070b9818 100644
Binary files a/out/production/infinitymonkeys/GUI/PaintGUI.class and b/out/production/infinitymonkeys/GUI/PaintGUI.class differ
diff --git a/out/production/infinitymonkeys/client/ChatUpdate.class b/out/production/infinitymonkeys/client/ChatUpdate.class
index d3d43bbf0dbe0a7b388beca7ad07b42d699e904d..68eadfd4ea14a8cb64bdd7296f5f200597299421 100644
Binary files a/out/production/infinitymonkeys/client/ChatUpdate.class and b/out/production/infinitymonkeys/client/ChatUpdate.class differ
diff --git a/out/production/infinitymonkeys/client/Client.class b/out/production/infinitymonkeys/client/Client.class
index c77e62aac733fe7def8e84b41a6801f5ef591816..ef1be6eb4d0807a5bcca430017f302a77a2a45b3 100644
Binary files a/out/production/infinitymonkeys/client/Client.class and b/out/production/infinitymonkeys/client/Client.class differ
diff --git a/out/production/infinitymonkeys/client/ClientUpdate.class b/out/production/infinitymonkeys/client/ClientUpdate.class
index f3d25e75dcea30aad35683b0aedc4e92e2561079..a1d023651651cabe0b23dd94329cf3cd62e669c7 100644
Binary files a/out/production/infinitymonkeys/client/ClientUpdate.class and b/out/production/infinitymonkeys/client/ClientUpdate.class differ
diff --git a/out/production/infinitymonkeys/client/DrawingUpdate.class b/out/production/infinitymonkeys/client/DrawingUpdate.class
index 0d069f263b5239d56e9d5cbba428006c12a08e44..bab63ecfc480e691445e42f0b4c0716e7374c791 100644
Binary files a/out/production/infinitymonkeys/client/DrawingUpdate.class and b/out/production/infinitymonkeys/client/DrawingUpdate.class differ
diff --git a/out/production/infinitymonkeys/server/ClientController.class b/out/production/infinitymonkeys/server/ClientController.class
index fe0b87bb2045cdd4eb764eff6cfed1a0ac766134..b7095b80ed7d6e9586534ffe95c385745b258c00 100644
Binary files a/out/production/infinitymonkeys/server/ClientController.class and b/out/production/infinitymonkeys/server/ClientController.class differ
diff --git a/src.zip b/src.zip
deleted file mode 100644
index d037531c7c7e5a2934c2e6521fdab3171a018182..0000000000000000000000000000000000000000
Binary files a/src.zip and /dev/null differ
diff --git a/src/GUI/ApplicationMain.java b/src/GUI/ApplicationMain.java
deleted file mode 100644
index 6c35fece617762f9bc54f63078cf3fc41c3c9dfc..0000000000000000000000000000000000000000
--- a/src/GUI/ApplicationMain.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package GUI;
-
-import client.Client;
-
-import javax.swing.*;
-import java.awt.*;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-import java.rmi.RemoteException;
-
-public class ApplicationMain extends JPanel {
- Client client;
- ChatScreen chatScreen;
- PaintGUI paintGUI;
- JFrame frame;
-
- public ChatScreen getChatScreen() { return chatScreen; }
-
- public PaintGUI getPaintGUI() { return paintGUI; }
-
- public JFrame getFrame() {
- return frame;
- }
-
- public ApplicationMain(Client client) {
- this.client = client;
- this.chatScreen = new ChatScreen(client);
- this.paintGUI = new PaintGUI(client);
- }
-
- public void createAndShowGUI() {
- frame = new JFrame("Application Main");
- JFrame.setDefaultLookAndFeelDecorated(true);
- Container content = frame.getContentPane();
- content.setLayout(new BorderLayout());
- content.add(paintGUI.getGlobal(), BorderLayout.WEST);
- content.add(chatScreen.panel2, BorderLayout.EAST);
- SwingUtilities.getRootPane(chatScreen.getSendButton()).setDefaultButton(chatScreen.getSendButton());
- frame.addWindowListener(new WindowAdapter()
- {
- @Override
- public void windowClosing(WindowEvent arg0)
- {
- int answer = JOptionPane.showConfirmDialog(null,
- "Are you sure you want to quit the session?",
- "Shut down session", JOptionPane.YES_NO_OPTION);
- System.out.println(answer);
- if (answer == 0)
- {
- System.out.println("Quitting session");
- try
- {
- client.getClientController().quit(client.getUserName());
- }
- catch (RemoteException e)
- {
- e.printStackTrace();
- }
- System.exit(0);
- }
- }
- });
-
- frame.setSize(1200, 700);
- frame.setLocationRelativeTo( null );
- frame.setResizable(false);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- frame.pack();
- frame.setVisible(true);
- }
-
-}
diff --git a/src/GUI/ChatScreen.form b/src/GUI/ChatScreen.form
deleted file mode 100644
index baeed115748181b31d550c0aacfc5dc6db17fe1e..0000000000000000000000000000000000000000
--- a/src/GUI/ChatScreen.form
+++ /dev/null
@@ -1,200 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="GUI.ChatScreen">
- <grid id="27dc6" binding="panel2" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
- <margin top="0" left="0" bottom="0" right="0"/>
- <constraints>
- <xy x="20" y="20" width="1200" height="1200"/>
- </constraints>
- <properties>
- <maximumSize width="-1" height="-1"/>
- <minimumSize width="-1" height="-1"/>
- <preferredSize width="700" height="600"/>
- </properties>
- <border type="none"/>
- <children>
- <grid id="b37e3" binding="othersPanel" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
- <margin top="0" left="0" bottom="0" right="0"/>
- <constraints>
- <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="1" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties/>
- <border type="none"/>
- <children>
- <grid id="bad73" binding="myAreaPanel" layout-manager="GridLayoutManager" row-count="12" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
- <margin top="0" left="0" bottom="0" right="0"/>
- <constraints>
- <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="7" hsize-policy="1" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties/>
- <border type="none" title="My Area"/>
- <children>
- <component id="a35da" class="javax.swing.JLabel" binding="managersNameLabel">
- <constraints>
- <grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties>
- <font size="14" style="1"/>
- <text value="Manager's Name:"/>
- </properties>
- </component>
- <vspacer id="38e19">
- <constraints>
- <grid row="10" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
- </constraints>
- </vspacer>
- <component id="98bbe" class="javax.swing.JLabel" binding="yourNameLabel">
- <constraints>
- <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties>
- <font size="14" style="1"/>
- <text value="Your Name:"/>
- </properties>
- </component>
- <component id="33d66" class="javax.swing.JLabel" binding="yourNameDisplay">
- <constraints>
- <grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties>
- <text value="Here goes User's Name"/>
- </properties>
- </component>
- <grid id="4212" binding="managersPanel" layout-manager="GridLayoutManager" row-count="4" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
- <margin top="0" left="0" bottom="0" right="0"/>
- <constraints>
- <grid row="6" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties/>
- <border type="none" title="Manager's Tools"/>
- <children>
- <component id="b7068" class="javax.swing.JComboBox" binding="userSelectComboBox">
- <constraints>
- <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties>
- <model/>
- </properties>
- </component>
- <vspacer id="aae38">
- <constraints>
- <grid row="3" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
- </constraints>
- </vspacer>
- <component id="be5e9" class="javax.swing.JButton" binding="kickOutButton" default-binding="true">
- <constraints>
- <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties>
- <text value="Kick Out"/>
- </properties>
- </component>
- <component id="1336c" class="javax.swing.JButton" binding="promoteToManagerButton" default-binding="true">
- <constraints>
- <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties>
- <text value="Promote to Manager"/>
- </properties>
- </component>
- </children>
- </grid>
- <component id="51b56" class="javax.swing.JLabel" binding="managersNameDisplay">
- <constraints>
- <grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties>
- <text value="Here goes Admin's Name"/>
- </properties>
- </component>
- <vspacer id="e9e96">
- <constraints>
- <grid row="11" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
- </constraints>
- </vspacer>
- <component id="deaed" class="javax.swing.JButton" binding="exitThisRoomButton" default-binding="true">
- <constraints>
- <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties>
- <text value="Exit This Room"/>
- </properties>
- </component>
- <component id="bd8ec" class="javax.swing.JButton" binding="quitButton">
- <constraints>
- <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties>
- <text value="Quit Program"/>
- </properties>
- </component>
- </children>
- </grid>
- <grid id="5d886" binding="chatPanel" layout-manager="GridLayoutManager" row-count="6" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
- <margin top="0" left="0" bottom="0" right="0"/>
- <constraints>
- <grid row="0" column="0" row-span="2" col-span="1" vsize-policy="7" hsize-policy="6" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties/>
- <border type="none" title="Chat Area"/>
- <children>
- <component id="6a928" class="javax.swing.JLabel">
- <constraints>
- <grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties>
- <text value="Your Message"/>
- </properties>
- </component>
- <component id="9e940" class="javax.swing.JButton" binding="sendButton">
- <constraints>
- <grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties>
- <text value="Send"/>
- </properties>
- </component>
- <scrollpane id="ec60d">
- <constraints>
- <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties/>
- <border type="none"/>
- <children>
- <component id="c55f3" class="javax.swing.JTextArea" binding="chatDisplayBox">
- <constraints/>
- <properties>
- <editable value="true"/>
- <lineWrap value="true"/>
- </properties>
- </component>
- </children>
- </scrollpane>
- <component id="2b67f" class="javax.swing.JTextField" binding="chatInputBox">
- <constraints>
- <grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
- <preferred-size width="150" height="-1"/>
- </grid>
- </constraints>
- <properties/>
- </component>
- <component id="df8f1" class="javax.swing.JLabel" binding="sendMessageToLabel">
- <constraints>
- <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties>
- <text value="Send Message To:"/>
- </properties>
- </component>
- <component id="cc35d" class="javax.swing.JComboBox" binding="sendMessageToComboBox">
- <constraints>
- <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties/>
- </component>
- </children>
- </grid>
- </children>
- </grid>
- </children>
- </grid>
-</form>
diff --git a/src/GUI/ChatScreen.java b/src/GUI/ChatScreen.java
deleted file mode 100644
index 972ea6ec0e165b16ef3661237f19915f1f3d09e1..0000000000000000000000000000000000000000
--- a/src/GUI/ChatScreen.java
+++ /dev/null
@@ -1,142 +0,0 @@
-package GUI;
-
-import client.Client;
-import remote.IChatController;
-import remote.IClientController;
-
-import javax.swing.*;
-import java.awt.event.*;
-import java.rmi.RemoteException;
-
-public class ChatScreen {
-
- public JPanel panel2;
-
- private JButton sendButton;
-
- // private JPanel drawingPanel;
- private JPanel othersPanel;
- private JComboBox sendMessageToComboBox;
- private JTextArea chatDisplayBox;
- private JComboBox userSelectComboBox;
- private JButton kickOutButton;
- private JButton promoteToManagerButton;
- private JTextField chatInputBox;
- private JLabel sendMessageToLabel;
- private JLabel managersNameLabel;
- private JLabel yourNameLabel;
- private JLabel yourNameDisplay;
- private JLabel managersNameDisplay;
- private JPanel myAreaPanel;
- private JPanel managersPanel;
- private JPanel chatPanel;
- private JButton exitThisRoomButton;
- private JButton quitButton;
- private JFrame frame;
- public Client getClient() {
- return client;
- }
-
- public Client client;
-
-
- public ChatScreen(Client client)
- {
- this.client = client;
- yourNameDisplay.setText(client.getUserName());
-// drawingPanel = new PaintGUI(client);
-// SwingUtilities.getRootPane(sendButton).setDefaultButton(sendButton);
- }
-
- frame.addWindowListener(new WindowAdapter()
- {
- @Override
- public void windowClosing(WindowEvent arg0)
- {
- int answer = JOptionPane.showConfirmDialog(null,
- "Are you sure you want to quit the session?",
- "Shut down session", JOptionPane.YES_NO_OPTION);
- System.out.println(answer);
- if (answer == 0)
- {
- System.out.println("Quitting session");
- try
- {
- client.getClientController().quit(client.getUserName());
- }
- catch (RemoteException e)
- {
- e.printStackTrace();
- }
- System.exit(0);
- }
- }
- });
-
- public JButton getSendButton() {
- return sendButton;
- }
-
-
- public JTextArea getChatDisplayBox() {
- return chatDisplayBox;
- }
-
- public JComboBox getSendMessageToComboBox()
- {
- return sendMessageToComboBox;
- }
-
-// public JPanel getDrawingPanel() {
-// return drawingPanel;
-// }
-
-
-
- ActionListener actionListener = new ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- if (e.getSource() == sendButton)
- {
- String message = chatInputBox.getText();
- chatInputBox.setText("");
- IChatController chatController = client.getChatController();
- try
- {
- System.out.println("Send button pressed");
-
- String toUser = sendMessageToComboBox.getSelectedItem().toString();
-
- if( toUser.equals("All") )
- {
- chatController.broadcastMessage(client.getUserName(), message);
- }
- else
- {
- chatController.sendPrivateMessage(client.getUserName(), toUser, message);
- }
- }
- catch (RemoteException ex)
- {
- ex.printStackTrace();
- }
- }
- else if (e.getSource() == exitThisRoomButton)
- {
- IClientController clientController = client.getClientController();
- try
- {
- System.out.println("Exit room button pressed");
- clientController.quit(client.getUserName());
- System.exit(0);
- }
- catch (RemoteException ex)
- {
- ex.printStackTrace();
- }
- }
- }
-
- };
-}
diff --git a/src/GUI/DrawingArea.java b/src/GUI/DrawingArea.java
deleted file mode 100644
index 21069490ac09b3a85c3eb35b876440ee928f206a..0000000000000000000000000000000000000000
--- a/src/GUI/DrawingArea.java
+++ /dev/null
@@ -1,374 +0,0 @@
-package GUI;
-
-import client.Client;
-import remote.IDrawingController;
-
-import javax.imageio.ImageIO;
-import javax.swing.*;
-import java.awt.*;
-import java.awt.event.MouseEvent;
-import java.awt.event.MouseListener;
-import java.awt.event.MouseMotionListener;
-import java.awt.geom.Ellipse2D;
-import java.awt.geom.Line2D;
-import java.awt.geom.Rectangle2D;
-import java.awt.geom.RectangularShape;
-import java.awt.image.BufferedImage;
-import java.io.File;
-import java.io.IOException;
-import java.rmi.RemoteException;
-
-public class DrawingArea extends JPanel implements MouseMotionListener, MouseListener {
-
-
-
- /// enum for all different mode ///
- enum Mode { FREEHAND, LINE, CIRCLE, RECTANGLE, OVAL, ERASE }
-
- /// Canvas size parameter ///
- private final static int AREA_WIDTH = 600;
- private final static int AREA_HEIGHT = 620;
-
- /// Shape to be drawn on the canvas ///
- private Client client;
-
- private Shape drawing;
-
- private Point startPoint;
- private Point previousPoint;
-
- private Point currentPoint;
- /// Default mode and color ///
- private Color shapeColor;// = new Color(0, 0, 0);
-
- private Mode currentMode;// = Mode.FREEHAND;
- /// Create a empty canvas ///
- private BufferedImage image;// = new BufferedImage(AREA_WIDTH, AREA_HEIGHT, BufferedImage.TYPE_INT_ARGB);
-
- /// Drawing tool
- private Graphics2D g2;// = (Graphics2D) image.getGraphics();
-
-
- public DrawingArea(Client client) {
- this.client = client;
- setBackground(Color.WHITE); // Set Background color
- setDoubleBuffered(false); // Non-buffered drawing
- image = new BufferedImage(AREA_WIDTH, AREA_HEIGHT, BufferedImage.TYPE_INT_ARGB);
- g2 = (Graphics2D) image.getGraphics();
- /// Antialiasing the graphic for smoothness ///
- g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- shapeColor = new Color(0, 0, 0);
- currentMode = Mode.FREEHAND;
- drawing = null;
- addMouseListener(this);
- addMouseMotionListener(this);
- }
-
-
- public Shape getDrawing() {
- return drawing;
- }
-
- public void setDrawing(Shape drawing) {
- this.drawing = drawing;
- }
-
-
- @Override
- public Dimension getPreferredSize()
- {
- return isPreferredSizeSet() ?
- super.getPreferredSize() : new Dimension(AREA_WIDTH, AREA_HEIGHT);
- }
-
-/// Create a white image to clear previous drawing ///
- public void clear() {
-
- image = new BufferedImage(AREA_WIDTH, AREA_HEIGHT, BufferedImage.TYPE_INT_ARGB);
- g2 = (Graphics2D) image.getGraphics();
- g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- repaint();
-
- }
-
- @Override
- protected void paintComponent(Graphics g) {
- super.paintComponent(g);
-
-/// Draw the whole image on JPanel ///
- if (image != null) {
- g.drawImage(image, 0, 0, null);
- }
-
-/// Draw temporary shape ///
- if (drawing != null) {
- Graphics2D g2 = (Graphics2D) g;
-
-/// Eraser has no border color ///
- Color borderColor = currentMode != Mode.ERASE ? shapeColor : Color.WHITE;
- g2.setColor(borderColor);
- g2.draw(drawing);
- IDrawingController drawingController = client.getDrawingController();
- try {
- drawingController.broadcastDrawing(client.getUserName(), drawing);
- } catch (RemoteException ex) {
- ex.printStackTrace();
- }
- }
- }
-
-/// File manipulations (PNG only) ///
- public void saveFile() {
- try {
- ImageIO.write(image, "PNG", new File("Saved_White_Board.png"));
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- public void saveAsFile(File file) {
- try {
- ImageIO.write(image, "PNG", file);
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- public void openFile(File file) {
- try {
- image = ImageIO.read(file);
- } catch (IOException e) {
- e.printStackTrace();
- }
- repaint();
- }
-
-/// Drawing mode setters ///
-
- public void setModeFreehand() {
- currentMode = Mode.FREEHAND;
- }
-
- public void setModeLine() {
- currentMode = Mode.LINE;
- }
-
- public void setModeCircle() {
- currentMode = Mode.CIRCLE;
- }
-
- public void setModeRectangle() {
- currentMode = Mode.RECTANGLE;
- }
-
- public void setModeOval() {
- currentMode = Mode.OVAL;
- }
-
- public void setModeErase() {
- currentMode = Mode.ERASE;
- }
-
-/// Drawing color setters ///
-
- public void setColorAqua() {
- shapeColor = new Color(0,255, 255);
- }
-
- public void setColorBlack() {
- shapeColor = new Color(0, 0, 0);
- }
-
- public void setColorBlue() {
- shapeColor = new Color(0, 0, 255);
- }
-
- public void setColorFuchsia() {
- shapeColor = new Color(255, 0, 255);
- }
-
- public void setColorGray() {
- shapeColor = new Color(128, 128, 128);
- }
-
- public void setColorGreen() {
- shapeColor = new Color(0, 128, 0);
- }
-
- public void setColorLime() {
- shapeColor = new Color(0, 255, 0);
- }
-
- public void setColorMaroon() {
- shapeColor = new Color(128,0, 0);
- }
-
- public void setColorNavy() {
- shapeColor = new Color(0, 0, 128);
- }
-
- public void setColorOlive() {
- shapeColor = new Color(128, 128, 0);
- }
-
- public void setColorPurple() {
- shapeColor = new Color(128, 0, 128);
- }
-
- public void setColorRed() {
- shapeColor = new Color(255, 0, 0);
- }
-
- public void setColorSilver() {
- shapeColor = new Color(192, 192, 192);
- }
-
- public void setColorTeal() {
- shapeColor = new Color(0, 128, 128);
- }
-
- public void setColorWhite() {
- shapeColor = new Color(255, 255, 255);
- }
-
- public void setColorYellow() {
- shapeColor = new Color(255, 255, 0);
- }
-
- @Override
- public void mouseClicked(MouseEvent e) {
-
- }
-
- @Override
- public void mousePressed(MouseEvent e) {
- startPoint = previousPoint = e.getPoint();
-
-/// Instantiate object based on current mode ///
- switch (currentMode) {
-
- case FREEHAND:
- case LINE:
-
- drawing = new Line2D.Double();
- break;
-
- case ERASE:
- case CIRCLE:
- case OVAL:
-
- drawing = new Ellipse2D.Double();
- break;
-
- case RECTANGLE:
-
- drawing = new Rectangle2D.Double();
- break;
- }
- }
-
- @Override
- public void mouseReleased(MouseEvent e) {
- switch (currentMode) {
- case OVAL:
- case RECTANGLE:
- case CIRCLE:
-
-/// Abort drawing if 2D has no width or height ///
- if (((RectangularShape) drawing).getWidth() == 0 || ((RectangularShape) drawing).getHeight() == 0) {
- break;
- }
- case FREEHAND:
- case LINE:
-// Graphics2D g2 = (Graphics2D) image.getGraphics();
- g2.setColor(shapeColor);
-
-/// Uncomment the line below to fill the shapes with color ///
-// g2.fill(drawing);
- g2.draw(drawing);
- }
-
- g2 = (Graphics2D) image.getGraphics();
- g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2.setColor(shapeColor);
-
-/// This repaint is needed if we want to fill the drawing shape with color
- repaint();
-
- drawing = null;
- }
-
- @Override
- public void mouseEntered(MouseEvent e) {
-
- }
-
- @Override
- public void mouseExited(MouseEvent e) {
-
- }
-
- @Override
- public void mouseDragged(MouseEvent e) {
- currentPoint = e.getPoint();
-
- int x = Math.min(startPoint.x, e.getX());
- int y = Math.min(startPoint.y, e.getY());
- int width = Math.abs(startPoint.x - e.getX());
- int height = Math.abs(startPoint.y - e.getY());
-
- switch (currentMode) {
-
-/// Freehand drawing is continuously drawing line from current point to previous point ///
- case FREEHAND:
-
- ((Line2D) drawing).setLine(currentPoint, previousPoint);
- g2.setColor(shapeColor);
- g2.draw(drawing);
- previousPoint = currentPoint;
- break;
-
-/// Single line ///
- case LINE:
-
- ((Line2D) drawing).setLine(startPoint, currentPoint);
- break;
-
-/// Eraser is continuously drawing "small white circle" from current point to previous point ///
- case ERASE:
-
- ((Ellipse2D) drawing).setFrame(currentPoint.getX(), currentPoint.getY(), 10, 10);
- g2.setColor(Color.WHITE);
- g2.fill(drawing);
- g2.draw(drawing);
- break;
-
-/// Single circle (How to draw more intuitively?)///
- case CIRCLE:
-
- double radius = Math.sqrt(width * width + height * height);
-// ((Ellipse2D) drawing).setFrame(x, y, radius, radius);
- ((Ellipse2D) drawing).setFrame(startPoint.getX() - radius, startPoint.getY() - radius, 2 * radius, 2 * radius);
- break;
-
-/// Single oval ///
- case OVAL:
-
- ((Ellipse2D) drawing).setFrame(x, y, width, height);
- break;
-
-/// Single rectangle ///
- case RECTANGLE:
-
- ((Rectangle2D) drawing).setFrame(x, y, width, height);
- break;
- }
-
- repaint();
- }
-
- @Override
- public void mouseMoved(MouseEvent e) {
-
- }
-}
\ No newline at end of file
diff --git a/src/GUI/MenuBar.java b/src/GUI/MenuBar.java
deleted file mode 100644
index b466e4b9cbe917d1c2acd97dee35ef4d995acfd8..0000000000000000000000000000000000000000
--- a/src/GUI/MenuBar.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package GUI;
-
-import javax.swing.*;
-
-public class MenuBar extends JMenuBar {
- JButton clearBtn, newBtn, openBtn, saveBtn, saveAsBtn, closeBtn;
-}
diff --git a/src/GUI/PaintGUI.java b/src/GUI/PaintGUI.java
deleted file mode 100644
index 40a63589b23c67847eade7ad28d6ae306516d3fd..0000000000000000000000000000000000000000
--- a/src/GUI/PaintGUI.java
+++ /dev/null
@@ -1,232 +0,0 @@
-package GUI;
-
-import client.Client;
-
-import javax.swing.*;
-import java.awt.*;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.io.File;
-
-public class PaintGUI extends JPanel {
-
- Client client;
-
- String[] shapes = {"Freehand", "Line", "Circle", "Rectangle", "Oval", "Eraser"};
- String[] colors = {"Aqua", "Black", "Blue", "Fuchsia", "Gray", "Green", "Lime", "Maroon", "Navy", "Olive", "Purple", "Red", "Silver", "Teal", "White", "Yellow"};
- JFrame frame;
- JButton clearBtn, newBtn, openBtn, saveBtn, saveAsBtn, closeBtn;
- JComboBox colorOptions;
- JComboBox shapeOptions;
- DrawingArea drawingArea;
-
-
- JPanel global = new JPanel();
- JFileChooser fileChooser= new JFileChooser();
- JPanel toolbox = new JPanel();
- JPanel fileControl = new JPanel();
-
- /// GUI setup ///
- public PaintGUI(Client client) {
-
- this.client = client;
-
-/// Main drawing area ///
- drawingArea = new DrawingArea(client);
-
-/// Set up main frame and container ///
- global.setLayout(new BorderLayout());
-
-/// Set up elements ///
- shapeOptions = new JComboBox(shapes);
- shapeOptions.addActionListener(actionListener);
- colorOptions = new JComboBox(colors);
- colorOptions.setSelectedItem("Black");
- colorOptions.addActionListener(actionListener);
- clearBtn = new JButton("Clear");
- clearBtn.addActionListener(actionListener);
- newBtn = new JButton("New");
- newBtn.addActionListener(actionListener);
- openBtn = new JButton("Open");
- openBtn.addActionListener(actionListener);
- saveBtn = new JButton("Save");
- saveBtn.addActionListener(actionListener);
- saveAsBtn = new JButton("Save As");
- saveAsBtn.addActionListener(actionListener);
- closeBtn = new JButton("Close");
- closeBtn.addActionListener(actionListener);
-
-/// Toolbox panel ///
- toolbox.add(colorOptions);
- toolbox.add(shapeOptions);
- toolbox.add(clearBtn);
-
-/// File control panel ///
- fileControl.add(newBtn);
- fileControl.add(openBtn);
- fileControl.add(saveBtn);
- fileControl.add(saveAsBtn);
- fileControl.add(closeBtn);
-
-/// Layout ///
- global.add(fileControl, BorderLayout.NORTH);
- global.add(drawingArea);
- global.add(toolbox, BorderLayout.SOUTH);
- }
-
- public JPanel getGlobal() {
- return global;
- }
-
- ActionListener actionListener = new ActionListener() {
-
- public void actionPerformed(ActionEvent e) {
-
-/// Clear button ///
- if (e.getSource() == clearBtn) {
- drawingArea.clear();
-
-/// Create new canvas ///
- } else if (e.getSource() == newBtn) {
- int returnVal = JOptionPane.showConfirmDialog(new JFrame(), "Save your current whiteboard?", "Save or Discard", JOptionPane.YES_NO_CANCEL_OPTION);
- if (returnVal == JOptionPane.YES_OPTION) {
-
- drawingArea.saveFile();
- drawingArea.clear();
-
- } else if (returnVal == JOptionPane.NO_OPTION) {
-
- drawingArea.clear();
-
- }
-
-// Open file (PNG only) ///
- } else if (e.getSource() == openBtn) {
- int returnVal = fileChooser.showOpenDialog(frame);
- if (returnVal == JFileChooser.APPROVE_OPTION) {
- File file = fileChooser.getSelectedFile();
- drawingArea.openFile(file);
- }
-
-/// Save under project directory without filename (PNG file with default filename) ///
- } else if (e.getSource() == saveBtn) {
- drawingArea.saveFile();
-
-/// Save with other filename (PNG only) ///
- } else if (e.getSource() == saveAsBtn) {
- fileChooser = new JFileChooser();
- int returnVal = fileChooser.showSaveDialog(frame);
- if (returnVal == JFileChooser.APPROVE_OPTION) {
- File file = fileChooser.getSelectedFile();
- drawingArea.saveAsFile(file);
- }
-
-/// Close application ///
- } else if (e.getSource() == closeBtn) {
- System.exit(0);
-
-/// Choose drawing color ///
- } else if (e.getSource() == colorOptions) {
-
- String colorChosen = (String) colorOptions.getSelectedItem();
-
- switch (colorChosen){
- case "Aqua":
- drawingArea.setColorAqua();
- break;
- case "Black":
- drawingArea.setColorBlack();
- break;
- case "Blue":
- drawingArea.setColorBlue();
- break;
- case "Fuchsia":
- drawingArea.setColorFuchsia();
- break;
- case "Gray":
- drawingArea.setColorGray();
- break;
- case "Green":
- drawingArea.setColorGreen();
- break;
- case "Lime":
- drawingArea.setColorLime();
- break;
- case "Maroon":
- drawingArea.setColorMaroon();
- break;
- case "Navy":
- drawingArea.setColorNavy();
- break;
- case "Olive":
- drawingArea.setColorOlive();
- break;
- case "Purple":
- drawingArea.setColorPurple();
- break;
- case "Red":
- drawingArea.setColorRed();
- break;
- case "Silver":
- drawingArea.setColorSilver();
- break;
- case "Teal":
- drawingArea.setColorTeal();
- break;
- case "White":
- drawingArea.setColorWhite();
- break;
- case "Yellow":
- drawingArea.setColorYellow();
- break;
- }
-
-/// Choose drawing tool ///
- } else if (e.getSource() == shapeOptions) {
-
- String shapeChosen = (String) shapeOptions.getSelectedItem();
-
- switch (shapeChosen){
- case "Freehand":
- drawingArea.setModeFreehand();
- break;
- case "Line":
- drawingArea.setModeLine();
- break;
- case "Circle":
- drawingArea.setModeCircle();
- break;
- case "Rectangle":
- drawingArea.setModeRectangle();
- break;
- case "Oval":
- drawingArea.setModeOval();
- break;
- case "Eraser":
- drawingArea.setModeErase();
- break;
- }
- }
- }
- };
-
- public DrawingArea getDrawingArea() {
- return drawingArea;
- }
-
-
-
-
- public void showGUI() {
- frame = new JFrame("Shared Whiteboard System");
- JFrame.setDefaultLookAndFeelDecorated(true);
- frame.setContentPane(global);
-
- frame.setSize(800, 600);
- frame.setLocationRelativeTo( null );
- frame.setResizable(false);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- frame.setVisible(true);
- }
-
-}
\ No newline at end of file
diff --git a/src/GUI/StartScreen.form b/src/GUI/StartScreen.form
deleted file mode 100644
index f266275f5779005b91d96dc1a9134323e557dfdb..0000000000000000000000000000000000000000
--- a/src/GUI/StartScreen.form
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="GUI.StartScreen">
- <grid id="27dc6" binding="panel1" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
- <margin top="0" left="0" bottom="0" right="0"/>
- <constraints>
- <xy x="20" y="20" width="833" height="400"/>
- </constraints>
- <properties/>
- <border type="none"/>
- <children>
- <grid id="abaca" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
- <margin top="0" left="0" bottom="0" right="0"/>
- <constraints>
- <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties/>
- <border type="none"/>
- <children>
- <hspacer id="53fe0">
- <constraints>
- <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
- </constraints>
- </hspacer>
- <component id="ebca9" class="javax.swing.JLabel">
- <constraints>
- <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties>
- <text value="Distributed Whiteboard App"/>
- </properties>
- </component>
- <component id="d60e2" class="javax.swing.JTextArea" binding="information">
- <constraints>
- <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="6" anchor="0" fill="3" indent="0" use-parent-layout="false">
- <preferred-size width="150" height="50"/>
- </grid>
- </constraints>
- <properties>
- <editable value="false"/>
- <text value="Welcome, please provide server's IP to connect to and nameto be identified by in the Whiteboard's chat."/>
- </properties>
- </component>
- </children>
- </grid>
- <grid id="790e1" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
- <margin top="0" left="0" bottom="0" right="0"/>
- <constraints>
- <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties/>
- <border type="none"/>
- <children>
- <component id="87b91" class="javax.swing.JLabel">
- <constraints>
- <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties>
- <text value="Your name:"/>
- </properties>
- </component>
- <component id="e39f4" class="javax.swing.JTextField" binding="textField1" default-binding="true">
- <constraints>
- <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
- <preferred-size width="150" height="-1"/>
- </grid>
- </constraints>
- <properties/>
- </component>
- <component id="ea0c1" class="javax.swing.JButton" binding="joinButton">
- <constraints>
- <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties>
- <text value="JOIN WHITEBOARD"/>
- </properties>
- </component>
- </children>
- </grid>
- <grid id="6ef31" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
- <margin top="0" left="0" bottom="0" right="0"/>
- <constraints>
- <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties/>
- <border type="none"/>
- <children>
- <hspacer id="23c9f">
- <constraints>
- <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
- </constraints>
- </hspacer>
- <component id="94078" class="javax.swing.JLabel">
- <constraints>
- <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties>
- <text value="Server IP:"/>
- </properties>
- </component>
- <component id="63209" class="javax.swing.JTextField" binding="textField2">
- <constraints>
- <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
- <preferred-size width="150" height="-1"/>
- </grid>
- </constraints>
- <properties>
- <text value=""/>
- </properties>
- </component>
- </children>
- </grid>
- </children>
- </grid>
-</form>
diff --git a/src/GUI/StartScreen.java b/src/GUI/StartScreen.java
deleted file mode 100644
index 77556623ec82c8efc4ec20a6da9f98566d176490..0000000000000000000000000000000000000000
--- a/src/GUI/StartScreen.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package GUI;
-
-import client.Client;
-
-import javax.swing.*;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-
-public class StartScreen {
-
- private JPanel panel1;
- private JTextArea information;
- private JTextField textField1;
- private JButton joinButton;
- private JTextField textField2;
- JFrame frame;
-
- private Client client;
-
- public StartScreen(Client client)
- {
- this.client = client;
- }
-
-// public static void main(String[] args) {
-// new StartScreen().go();
-// }
-
-
- ActionListener actionListener = new ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- if (e.getSource() == joinButton)
- {
- client.setServerAddress(textField2.getText());
- client.setUsername(textField1.getText());
-
- if( client.connect() )
- {
- frame.setVisible(false);
- frame.dispose();
- //client.doSomething();
- new ChatScreen(client);
- }
- else
- {
- showErrorMessage("Could not connect to server...");
- }
- }
- }
-
- };
-
- private void showErrorMessage(String message)
- {
- JOptionPane.showMessageDialog(null,
- message, "Error", JOptionPane.PLAIN_MESSAGE);
- }
-
- public void go(){
- joinButton.addActionListener(actionListener);
- frame = new JFrame("StartScreen");
- frame.setContentPane(panel1);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- frame.pack();
- frame.setVisible(true);
- }
-
-}
diff --git a/src/GUI/ToolBar.java b/src/GUI/ToolBar.java
deleted file mode 100644
index 04087e80db705c26881b58bcde46bfead77687d7..0000000000000000000000000000000000000000
--- a/src/GUI/ToolBar.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package GUI;
-
-import javax.swing.*;
-import java.awt.*;
-
-public class ToolBar extends JPanel {
- private DrawingArea drawingArea;
-
- public ToolBar() {
-
- }
-}
-
-class Tools extends JPanel {
-
-}
-
-class ColorPallete extends JPanel {
- private Color color;
-
- public ColorPallete() {
- this.color = new Color(0, 0, 0); // Black
- }
-
- public void setColor(Color color) {
- this.color = color;
- }
-
- public void setColorRBG(int r, int b, int g) {
- this.color = new Color(r, b, g);
- }
-
- public Color getColor() {
- return this.color;
- }
-
- public void setColorAqua() {
- this.color = new Color(0,255, 255);
- }
-
- public void setColorBlack() {
- this.color = new Color(0, 0, 0);
- }
-
- public void setColorBlue() {
- this.color = new Color(0, 0, 255);
- }
-
- public void setColorFuchsia() {
- this.color = new Color(255, 0, 255);
- }
-
- public void setColorGray() {
- this.color = new Color(128, 128, 128);
- }
-
- public void setColorGreen() {
- this.color = new Color(0, 128, 0);
- }
-
- public void setColorLime() {
- this.color = new Color(0, 255, 0);
- }
-
- public void setColorMaroon() {
- this.color = new Color(128,0, 0);
- }
-
- public void setColorNavy() {
- this.color = new Color(0, 0, 128);
- }
-
- public void setColorOlive() {
- this.color = new Color(128, 128, 0);
- }
-
- public void setColorPurple() {
- this.color = new Color(128, 0, 128);
- }
-
- public void setColorRed() {
- this.color = new Color(255, 0, 0);
- }
-
- public void setColorSilver() {
- this.color = new Color(192, 192, 192);
- }
-
- public void setColorTeal() {
- this.color = new Color(0, 128, 128);
- }
-
- public void setColorWhite() {
- this.color = new Color(255, 255, 255);
- }
-
- public void setColorYellow() {
- this.color = new Color(255, 255, 0);
- }
-}
\ No newline at end of file
diff --git a/src/LICENSE b/src/LICENSE
deleted file mode 100644
index ba0e33f6a054056eae2fdf79d3c4f4949e618044..0000000000000000000000000000000000000000
--- a/src/LICENSE
+++ /dev/null
@@ -1,339 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- COMP90015-DSAss2-InfinityMonkeys-remaster
- Copyright (C) 2019 Ho Dac Hai
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- {signature of Ty Coon}, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
diff --git a/src/client/ChatUpdate.java b/src/client/ChatUpdate.java
deleted file mode 100644
index 2edc3ccdd3c5a1c5262fdc2107d9f28b74b556ce..0000000000000000000000000000000000000000
--- a/src/client/ChatUpdate.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package client;
-
-import remote.IChatUpdate;
-
-import java.io.Serializable;
-import java.rmi.RemoteException;
-import java.rmi.server.UnicastRemoteObject;
-
-public class ChatUpdate extends UnicastRemoteObject implements IChatUpdate, Serializable
-{
- private Client client;
-
- public ChatUpdate(Client client) throws RemoteException
- {
- super();
- this.client = client;
- }
-
- @Override
- public boolean notifyChat(String fromClient, String message, boolean isPrivate) throws RemoteException
- {
- String outputString;
-
- if( isPrivate )
- {
- outputString = "PRIVATE (from " + fromClient + "): " + message + "\n";
- }
- else
- {
- outputString = fromClient + ": " + message + "\n";
- }
-
- client.getApplicationMain().getChatScreen().getChatDisplayBox().append(outputString);
-
- //client.setReceivedMessage(message);
- //System.out.println(fromClient + ": " + message);
- return true;
- }
-
- @Override
- public boolean notifyUserLogin(String fromClient) throws RemoteException {
- client.getApplicationMain().getChatScreen().getChatDisplayBox().append(fromClient + " has joined the room.\n");
- return true;
- }
-
- @Override
- public boolean notifyUserLogout(String fromClient) throws RemoteException {
- client.getApplicationMain().getChatScreen().getChatDisplayBox().append(fromClient + " has left the room.\n");
- return true;
- }
-
-}
diff --git a/src/client/Client.java b/src/client/Client.java
deleted file mode 100644
index df3c80670c03fd12276ee1503a18a0d7e2a36cf8..0000000000000000000000000000000000000000
--- a/src/client/Client.java
+++ /dev/null
@@ -1,156 +0,0 @@
-package client;
-
-import GUI.ApplicationMain;
-import GUI.ChatScreen;
-import GUI.PaintGUI;
-import GUI.StartScreen;
-import remote.IChatController;
-import remote.IClientController;
-import remote.IDrawingController;
-
-import java.rmi.RemoteException;
-import java.rmi.registry.LocateRegistry;
-import java.rmi.registry.Registry;
-
-public class Client
-{
- private String userName;
- private String serverAddress;
-
- private Registry registryServer;
- private IChatController chatController;
- private IClientController clientController;
-
- private IDrawingController drawingController;
-
- private ClientUpdate clientUpdate;
-
- private ChatUpdate chatUpdate;
- private DrawingUpdate drawingUpdate;
- private StartScreen startScreen;
-
- private ChatScreen chatScreen;
- private PaintGUI paintGUI;
-
- public ApplicationMain getApplicationMain() { return applicationMain; }
-
- private ApplicationMain applicationMain;
-
- public PaintGUI getPaintGUI() { return paintGUI; }
-
-
- public ChatScreen getChatScreen() { return chatScreen; }
-
- public void setConnectedUsers(String[] users)
- {
- this.connectedUsers = users;
- }
-
-
- public IChatController getChatController()
- {
- return chatController;
- }
-
- public IClientController getClientController()
- {
- return clientController;
- }
-
- public IDrawingController getDrawingController() { return drawingController; }
-
- public void setUsername(String userName)
- {
- this.userName = userName;
- }
-
- public String getUserName()
- {
- return this.userName;
- }
-
- public void setServerAddress(String serverAddress)
- {
- this.serverAddress = serverAddress;
- }
-
- public Client(String username) throws RemoteException
- {
- this.userName = username;
- this.clientUpdate = new ClientUpdate(this);
- this.chatUpdate = new ChatUpdate(this);
- this.drawingUpdate = new DrawingUpdate(this);
-// this.startScreen = new StartScreen(this);
-// this.chatScreen = new ChatScreen(this);
-// this.paintGUI = new PaintGUI(this);
- this.applicationMain = new ApplicationMain(this);
-
- }
-
- public static void main(String[] args)
- {
- try
- {
- Client client = new Client(args[0]);
- client.connect();
-// client.getChatScreen().showGUI();
-// client.getPaintGUI().showGUI();
- client.getApplicationMain().createAndShowGUI();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
-// public void doSomething()
-// {
-//// new ChatScreen();
-//
-// try
-// {
-// new ChatScreen(this);
-// System.out.println("Sleeping...");
-// TimeUnit.MINUTES.sleep(5);
-// }
-// catch(Exception e)
-// {
-// e.printStackTrace();
-// }
-// }
-
- public boolean connect()
- {
- try
- {
- registryServer = LocateRegistry.getRegistry(serverAddress);
-
- chatController = (IChatController) registryServer.lookup("ChatController");
- clientController = (IClientController) registryServer.lookup("ClientController");
- drawingController = (IDrawingController) registryServer.lookup("DrawingController");
-
- if (clientController.join(userName, this.chatUpdate, this.clientUpdate, this.drawingUpdate))
- {
- System.out.println("Connected to server");
-
- return true;
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- return false;
- }
-
- public String getReceivedMessage()
- {
- return receivedMessage;
- }
-
- public void setReceivedMessage(String receivedMessage)
- {
- this.receivedMessage = receivedMessage;
- }
-}
\ No newline at end of file
diff --git a/src/client/ClientUpdate.java b/src/client/ClientUpdate.java
deleted file mode 100644
index aefdaf5e3e63106ee06a92b045f89c0f08b5a630..0000000000000000000000000000000000000000
--- a/src/client/ClientUpdate.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package client;
-
-import remote.IClientUpdate;
-
-import javax.swing.*;
-import java.io.Serializable;
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-import java.rmi.server.UnicastRemoteObject;
-
-public class ClientUpdate extends UnicastRemoteObject implements IClientUpdate, Serializable {
-
- private Client client;
-
- public ClientUpdate(Client client) throws RemoteException
- {
- super();
- this.client = client;
- }
-
- @Override
- public boolean notifyClient(String fromClient, String newUsername) throws RemoteException
- {
- client.getApplicationMain().getChatScreen().getSendMessageToComboBox().addItem(newUsername);
-
- return true;
- }
-
- @Override
- public boolean updateUserList(String[] users) throws RemoteException
- {
- //client.setConnectedUsers(users);
-
- JComboBox userBox = client.getApplicationMain().getChatScreen().getSendMessageToComboBox();
-
- userBox.removeAllItems();
-
- userBox.addItem("All");
-
- for( String s : users )
- {
- if( !s.equals(client.getUserName()) )
- {
- userBox.addItem(s);
- }
- }
-
- return true;
- }
-}
diff --git a/src/client/DrawingUpdate.java b/src/client/DrawingUpdate.java
deleted file mode 100644
index 4b41c0285681b1674f9b35cc61336ca6d4451426..0000000000000000000000000000000000000000
--- a/src/client/DrawingUpdate.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package client;
-
-import GUI.DrawingArea;
-import remote.IDrawingUpdate;
-
-import java.awt.*;
-import java.io.Serializable;
-import java.rmi.RemoteException;
-import java.rmi.server.UnicastRemoteObject;
-
-public class DrawingUpdate extends UnicastRemoteObject implements IDrawingUpdate, Serializable {
-
- private Client client;
-
- public DrawingUpdate(Client client) throws RemoteException {
- super();
- this.client = client;
- }
-
- @Override
- public boolean notifyDrawing(String fromClient, Shape drawing) throws RemoteException {
- client.getApplicationMain().getPaintGUI().getDrawingArea().setDrawing(drawing);
- client.getApplicationMain().getPaintGUI().getDrawingArea().repaint();
-// DrawingArea drawingArea = (DrawingArea) client.getChatScreen().getDrawingPanel().getComponent(1);
-// drawingArea.setDrawing(drawing);
-// drawingArea.repaint();
- return false;
- }
-}
diff --git a/src/remote/IChatController.java b/src/remote/IChatController.java
deleted file mode 100644
index 82305870e4b5438637dc6b8759ce3235b6a02dd0..0000000000000000000000000000000000000000
--- a/src/remote/IChatController.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package remote;
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-public interface IChatController extends Remote
-{
- boolean broadcastMessage(String fromClient, String message) throws RemoteException;
- boolean broadcastMessageUserLogin(String fromClient) throws RemoteException;
- boolean broadcastMessageUserLogout(String fromClient) throws RemoteException;
- boolean sendPrivateMessage(String fromClient, String toClient, String message) throws RemoteException;
-}
diff --git a/src/remote/IChatUpdate.java b/src/remote/IChatUpdate.java
deleted file mode 100644
index 0c9b54d9daab6367372e1987f2c988a94bcbde8d..0000000000000000000000000000000000000000
--- a/src/remote/IChatUpdate.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package remote;
-
-import java.io.Serializable;
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-public interface IChatUpdate extends Remote, Serializable
-{
- boolean notifyChat(String fromClient, String message, boolean isPrivate) throws RemoteException;
- boolean notifyUserLogin(String fromClient) throws RemoteException;
- boolean notifyUserLogout(String fromClient) throws RemoteException;
-}
diff --git a/src/remote/IClientController.java b/src/remote/IClientController.java
deleted file mode 100644
index bde0a0f500ed01f94c2485ba8de0bdea378d05d9..0000000000000000000000000000000000000000
--- a/src/remote/IClientController.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package remote;
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-public interface IClientController extends Remote
-{
- boolean join(String username, IChatUpdate clientChat, IClientUpdate clientUpdate, IDrawingUpdate clientDrawing) throws RemoteException;
-
- void quit(String username) throws RemoteException;
-
- boolean assignAdmin(String username) throws RemoteException;
-
- boolean kickUser(String username, String who) throws RemoteException;
-}
diff --git a/src/remote/IClientUpdate.java b/src/remote/IClientUpdate.java
deleted file mode 100644
index c1337f90f560c6b527bd067d7d5d2cf0d85ee234..0000000000000000000000000000000000000000
--- a/src/remote/IClientUpdate.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package remote;
-
-import java.io.Serializable;
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-public interface IClientUpdate extends Remote, Serializable {
-
- boolean notifyClient(String fromClient, String newUsername) throws RemoteException;
-
- boolean updateUserList(String[] users) throws RemoteException;
-}
diff --git a/src/remote/IDrawingController.java b/src/remote/IDrawingController.java
deleted file mode 100644
index 145cc49619dcab3c25de449b706221fff56ecab6..0000000000000000000000000000000000000000
--- a/src/remote/IDrawingController.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package remote;
-
-import java.awt.*;
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-
-/**
- * RMI Remote interface - must be shared between client and server.
- * All methods must throw RemoteException.
- * All parameters and return types must be either primitives or Serializable.
- *
- * Any object that is a remote object must implement this interface.
- * Only those methods specified in a "remote interface" are available remotely.
- */
-public interface IDrawingController extends Remote {
-
- boolean broadcastDrawing(String fromClient, Shape drawing) throws RemoteException;
-
-
-}
diff --git a/src/remote/IDrawingUpdate.java b/src/remote/IDrawingUpdate.java
deleted file mode 100644
index 3df14ff51b7f3bbb41069b15f36ea23627699439..0000000000000000000000000000000000000000
--- a/src/remote/IDrawingUpdate.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package remote;
-
-import java.awt.*;
-import java.io.Serializable;
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-public interface IDrawingUpdate extends Remote, Serializable {
- boolean notifyDrawing(String fromClient, Shape drawing) throws RemoteException;
-}
diff --git a/src/server/ChatController.java b/src/server/ChatController.java
deleted file mode 100644
index 8fbff1e4457c8c633893caad33f1ceeff7b6b49c..0000000000000000000000000000000000000000
--- a/src/server/ChatController.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package server;
-
-import remote.IChatController;
-import remote.IChatUpdate;
-
-import java.io.Serializable;
-import java.rmi.RemoteException;
-import java.rmi.server.UnicastRemoteObject;
-
-public class ChatController extends UnicastRemoteObject implements IChatController, Serializable
-{
- private Server server;
-
- public ChatController(Server server) throws RemoteException
- {
- this.server = server;
- }
-
- @Override
- public boolean broadcastMessage(String fromClient, String message) throws RemoteException
- {
- System.out.print("Broadcasting message to everyone...");
-
- IChatUpdate client;
-
- for( User u : server.users )
- {
- client = u.getIChatUpdate();
- client.notifyChat(fromClient, message, false);
- }
-
- System.out.print("...DONE\n");
-
- return true;
- }
-
- @Override
- public boolean broadcastMessageUserLogin(String fromClient) throws RemoteException {
- System.out.print("Broadcasting message to everyone...");
-
- IChatUpdate client;
-
- for( User u : server.users )
- {
- client = u.getIChatUpdate();
- client.notifyUserLogin(fromClient);
- }
-
- System.out.print("...DONE\n");
- System.out.println(fromClient + " has joined the room.");
-
- return true;
- }
-
- @Override
- public boolean broadcastMessageUserLogout(String fromClient) throws RemoteException {
- System.out.print("Broadcasting message to everyone...");
-
- IChatUpdate client;
-
- for( User u : server.users )
- {
- client = u.getIChatUpdate();
- client.notifyUserLogout(fromClient);
- }
-
- System.out.print("...DONE\n");
- System.out.println(fromClient + " has left the room.");
-
- return true;
- }
-
- @Override
- public boolean sendPrivateMessage(String fromClient, String toClient, String message) throws RemoteException
- {
- int toClientIndex = server.clientController.getUserIndex(toClient);
- int fromClientIndex = server.clientController.getUserIndex(fromClient);
-
- if( toClientIndex >= 0 && fromClientIndex >= 0 )
- {
- server.users.get(toClientIndex).getIChatUpdate().notifyChat(fromClient, message, true);
-
- server.users.get(fromClientIndex).getIChatUpdate().notifyChat(fromClient, message, true);
-
- return true;
- }
-
- return false;
- }
-}
diff --git a/src/server/ClientController.java b/src/server/ClientController.java
deleted file mode 100644
index bcfd261f7da172aca929a6a4f291b39c277fb2b1..0000000000000000000000000000000000000000
--- a/src/server/ClientController.java
+++ /dev/null
@@ -1,122 +0,0 @@
-package server;
-
-import remote.IChatUpdate;
-import remote.IClientController;
-import remote.IClientUpdate;
-import remote.IDrawingUpdate;
-
-import java.io.Serializable;
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-import java.rmi.server.UnicastRemoteObject;
-
-public class ClientController extends UnicastRemoteObject implements IClientController, Serializable
-{
- private Server server;
-
- protected ClientController(Server server) throws RemoteException
- {
- this.server = server;
- }
-
- @Override
- public boolean join(String username, IChatUpdate clientChat, IClientUpdate clientUpdate, IDrawingUpdate clientDrawing) throws RemoteException
- {
- server.chatController.broadcastMessageUserLogin(username);
-
- User newUser = new User(username, clientChat, clientUpdate, clientDrawing);
-
- server.users.add(newUser);
-
- if(server.users.size() == 1)
- {
- server.users.get(0).setAdmin(true);
- }
-
- System.out.println(username + " registered successfully");
-
- broadcastUserList();
-
- return true;
- }
-
- @Override
- public void quit(String username) throws RemoteException
- {
- int userIndex = getUserIndex(username);
-
- if( userIndex >= 0 )
- {
- server.users.remove(userIndex);
-
- server.chatController.broadcastMessageUserLogout(username);
-
- broadcastUserList();
- }
- }
-
- @Override
- public boolean assignAdmin(String username) throws RemoteException
- {
- int adminIndex = getUserIndex(username);
-
- if( adminIndex >= 0 )
- {
- server.users.get(adminIndex).setAdmin(true);
-
- return true;
- }
-
- return false;
- }
-
- @Override
- public boolean kickUser(String username, String who) throws RemoteException
- {
- int userIndex = getUserIndex(who);
-
- int adminIndex = getUserIndex(username);
-
- if ( adminIndex > 0 && userIndex > 0 && server.users.get(adminIndex).isAdmin() )
- {
- server.users.remove(userIndex);
-
- broadcastUserList();
-
- return true;
- }
-
- return false;
- }
-
- public int getUserIndex(String username)
- {
- int index = -1;
-
- for( int i = 0; i < server.users.size(); i++ )
- {
- if( server.users.get(i).getUserName().equals(username) )
- {
- index = i;
- break;
- }
- }
-
- return index;
- }
-
- private void broadcastUserList() throws RemoteException
- {
- String[] connectedUsers = new String[server.users.size()];
-
- for( int i = 0; i<server.users.size(); i++ )
- {
- connectedUsers[i] = server.users.get(i).getUserName();
- }
-
- for( User u : server.users )
- {
- u.getIClientUpdate().updateUserList(connectedUsers);
- }
- }
-}
diff --git a/src/server/DrawingController.java b/src/server/DrawingController.java
deleted file mode 100644
index 1471e8a38a33c3fc1d496f36ffa306ad0f0a1888..0000000000000000000000000000000000000000
--- a/src/server/DrawingController.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package server;
-
-import remote.IDrawingController;
-import remote.IDrawingUpdate;
-
-import java.awt.*;
-import java.rmi.RemoteException;
-import java.rmi.server.UnicastRemoteObject;
-
-public class DrawingController extends UnicastRemoteObject implements IDrawingController {
-
- private Server server;
-
- protected DrawingController(Server server) throws RemoteException {
- this.server = server;
- }
-
- @Override
- public boolean broadcastDrawing(String fromClient, Shape drawing) throws RemoteException {
- System.out.print("Broadcasting drawing to everyone...");
-
- IDrawingUpdate client;
-
- for( User u : server.users )
- {
- client = u.getIDrawingUpdate();
- client.notifyDrawing(fromClient, drawing);
- }
-
- System.out.print("...DONE\n");
-
- return true;
- }
-}
\ No newline at end of file
diff --git a/src/server/Server.java b/src/server/Server.java
deleted file mode 100644
index 65842248bec9de49f36f79a9e29c9e2eface21a3..0000000000000000000000000000000000000000
--- a/src/server/Server.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package server;
-
-import remote.IChatController;
-import remote.IClientController;
-import remote.IDrawingController;
-
-import java.rmi.RemoteException;
-import java.rmi.registry.LocateRegistry;
-import java.rmi.registry.Registry;
-import java.util.ArrayList;
-
-public class Server
-{
- protected ArrayList<User> users;
-
- protected ClientController clientController;
- protected ChatController chatController;
- protected DrawingController drawingController;
-
- public Server() throws RemoteException
- {
- users = new ArrayList<User>();
- clientController = new ClientController(this);
- chatController = new ChatController(this);
- drawingController = new DrawingController(this);
- }
-
- public static void main(String[] args)
- {
- try
- {
- Server server = new Server();
-
- server.run();
- }
- catch( Exception e )
- {
- e.printStackTrace();
- }
- }
-
- public void run() throws RemoteException
- {
-
- LocateRegistry.createRegistry(1099);
- Registry registry = LocateRegistry.getRegistry();
-
- String clientControllerName = "ClientController";
- String chatControllerName = "ChatController";
- String drawingControllerName = "DrawingController";
-
- IClientController clientController = new ClientController(this);
- IChatController chatController = new ChatController(this);
- IDrawingController drawingController = new DrawingController(this);
-
- registry.rebind(clientControllerName, clientController);
- registry.rebind(chatControllerName, chatController);
- registry.rebind(drawingControllerName, drawingController);
-
- System.out.println("Server is ready");
- }
-}
diff --git a/src/server/User.java b/src/server/User.java
deleted file mode 100644
index a79c8c6bb8c7f34404bd940feedbee095f699ad5..0000000000000000000000000000000000000000
--- a/src/server/User.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package server;
-
-import remote.IChatUpdate;
-import remote.IClientUpdate;
-import remote.IDrawingUpdate;
-
-public class User
-{
- private String username;
- private remote.IChatUpdate IChatUpdate;
- private remote.IDrawingUpdate IDrawingUpdate;
- private remote.IClientUpdate IClientUpdate;
- private boolean isAdmin;
- public User(String username, remote.IChatUpdate IChatUpdate, remote.IClientUpdate IClientUpdate, remote.IDrawingUpdate IDrawingUpdate)
-
- public User(String username, IChatUpdate IChatUpdate, IClientUpdate IClientUpdate, IDrawingUpdate IDrawingUpdate)
- {
- this.username = username;
- this.IChatUpdate = IChatUpdate;
- this.IDrawingUpdate = IDrawingUpdate;
- this.IClientUpdate = IClientUpdate;
- this.isAdmin = false;
- }
-
- public String getUserName()
- {
- return this.username;
- }
-
- public void setAdmin(boolean admin)
- {
- isAdmin = admin;
- }
-
- public boolean isAdmin()
- {
- return isAdmin;
- }
-
- public IChatUpdate getIChatUpdate()
- {
- return this.IChatUpdate;
- }
-
- public remote.IClientUpdate getIClientUpdate()
- {
- return this.IClientUpdate;
- }
-
- public remote.IDrawingUpdate getIDrawingUpdate() { return this.IDrawingUpdate; }
-
-}