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

Selection Event #121

Open
DeflatedPickle opened this issue Mar 6, 2020 · 2 comments
Open

Selection Event #121

DeflatedPickle opened this issue Mar 6, 2020 · 2 comments

Comments

@DeflatedPickle
Copy link

The selection event would be a way to cause a widget to be selected without a mouse. The event would be fired when the widget was; clicked, tabbed to or when a select method was called.

@SpinyOwl
Copy link
Owner

Actually there is focus event, fired when component was clicked or tabbed (ctrl+tab/ctrl+shift+tab)
You can also define some method in your component and call Context#setFocusedGui(Component toGainFocus, Context context, Frame frame) to make some component focused and fire focus event. Context and Frame arguments are optional but required for valid focus switch from previous focus owner and to let system know that focused event was changed.
Also you have to keep in mind that Component#setFocused(boolean focused) called by event listeners/handlers so it is not the best option to override it and add event generation here.

@DeflatedPickle
Copy link
Author

DeflatedPickle commented Mar 10, 2020

I'm proposing an event for when a component has no visual way to select it. The selection event could also be called with some select method as well as using a possible visual way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants