contactSearchTab
This commit is contained in:
parent
1fe83dbcc0
commit
b4397fe2f2
@ -28,6 +28,7 @@ import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.input.KeyCode;
|
||||
import javafx.scene.input.KeyEvent;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.scene.layout.VBox;
|
||||
import javafx.scene.paint.Color;
|
||||
@ -129,6 +130,9 @@ public final class ChatScene implements Restorable {
|
||||
@FXML
|
||||
private TabPane tabPane;
|
||||
|
||||
@FXML
|
||||
private Tab contactSearchTab;
|
||||
|
||||
private LocalDB localDB;
|
||||
private Client client;
|
||||
private WriteProxy writeProxy;
|
||||
@ -177,14 +181,11 @@ public final class ChatScene implements Restorable {
|
||||
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();
|
||||
// }
|
||||
try {
|
||||
contactSearchTab.setContent(FXMLLoader.load(new File("src/main/resources/fxml/ContactSearchTab.fxml").toURI().toURL()));
|
||||
} catch (Exception e2) {
|
||||
e2.printStackTrace();
|
||||
}
|
||||
|
||||
// Listen to received messages
|
||||
eventBus.register(MessageCreationEvent.class, e -> {
|
||||
@ -393,6 +394,7 @@ public final class ChatScene implements Restorable {
|
||||
private void addContactButtonClicked() {
|
||||
// sceneContext.load(SceneContext.SceneInfo.CONTACT_SEARCH_SCENE);
|
||||
// sceneContext.<ContactSearchScene>getController().initializeData(sceneContext, localDB);
|
||||
tabPane.getSelectionModel().select(1);
|
||||
}
|
||||
|
||||
@FXML
|
||||
|
@ -134,3 +134,11 @@
|
||||
.listElement {
|
||||
-fx-background-color: transparent;
|
||||
}
|
||||
|
||||
.tab-pane {
|
||||
-fx-tab-max-height: 0 ;
|
||||
}
|
||||
.tab-pane .tab-header-area {
|
||||
visibility: hidden ;
|
||||
-fx-padding: -20 0 0 0;
|
||||
}
|
||||
|
@ -104,9 +104,8 @@
|
||||
</AnchorPane>
|
||||
</content>
|
||||
</Tab>
|
||||
<Tab text="Untitled Tab 2">
|
||||
<Tab fx:id="contactSearchTab" text="">
|
||||
<content>
|
||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" />
|
||||
</content>
|
||||
</Tab>
|
||||
</tabs>
|
||||
|
11
client/src/main/resources/fxml/ContactSearchTab.fxml
Normal file
11
client/src/main/resources/fxml/ContactSearchTab.fxml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import java.lang.*?>
|
||||
<?import java.util.*?>
|
||||
<?import javafx.scene.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<AnchorPane xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml">
|
||||
<Button text="This is a test!" />
|
||||
</AnchorPane>
|
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.text.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<StackPane prefHeight="200" prefWidth="200" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
|
||||
<children>
|
||||
<Text text="test" />
|
||||
</children>
|
||||
</StackPane>
|
Reference in New Issue
Block a user