Package gruppe2.imagingapplication.gui
Class GalleryPageController
- java.lang.Object
-
- gruppe2.imagingapplication.gui.GalleryPageController
-
- All Implemented Interfaces:
javafx.fxml.Initializable
public class GalleryPageController extends java.lang.Object implements javafx.fxml.Initializable
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Export
export
private static java.lang.String
FILE_NOT_FOUND
private javafx.scene.layout.TilePane
galleryImages
(package private) org.slf4j.Logger
logger
private javafx.scene.control.TextField
searchField
-
Constructor Summary
Constructors Constructor Description GalleryPageController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
btnAddImage(javafx.event.ActionEvent event)
This method handles what happens when the add image button is pressed.private void
btnExport(javafx.event.ActionEvent event)
This method handles what happens when the export button is pressed.private void
btnHome(javafx.event.ActionEvent event)
This method handles what happens when the home button is pressed.void
btnSearch(javafx.event.ActionEvent actionEvent)
This button handles what happens when the search button is pressed.void
generateGallery(java.util.Map<java.lang.String,ImageData> imageHashMap)
This method generates a gallery by accessing the paths of the images.void
initialize(java.net.URL url, java.util.ResourceBundle resourceBundle)
The generateGallery method is run when the gallery page is initialized.
-
-
-
Field Detail
-
searchField
private javafx.scene.control.TextField searchField
-
FILE_NOT_FOUND
private static final java.lang.String FILE_NOT_FOUND
- See Also:
- Constant Field Values
-
export
Export export
-
logger
org.slf4j.Logger logger
-
galleryImages
private javafx.scene.layout.TilePane galleryImages
-
-
Method Detail
-
initialize
public void initialize(java.net.URL url, java.util.ResourceBundle resourceBundle)
The generateGallery method is run when the gallery page is initialized.- Specified by:
initialize
in interfacejavafx.fxml.Initializable
-
btnHome
private void btnHome(javafx.event.ActionEvent event)
This method handles what happens when the home button is pressed. The button sets a new scene by using the MetIma_HomePage.fxml file- Parameters:
event
- The event is the event that occurs when the button is pressed
-
btnAddImage
private void btnAddImage(javafx.event.ActionEvent event)
This method handles what happens when the add image button is pressed. The button sets a new scene by using the MetIma_AddImagePage.fxml file.- Parameters:
event
- The event is the event that occurs when the button is pressed
-
btnExport
private void btnExport(javafx.event.ActionEvent event)
This method handles what happens when the export button is pressed. It exports everything that is shown in the gallery to a pdf document.- Parameters:
event
- The event is the event that occurs when the button is pressed
-
btnSearch
public void btnSearch(javafx.event.ActionEvent actionEvent)
This button handles what happens when the search button is pressed. It uses the performSearch method in ContentManager with the searchField text as its input.- Parameters:
actionEvent
- The event is the event that occurs when the button is pressed
-
generateGallery
public void generateGallery(java.util.Map<java.lang.String,ImageData> imageHashMap)
This method generates a gallery by accessing the paths of the images. If an image in clicked by a mouse it will be taken to the view image page.- Parameters:
imageHashMap
- Takes a HashMap with a string as key and ImageData as value as a parameter
-
-