public class SelectionView extends ViewWithMenu
Modifier and Type | Field and Description |
---|---|
private javafx.scene.layout.VBox |
allItemsVBox |
private javafx.scene.control.Button |
createItemButton |
private javafx.scene.text.Text |
errorMessageText |
private javafx.scene.control.TextField |
newItemTextField |
private static java.lang.String |
SELECTION_FXML
The fxml resource for the view
|
private SelectionController |
selectionController |
private javafx.scene.text.Text |
title |
Constructor and Description |
---|
SelectionView(SelectionController controller,
javafx.scene.Scene scene,
java.lang.String title) |
Modifier and Type | Method and Description |
---|---|
private javafx.scene.control.Button |
createDeleteButton(java.lang.String listName,
javafx.scene.layout.HBox hBox)
Creates the delete button for an item
|
private javafx.scene.layout.HBox |
createHBox()
Creates the HBox the name and the delete button of an item.
|
private javafx.scene.text.TextFlow |
createItemName(java.lang.String listName,
javafx.scene.layout.HBox hBox)
Creates the name of an item.
|
private javafx.scene.layout.HBox |
createListItem(java.lang.String listName)
Creates the HBox with the TextView as
well as the delete button inside
|
void |
createNewEntry(java.lang.String listName)
Creates a new HBox with the help of createListItem() on the view and adds
it to the VBox
|
private java.lang.String |
getNewItemName() |
private void |
initialize()
Initializes the Window, disable the create list button while
newGroceryListTextField is empty field.
|
void |
onCreateNewItem() |
void |
setErrorText(java.lang.String message) |
createMenu, disableHelpButton, enableHelpButton, getHeader, onEditProfileClick, onHelpClick, onLogoutClick, onMyGroceryListsClick, onMyRecipesClick, onShowMapClick
showDatabaseConnectionError, showDataBaseInternalError
private static final java.lang.String SELECTION_FXML
private javafx.scene.text.Text title
private javafx.scene.layout.VBox allItemsVBox
private javafx.scene.text.Text errorMessageText
private javafx.scene.control.TextField newItemTextField
private javafx.scene.control.Button createItemButton
private SelectionController selectionController
public SelectionView(SelectionController controller, javafx.scene.Scene scene, java.lang.String title)
private void initialize()
private java.lang.String getNewItemName()
public void setErrorText(java.lang.String message)
public void createNewEntry(java.lang.String listName)
listName
- private javafx.scene.layout.HBox createListItem(java.lang.String listName)
listName
- private javafx.scene.control.Button createDeleteButton(java.lang.String listName, javafx.scene.layout.HBox hBox)
listName
- hBox
- private javafx.scene.text.TextFlow createItemName(java.lang.String listName, javafx.scene.layout.HBox hBox)
listName
- hBox
- private javafx.scene.layout.HBox createHBox()
public void onCreateNewItem()