Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for overriding button texts #7

Closed
io7m opened this issue Apr 19, 2020 · 3 comments
Closed

Allow for overriding button texts #7

io7m opened this issue Apr 19, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@io7m
Copy link
Owner

io7m commented Apr 19, 2020

Allow for specifying custom strings that will be used for buttons.

@io7m io7m added the enhancement New feature or request label Apr 19, 2020
@io7m io7m self-assigned this Apr 19, 2020
@ghost
Copy link

ghost commented Apr 8, 2021

The JavaFX FileChooser offers showSaveDialog and showOpenDialog methods to control, indirectly, the default button names. Configuring the builder could be a bit more flexible, such as:

.setFileAccess( FileAccess.EXPORT )
.setFileAccess( FileAccess.IMPORT )
.setFileAccess( FileAccess.OPEN )
.setFileAccess( FileAccess.SAVE_AS )

The naming borrows from RandomAccessFile.

@ghost
Copy link

ghost commented Apr 8, 2021

Using a ButtonBar would be helpful for setting the order that buttons are displayed. For example, see the following short class that overrides the button order:

https://github.com/DaveJarvis/keenwrite/blob/master/src/main/java/com/keenwrite/service/events/impl/ButtonOrderPane.java

For my app, in all cases, the order is fixed to use Windows ordering because that's what most people expect, despite having defined the order for the big three in a properties file:

dialog.alert.button.order.mac=L_HE+U+FBIX_NCYOA_R
dialog.alert.button.order.linux=L_HE+UNYACBXIO_R
dialog.alert.button.order.windows=L_E+U+FBXI_YNOCAH_R

io7m added a commit that referenced this issue May 1, 2021
This implements two APIs:

  * An API for requiring the confirmation of selections
    of existing files when the chooser is in CREATE
    mode.

  * An API for providing overrides of button strings.

Affects: #17
Affects: #7
@io7m
Copy link
Owner Author

io7m commented May 2, 2021

Completed as of 1c8fcbb.

@io7m io7m closed this as completed May 2, 2021
io7m added a commit that referenced this issue May 18, 2021
Release: com.io7m.jwheatsheaf 3.0.0

A big thanks to @DaveJarvis for suggestions, bug reports, and some
code contributions!

Change: Add the ability to specify custom strings (Ticket: #7)
Change: Add the ability to confirm file selections (Ticket: #17)
Change: Allow for including ".." in directory listings (Ticket: #23)
Change: Improve "select directly" dialog behaviour (Ticket: #29)
Change: Fix the size formatter (Ticket: #30)
Change: Use the default filesystem by default (Ticket: #21)
Change: Add support for glob-based filters (Ticket: #19)
Change: Improve filename field behaviour (Ticket: #28)
Change: Add an optional home directory button (Ticket: #12)
Change: Enable sorting of directory items (Ticket: #22)
Change: Allow for setting a default file filter (Ticket: #9)
Change: Allow the escape key to close file choosers (Ticket: #14)
Change: Allow for specifying an initial filename in choosers (Ticket: #15)
Change: Allow for specifying custom dialog titles (Ticket: #8)
Change: Make the default filters part of the public API (Ticket: #10)
io7m added a commit that referenced this issue May 18, 2021
Release: com.io7m.jwheatsheaf 3.0.0

A big thanks to @DaveJarvis for suggestions, bug reports, and some
code contributions!

Change: Add the ability to specify custom strings (Ticket: #7)
Change: Add the ability to confirm file selections (Ticket: #17)
Change: Allow for including ".." in directory listings (Ticket: #23)
Change: Improve "select directly" dialog behaviour (Ticket: #29)
Change: Fix the size formatter (Ticket: #30)
Change: Use the default filesystem by default (Ticket: #21)
Change: Add support for glob-based filters (Ticket: #19)
Change: Improve filename field behaviour (Ticket: #28)
Change: Add an optional home directory button (Ticket: #12)
Change: Enable sorting of directory items (Ticket: #22)
Change: Allow for setting a default file filter (Ticket: #9)
Change: Allow the escape key to close file choosers (Ticket: #14)
Change: Allow for specifying an initial filename in choosers (Ticket: #15)
Change: Allow for specifying custom dialog titles (Ticket: #8)
Change: Make the default filters part of the public API (Ticket: #10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant