Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What type of listener can i use, instead of FocusListener

 
Bharath Raja
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a 3 text boxes (org.eclipse.swt.widgets.Text) in a eclipse view (customized), and I've one action set menu named as "save" which responsible for get hold of the 3 text boxes values in to TableViewer. For this scenario, I've added the focus listener to each text boxes and focus lost event of focus listener. Within the focus lost event I've added the text box values in an array list and when the user clicked the action set menu "save" using that array list I can show the values in a TableViewer.

Now the problem is with my focus listener. Because of I've done my logic within the focus lost event, if the user enter a value in a first text box and directly go to the action set "save" and click it (please note : still the key cursor is in first text box only). Since this now the array list doesn't contain any thing.

My primary requirement is I've to get hold of the value even the user doesn't move to any other text box exclude where his cursor right now. For this can i use any other listeners?

Can we do programmatically push to get lost the focus of text boxes. Any Idea.?
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Inside the actionPerformed for the save menu you can always populate your array list by invoking textField1.getText() etc
 
Bharath Raja
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maneesh Godbole wrote:Inside the actionPerformed for the save menu you can always populate your array list by invoking textField1.getText() etc


sorry maneesh, I don't think we have method as actionPerformed in action set. Let say clear, I'm talking about SWT/JFace in Eclipse Plug-in Development Environment. Anyway, thanks for your concern.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic