What is an example of the use of Application.UnprocessedKeyHandler in Apache Pivot?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

What is an example of the use of Application.UnprocessedKeyHandler in Apache Pivot?

Erik Innocent
What is an example of the use of `Application.UnprocessedKeyHandler` in Apache Pivot? I've checked Google and the Pivot docs and see no examples, and the Javadoc isn't enlightening. There's a tease of sample code in the mailing list archives at:


But the code attachment is not available. Note that I asked this question yesterday at:


Feel free to answer it there if you want to get the points for it =) Otherwise I'll post the answer there and cite the source here.

Thanks!
--Erik Innocent

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: What is an example of the use of Application.UnprocessedKeyHandler in Apache Pivot?

Roger Whitcomb-2

So, according to the Javadoc for the Application. UnprocessedKeyHandler interface:

 

Optional interface that allows an application to handle unprocessed

key events (keystrokes that are processed when no component has the

input focus).

 

This would be the case (for instance), if you have an empty window, or a form that has all its fields disabled.  The kind of things you would probably want to handle in here would be a keystroke to exit the application, or to invoke Help, or an About box.  Or maybe a “Connect” function – something that the user would want to do when nothing else was available.

 

The code in ApplicationContext that handles key events will drop into looking for an “Application” object that implements this interface when nothing else claims the keystroke.

 

HTH,

~Roger Whitcomb

 

From: Erik Innocent [mailto:[hidden email]]
Sent: Wednesday, July 17, 2013 3:22 PM
To: [hidden email]
Subject: What is an example of the use of Application.UnprocessedKeyHandler in Apache Pivot?

 

What is an example of the use of `Application.UnprocessedKeyHandler` in Apache Pivot? I've checked Google and the Pivot docs and see no examples, and the Javadoc isn't enlightening. There's a tease of sample code in the mailing list archives at:

 

 

But the code attachment is not available. Note that I asked this question yesterday at:

 

 

Feel free to answer it there if you want to get the points for it =) Otherwise I'll post the answer there and cite the source here.

 

Thanks!

--Erik Innocent

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What is an example of the use of Application.UnprocessedKeyHandler in Apache Pivot?

Erik Innocent
Ohhhhh, so I need to add the interface UnprocessedKeyHandler to my class that implements Application, and then of course implement the interface's methods. So simple... I don't know why that didn't click for me from the Javadoc. Your answer -- '“Application” object that implements this interface' -- is what gave me the eureka moment.

Thanks for your help and your prompt reply, I genuinely appreciate it!
--E



On Wed, Jul 17, 2013 at 5:52 PM, Roger L. Whitcomb <[hidden email]> wrote:

So, according to the Javadoc for the Application. UnprocessedKeyHandler interface:

 

Optional interface that allows an application to handle unprocessed

key events (keystrokes that are processed when no component has the

input focus).

 

This would be the case (for instance), if you have an empty window, or a form that has all its fields disabled.  The kind of things you would probably want to handle in here would be a keystroke to exit the application, or to invoke Help, or an About box.  Or maybe a “Connect” function – something that the user would want to do when nothing else was available.

 

The code in ApplicationContext that handles key events will drop into looking for an “Application” object that implements this interface when nothing else claims the keystroke.

 

HTH,

~Roger Whitcomb

 

From: Erik Innocent [mailto:[hidden email]]
Sent: Wednesday, July 17, 2013 3:22 PM
To: [hidden email]
Subject: What is an example of the use of Application.UnprocessedKeyHandler in Apache Pivot?

 

What is an example of the use of `Application.UnprocessedKeyHandler` in Apache Pivot? I've checked Google and the Pivot docs and see no examples, and the Javadoc isn't enlightening. There's a tease of sample code in the mailing list archives at:

 

 

But the code attachment is not available. Note that I asked this question yesterday at:

 

 

Feel free to answer it there if you want to get the points for it =) Otherwise I'll post the answer there and cite the source here.

 

Thanks!

--Erik Innocent

 


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What is an example of the use of Application.UnprocessedKeyHandler in Apache Pivot?

Roger and Beth Whitcomb
Ah. Good. You're very welcome. Thanks for using Pivot.  

~Roger Whitcomb


On Jul 17, 2013, at 5:55 PM, Erik Innocent <[hidden email]> wrote:

Ohhhhh, so I need to add the interface UnprocessedKeyHandler to my class that implements Application, and then of course implement the interface's methods. So simple... I don't know why that didn't click for me from the Javadoc. Your answer -- '“Application” object that implements this interface' -- is what gave me the eureka moment.

Thanks for your help and your prompt reply, I genuinely appreciate it!
--E



On Wed, Jul 17, 2013 at 5:52 PM, Roger L. Whitcomb <[hidden email]> wrote:

So, according to the Javadoc for the Application. UnprocessedKeyHandler interface:

 

Optional interface that allows an application to handle unprocessed

key events (keystrokes that are processed when no component has the

input focus).

 

This would be the case (for instance), if you have an empty window, or a form that has all its fields disabled.  The kind of things you would probably want to handle in here would be a keystroke to exit the application, or to invoke Help, or an About box.  Or maybe a “Connect” function – something that the user would want to do when nothing else was available.

 

The code in ApplicationContext that handles key events will drop into looking for an “Application” object that implements this interface when nothing else claims the keystroke.

 

HTH,

~Roger Whitcomb

 

From: Erik Innocent [mailto:[hidden email]]
Sent: Wednesday, July 17, 2013 3:22 PM
To: [hidden email]
Subject: What is an example of the use of Application.UnprocessedKeyHandler in Apache Pivot?

 

What is an example of the use of `Application.UnprocessedKeyHandler` in Apache Pivot? I've checked Google and the Pivot docs and see no examples, and the Javadoc isn't enlightening. There's a tease of sample code in the mailing list archives at:

 

 

But the code attachment is not available. Note that I asked this question yesterday at:

 

 

Feel free to answer it there if you want to get the points for it =) Otherwise I'll post the answer there and cite the source here.

 

Thanks!

--Erik Innocent

 


Loading...