RFR: 8268225: Support :focus-visible and :focus-within CSS pseudoclasses
Kevin Rushforth
kcr at openjdk.java.net
Wed Jun 9 13:09:19 UTC 2021
On Wed, 21 Apr 2021 18:17:27 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
> This PR adds the `Node.focusVisible` and `Node.focusWithin` properties, as well as the corresponding `:focus-visible` and `:focus-within` CSS pseudo-classes.
I took an initial pass at the API docs. I have a couple global comments.
First, can you reorder the properties and their associated methods such that they are grouped together? If the docs are on the (private) field, which is what we usually do, it should be followed immediately by the associated setter (if any), getter, and property methods.
The order should be:
/**
* EXISTING API DOCS FOR FOCUSED PROPERTY
*/
private FocusPropertyBase focused;
protected final void setFocused(boolean value) {
public final boolean isFocused() {
public final ReadOnlyBooleanProperty focusedProperty() {
/**
* API DOCS FOR NEW FOCUSVISIBLE PROPERTY
*/
private FocusPropertyBase focusVisible;
public final boolean isFocusVisible() {
public final ReadOnlyBooleanProperty focusVisibleProperty() {
...
Second, the two new properties need both a `@defaultValue` and an `@since NN` tag. You can optimistically use `@since 17` or you can use `@since 18` (the latter is more likely).
modules/javafx.graphics/src/main/java/javafx/scene/Node.java line 8167:
> 8165: /**
> 8166: * Indicates whether this {@code Node} should visibly indicate focus.
> 8167: * This flag is set when a node acquired input focus via keyboard navigation,
`acquired` --> `acquires`
-------------
PR: https://git.openjdk.java.net/jfx/pull/475
More information about the openjfx-dev
mailing list