RFR: 8313424: JavaFX controls in the title bar [v45]

Kevin Rushforth kcr at openjdk.org
Tue Feb 4 13:02:27 UTC 2025


On Tue, 4 Feb 2025 12:12:31 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:

>> modules/javafx.graphics/src/main/java/com/sun/javafx/scene/layout/HeaderButtonBehavior.java line 41:
>> 
>>> 39: import java.util.Optional;
>>> 40: 
>>> 41: public final class HeaderButtonBehavior implements EventHandler<MouseEvent> {
>> 
>> it might be better to call this class other than "behavior", "handler" perhaps?  mouse handler?
>
> It's a bit more than just a generic handler, it basically encapsulates the entire behavior of a window button (including setting its visibility and disabled states).

We generally use "Behavior" in the context of controls. Although not wrong, I also think another name might be better. Maybe "Controller"? Or "Manager"? Or ...

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1605#discussion_r1941120150


More information about the openjfx-dev mailing list