{"id":22305017,"url":"https://github.com/dtonhofer/javafx_button_exercise","last_synced_at":"2026-05-17T09:50:37.985Z","repository":{"id":265635669,"uuid":"869351643","full_name":"dtonhofer/javafx_button_exercise","owner":"dtonhofer","description":"A simple exercise in trying to understand the events generated by a JavaFX button","archived":false,"fork":false,"pushed_at":"2024-10-10T16:26:26.000Z","size":450,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-28T16:36:30.943Z","etag":null,"topics":["educational","example-code","javafx","javafx-maven-plugin"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dtonhofer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-08T06:42:47.000Z","updated_at":"2024-10-10T16:26:30.000Z","dependencies_parsed_at":"2024-11-30T15:51:37.119Z","dependency_job_id":null,"html_url":"https://github.com/dtonhofer/javafx_button_exercise","commit_stats":null,"previous_names":["dtonhofer/javafx_button_exercise"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dtonhofer/javafx_button_exercise","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtonhofer%2Fjavafx_button_exercise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtonhofer%2Fjavafx_button_exercise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtonhofer%2Fjavafx_button_exercise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtonhofer%2Fjavafx_button_exercise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dtonhofer","download_url":"https://codeload.github.com/dtonhofer/javafx_button_exercise/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtonhofer%2Fjavafx_button_exercise/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270147968,"owners_count":24535690,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["educational","example-code","javafx","javafx-maven-plugin"],"created_at":"2024-12-03T19:09:23.327Z","updated_at":"2025-10-12T19:34:20.836Z","avatar_url":"https://github.com/dtonhofer.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# javafx_button_exercise\n\nA simple exercise in trying to understand the sequence of events generated by a JavaFX button.\n\nI posted the question\n\n[JavaFX events sent to a button control: why two MOUSE_ENTERED / MOUSE_EXITED events?](https://stackoverflow.com/questions/79059318/javafx-events-sent-to-a-button-control-why-two-mouse-entered-mouse-exited-eve/)\n\nto Stack Overflow, and after clarification, we get the code and diagrams in this project.\n\nThe program creates a [Button Control](https://openjfx.io/javadoc/23/javafx.controls/javafx/scene/control/Button.html) which you can prod. \n\n![Button Control statechart](doc/button.png)\n\nInformation about events generated by the Button Control (aka. \"received at the Button Control's event handlers) is then printed out.\n\nSee the [`MouseEvent` JavaDoc](https://openjfx.io/javadoc/23/javafx.graphics/javafx/scene/input/MouseEvent.html) for a description of events.\n\nAfter testing a bit, we obtain the following (not quite formally correct) [statechart](https://en.wikipedia.org/wiki/UML_state_machine)\nthat describes what events are generated. The statechart is large-ish because the sequence of event generated depends on where exactly\nthe mouse button was pressed - outside the Button Control, inside the Button Control or inside the Button Control's label. \n(But there may well be a simpler statechart.)\n\n![Button Control statechart](doc/Button%20state%20machine.png)\n\nThe above has been edited in yEd, which has no notion about statechart semantics. The result is a [graphml file](doc/Button%20state%20machine.graphml).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdtonhofer%2Fjavafx_button_exercise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdtonhofer%2Fjavafx_button_exercise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdtonhofer%2Fjavafx_button_exercise/lists"}