feat implement main ui components

This commit is contained in:
Arnaud Vergnet 2020-12-01 10:29:58 +01:00
parent dd38c059a7
commit ae1f609ee3
23 changed files with 581 additions and 165 deletions

View file

@ -1,5 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<writeAnnotations>
<writeAnnotation name="javafx.fxml.FXML" />
</writeAnnotations>
</component>
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" />

View file

@ -1,45 +0,0 @@
package fr.insa.clavardator;
import com.jfoenix.controls.JFXHamburger;
import com.jfoenix.transitions.hamburger.HamburgerBackArrowBasicTransition;
import com.jfoenix.transitions.hamburger.HamburgerSlideCloseTransition;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.ListView;
import java.net.URL;
import java.util.ResourceBundle;
public class ChatController implements Initializable {
@FXML
private ListView<String> messageList;
@FXML
private JFXHamburger hamburger;
private HamburgerBackArrowBasicTransition burgerTask;
@Override
public void initialize(URL url, ResourceBundle rb) {
ObservableList<String> messages = FXCollections.observableArrayList(
"test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test");
messageList.setItems(messages);
messageList.scrollTo(messageList.getItems().size() - 1);
burgerTask = new HamburgerBackArrowBasicTransition(hamburger);
burgerTask.setRate(-1);
}
public void onHamburgerClick() {
burgerTask.setRate(burgerTask.getRate() * -1);
burgerTask.play();
}
public JFXHamburger getHamburger() {
return hamburger;
}
}

View file

@ -1,6 +1,8 @@
package fr.insa.clavardator;
import fr.insa.clavardator.ui.MainController;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
@ -18,15 +20,16 @@ public class MainApp extends Application {
// String javaVersion = System.getProperty("java.version");
// String javafxVersion = System.getProperty("javafx.version");
final MainController main = new MainController();
final Parent content = main.init();
final FXMLLoader mainLoader = new FXMLLoader(getClass().getResource("ui/scene.fxml"));
final MainController main = mainLoader.getController();
final Parent content = mainLoader.load();
Scene scene = new Scene(content);
stage.setScene(scene);
stage.setTitle("Clavardator");
stage.setMinHeight(640);
stage.setMinWidth(640);
stage.setMinWidth(800);
stage.setMaximized(true);
stage.show();
}

View file

@ -1,47 +0,0 @@
package fr.insa.clavardator;
import com.jfoenix.controls.JFXButton;
import com.jfoenix.controls.JFXDrawer;
import com.jfoenix.controls.JFXDrawersStack;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.layout.FlowPane;
import java.io.IOException;
import static javafx.scene.input.MouseEvent.MOUSE_CLICKED;
import static javafx.scene.input.MouseEvent.MOUSE_PRESSED;
public class MainController {
private final JFXDrawer leftDrawer ;
private final JFXDrawersStack drawersStack;
public MainController() {
leftDrawer = new JFXDrawer();
drawersStack = new JFXDrawersStack();
}
public Parent init() throws IOException {
FXMLLoader chatLoader = new FXMLLoader(getClass().getResource("scene.fxml"));
Parent chatContent = chatLoader.load();
ChatController chatController = chatLoader.getController();
FXMLLoader drawerLoader = new FXMLLoader(getClass().getResource("drawer.fxml"));
Parent drawerContent = drawerLoader.load();
leftDrawer.setSidePane(drawerContent);
leftDrawer.setDefaultDrawerSize(300);
leftDrawer.setResizeContent(true);
leftDrawer.setOverLayVisible(false);
leftDrawer.setResizableOnDrag(false);
leftDrawer.setOverLayVisible(false);
drawersStack.setContent(chatContent);
chatController.getHamburger().addEventHandler(MOUSE_CLICKED, e -> drawersStack.toggle(leftDrawer));
return drawersStack;
}
}

View file

@ -0,0 +1,5 @@
package fr.insa.clavardator.ui;
public interface ButtonPressEvent {
public void onPress();
}

View file

@ -0,0 +1,61 @@
package fr.insa.clavardator.ui;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.ListView;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.ResourceBundle;
public class ChatController implements Initializable {
@FXML
private ListView<String> messageList;
private List<ButtonPressEvent> attachmentListeners;
private List<ButtonPressEvent> sendListeners;
private List<ButtonPressEvent> editListeners;
public void addAttachmentListener(ButtonPressEvent listener) {
attachmentListeners.add(listener);
}
public void addSendListener(ButtonPressEvent listener) {
sendListeners.add(listener);
}
public void addEditListener(ButtonPressEvent listener) {
editListeners.add(listener);
}
public void onAttachmentPress() {
attachmentListeners.forEach(ButtonPressEvent::onPress);
}
public void onSendPress() {
sendListeners.forEach(ButtonPressEvent::onPress);
}
public void onEditPress() {
editListeners.forEach(ButtonPressEvent::onPress);
}
@Override
public void initialize(URL url, ResourceBundle rb) {
attachmentListeners = new ArrayList<>();
sendListeners = new ArrayList<>();
editListeners = new ArrayList<>();
ObservableList<String> messages = FXCollections.observableArrayList(
"test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "no", "no", "test", "no", "no", "test", "no", "test");
messageList.setItems(messages);
messageList.scrollTo(messageList.getItems().size() - 1);
messageList.setSelectionModel(new NoSelectionModel());
messageList.setCellFactory(listView -> new MessageListItemCell());
}
}

View file

@ -0,0 +1,31 @@
package fr.insa.clavardator.ui;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import java.net.URL;
import java.util.ResourceBundle;
public class MainController implements Initializable {
@FXML
private UserListController userListController;
@FXML
private ChatController chatController;
@Override
public void initialize(URL url, ResourceBundle rb) {
userListController.addRefreshUserListener(() -> {
System.out.println("refresh event");
});
chatController.addAttachmentListener(() -> {
System.out.println("attach event");
});
chatController.addSendListener(() -> {
System.out.println("send event");
});
chatController.addEditListener(() -> {
System.out.println("edit event");
});
}
}

View file

@ -0,0 +1,33 @@
package fr.insa.clavardator.ui;
import javafx.fxml.FXMLLoader;
import javafx.scene.control.ListCell;
import java.io.IOException;
public class MessageListItemCell extends ListCell<String> {
public MessageListItemCell() {
setStyle("-fx-padding: 0px");
}
@Override
protected void updateItem(String item, boolean empty) {
super.updateItem(item, empty);
if (item != null) {
FXMLLoader cellLoader;
if (item.equals("test")) {
cellLoader = new FXMLLoader(getClass().getResource("messageListItemSelf.fxml"));
} else {
cellLoader = new FXMLLoader(getClass().getResource("messageListItemOther.fxml"));
}
try {
setGraphic(cellLoader.load());
final MessageListItemController userListItemController = cellLoader.getController();
userListItemController.setMessage(item);
} catch (IOException e) {
e.printStackTrace();
}
}
}
}

View file

@ -0,0 +1,23 @@
package fr.insa.clavardator.ui;
import com.jfoenix.controls.JFXButton;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import java.net.URL;
import java.util.ResourceBundle;
public class MessageListItemController implements Initializable {
@FXML
private JFXButton button;
@Override
public void initialize(URL url, ResourceBundle rb) {
}
public void setMessage(String text) {
button.setText(text);
}
}

View file

@ -0,0 +1,82 @@
package fr.insa.clavardator.ui;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.control.MultipleSelectionModel;
public class NoSelectionModel extends MultipleSelectionModel<String> {
@Override
public ObservableList<Integer> getSelectedIndices() {
return FXCollections.emptyObservableList();
}
@Override
public ObservableList<String> getSelectedItems() {
return FXCollections.emptyObservableList();
}
@Override
public void selectIndices(int index, int... indices) {
}
@Override
public void selectAll() {
}
@Override
public void selectFirst() {
}
@Override
public void selectLast() {
}
@Override
public void clearAndSelect(int index) {
}
@Override
public void select(int index) {
}
@Override
public void select(String obj) {
}
@Override
public void clearSelection(int index) {
}
@Override
public void clearSelection() {
}
@Override
public boolean isSelected(int index) {
return false;
}
@Override
public boolean isEmpty() {
return false;
}
@Override
public void selectPrevious() {
}
@Override
public void selectNext() {
}
}

View file

@ -1,23 +1,39 @@
package fr.insa.clavardator;
package fr.insa.clavardator.ui;
import com.jfoenix.controls.JFXListCell;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.ListCell;
import javafx.scene.control.ListView;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.ResourceBundle;
public class DrawerController implements Initializable {
public class UserListController implements Initializable {
@FXML
private ListView<String> userList;
private List<ButtonPressEvent> refreshUserListeners;
public void addRefreshUserListener(ButtonPressEvent listener) {
refreshUserListeners.add(listener);
}
public void onRefreshUserListPress() {
refreshUserListeners.forEach(ButtonPressEvent::onPress);
}
@Override
public void initialize(URL url, ResourceBundle rb) {
refreshUserListeners = new ArrayList<>();
ObservableList<String> activeList = FXCollections.observableArrayList(
"Julia", "Ian", "Sue", "Matthew", "Hannah", "Stephan", "Denise", "Julia", "Ian", "Sue", "Matthew", "Hannah", "Stephan", "Denise", "Julia", "Ian", "Sue", "Matthew", "Hannah", "Stephan", "Denise", "Julia", "Ian", "Sue", "Matthew", "Hannah", "Stephan", "Denise");
userList.setItems(activeList);
userList.setCellFactory(listView -> new UserListItemCell());
}
}

View file

@ -0,0 +1,29 @@
package fr.insa.clavardator.ui;
import com.jfoenix.controls.JFXListCell;
import javafx.fxml.FXMLLoader;
import javafx.scene.control.ListCell;
import java.io.IOException;
public class UserListItemCell extends ListCell<String> {
public UserListItemCell() {
setStyle("-fx-padding: 0px");
}
@Override
protected void updateItem(String item, boolean empty) {
super.updateItem(item, empty);
if (item != null) {
final FXMLLoader cellLoader = new FXMLLoader(getClass().getResource("userListItem.fxml"));
try {
setGraphic(cellLoader.load());
final UserListItemController userListItemController = cellLoader.getController();
userListItemController.setName(item);
} catch (IOException e) {
e.printStackTrace();
}
}
}
}

View file

@ -0,0 +1,23 @@
package fr.insa.clavardator.ui;
import com.jfoenix.controls.JFXButton;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Label;
import java.net.URL;
import java.util.ResourceBundle;
public class UserListItemController implements Initializable {
@FXML
private JFXButton button;
@Override
public void initialize(URL location, ResourceBundle resources) {
}
public void setName(String string) {
button.setText(string);
}
}

View file

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane prefHeight="673.0" prefWidth="392.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.insa.clavardator.DrawerController">
<children>
<VBox prefHeight="673.0" prefWidth="392.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<HBox alignment="CENTER" prefHeight="48.0" prefWidth="200.0" spacing="10.0">
<children>
<Label text="Utilisateurs" />
<JFXButton mnemonicParsing="false" text="Rafraichir" />
</children>
</HBox>
<JFXListView fx:id="userList" prefHeight="533.0" prefWidth="282.0" VBox.vgrow="ALWAYS" />
</children>
</VBox>
</children>
</AnchorPane>

View file

@ -1,42 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane prefHeight="562.0" prefWidth="786.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.insa.clavardator.ChatController">
<children>
<VBox prefHeight="440.0" prefWidth="400.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<FlowPane alignment="CENTER_LEFT" prefHeight="40.0" prefWidth="200.0">
<children>
<JFXHamburger fx:id="hamburger" onMouseClicked="#onHamburgerClick">
<FlowPane.margin>
<Insets left="10.0" right="10.0" />
</FlowPane.margin>
</JFXHamburger>
<Label text="Connecté en tant que : " />
<Label text="&lt;USERNAME&gt;" />
<JFXButton mnemonicParsing="false" text="Changer">
<FlowPane.margin>
<Insets left="10.0" right="10.0" />
</FlowPane.margin>
</JFXButton>
</children>
</FlowPane>
<JFXListView fx:id="messageList" prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS" />
<HBox alignment="CENTER" prefHeight="48.0" prefWidth="200.0" spacing="10.0">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
<children>
<JFXTextField HBox.hgrow="ALWAYS" />
<JFXButton mnemonicParsing="false" text="Joindre" />
<JFXButton layoutX="725.0" layoutY="22.0" mnemonicParsing="false" text="Envoyer" />
</children>
</HBox>
</children>
</VBox>
</children>
</AnchorPane>

View file

@ -1,4 +0,0 @@
.label {
-fx-text-fill: #5c8d7b;
-fx-text-alignment: center;
}

View file

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.*?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.shape.Circle?>
<?import org.kordamp.ikonli.javafx.FontIcon?>
<AnchorPane xmlns="http://javafx.com/javafx/11.0.1"
xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.insa.clavardator.ui.ChatController"
stylesheets="@styles.css" styleClass="container">
<VBox AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<HBox alignment="CENTER_LEFT" prefHeight="64.0" spacing="10">
<padding>
<Insets left="20" right="20"/>
</padding>
<Label text="Connecté en tant que : "/>
<Label text="&lt;USERNAME&gt;"/>
<JFXButton mnemonicParsing="false" onMouseClicked="#onEditPress">
<graphic>
<FontIcon iconLiteral="fas-user-edit" iconSize="24"/>
</graphic>
</JFXButton>
<Pane HBox.hgrow="ALWAYS"/>
<JFXButton mnemonicParsing="false" onMouseClicked="#onEditPress">
<graphic>
<FontIcon iconLiteral="fas-info" iconSize="24"/>
</graphic>
</JFXButton>
</HBox>
<HBox alignment="CENTER_LEFT" spacing="5" prefHeight="45">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/>
</padding>
<Circle radius="7.0" styleClass="active-user-dot"/>
<Label text="USER NAME" styleClass="current-user"/>
</HBox>
<ListView fx:id="messageList" VBox.vgrow="ALWAYS"/>
<HBox alignment="CENTER" spacing="10.0">
<padding>
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0"/>
</padding>
<JFXTextField HBox.hgrow="ALWAYS"/>
<JFXButton mnemonicParsing="false" onMouseClicked="#onAttachmentPress">
<graphic>
<FontIcon iconLiteral="fas-paperclip" iconSize="24"/>
</graphic>
</JFXButton>
<JFXButton mnemonicParsing="false" text="Envoyer" onMouseClicked="#onSendPress">
<graphic>
<FontIcon iconLiteral="fas-paper-plane" iconSize="24"/>
</graphic>
</JFXButton>
</HBox>
</VBox>
</AnchorPane>

View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.*?>
<AnchorPane prefHeight="80.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1"
xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.insa.clavardator.ui.MessageListItemController"
stylesheets="@styles.css" styleClass="inner">
<VBox prefHeight="200.0" prefWidth="600.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<AnchorPane prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS">
<children>
<JFXButton fx:id="button" alignment="CENTER_LEFT" mnemonicParsing="false"
styleClass="message-other" text="Message" textAlignment="CENTER"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="10.0" AnchorPane.rightAnchor="50.0"
AnchorPane.topAnchor="10.0"/>
</children>
</AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0">
<children>
<Label alignment="CENTER_LEFT" prefHeight="35.0" prefWidth="600.0" text="Timestamp" styleClass="timestamp"
AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="10.0" AnchorPane.rightAnchor="10.0"
AnchorPane.topAnchor="0.0"/>
</children>
</AnchorPane>
</children>
</VBox>
</AnchorPane>

View file

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.Font?>
<AnchorPane prefHeight="80.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1"
xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.insa.clavardator.ui.MessageListItemController"
stylesheets="@styles.css" styleClass="inner">
<VBox prefHeight="200.0" prefWidth="600.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<AnchorPane prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS">
<children>
<JFXButton fx:id="button" alignment="CENTER_RIGHT" mnemonicParsing="false"
styleClass="message-self" text="Message" textAlignment="CENTER" textFill="WHITE"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="50.0" AnchorPane.rightAnchor="10.0"
AnchorPane.topAnchor="10.0"/>
</children>
</AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0">
<children>
<Label alignment="CENTER_RIGHT" prefHeight="35.0" prefWidth="600.0" text="Timestamp" styleClass="timestamp"
AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="10.0" AnchorPane.rightAnchor="10.0"
AnchorPane.topAnchor="0.0"/>
</children>
</AnchorPane>
</children>
</VBox>
</AnchorPane>

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.layout.*?>
<!--suppress JavaFxUnresolvedFxIdReference -->
<AnchorPane xmlns="http://javafx.com/javafx/11.0.1"
xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.insa.clavardator.ui.MainController">
<HBox AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<fx:include source="userList.fxml" fx:id="userList"/>
<fx:include source="chat.fxml" fx:id="chat" HBox.hgrow="ALWAYS"/>
</HBox>
</AnchorPane>

View file

@ -0,0 +1,100 @@
.label, .button {
-fx-text-fill: #EAEAEA;
-fx-font-size: 20;
}
.ikonli-font-icon {
-fx-icon-color: #EAEAEA;
}
.container {
-fx-background-color: #33333B;
}
.inner {
-fx-background-color: #36383E;
}
.active-user-dot {
-fx-fill: #32b612;
}
.message-self, .message-other {
-fx-font-size: 18;
}
.message-self {
-fx-background-color: #347dbd;
}
.message-other {
-fx-background-color: #555555;
}
.timestamp {
-fx-text-fill: #c9c9c9;
-fx-font-size: 12;
}
.current-user {
-fx-font-size: 25;
}
.list-view {
-fx-padding: 0;
}
/********************************************************
SCROLLBARS
*********************************************************/
.scroll-bar:horizontal .track,
.scroll-bar:vertical .track{
-fx-background-color : #33333B;
-fx-border-color :transparent;
-fx-background-radius : 0.0em;
-fx-border-radius :2.0em;
}
.scroll-bar:horizontal .increment-button ,
.scroll-bar:horizontal .decrement-button {
-fx-background-color :transparent;
-fx-background-radius : 0.0em;
-fx-padding :0.0 0.0 10.0 0.0;
}
.scroll-bar:vertical .increment-button ,
.scroll-bar:vertical .decrement-button {
-fx-background-color :transparent;
-fx-background-radius : 0.0em;
-fx-padding :0.0 10.0 0.0 0.0;
}
.scroll-bar .increment-arrow,
.scroll-bar .decrement-arrow{
-fx-shape : " ";
-fx-padding :0.15em 0.0;
}
.scroll-bar:vertical .increment-arrow,
.scroll-bar:vertical .decrement-arrow{
-fx-shape : " ";
-fx-padding :0.0 0.15em;
}
.scroll-bar:horizontal .thumb,
.scroll-bar:vertical .thumb {
-fx-background-color :derive(#33333B,50.0%);
-fx-background-insets : 2.0, 0.0, 0.0;
-fx-background-radius : 1.0em;
}
.scroll-bar:horizontal .thumb:hover,
.scroll-bar:vertical .thumb:hover {
-fx-background-color :derive(#33333B,80.0%);
-fx-background-insets : 2.0, 0.0, 0.0;
-fx-background-radius : 1.0em;
}

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.layout.*?>
<?import org.kordamp.ikonli.javafx.FontIcon?>
<AnchorPane xmlns="http://javafx.com/javafx/11.0.1"
xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.insa.clavardator.ui.UserListController"
stylesheets="@styles.css" styleClass="container">
<VBox AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<HBox alignment="CENTER" prefHeight="64.0" spacing="10.0">
<JFXButton mnemonicParsing="false" text="Utilisateurs" onMouseClicked="#onRefreshUserListPress">
<graphic>
<FontIcon iconLiteral="fas-sync-alt" iconSize="24"/>
</graphic>
</JFXButton>
</HBox>
<ListView fx:id="userList" VBox.vgrow="ALWAYS"/>
</VBox>
</AnchorPane>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.shape.Circle?>
<AnchorPane prefHeight="40.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="fr.insa.clavardator.ui.UserListItemController" stylesheets="@styles.css"
styleClass="inner">
<JFXButton fx:id="button" alignment="CENTER_LEFT" AnchorPane.bottomAnchor="0" AnchorPane.leftAnchor="0"
AnchorPane.rightAnchor="0" AnchorPane.topAnchor="0">
<graphic>
<Circle radius="5.0" styleClass="active-user-dot"/>
</graphic>
</JFXButton>
</AnchorPane>