implemented basic architecture
This commit is contained in:
@ -0,0 +1,21 @@
|
||||
package envoy.client.ui.control;
|
||||
|
||||
import javafx.scene.control.Label;
|
||||
|
||||
import envoy.data.User;
|
||||
|
||||
/**
|
||||
* @author Maximilian Käfer
|
||||
* @since Envoy Client v0.3-beta
|
||||
*/
|
||||
public class QuickSelectControl extends Label {
|
||||
|
||||
public QuickSelectControl(User user) {
|
||||
setPrefSize(35, 35);
|
||||
setMaxSize(35, 35);
|
||||
setMinSize(35, 35);
|
||||
setText(user.getName());
|
||||
getStyleClass().add("quick-select");
|
||||
}
|
||||
|
||||
}
|
@ -11,7 +11,7 @@ import javafx.scene.layout.HBox;
|
||||
|
||||
import envoy.client.data.*;
|
||||
import envoy.client.event.BackEvent;
|
||||
import envoy.client.ui.control.ContactControl;
|
||||
import envoy.client.ui.control.*;
|
||||
import envoy.client.ui.listcell.ListCellFactory;
|
||||
import envoy.data.*;
|
||||
import envoy.event.GroupCreation;
|
||||
@ -58,6 +58,9 @@ public class GroupCreationTab implements EventListener {
|
||||
@FXML
|
||||
private HBox errorProceedBox;
|
||||
|
||||
@FXML
|
||||
private ListView<QuickSelectControl> quickSelectList;
|
||||
|
||||
private String name;
|
||||
|
||||
private final LocalDB localDB = Context.getInstance().getLocalDB();
|
||||
@ -86,7 +89,10 @@ public class GroupCreationTab implements EventListener {
|
||||
* @since Envoy Client v0.1-beta
|
||||
*/
|
||||
@FXML
|
||||
private void userListClicked() { createButton.setDisable(userList.getSelectionModel().isEmpty() || groupNameField.getText().isBlank()); }
|
||||
private void userListClicked() {
|
||||
createButton.setDisable(userList.getSelectionModel().isEmpty() || groupNameField.getText().isBlank());
|
||||
quickSelectList.getItems().add(new QuickSelectControl(userList.getSelectionModel().getSelectedItem()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks, whether the {@code createButton} can be enabled because text is
|
||||
|
Reference in New Issue
Block a user