Add compatible DataGrid, filter editors, themes and JDBC example
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
# Local DataGrid and request coordination
|
||||
|
||||
`DataGrid<K,T>` composes the existing Table result renderer with paging controls and a toolkit-independent coordinator. All UI methods are called on the JavaFX application thread. The legacy Table FXML/collection path is unchanged.
|
||||
|
||||
```java
|
||||
var source = new MemoryGridSource<Long, Person>(
|
||||
() -> people, Person::getId, Long::compare,
|
||||
List.of(new MemoryColumn<>("name", MemoryColumn.Kind.TEXT,
|
||||
person -> person.getName() == null ? null : new FilterValue.Text(person.getName()))),
|
||||
applicationExecutor, 250);
|
||||
var grid = new DataGrid<Long, Person>(
|
||||
List.of(new ResultColumn("name", "Name", 180, 80, 400, -1)),
|
||||
person -> {
|
||||
Label name = new Label(person.getName());
|
||||
return new ResultRow(new HBox(name), Map.of("name", name), () -> { });
|
||||
}, source);
|
||||
grid.setAllWarningThreshold(1000);
|
||||
// Set optional edit guard / custom confirmation handler before the first request.
|
||||
grid.load();
|
||||
```
|
||||
|
||||
Use `de.neitzel.grid` for shared models/source types and `de.neitzel.fx.view` for DataGrid/result rendering. The application owns the executor and closes the grid when its view is disposed. No query runs in the constructor.
|
||||
|
||||
## Operations
|
||||
|
||||
- First/Previous/Next/Last, page-size selection, Refresh and Retry are supplied. Page sizes offer 25/50/100/250 within source limits plus explicit All when supported. The initial page size is 50, bounded by source limits.
|
||||
- Header clicks alternate ascending/descending sort for that mapped column; `setSort(null)` clears user sorting. Sorting/filter/page-size changes request the first page (All remains All with fresh consent checks).
|
||||
- `setFilters`, `setSort`, `setPageRequest`, `setSource`, `load`, `refresh`, and `retry` delegate to the coordinator; returned rows are never locally filtered again.
|
||||
- `stateProperty` exposes requested versus displayed query, result, phase and error. Loading/failed rows stay visible but disabled; selected loaded data becomes unavailable while those rows are stale. Query/navigation controls remain usable.
|
||||
- `selectedKeyProperty` retains an off-page identity. `selectedElementProperty` exposes only current displayed selected data. A successfully replaced source clears selection. `confirmedDeleted(key)` clears that key and refreshes; absence from a page alone does not imply deletion.
|
||||
- Empty results disable navigation. Unknown totals are displayed as unknown and disable Last. A disappeared page receives one bounded correction; subsequent invalidation becomes an error with Retry.
|
||||
|
||||
## Guards, warnings and supersession
|
||||
|
||||
`setEditGuard(query -> CompletionStage<Boolean>)` lets the application save/discard/block unfinished edits. `setAllConfirmation((query, count) -> CompletionStage<Boolean>)` can replace the default nonblocking Continue/Cancel alert. Neither dialog handling nor guard completion runs inside a source transaction. Superseded answers cannot publish or restart old requests.
|
||||
|
||||
The default All warning is based on the source's count in its execution snapshot, before unpaged rows are returned. Exactly the threshold does not warn. Cancel restores the prior displayed query/page. A subsequent approved attempt takes a fresh source snapshot; approval is not stored in setup data or reused for later query changes. The coordinator requires a source that implements the guarded All overload, not just a flag claiming All support.
|
||||
|
||||
The application must provide a serial owner-thread callback executor when using the neutral coordinator directly. DataGrid always uses Platform.runLater and keeps row publication on the FX thread. Requests triggered by state/selection observers are queued after publication.
|
||||
|
||||
## Lifecycle and remaining slices
|
||||
|
||||
`close` cancels the active request, invalidates pending callbacks/alerts, closes the renderer and releases displayed rows. It does not close application-owned infrastructure. Observe `disposalFailureProperty` for row cleanup failures.
|
||||
|
||||
FXML filter editors and the opt-in popup host are now available; see [filter editors](filter-editors.md), including the recorded native qualification limitation. [JSON setup restore](saved-setups.md) is available through the optional Gson module. [Shared themes and window propagation](themes.md) are available opt-in. The optional [JDBC adapter and H2 example](../../fx-example/docs/product-grid.md) now demonstrate external execution. The default alert is ordinary JavaFX; native interaction/theme qualification remains part of those acceptance gates. Row mappings, programmatic order/width changes and cleanup retain the foundation guide's constraints in [table-results](table-results.md).
|
||||
@@ -0,0 +1,78 @@
|
||||
# Transactional FXML filters
|
||||
|
||||
`DataGrid` filtering is opt-in. Existing `Table` FXML, checklist and comparison behavior is unchanged. The new API uses one immutable condition per column, with AND across columns. Editors create drafts; only the popup host accepts or cancels them. SQL and persistence do not belong in a controller.
|
||||
|
||||
```java
|
||||
grid.configureFilter("name", FilterColumn.text());
|
||||
grid.configureFilter("quantity", FilterColumn.number(
|
||||
Locale.GERMANY, true, BigDecimal.ZERO, BigDecimal.valueOf(Integer.MAX_VALUE)));
|
||||
grid.setFilterPopupOptions(new FilterPopup.Options(FilterPopup.Outside.CANCEL, true, true));
|
||||
```
|
||||
|
||||
Types are in `de.neitzel.fx.grid.filter`; conditions and candidate contracts are in `de.neitzel.grid`. Each configured header gets an accessible vector filter button which does not sort the column. Standalone `TableResults.setFilterActions` delegates the same button to an application-supplied handler.
|
||||
|
||||
## Built-in editor
|
||||
|
||||
`BuiltInFilterEditor.fxml` and its controller implement text, numbers, missing/present and checklist modes. Clear filter removes the condition; an empty checklist instead matches nothing. Switching modes modifies only the current draft. Each opening creates a fresh controller, initialized from the committed condition.
|
||||
|
||||
Text is literal: `%`, `_`, empty equality and intentional spaces are preserved. Other text operations reject empty operands. Case-insensitive matching is the default; construct a `FilterColumn` with `caseSensitive=true` to override it.
|
||||
|
||||
Numeric parsing uses the configured locale and exact `BigDecimal`. Grouping separators are deliberately rejected rather than silently interpreted; use the locale's decimal separator. Integer columns reject fractions and signed-64-bit overflow, and configured minimum/maximum bounds enforce narrower types. NaN, infinity, reversed ranges and out-of-domain values fail with a visible explanation. No rounding occurs.
|
||||
|
||||
## Checklist providers
|
||||
|
||||
The grid default is `DISABLED`. A column can inherit it or select `DISABLED`, `CURRENT_PAGE`, or `SOURCE_WIDE`. The developer chooses the scope; it is not an end-user setting. Enabled columns must have an explicit provider, including when inheriting an enabled grid default.
|
||||
|
||||
```java
|
||||
// Attach explicitly; the source is never implicitly inferred from loaded UI rows.
|
||||
var sourceWide = memorySource.candidateProvider(value -> value == null ? "Missing" : display(value));
|
||||
grid.configureFilter("name", FilterColumn.text()
|
||||
.withChecklist(FilterColumn.Checklist.SOURCE_WIDE, sourceWide));
|
||||
|
||||
// For current-page values, supply typed Candidate entries from the displayed result.
|
||||
var currentPage = FilterCandidates.currentPage(() -> candidatesFromDisplayedPage());
|
||||
grid.configureFilter("name", FilterColumn.text()
|
||||
.withChecklist(FilterColumn.Checklist.CURRENT_PAGE, currentPage));
|
||||
```
|
||||
|
||||
`currentPage` copies supplied entries when the editor opens. `MemoryGridSource.candidateProvider` captures scalar values then evaluates other columns' filters on its executor, excluding the edited column's condition. Provider sessions accept a context, search text and offset/limit. Results carry typed values and independent labels; a null candidate value explicitly means missing. Distinctness never depends on the label.
|
||||
|
||||
Source-wide providers must declare that scope and implement search/batching; unsupported scopes show an explanation and cannot be accepted. Comparison modes remain usable. No fallback to the loaded page occurs. Select all shown and Uncheck shown affect only displayed candidates. Off-page/off-search selections survive searches, batches and failures. Async results after a newer search or disposal are ignored. A failure is displayed with Retry and preserves the draft; it is never treated as an empty successful result.
|
||||
|
||||
## Custom FXML controllers and capabilities
|
||||
|
||||
Implement `FilterEditor`: supply a detached fresh `Parent`, a read-only validation message, `draft()` and `close()`. Load FXML with `FXMLLoader` inside a registration factory; applications can supply their own controller factory/injection. `draft()` returns an immutable `FilterCondition` or null for Clear, and throws an actionable validation exception for invalid input. It must not modify a grid or execute SQL. Release external listeners and pending lookup work in `close()`.
|
||||
|
||||
```java
|
||||
var editors = FilterEditors.builtIns();
|
||||
editors.register(new FilterEditors.Registration(
|
||||
"app.custom", new FilterCapabilities(true, false, Set.of()),
|
||||
Set.of("app.custom"), context -> MyFxmlEditor.load(context)));
|
||||
grid.setFilterEditors(editors);
|
||||
```
|
||||
|
||||
Configure a column with that editor ID. Registration declares emitted condition IDs plus independent local, persistence and adapter capabilities. The popup checks emitted IDs and the active source's execution capability ID; the source then validates the concrete condition. An editor declaration alone never makes a condition executable. Memory columns need a matching custom compiler in `MemoryColumn.customFilters`. External sources override `filterExecutionId()` and `validateFilter()`; the default visibly rejects undeclared support. `DataGrid.setFilters` also validates through the source before changing requested state.
|
||||
|
||||
The built-in registry declares local evaluation and persistence through the optional Gson module; see [saved setups](saved-setups.md). Use `FilterEditors.builtIns(Set.of("jdbc-h2"))` to explicitly declare the qualified H2 adapter in an application; source validation still checks each concrete condition. The no-argument registry retains local-only declarations. See the [H2 demonstration](../../fx-example/docs/product-grid.md). Duplicate editor IDs and missing registrations fail explicitly.
|
||||
|
||||
## Popup completion and disposal
|
||||
|
||||
`FilterPopup` hosts any editor with independent optional OK/Cancel actions and Clear filter. Enter accepts; Escape cancels. Open ComboBox/DatePicker choosers get their own Enter/Escape first. Custom nonstandard nested popups implement `nestedPopupShowing` and `closeNestedPopup`.
|
||||
|
||||
Outside dismissal defaults to Cancel and can be configured to Accept. Invalid or unsupported outside-accept keeps/reopens the draft with an error and preserves the committed condition. Opener re-click uses the same policy. Explicit completion requests focus back to the opener; outside completion leaves focus with the clicked target. Owner hiding or detaching the opener cancels and disposes the session. `close()` is idempotent and always rolls back. Cleanup failures are exposed by `FilterPopup.disposalFailureProperty` after the popup has released its window listeners and content.
|
||||
|
||||
These are the implemented policies. The user waived the remaining native/manual qualification for this popup implementation. Native OS input routing, placement and other-application dismissal remain unverified; handler tests do not establish them. See the workspace implementation ticket and the probe below.
|
||||
|
||||
## Reproducible native qualification
|
||||
|
||||
After running tests including `FilterEditorsTest`, from the repository root:
|
||||
|
||||
```sh
|
||||
python3 fx/scripts/filter-popup-probe.py --manual
|
||||
# Optional automated OS-input attempt; it fails rather than substituting synthetic events:
|
||||
python3 fx/scripts/filter-popup-probe.py
|
||||
```
|
||||
|
||||
The manual probe opens the production popup/editor plus a DatePicker to qualify custom nested controls. Check real typing + Enter (with actions visible and hidden), Escape rollback, ComboBox selection and first-Escape handling, DatePicker selection and first-Escape handling, second Escape, both outside policies, invalid outside-accept, opener re-click, focus return versus outside target focus, owner disposal, repeated reopening, other-application dismissal, and placement near screen edges. Close the window to end the probe. The remaining manual qualification was waived by the user; this launcher remains available for future native evidence.
|
||||
|
||||
CSS hooks: `filter-button`, `filter-icon`, `filter-popup`, `filter-editor`, `filter-actions`, `filter-validation`. The popup includes owner-scene stylesheets at open. [Shared themes](themes.md) propagate live through the owner manager and include resolved popup text-contrast checks.
|
||||
@@ -0,0 +1,50 @@
|
||||
# Saved DataGrid setups
|
||||
|
||||
Saved setups are opt-in and preserve the legacy Table path. The `data-grid` module owns immutable models, definition validation and migrations; `fx` stages layout/result publication; the existing optional `gson` module owns JSON encoding. Applications choose storage and save/load timing. The FX library does not depend on Gson.
|
||||
|
||||
## Configure and save
|
||||
|
||||
```java
|
||||
grid.configureSetups("inventory.products", 1,
|
||||
Map.of("name", "text.v1", "quantity", "int32.v1"), Map.of());
|
||||
|
||||
GridSetupJson json = new GridSetupJson(); // de.neitzel.gson.grid; optional gson module
|
||||
String document = json.encode(grid.snapshotSetup());
|
||||
```
|
||||
|
||||
Use a stable definition ID and stable column type/schema identifiers. Labels and Java Attribute names are not identities. Every column needs a type. The existing two-argument `ColumnState(id,width)` constructor remains available for earlier model callers, but its `unspecified` type must be supplied before saving/restoring against a definition.
|
||||
|
||||
Snapshots include column order, default-versus-explicit widths, one user sort, committed conditions and page size or explicit All mode. They omit current page, selection, row data, credentials, unfinished drafts and All approval. Saving neither commits nor closes a filter editor and does not invoke the edit guard. Pending/failed queries do not become committed saved filters; snapshots use the last successfully displayed query, or the initial configuration before first success.
|
||||
|
||||
The complete JSON string is produced only if every filter can be encoded. No unsupported condition is omitted. Filesystem/database writes and atomic replacement of stored files remain application-owned.
|
||||
|
||||
## Restore
|
||||
|
||||
```java
|
||||
// Configure before load(); constructor issues no query.
|
||||
grid.restoreSetup(() -> json.decode(document));
|
||||
```
|
||||
|
||||
The supplier overload presents decode errors through the same visible coordinator error state. It does not issue a default query. Alternatively pass an already decoded `GridSetup`.
|
||||
|
||||
Restoration validates format/definition versions, column identity/type, order constraints, source page limits and concrete filter support. New columns missing from a compatible document are appended in declaration order with default widths. Removed columns or changed types require migration. Fixed columns cannot move or be displaced by appended columns. Valid explicit widths are clamped to current limits; `restorationAdjustmentsProperty` reports these adjustments after successful publication. Negative, zero and non-finite widths are invalid.
|
||||
|
||||
Only after preparation succeeds does the asynchronous edit guard run. Guard denial retains any open filter draft. Approval cancels that draft and issues one initial query on the first page. The current layout and page remain displayed until both new rows and layout have been prepared successfully. Query or row-construction failure retains the previous committed setup/page and exposes an error. A cancelled draft is not resurrected on failure.
|
||||
|
||||
A newer query or layout operation supersedes a pending restore; late guard/query/confirmation results cannot install it. Selection keys survive restoration according to ordinary paging rules; selection is not read from a document. Filter lookup/editor validation and external-source validation remain independent.
|
||||
|
||||
All restores use the existing count-warning protocol with configurable threshold (default 1000): count first, release the attempt, ask Continue/Cancel, then start a fresh approved attempt. Consent is never saved. Cancel retains the previous setup. A newer request invalidates old consent. A failed restore returns requested settings to the previous committed configuration; retrying the saved candidate requires calling `restoreSetup` again.
|
||||
|
||||
## Explicit migrations
|
||||
|
||||
Supply `Map<Integer, UnaryOperator<GridSetup>>` to `configureSetups`. The key is the old definition version; each migration must return exactly the next version, retain the definition ID and supported format, and explicitly repair removed/renamed IDs, type changes and dependent filters/sorts. Migrations run consecutively until the configured version. Missing migration steps, future versions and output violating current constraints fail without querying. A migration cannot bypass source validation.
|
||||
|
||||
Appending a new column does not itself require a migration when the saved definition version remains compatible; if the developer advances the definition version, an explicit migration is required even if it simply confirms compatible existing state.
|
||||
|
||||
## JSON and custom filters
|
||||
|
||||
`GridSetupJson` format version 1 uses explicit objects and typed scalar values. Exact decimal operands and integer checklist values use strings to avoid conversion through floating point. Missing checklist values remain separate from empty strings. Strict parsing rejects duplicate/unknown properties, trailing input, incorrect scalar types and unsupported versions. No arbitrary Java object deserialization is used.
|
||||
|
||||
Implement and register `GridSetupJson.FilterCodec` for a custom stable filter type ID. Declare the write version, readable versions, explicit JSON payload and decoding logic. The codec must preserve the requested column/type identity. `readableVersions` defaults to the current write version; support older payloads only with explicit decoding/migration logic. Missing codecs and unsupported payload versions fail visibly. Codec registration is independent of editor availability and local/adapter execution; successful decoding does not establish that the active source supports the condition.
|
||||
|
||||
Built-in text, number, missing/present and checklist codecs are supplied. The built-in editor registrations now declare persistence support through this optional module. See the [JDBC demonstration](../../fx-example/docs/product-grid.md) and [shared themes](themes.md) for opt-in integration.
|
||||
@@ -0,0 +1,27 @@
|
||||
# Opt-in queried Table results
|
||||
|
||||
`Table.openResults` is a presentation integration point for the DataGrid coordinator. It does not replace the existing ViewLoader/FXML collection Table. Call it on a fresh Table on the JavaFX application thread; a Table cannot switch between modes or be opened twice.
|
||||
|
||||
```java
|
||||
Table table = new Table();
|
||||
TableResults<Long, Person> renderer = table.openResults(
|
||||
List.of(new ResultColumn("name", "Name", 180, 80, 400, -1)),
|
||||
person -> {
|
||||
Label name = new Label(person.getName());
|
||||
HBox root = new HBox(name);
|
||||
return new ResultRow(root, Map.of("name", name), () -> { });
|
||||
});
|
||||
renderer.show(List.of(new GridRow<>(person.getId(), person)));
|
||||
```
|
||||
|
||||
Factories may supply freshly bound FXML Components as HBox roots. They must map every column ID to a distinct direct-child Region. Any unmapped children are trailing action controls. Supply a disposer to release application bindings/listeners; the renderer removes its own click handler. Never return an existing attached root or reuse a row between results. No Component is rebound to a new model.
|
||||
|
||||
The renderer preserves supplied row order and does no local filtering, sorting, fetching or edit observation. The caller validates query results and handles guard approval before calling `show`. It stages new rows before replacing old ones. If construction or mapping validation fails, staged rows are disposed and the old page remains. Factory code that throws before returning a row owns cleanup of its partial construction.
|
||||
|
||||
`setColumnOrder` validates complete stable-ID membership and fixed positions before updating headers and fields. `setColumnWidth` accepts default/explicit intent; it returns the clamped applied width so the coordinator can report adjustments. Row roots must have zero padding (put padding inside mapped fields). Rows use zero inter-field spacing to align with result headers; action controls keep their intrinsic size. This first integration point supplies programmatic ordering/sizing, not drag UI. Header requests can be delegated through `setOnSortRequest`; the renderer never sorts locally.
|
||||
|
||||
`select(key)` retains an off-page key; the read-only loaded selected element becomes null until that key returns. Row clicks and blank-body clicks update this separate result selection. The old `Table.selectionProperty()` remains the legacy path and is not the result-mode selection API.
|
||||
|
||||
`close()` is idempotent, removes rows/handlers and disposes row resources. Disposal failures do not undo an already published page; observe `disposalFailureProperty()` to surface them. Explicit close is necessary; attaching/removing a Table from a Scene does not infer application ownership.
|
||||
|
||||
This is a rendering foundation, not the complete DataGrid. [Local DataGrid](data-grid.md) now supplies request coordination and local source execution. [FXML popup editors](filter-editors.md), [setup codecs](saved-setups.md), and [themes](themes.md) are implemented. Ordering and sizing use the documented programmatic API; drag reorder/resize is not supplied by this result renderer.
|
||||
@@ -0,0 +1,74 @@
|
||||
# Opt-in shared themes
|
||||
|
||||
`de.neitzel.fx.theme.ThemeManager` is application-owned and uses the JavaFX application thread. Existing applications, including legacy Table users, retain their appearance until they register a scene. The bundled themes are `light`, `dark` and `high-contrast` (dark polarity). They share typography, spacing and dimensions; no filter behavior, query, page setting, selection or explicit column width is changed by a theme switch.
|
||||
|
||||
```java
|
||||
ThemeManager themes = new ThemeManager();
|
||||
ThemeManager.Registration registration = themes.register(scene);
|
||||
themes.failureProperty().addListener((observable, old, failure) -> {
|
||||
if (failure != null) showThemeFailure(failure.message());
|
||||
});
|
||||
themes.selectSaved(applicationPreference); // unavailable preference falls back to light with explanation
|
||||
// Later:
|
||||
themes.select("high-contrast");
|
||||
// At application/view disposal:
|
||||
registration.close();
|
||||
themes.close();
|
||||
```
|
||||
|
||||
Applications persist the theme ID separately from DataGrid setups. OS-following is not enabled. A second high-contrast polarity can be supplied through `addTheme(new Theme(id, stylesheetUrls))`.
|
||||
|
||||
## Windows and lifetime
|
||||
|
||||
Register application scenes explicitly. Owned popups/dialogs inherit the manager when shown; this includes filter editors, ComboBox/DatePicker nested windows, tooltips and DataGrid confirmation alerts. A dialog must have an owner to inherit automatically. `MessagePopup.showNewMessages(model, owner)` supplies an opt-in owned-message path; the original overload remains unchanged.
|
||||
|
||||
Docking floating windows carry an explicit link to the main scene without changing their native ownership or close semantics. `ThemeManager.link(childWindow, ownerScene)` provides the same hook for other library windows. Ordinary owned application stages also inherit. Windows created after selection receive the current theme. Automatically registered scenes release their registration when hidden and are registered again on reopening. Explicit registrations are application-owned and must be closed; the manager closes all remaining registrations and its window listener on disposal.
|
||||
|
||||
Standard JavaFX Dialogs bind their stylesheet list to the owner's list. The manager scopes and validates those scenes but does not mutate the bound target list. Popups have copied stylesheet lists and are updated separately. This distinction is covered by tests that fail on uncaught FX-thread errors.
|
||||
|
||||
Do not use one scene with two theme managers. SubScene and web/HTML content have separate styling domains and are not covered by this scene manager.
|
||||
|
||||
## Cascade and customization
|
||||
|
||||
Managed CSS order is component defaults, shared base/selected palette, then application styles. Application stylesheet ordering is preserved on changes and shutdown. Theme bundle URLs explicitly registered with the manager are reserved as manager-owned; keep application overrides in separate URLs. Filter popups copy application styles without copying a frozen palette.
|
||||
|
||||
JavaFX specificity and scope still apply: parent-level sheets can outrank scene-level sheets, and inline styles outrank ordinary stylesheet rules. A later sheet alone does not guarantee an override. Use matching documented selectors, or an intentional parent/inline override. For example, an application stylesheet appended after registration can set `.neitzel-theme { -nl-focus: #005fcc; }`. Custom palettes/overrides require their own contrast qualification.
|
||||
|
||||
CSS controls colors, fonts, padding, borders, backgrounds, focus/state indicators and icon appearance. APIs control source/filter behavior, dismissal policy, paging, selection and saved/explicit widths. No new styleable Java properties were needed; standard JavaFX CSS properties and looked-up colors express the presentation contract.
|
||||
|
||||
## Palette and public hooks
|
||||
|
||||
All bundled palette colors are opaque. Stable looked-up colors:
|
||||
|
||||
| Token | Meaning |
|
||||
| --- | --- |
|
||||
| `-nl-surface`, `-nl-raised`, `-nl-hover` | Main, raised and hovered surfaces |
|
||||
| `-nl-text`, `-nl-muted` | Normal and readable disabled/secondary text |
|
||||
| `-nl-selection`, `-nl-selection-text` | Selected surface and its text |
|
||||
| `-nl-focus`, `-nl-border` | Focus and control boundaries |
|
||||
| `-nl-error`, `-nl-warning` | Error and warning text/indicators |
|
||||
|
||||
The manager adds `neitzel-theme` only to registered roots. Public library hooks include:
|
||||
|
||||
- `data-grid`, `data-grid-status`, `data-grid-paging`; DataGrid publishes `:loading` and `:error`.
|
||||
- `result-row` and `:selected`; the previous `selected` style class remains supported. Stale/disabled selected rows retain readable text.
|
||||
- `filter-button`, `filter-icon`, `filter-popup`, `filter-editor`, `filter-actions`, `filter-validation`; active buttons expose `:filtered`, a dot, a dashed boundary and an accessible active description.
|
||||
- Legacy `table`, `column-header-row`, `column-cell`, `column-header`, `column-opener.filtered`, `column-popup`, `table-scroll`; behavior is unchanged.
|
||||
- Existing docking hooks, including `dock-divider`, `dock-area-divider`, `dock-drop-indicator` and `dock-floating-preview-frame`.
|
||||
- `theme-error` and `theme-warning` for application messages. Supply explanatory text/symbols, not color alone. Applications can use `:invalid` on input controls alongside an explanation.
|
||||
|
||||
Standard-control coverage includes buttons/toggles, text inputs, checkboxes/radio buttons, combo/date controls, TableView/ListView/TreeView selection, menu/dialog/tooltip surfaces and progress indicators. Internal skin selectors used by the shipped sheets follow the pinned JavaFX baseline; applications should prefer the palette/public hooks rather than duplicating skin structure.
|
||||
|
||||
## Failure handling
|
||||
|
||||
A missing theme or unreadable stylesheet leaves the previous selection and managed sheets intact and sets `failureProperty`. `selectSaved` explicitly falls back to light and retains an explanation. `select` returns success/failure; failures are not silently ignored by the gallery.
|
||||
|
||||
An optional `setInstallationCheck(scene -> ...)` can perform application-specific post-CSS validation. Throwing rolls back managed sheets across registered scenes. Checks should be read-only and must not create/dispose windows or reenter the manager. JavaFX does not surface every CSS warning as an exception; the manager does not claim transactional detection/recovery for every parser diagnostic or visual defect.
|
||||
|
||||
## Qualification
|
||||
|
||||
The shared gallery tests measure resolved control foreground/background combinations after CSS application, including normal, hover, focus, disabled, invalid, selected TableView/DataGrid, selected disabled rows, errors/warnings, filter icons, checkbox boundaries, popup drafts, dialogs and floating windows. Light/dark normal text targets 4.5:1, high-contrast text 7:1, meaningful boundaries/icons/focus 3:1. These are desktop design targets, not a claim of full WCAG or accessibility conformance.
|
||||
|
||||
See the [runnable gallery](../../fx-example/docs/theme-gallery.md) for screenshots, measurements and scope. Focus/hover specimens deliberately expose CSS states; they are not evidence of native keyboard routing. The user's earlier popup-native-test waiver remains separate from theme-state rendering qualification.
|
||||
|
||||
DNSCheck owns file/live/removal palette entries and row/legend semantics. This library does not introduce DNS domain colors. Actual DNSCheck integration/selection combinations remain the dedicated downstream ticket; the gallery's FILE/LIVE/REMOVE text demonstrates non-color indicators only.
|
||||
Reference in New Issue
Block a user