Canvas and Keyboard events

2016-02-29 Thread Bryan Buchanan
I have this layout: BorderPane with a MenuBar (top) and TabPane (center) I have two initial tabs. Selecting some menu option will create a new tab. One of the menu options creates a drawing surface, which is made up of a StackPane with a Canvas. The canvas has FocusTraversable set to true and has

Re: Keyboard events

2013-10-10 Thread Artem Ananiev
ser that the chart is ready for a panning action. The problem is that for this to be possible I want the chart to be able to listen to keyboard events even when it doesn't have focu

Re: Keyboard events

2013-10-09 Thread Pedro Duque Vieira
ponent the >> cursor must change to an open hand cursor signaling to >> the user that the >> chart is ready for a panning action. >> The problem is that for this to be possible I want the >> ch

Re: Keyboard events

2013-10-09 Thread Artem Ananiev
rsor must change to an open hand cursor signaling to the user that the chart is ready for a panning action. The problem is that for this to be possible I want the chart to be able to listen to keyboard events even when

Re: Keyboard events

2013-10-08 Thread Pedro Duque Vieira
ust change to an open hand cursor signaling to the user that the >>>> chart is ready for a panning action. >>>> The problem is that for this to be possible I want the chart to be able >>>> to >>>> listen to keyboard events even when it doesn't

Re: Keyboard events

2013-10-07 Thread Artem Ananiev
chart is ready for a panning action. The problem is that for this to be possible I want the chart to be able to listen to keyboard events even when it doesn't have focus. I think this is not possible and I wonder why. Swing was the same, you could only listen to keyboard events if the contro

Re: Keyboard events

2013-10-07 Thread Artem Ananiev
have to be focused in order for it to receive keyboard events, right? For standalone FX apps (no Swing), it's required and enough to have FX scene focused. With Swing involved, things get more complicated. FX scene is considered to have focus, if the corresponding JFXPanel is focused (as a

Re: Keyboard events

2013-10-07 Thread Richard Bair
at for this to be possible I want the chart to be able to >> listen to keyboard events even when it doesn't have focus. >> >> I think this is not possible and I wonder why. Swing was the same, you >> could only listen to keyboard events if the control had focus. Is this a >

Re: Keyboard events

2013-10-07 Thread Pedro Duque Vieira
Hi Artem, Richard, Thanks for your feedback! There's one more thing which further complicates things and that I've forgot to mention. The chart is embedded in a swing app, so doing as Artem suggests will not work: the scene will have to be focused in order for it to receive keyboard eve

Re: Keyboard events

2013-10-07 Thread Artem Ananiev
this to be possible I want the chart to be able to listen to keyboard events even when it doesn't have focus. I think this is not possible and I wonder why. Swing was the same, you could only listen to keyboard events if the control had focus. Is this a technical limitation? If there is no tech

Re: Keyboard events

2013-10-06 Thread Tom Eugelink
to keyboard events even when it doesn't have focus. I think this is not possible and I wonder why. Swing was the same, you could only listen to keyboard events if the control had focus. Is this a technical limitation? If there is no technical limitation I think it would be better to remove

Keyboard events

2013-10-06 Thread Pedro Duque Vieira
listen to keyboard events even when it doesn't have focus. I think this is not possible and I wonder why. Swing was the same, you could only listen to keyboard events if the control had focus. Is this a technical limitation? If there is no technical limitation I think it would be better to r