Added Tabs Constant
This commit is contained in:
parent
6c32cf650e
commit
74025c6111
@ -45,6 +45,7 @@ import envoy.client.net.WriteProxy;
|
||||
import envoy.client.ui.*;
|
||||
import envoy.client.ui.listcell.*;
|
||||
import envoy.client.util.ReflectionUtil;
|
||||
import envoy.constant.Tabs;
|
||||
import envoy.data.*;
|
||||
import envoy.data.Attachment.AttachmentType;
|
||||
import envoy.event.*;
|
||||
@ -193,7 +194,7 @@ public final class ChatScene implements Restorable {
|
||||
});
|
||||
|
||||
//Listen to backEvents
|
||||
eventBus.register(BackEvent.class, e -> tabPane.getSelectionModel().select(0));
|
||||
eventBus.register(BackEvent.class, e -> tabPane.getSelectionModel().select(Tabs.CONTANCT_LIST));
|
||||
|
||||
// Listen to received messages
|
||||
eventBus.register(MessageCreationEvent.class, e -> {
|
||||
@ -416,13 +417,13 @@ public final class ChatScene implements Restorable {
|
||||
*/
|
||||
@FXML
|
||||
private void addContactButtonClicked() {
|
||||
tabPane.getSelectionModel().select(1);
|
||||
tabPane.getSelectionModel().select(Tabs.CONTACT_SEARCH);
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void groupCreationButtonClicked() {
|
||||
eventBus.dispatch(new LoadGroupCreationEvent(localDB));
|
||||
tabPane.getSelectionModel().select(2);
|
||||
tabPane.getSelectionModel().select(Tabs.GROUP_CREATION);
|
||||
}
|
||||
|
||||
@FXML
|
||||
|
17
client/src/main/java/envoy/constant/Tabs.java
Normal file
17
client/src/main/java/envoy/constant/Tabs.java
Normal file
@ -0,0 +1,17 @@
|
||||
package envoy.constant;
|
||||
|
||||
/**
|
||||
* Project: <strong>client</strong><br>
|
||||
* File: <strong>Tabs.java</strong><br>
|
||||
* Created: <strong>Aug 30, 2020</strong><br>
|
||||
*
|
||||
* @author Maximilian Käfer
|
||||
* @since Envoy Client v0.2-beta
|
||||
*/
|
||||
public class Tabs {
|
||||
private Tabs() {}
|
||||
|
||||
public static int CONTANCT_LIST = 0;
|
||||
public static int CONTACT_SEARCH = 1;
|
||||
public static int GROUP_CREATION = 2;
|
||||
}
|
Reference in New Issue
Block a user