Package NTNU.IDATT1002.controllers
Class DataExchange
java.lang.Object
NTNU.IDATT1002.controllers.DataExchange
public class DataExchange
extends java.lang.Object
Class for storing temporary variables between controllers,
when the scene changes
- Version:
- 1.0 22.03.2020
-
Field Summary
Fields Modifier and Type Field Description javafx.application.HostServiceshostServices -
Constructor Summary
Constructors Constructor Description DataExchange() -
Method Summary
Modifier and Type Method Description voidemptyPageLog()Method that empties the array of visited pages.java.lang.StringgetApiKey()java.lang.LonggetChosenAlbumId()java.lang.LonggetChosenImg()java.lang.StringgetDefaultFont()javax.persistence.EntityManagergetEntityManager()com.google.maps.GeoApiContextgetGeoApiContext()javafx.application.HostServicesgetHostServices()java.lang.StringgetSearchField()java.util.List<java.io.File>getUploadedFiles()voidnewPage(java.lang.String FXML)Method for adding new page to previousFXML list.java.lang.StringpreviousPage()Method for going back.voidsetChosenAlbumId(java.lang.Long chosenAlbumId)voidsetChosenImg(java.lang.Long chosenImg)voidsetHostServices(javafx.application.HostServices hostServices)voidsetSearchField(java.lang.String searchField)voidsetUploadedFiles(java.util.List<java.io.File> uploadedFiles)
-
Field Details
-
hostServices
public javafx.application.HostServices hostServices
-
-
Constructor Details
-
DataExchange
public DataExchange()
-
-
Method Details
-
getEntityManager
public javax.persistence.EntityManager getEntityManager() -
getApiKey
public java.lang.String getApiKey() -
getHostServices
public javafx.application.HostServices getHostServices() -
getGeoApiContext
public com.google.maps.GeoApiContext getGeoApiContext() -
getUploadedFiles
public java.util.List<java.io.File> getUploadedFiles() -
getSearchField
public java.lang.String getSearchField() -
getChosenAlbumId
public java.lang.Long getChosenAlbumId() -
getChosenImg
public java.lang.Long getChosenImg() -
setHostServices
public void setHostServices(javafx.application.HostServices hostServices) -
setUploadedFiles
public void setUploadedFiles(java.util.List<java.io.File> uploadedFiles) -
setSearchField
public void setSearchField(java.lang.String searchField) -
setChosenAlbumId
public void setChosenAlbumId(java.lang.Long chosenAlbumId) -
setChosenImg
public void setChosenImg(java.lang.Long chosenImg) -
getDefaultFont
public java.lang.String getDefaultFont() -
newPage
public void newPage(java.lang.String FXML)Method for adding new page to previousFXML list. Will not add if the last element of the list is the same as the page loaded.- Parameters:
FXML- new fxml page loaded
-
previousPage
public java.lang.String previousPage()Method for going back. Checks if there is a previous page and makes it the current one- Returns:
- previous page if it exists or null if not
-
emptyPageLog
public void emptyPageLog()Method that empties the array of visited pages. This method is called when logout button is pressed.
-