• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

se-edu / addressbook-level4 / 4241
94%

Build:
DEFAULT BRANCH: master
Ran 24 Feb 2018 02:00PM UTC
Jobs 1
Files 92
Run time 7s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
4241

Pull #832

travis-ci

web-flow
MainWindow.fxml: update onCloseRequest event to call handleExit()

The MainWindow has no specified event handler when there are external
requests to close the MainWindow, such as the close button or through
the taskbar.

This may cause the app to not close properly since it will not raise an
ExitAppRequestEvent, in turn MainApp#stop() is not called.
MainApp#stop() is the method used to call Platform#exit() and
System#exit(int) which stops our app and closes all remaining open
windows. Thus, if MainApp#stop() is not called, the app may continue to
run even after the MainWindow is closed, causing existing HelpWindows
to remain open even when the user expects the app to stop.

According to the life-cycle section in the documentation on JavaFX
Application[1], the app will only finish and call MainApp#stop() when
the app either calls Platform#exit() or when the last window has been
closed. Thus, should there be any HelpWindows still opened, the app
will continue running, causing those HelpWindows to remain open.

Let's add an event handler for the onCloseRequest event in the root of
MainWindow.fxml. This event will call MainWindow#handleExit() when
raised by an external request to close the app.

MainWindowHandleUnit does not contain a close button, thus we fire a
WindowEvent#WINDOW_CLOSE_REQUEST event which simulates an external
request to close the MainWindow for testing if an ExitAppRequestEvent
was raised.

[1] JavaFx documentation for Application:
https://docs.oracle.com/javafx/2/api/javafx/application/Application.html
Pull Request #832: HelpWindow: help window stays open even after exiting by clicking the close button #826

1463 of 1587 relevant lines covered (92.19%)

0.92 hits per line

Jobs
ID Job ID Ran Files Coverage
1 4241.1 24 Feb 2018 02:00PM UTC 0
92.19
Travis Job 4241.1
Source Files on build 4241
  • Tree
  • List 0
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #4241
  • Pull Request #832
  • PR Base - master (#4236)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc