@@ -0,0 +1,1562 @@
+package pro.simpleproject.core.intra;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Aimport javafx.fxml.FXMLLoader;%0Aimport javafx.scene.Node;%0Aimport javafx.scene.control.TreeView;%0Aimport javafx.scene.layout.Pane;%0Aimport javafx.scene.layout.VBox;%0Aimport javafx.scene.text.Text;%0Aimport pro.simpleproject.core.helper.EditorBuilder;%0Aimport pro.simpleproject.core.intra.model.IntraContact;%0A%0Apublic class IntraPaneBuilder %7B%0A%0A%09private static TreeView%3CText%3E view;%0A%09private static Pane connectPane;%0A%09private static Map%3CIntraContact, Node%3E nodes = new HashMap%3C%3E();%0A%0A%09public static TreeView%3CText%3E getContact() %7B%0A%09%09if (view == null) %7B%0A%09%09%09view = IntraContactPaneBuilder.build();%0A%09%09%7D%0A%09%09return view;%0A%09%7D%0A%0A%09public static Pane getConnect() %7B%0A%09%09if (connectPane == null) %7B%0A%09%09%09try %7B%0A%09%09%09%09FXMLLoader f = new FXMLLoader(IntraPaneBuilder.class.getResource(%22intra.fxml%22));%0A%09%09%09%09connectPane = f.load();%0A%09%09%09%7D catch (Exception e) %7B%0A%09%09%09%09e.printStackTrace();%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return connectPane;%0A%09%7D%0A%0A%09public static Node getChat(IntraContact contact) %7B%0A%09%09Node node = nodes.get(contact);%0A%09%09if (node == null) %7B%0A%09%09%09node = buildChat(contact.getAddress());%0A%09%09%09nodes.put(contact, node);%0A%09%09%7D%0A%09%09return node;%0A%09%7D%0A%0A%09private static Pane buildChat(String c) %7B%0A%09%09try %7B%0A%09%09%09FXMLLoader f = new FXMLLoader(IntraPaneBuilder.class.getResource(%22intrachat.fxml%22));%0A%09%09%09VBox vbox = f.load();%0A%09%09%09IntraChatController intraChatController = f.getController();%0A%09%09%09vbox.setUserData(c);%0A%09%09%09EditorBuilder.build(intraChatController.editor);%0A%09%09%09return vbox;%0A%09%09%7D catch (Exception e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%09return null;%0A%09%7D%0A%7D%0A

Create IntraPaneBuilder.java