Implemented TabPane and done preparation for internal file loading
This commit is contained in:
@ -7,6 +7,7 @@ import java.awt.datatransfer.StringSelection;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Files;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
@ -20,6 +21,7 @@ import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.collections.transformation.FilteredList;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.control.Alert.AlertType;
|
||||
import javafx.scene.image.Image;
|
||||
@ -123,6 +125,9 @@ public final class ChatScene implements Restorable {
|
||||
|
||||
@FXML
|
||||
private VBox contactOperations;
|
||||
|
||||
@FXML
|
||||
private TabPane tabPane;
|
||||
|
||||
private LocalDB localDB;
|
||||
private Client client;
|
||||
@ -171,6 +176,15 @@ public final class ChatScene implements Restorable {
|
||||
clip.setArcHeight(43);
|
||||
clip.setArcWidth(43);
|
||||
clientProfilePic.setClip(clip);
|
||||
|
||||
// FXMLLoader loader = new FXMLLoader();
|
||||
//
|
||||
// try {
|
||||
// URL url = new File("src/main/resources/fxml/Test.fxml").toURI().toURL();
|
||||
// contactOperations.getChildren().add(0, loader.load(url));
|
||||
// } catch (Exception e2) {
|
||||
// e2.printStackTrace();
|
||||
// }
|
||||
|
||||
// Listen to received messages
|
||||
eventBus.register(MessageCreationEvent.class, e -> {
|
||||
@ -377,8 +391,8 @@ public final class ChatScene implements Restorable {
|
||||
*/
|
||||
@FXML
|
||||
private void addContactButtonClicked() {
|
||||
sceneContext.load(SceneContext.SceneInfo.CONTACT_SEARCH_SCENE);
|
||||
sceneContext.<ContactSearchScene>getController().initializeData(sceneContext, localDB);
|
||||
// sceneContext.load(SceneContext.SceneInfo.CONTACT_SEARCH_SCENE);
|
||||
// sceneContext.<ContactSearchScene>getController().initializeData(sceneContext, localDB);
|
||||
}
|
||||
|
||||
@FXML
|
||||
|
Reference in New Issue
Block a user