contactSearchTab
This commit is contained in:
parent
0cd53a8a0a
commit
f65c65863a
@ -28,6 +28,7 @@ import javafx.scene.image.Image;
|
|||||||
import javafx.scene.image.ImageView;
|
import javafx.scene.image.ImageView;
|
||||||
import javafx.scene.input.KeyCode;
|
import javafx.scene.input.KeyCode;
|
||||||
import javafx.scene.input.KeyEvent;
|
import javafx.scene.input.KeyEvent;
|
||||||
|
import javafx.scene.layout.AnchorPane;
|
||||||
import javafx.scene.layout.GridPane;
|
import javafx.scene.layout.GridPane;
|
||||||
import javafx.scene.layout.VBox;
|
import javafx.scene.layout.VBox;
|
||||||
import javafx.scene.paint.Color;
|
import javafx.scene.paint.Color;
|
||||||
@ -129,6 +130,9 @@ public final class ChatScene implements Restorable {
|
|||||||
@FXML
|
@FXML
|
||||||
private TabPane tabPane;
|
private TabPane tabPane;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private Tab contactSearchTab;
|
||||||
|
|
||||||
private LocalDB localDB;
|
private LocalDB localDB;
|
||||||
private Client client;
|
private Client client;
|
||||||
private WriteProxy writeProxy;
|
private WriteProxy writeProxy;
|
||||||
@ -177,14 +181,11 @@ public final class ChatScene implements Restorable {
|
|||||||
clip.setArcWidth(43);
|
clip.setArcWidth(43);
|
||||||
clientProfilePic.setClip(clip);
|
clientProfilePic.setClip(clip);
|
||||||
|
|
||||||
// FXMLLoader loader = new FXMLLoader();
|
try {
|
||||||
//
|
contactSearchTab.setContent(FXMLLoader.load(new File("src/main/resources/fxml/ContactSearchTab.fxml").toURI().toURL()));
|
||||||
// try {
|
} catch (Exception e2) {
|
||||||
// URL url = new File("src/main/resources/fxml/Test.fxml").toURI().toURL();
|
e2.printStackTrace();
|
||||||
// contactOperations.getChildren().add(0, loader.load(url));
|
}
|
||||||
// } catch (Exception e2) {
|
|
||||||
// e2.printStackTrace();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Listen to received messages
|
// Listen to received messages
|
||||||
eventBus.register(MessageCreationEvent.class, e -> {
|
eventBus.register(MessageCreationEvent.class, e -> {
|
||||||
@ -393,6 +394,7 @@ public final class ChatScene implements Restorable {
|
|||||||
private void addContactButtonClicked() {
|
private void addContactButtonClicked() {
|
||||||
// sceneContext.load(SceneContext.SceneInfo.CONTACT_SEARCH_SCENE);
|
// sceneContext.load(SceneContext.SceneInfo.CONTACT_SEARCH_SCENE);
|
||||||
// sceneContext.<ContactSearchScene>getController().initializeData(sceneContext, localDB);
|
// sceneContext.<ContactSearchScene>getController().initializeData(sceneContext, localDB);
|
||||||
|
tabPane.getSelectionModel().select(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
|
@ -134,3 +134,11 @@
|
|||||||
.listElement {
|
.listElement {
|
||||||
-fx-background-color: transparent;
|
-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>
|
</AnchorPane>
|
||||||
</content>
|
</content>
|
||||||
</Tab>
|
</Tab>
|
||||||
<Tab text="Untitled Tab 2">
|
<Tab fx:id="contactSearchTab" text="">
|
||||||
<content>
|
<content>
|
||||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" />
|
|
||||||
</content>
|
</content>
|
||||||
</Tab>
|
</Tab>
|
||||||
</tabs>
|
</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