Пример #1
0
  private void initComponents() {
    setId("roomview");
    historyView = new HistoryView();
    membersView = new MembersView();
    chatInputMessage = new MessageView();
    MessageViewActions.subscribe(chatInputMessage, roomName);
    VBox vBox1 = new VBox();
    VBox vBox2 = new VBox();

    vBox1.getChildren().add(historyView);
    vBox2.getChildren().add(membersView);
    vBox1.setVgrow(historyView, Priority.ALWAYS);
    vBox2.setVgrow(membersView, Priority.ALWAYS);

    for (int j = 0; j < 2; j++) {
      GUIUtils.autoSizeGridPaneColumns(this);
    }
    for (int j = 0; j < 2; j++) {
      GUIUtils.autoSizeGridPaneRows(this);
    }

    add(historyView, 0, 0);
    add(membersView, 1, 0);
    add(chatInputMessage, 0, 1, 2, 1);
  }
Пример #2
0
 public RoomView(String roomName) {
   this.roomName = roomName;
   GUIUtils.addCss(this, "fxml/roomview.css");
   initComponents();
   initListeners();
 }
Пример #3
0
 @Override
 public void show() {
   stage.show();
   GUIUtils.centerStage(stage);
 }