java.lang.Object
com.example.cab302project.MyReportsController
Controller responsible for displaying and managing the user's submitted crime reports.
It loads reports specific to the logged-in user, displays them in both list and table views,
and provides a detailed panel for viewing individual report information. It also integrates
geocoding services to resolve and display readable addresses.
Reports with id == 0 are treated as opened (not yet submitted) and are shown
in a separate Opened Reports section above the main submitted list.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new MyReportsController and initialises the DAO from the main application database instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidInitialises the screen after the FXML has loaded.voidCloses the detail panel by animating it sliding back down off-screen.voidHandles changes from any filter menu option.voidSaves the currently opened (unsubmitted) report to the database.voidNavigates to the report submission view.
-
Constructor Details
-
MyReportsController
public MyReportsController()Constructs a new MyReportsController and initialises the DAO from the main application database instance.
-
-
Method Details
-
initialize
public void initialize()Initialises the screen after the FXML has loaded. Filters all crime records to only those submitted by the current user, populates the list view, sets the report count label, activates the correct nav bar tab, begins background address preloading, and wires up the hamburger menu overlay. -
onFilterChanged
public void onFilterChanged()Handles changes from any filter menu option. -
onCloseDetail
public void onCloseDetail()Closes the detail panel by animating it sliding back down off-screen. Clears both list selections and hides the backdrop once the animation completes. -
onSaveChanges
public void onSaveChanges()Saves the currently opened (unsubmitted) report to the database. Only callable when an opened report (id == 0) is selected. On success the report moves from the Opened Reports section into the submitted list and the detail panel closes. -
onSubmitNewReport
public void onSubmitNewReport()Navigates to the report submission view.
-