Watch
2
0
Fork
You've already forked miscue
0
UI error dialogs.
  • Java 96.2%
  • CSS 3.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Mark Raynsford 3356dedbec
Some checks are pending
main-RHEL10-x86_64-jdk25 / Build (push) Waiting to run
main-RHEL10-x86_64-jdk26 / Build (push) Waiting to run
main-RHEL9-x86_64-jdk25 / Build (push) Waiting to run
main-RHEL9-x86_64-jdk26 / Build (push) Waiting to run
Update workflows.
2026-07-31 18:42:58 +01:00
.forgejo Update workflows. 2026-07-31 18:42:58 +01:00
com.io7m.miscue.core Begin next development iteration. 2025-12-30 12:29:18 +00:00
com.io7m.miscue.fx.demo Begin next development iteration. 2025-12-30 12:29:18 +00:00
com.io7m.miscue.fx.seltzer Begin next development iteration. 2025-12-30 12:29:18 +00:00
com.io7m.miscue.fx.taskrecorder Initial version. 2024-08-02 19:35:50 +00:00
com.io7m.miscue.tests Begin next development iteration. 2025-12-30 12:29:18 +00:00
src/site/resources Update site metadata. 2025-08-09 15:08:25 +00:00
.gitignore Initial version. 2024-08-02 19:35:50 +00:00
checkstyle-filter.xml Initial version. 2024-08-02 19:35:50 +00:00
checkstyle-suppressions-1.0.dtd Initial version. 2024-08-02 19:35:50 +00:00
doc7m-books.json Add doc7m-books.json 2026-07-31 18:36:49 +01:00
pom.xml Migrate project. 2026-06-27 10:12:53 +01:00
README-CHANGES.xml Open release. 2025-12-30 12:31:17 +00:00
README-LICENSE.txt Update site metadata. 2025-08-09 15:08:25 +00:00
README.in Migrate project. 2026-06-27 10:12:53 +01:00
README.md Migrate project. 2026-06-27 10:12:53 +01:00

miscue

Maven Central Maven Central (snapshot) Java Version

com.io7m.miscue

miscue

JavaFX component for displaying error dialogs.

Features

Usage

Given a structured error value:

SStructuredErrorType<String> error;

Create a new dialog and display it:

MSErrorDialogs.builder(error)
  .build()
  .showAndWait();

The contents of the dialog depends on the data present in the error value.

If only a message is present, the message will be displayed:

Message Only

If attributes are present, they will be displayed in a table below the message:

Attributes

If an exception is present, it will be displayed:

Exception

If a remediating action is present, it will be displayed:

Remediation

Any combination of the above is possible:

All

Reporting

If a reporting callback is provided to the builder, it will be evaluated when the user clicks the provided Report button. If no callback is provided, the Report button is disabled. The callback should be tied to your application's error reporting functionality.

MSErrorDialogs.builder(error)
  .setErrorReportCallback(() -> {
    LOG.debug("Pretending to send an error report...");
  })
  .build()
  .showAndWait();

CSS

All elements within an error dialog are assigned CSS classes:

CSS

A custom stylesheet can be specified to the dialog builder:

MSErrorDialogs.builder(error)
  .setCSS(URI.create("/path/to/custom.css"))
  .build()
  .showAndWait();

With great power comes great responsibility.

CSS Power

Demo

A demo application is included.